commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ProtectConfigurationInformation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoicev2-jvm Show documentation
Show all versions of pinpointsmsvoicev2-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice V2
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pinpointsmsvoicev2.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Provides information on the specified protect configuration.
*/
public class ProtectConfigurationInformation private constructor(builder: Builder) {
/**
* This is true if the protect configuration is set as your account default protect configuration.
*/
public val accountDefault: kotlin.Boolean = builder.accountDefault
/**
* The time when the protect configuration was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val createdTimestamp: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdTimestamp) { "A non-null value must be provided for createdTimestamp" }
/**
* The status of deletion protection for the protect configuration. When set to true deletion protection is enabled. By default this is set to false.
*/
public val deletionProtectionEnabled: kotlin.Boolean = builder.deletionProtectionEnabled
/**
* The Amazon Resource Name (ARN) of the protect configuration.
*/
public val protectConfigurationArn: kotlin.String = requireNotNull(builder.protectConfigurationArn) { "A non-null value must be provided for protectConfigurationArn" }
/**
* The unique identifier for the protect configuration.
*/
public val protectConfigurationId: kotlin.String = requireNotNull(builder.protectConfigurationId) { "A non-null value must be provided for protectConfigurationId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ProtectConfigurationInformation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ProtectConfigurationInformation(")
append("accountDefault=$accountDefault,")
append("createdTimestamp=$createdTimestamp,")
append("deletionProtectionEnabled=$deletionProtectionEnabled,")
append("protectConfigurationArn=$protectConfigurationArn,")
append("protectConfigurationId=$protectConfigurationId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accountDefault.hashCode()
result = 31 * result + (createdTimestamp.hashCode())
result = 31 * result + (deletionProtectionEnabled.hashCode())
result = 31 * result + (protectConfigurationArn.hashCode())
result = 31 * result + (protectConfigurationId.hashCode())
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as ProtectConfigurationInformation
if (accountDefault != other.accountDefault) return false
if (createdTimestamp != other.createdTimestamp) return false
if (deletionProtectionEnabled != other.deletionProtectionEnabled) return false
if (protectConfigurationArn != other.protectConfigurationArn) return false
if (protectConfigurationId != other.protectConfigurationId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ProtectConfigurationInformation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* This is true if the protect configuration is set as your account default protect configuration.
*/
public var accountDefault: kotlin.Boolean = false
/**
* The time when the protect configuration was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The status of deletion protection for the protect configuration. When set to true deletion protection is enabled. By default this is set to false.
*/
public var deletionProtectionEnabled: kotlin.Boolean = false
/**
* The Amazon Resource Name (ARN) of the protect configuration.
*/
public var protectConfigurationArn: kotlin.String? = null
/**
* The unique identifier for the protect configuration.
*/
public var protectConfigurationId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ProtectConfigurationInformation) : this() {
this.accountDefault = x.accountDefault
this.createdTimestamp = x.createdTimestamp
this.deletionProtectionEnabled = x.deletionProtectionEnabled
this.protectConfigurationArn = x.protectConfigurationArn
this.protectConfigurationId = x.protectConfigurationId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ProtectConfigurationInformation = ProtectConfigurationInformation(this)
internal fun correctErrors(): Builder {
if (createdTimestamp == null) createdTimestamp = Instant.fromEpochSeconds(0)
if (protectConfigurationArn == null) protectConfigurationArn = ""
if (protectConfigurationId == null) protectConfigurationId = ""
return this
}
}
}