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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SenderIdAndCountry.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

/**
 * The alphanumeric sender ID in a specific country that you want to describe. For more information on sender IDs see [Requesting sender IDs ](https://docs.aws.amazon.com/sms-voice/latest/userguide/sender-id-request.html) in the *AWS End User Messaging SMS User Guide*.
 */
public class SenderIdAndCountry private constructor(builder: Builder) {
    /**
     * 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 unique identifier of the sender.
     */
    public val senderId: kotlin.String = requireNotNull(builder.senderId) { "A non-null value must be provided for senderId" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SenderIdAndCountry = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("SenderIdAndCountry(")
        append("isoCountryCode=$isoCountryCode,")
        append("senderId=$senderId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = isoCountryCode.hashCode()
        result = 31 * result + (senderId.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 SenderIdAndCountry

        if (isoCountryCode != other.isoCountryCode) return false
        if (senderId != other.senderId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SenderIdAndCountry = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
         */
        public var isoCountryCode: kotlin.String? = null
        /**
         * The unique identifier of the sender.
         */
        public var senderId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SenderIdAndCountry) : this() {
            this.isoCountryCode = x.isoCountryCode
            this.senderId = x.senderId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SenderIdAndCountry = SenderIdAndCountry(this)

        internal fun correctErrors(): Builder {
            if (isoCountryCode == null) isoCountryCode = ""
            if (senderId == null) senderId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy