commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestSenderIdRequest.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
public class RequestSenderIdRequest private constructor(builder: Builder) {
/**
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* By default this is set to false. When set to true the sender ID can't be deleted.
*/
public val deletionProtectionEnabled: kotlin.Boolean? = builder.deletionProtectionEnabled
/**
* The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
*/
public val isoCountryCode: kotlin.String? = builder.isoCountryCode
/**
* The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
*/
public val messageTypes: List? = builder.messageTypes
/**
* The sender ID string to request.
*/
public val senderId: kotlin.String? = builder.senderId
/**
* An array of tags (key and value pairs) to associate with the sender ID.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestSenderIdRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RequestSenderIdRequest(")
append("clientToken=$clientToken,")
append("deletionProtectionEnabled=$deletionProtectionEnabled,")
append("isoCountryCode=$isoCountryCode,")
append("messageTypes=$messageTypes,")
append("senderId=$senderId,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (deletionProtectionEnabled?.hashCode() ?: 0)
result = 31 * result + (isoCountryCode?.hashCode() ?: 0)
result = 31 * result + (messageTypes?.hashCode() ?: 0)
result = 31 * result + (senderId?.hashCode() ?: 0)
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 RequestSenderIdRequest
if (clientToken != other.clientToken) return false
if (deletionProtectionEnabled != other.deletionProtectionEnabled) return false
if (isoCountryCode != other.isoCountryCode) return false
if (messageTypes != other.messageTypes) return false
if (senderId != other.senderId) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestSenderIdRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
*/
public var clientToken: kotlin.String? = null
/**
* By default this is set to false. When set to true the sender ID can't be deleted.
*/
public var deletionProtectionEnabled: kotlin.Boolean? = null
/**
* The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
*/
public var isoCountryCode: kotlin.String? = null
/**
* The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
*/
public var messageTypes: List? = null
/**
* The sender ID string to request.
*/
public var senderId: kotlin.String? = null
/**
* An array of tags (key and value pairs) to associate with the sender ID.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestSenderIdRequest) : this() {
this.clientToken = x.clientToken
this.deletionProtectionEnabled = x.deletionProtectionEnabled
this.isoCountryCode = x.isoCountryCode
this.messageTypes = x.messageTypes
this.senderId = x.senderId
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestSenderIdRequest = RequestSenderIdRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}