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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateVerifiedDestinationNumberResponse.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
import aws.smithy.kotlin.runtime.time.Instant

public class CreateVerifiedDestinationNumberResponse private constructor(builder: Builder) {
    /**
     * The time when the verified phone number was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
     */
    public val createdTimestamp: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdTimestamp) { "A non-null value must be provided for createdTimestamp" }
    /**
     * The verified destination phone number, in E.164 format.
     */
    public val destinationPhoneNumber: kotlin.String = requireNotNull(builder.destinationPhoneNumber) { "A non-null value must be provided for destinationPhoneNumber" }
    /**
     * The status of the verified destination phone number.
     * + `PENDING`: The phone number hasn't been verified yet.
     * + `VERIFIED`: The phone number is verified and can receive messages.
     */
    public val status: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.VerificationStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * An array of tags (key and value pairs) to associate with the destination number.
     */
    public val tags: List? = builder.tags
    /**
     * The Amazon Resource Name (ARN) for the verified destination phone number.
     */
    public val verifiedDestinationNumberArn: kotlin.String = requireNotNull(builder.verifiedDestinationNumberArn) { "A non-null value must be provided for verifiedDestinationNumberArn" }
    /**
     * The unique identifier for the verified destination phone number.
     */
    public val verifiedDestinationNumberId: kotlin.String = requireNotNull(builder.verifiedDestinationNumberId) { "A non-null value must be provided for verifiedDestinationNumberId" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateVerifiedDestinationNumberResponse(")
        append("createdTimestamp=$createdTimestamp,")
        append("destinationPhoneNumber=$destinationPhoneNumber,")
        append("status=$status,")
        append("tags=$tags,")
        append("verifiedDestinationNumberArn=$verifiedDestinationNumberArn,")
        append("verifiedDestinationNumberId=$verifiedDestinationNumberId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdTimestamp.hashCode()
        result = 31 * result + (destinationPhoneNumber.hashCode())
        result = 31 * result + (status.hashCode())
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (verifiedDestinationNumberArn.hashCode())
        result = 31 * result + (verifiedDestinationNumberId.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 CreateVerifiedDestinationNumberResponse

        if (createdTimestamp != other.createdTimestamp) return false
        if (destinationPhoneNumber != other.destinationPhoneNumber) return false
        if (status != other.status) return false
        if (tags != other.tags) return false
        if (verifiedDestinationNumberArn != other.verifiedDestinationNumberArn) return false
        if (verifiedDestinationNumberId != other.verifiedDestinationNumberId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The time when the verified phone number was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
         */
        public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The verified destination phone number, in E.164 format.
         */
        public var destinationPhoneNumber: kotlin.String? = null
        /**
         * The status of the verified destination phone number.
         * + `PENDING`: The phone number hasn't been verified yet.
         * + `VERIFIED`: The phone number is verified and can receive messages.
         */
        public var status: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.VerificationStatus? = null
        /**
         * An array of tags (key and value pairs) to associate with the destination number.
         */
        public var tags: List? = null
        /**
         * The Amazon Resource Name (ARN) for the verified destination phone number.
         */
        public var verifiedDestinationNumberArn: kotlin.String? = null
        /**
         * The unique identifier for the verified destination phone number.
         */
        public var verifiedDestinationNumberId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateVerifiedDestinationNumberResponse) : this() {
            this.createdTimestamp = x.createdTimestamp
            this.destinationPhoneNumber = x.destinationPhoneNumber
            this.status = x.status
            this.tags = x.tags
            this.verifiedDestinationNumberArn = x.verifiedDestinationNumberArn
            this.verifiedDestinationNumberId = x.verifiedDestinationNumberId
        }

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

        internal fun correctErrors(): Builder {
            if (createdTimestamp == null) createdTimestamp = Instant.fromEpochSeconds(0)
            if (destinationPhoneNumber == null) destinationPhoneNumber = ""
            if (status == null) status = VerificationStatus.SdkUnknown("no value provided")
            if (verifiedDestinationNumberArn == null) verifiedDestinationNumberArn = ""
            if (verifiedDestinationNumberId == null) verifiedDestinationNumberId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy