commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdateSenderIdResponse.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 UpdateSenderIdResponse private constructor(builder: Builder) {
/**
* 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 = requireNotNull(builder.isoCountryCode) { "A non-null value must be provided for 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 = requireNotNull(builder.messageTypes) { "A non-null value must be provided for messageTypes" }
/**
* The monthly price, in US dollars, to lease the sender ID.
*/
public val monthlyLeasingPrice: kotlin.String = requireNotNull(builder.monthlyLeasingPrice) { "A non-null value must be provided for monthlyLeasingPrice" }
/**
* True if the sender ID is registered..
*/
public val registered: kotlin.Boolean = builder.registered
/**
* The unique identifier for the registration.
*/
public val registrationId: kotlin.String? = builder.registrationId
/**
* The sender ID that was updated.
*/
public val senderId: kotlin.String = requireNotNull(builder.senderId) { "A non-null value must be provided for senderId" }
/**
* The Amazon Resource Name (ARN) associated with the SenderId.
*/
public val senderIdArn: kotlin.String = requireNotNull(builder.senderIdArn) { "A non-null value must be provided for senderIdArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdateSenderIdResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateSenderIdResponse(")
append("deletionProtectionEnabled=$deletionProtectionEnabled,")
append("isoCountryCode=$isoCountryCode,")
append("messageTypes=$messageTypes,")
append("monthlyLeasingPrice=$monthlyLeasingPrice,")
append("registered=$registered,")
append("registrationId=$registrationId,")
append("senderId=$senderId,")
append("senderIdArn=$senderIdArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deletionProtectionEnabled.hashCode()
result = 31 * result + (isoCountryCode.hashCode())
result = 31 * result + (messageTypes.hashCode())
result = 31 * result + (monthlyLeasingPrice.hashCode())
result = 31 * result + (registered.hashCode())
result = 31 * result + (registrationId?.hashCode() ?: 0)
result = 31 * result + (senderId.hashCode())
result = 31 * result + (senderIdArn.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 UpdateSenderIdResponse
if (deletionProtectionEnabled != other.deletionProtectionEnabled) return false
if (isoCountryCode != other.isoCountryCode) return false
if (messageTypes != other.messageTypes) return false
if (monthlyLeasingPrice != other.monthlyLeasingPrice) return false
if (registered != other.registered) return false
if (registrationId != other.registrationId) return false
if (senderId != other.senderId) return false
if (senderIdArn != other.senderIdArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdateSenderIdResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* By default this is set to false. When set to true the sender ID can't be deleted.
*/
public var deletionProtectionEnabled: kotlin.Boolean = false
/**
* 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 monthly price, in US dollars, to lease the sender ID.
*/
public var monthlyLeasingPrice: kotlin.String? = null
/**
* True if the sender ID is registered..
*/
public var registered: kotlin.Boolean = false
/**
* The unique identifier for the registration.
*/
public var registrationId: kotlin.String? = null
/**
* The sender ID that was updated.
*/
public var senderId: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) associated with the SenderId.
*/
public var senderIdArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdateSenderIdResponse) : this() {
this.deletionProtectionEnabled = x.deletionProtectionEnabled
this.isoCountryCode = x.isoCountryCode
this.messageTypes = x.messageTypes
this.monthlyLeasingPrice = x.monthlyLeasingPrice
this.registered = x.registered
this.registrationId = x.registrationId
this.senderId = x.senderId
this.senderIdArn = x.senderIdArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdateSenderIdResponse = UpdateSenderIdResponse(this)
internal fun correctErrors(): Builder {
if (isoCountryCode == null) isoCountryCode = ""
if (messageTypes == null) messageTypes = emptyList()
if (monthlyLeasingPrice == null) monthlyLeasingPrice = ""
if (senderId == null) senderId = ""
if (senderIdArn == null) senderIdArn = ""
return this
}
}
}