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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestPhoneNumberRequest.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 RequestPhoneNumberRequest 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 phone number 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 messageType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.MessageType? = builder.messageType
    /**
     * Indicates if the phone number will be used for text messages, voice messages, or both.
     */
    public val numberCapabilities: List? = builder.numberCapabilities
    /**
     * The type of phone number to request.
     */
    public val numberType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestableNumberType? = builder.numberType
    /**
     * The name of the OptOutList to associate with the phone number. You can use the OptOutListName or OptOutListArn.
     *
     * If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).
     */
    public val optOutListName: kotlin.String? = builder.optOutListName
    /**
     * The pool to associated with the phone number. You can use the PoolId or PoolArn.
     *
     * If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).
     */
    public val poolId: kotlin.String? = builder.poolId
    /**
     * Use this field to attach your phone number for an external registration process.
     */
    public val registrationId: kotlin.String? = builder.registrationId
    /**
     * An array of tags (key and value pairs) associate with the requested phone number.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("RequestPhoneNumberRequest(")
        append("clientToken=$clientToken,")
        append("deletionProtectionEnabled=$deletionProtectionEnabled,")
        append("isoCountryCode=$isoCountryCode,")
        append("messageType=$messageType,")
        append("numberCapabilities=$numberCapabilities,")
        append("numberType=$numberType,")
        append("optOutListName=$optOutListName,")
        append("poolId=$poolId,")
        append("registrationId=$registrationId,")
        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 + (messageType?.hashCode() ?: 0)
        result = 31 * result + (numberCapabilities?.hashCode() ?: 0)
        result = 31 * result + (numberType?.hashCode() ?: 0)
        result = 31 * result + (optOutListName?.hashCode() ?: 0)
        result = 31 * result + (poolId?.hashCode() ?: 0)
        result = 31 * result + (registrationId?.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 RequestPhoneNumberRequest

        if (clientToken != other.clientToken) return false
        if (deletionProtectionEnabled != other.deletionProtectionEnabled) return false
        if (isoCountryCode != other.isoCountryCode) return false
        if (messageType != other.messageType) return false
        if (numberCapabilities != other.numberCapabilities) return false
        if (numberType != other.numberType) return false
        if (optOutListName != other.optOutListName) return false
        if (poolId != other.poolId) return false
        if (registrationId != other.registrationId) return false
        if (tags != other.tags) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestPhoneNumberRequest = 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 phone number 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 messageType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.MessageType? = null
        /**
         * Indicates if the phone number will be used for text messages, voice messages, or both.
         */
        public var numberCapabilities: List? = null
        /**
         * The type of phone number to request.
         */
        public var numberType: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestableNumberType? = null
        /**
         * The name of the OptOutList to associate with the phone number. You can use the OptOutListName or OptOutListArn.
         *
         * If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).
         */
        public var optOutListName: kotlin.String? = null
        /**
         * The pool to associated with the phone number. You can use the PoolId or PoolArn.
         *
         * If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).
         */
        public var poolId: kotlin.String? = null
        /**
         * Use this field to attach your phone number for an external registration process.
         */
        public var registrationId: kotlin.String? = null
        /**
         * An array of tags (key and value pairs) associate with the requested phone number.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RequestPhoneNumberRequest) : this() {
            this.clientToken = x.clientToken
            this.deletionProtectionEnabled = x.deletionProtectionEnabled
            this.isoCountryCode = x.isoCountryCode
            this.messageType = x.messageType
            this.numberCapabilities = x.numberCapabilities
            this.numberType = x.numberType
            this.optOutListName = x.optOutListName
            this.poolId = x.poolId
            this.registrationId = x.registrationId
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy