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

commonMain.aws.sdk.kotlin.services.connect.model.ClaimPhoneNumberRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.connect.model



public class ClaimPhoneNumberRequest private constructor(builder: Builder) {
    /**
     * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see [Making retries safe with idempotent APIs](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/).
     *
     * Pattern: `^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$`
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The phone number you want to claim. Phone numbers are formatted `[+] [country code] [subscriber number including area code]`.
     */
    public val phoneNumber: kotlin.String? = builder.phoneNumber
    /**
     * The description of the phone number.
     */
    public val phoneNumberDescription: kotlin.String? = builder.phoneNumberDescription
    /**
     * The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
     */
    public val tags: Map? = builder.tags
    /**
     * The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.
     */
    public val targetArn: kotlin.String? = builder.targetArn

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

    override fun toString(): kotlin.String = buildString {
        append("ClaimPhoneNumberRequest(")
        append("clientToken=$clientToken,")
        append("phoneNumber=$phoneNumber,")
        append("phoneNumberDescription=$phoneNumberDescription,")
        append("tags=$tags,")
        append("targetArn=$targetArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (phoneNumber?.hashCode() ?: 0)
        result = 31 * result + (phoneNumberDescription?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (targetArn?.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 ClaimPhoneNumberRequest

        if (clientToken != other.clientToken) return false
        if (phoneNumber != other.phoneNumber) return false
        if (phoneNumberDescription != other.phoneNumberDescription) return false
        if (tags != other.tags) return false
        if (targetArn != other.targetArn) return false

        return true
    }

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

    public class Builder {
        /**
         * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see [Making retries safe with idempotent APIs](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/).
         *
         * Pattern: `^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$`
         */
        public var clientToken: kotlin.String? = null
        /**
         * The phone number you want to claim. Phone numbers are formatted `[+] [country code] [subscriber number including area code]`.
         */
        public var phoneNumber: kotlin.String? = null
        /**
         * The description of the phone number.
         */
        public var phoneNumberDescription: kotlin.String? = null
        /**
         * The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
         */
        public var tags: Map? = null
        /**
         * The Amazon Resource Name (ARN) for Amazon Connect instances or traffic distribution groups that phone numbers are claimed to.
         */
        public var targetArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.connect.model.ClaimPhoneNumberRequest) : this() {
            this.clientToken = x.clientToken
            this.phoneNumber = x.phoneNumber
            this.phoneNumberDescription = x.phoneNumberDescription
            this.tags = x.tags
            this.targetArn = x.targetArn
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.connect.model.ClaimPhoneNumberRequest = ClaimPhoneNumberRequest(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy