All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestSenderIdResponse.kt Maven / Gradle / Ivy

There is a newer version: 1.3.78
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.pinpointsmsvoicev2.model

import aws.smithy.kotlin.runtime.SdkDsl

public class RequestSenderIdResponse 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 sender ID that was requested.
     */
    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" }
    /**
     * 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.RequestSenderIdResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("RequestSenderIdResponse(")
        append("deletionProtectionEnabled=$deletionProtectionEnabled,")
        append("isoCountryCode=$isoCountryCode,")
        append("messageTypes=$messageTypes,")
        append("monthlyLeasingPrice=$monthlyLeasingPrice,")
        append("registered=$registered,")
        append("senderId=$senderId,")
        append("senderIdArn=$senderIdArn,")
        append("tags=$tags")
        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 + (senderId.hashCode())
        result = 31 * result + (senderIdArn.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 RequestSenderIdResponse

        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 (senderId != other.senderId) return false
        if (senderIdArn != other.senderIdArn) return false
        if (tags != other.tags) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestSenderIdResponse = 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 sender ID that was requested.
         */
        public var senderId: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) associated with the SenderId.
         */
        public var senderIdArn: 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.RequestSenderIdResponse) : this() {
            this.deletionProtectionEnabled = x.deletionProtectionEnabled
            this.isoCountryCode = x.isoCountryCode
            this.messageTypes = x.messageTypes
            this.monthlyLeasingPrice = x.monthlyLeasingPrice
            this.registered = x.registered
            this.senderId = x.senderId
            this.senderIdArn = x.senderIdArn
            this.tags = x.tags
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestSenderIdResponse = RequestSenderIdResponse(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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy