commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateProtectConfigurationResponse.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
public class CreateProtectConfigurationResponse 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" }
/**
* 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" }
/**
* An array of key and value pair tags that are associated with the resource.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateProtectConfigurationResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateProtectConfigurationResponse(")
append("accountDefault=$accountDefault,")
append("createdTimestamp=$createdTimestamp,")
append("deletionProtectionEnabled=$deletionProtectionEnabled,")
append("protectConfigurationArn=$protectConfigurationArn,")
append("protectConfigurationId=$protectConfigurationId,")
append("tags=$tags")
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())
result = 31 * result + (tags?.hashCode() ?: 0)
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 CreateProtectConfigurationResponse
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
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateProtectConfigurationResponse = 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
/**
* 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
/**
* An array of key and value pair tags that are associated with the resource.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateProtectConfigurationResponse) : this() {
this.accountDefault = x.accountDefault
this.createdTimestamp = x.createdTimestamp
this.deletionProtectionEnabled = x.deletionProtectionEnabled
this.protectConfigurationArn = x.protectConfigurationArn
this.protectConfigurationId = x.protectConfigurationId
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateProtectConfigurationResponse = CreateProtectConfigurationResponse(this)
internal fun correctErrors(): Builder {
if (createdTimestamp == null) createdTimestamp = Instant.fromEpochSeconds(0)
if (protectConfigurationArn == null) protectConfigurationArn = ""
if (protectConfigurationId == null) protectConfigurationId = ""
return this
}
}
}