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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationResponse.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 CreateRegistrationResponse private constructor(builder: Builder) {
    /**
     * Metadata about a given registration which is specific to that registration type.
     */
    public val additionalAttributes: Map? = builder.additionalAttributes
    /**
     * The time when the registration 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 current version number of the registration.
     */
    public val currentVersionNumber: kotlin.Long = requireNotNull(builder.currentVersionNumber) { "A non-null value must be provided for currentVersionNumber" }
    /**
     * The Amazon Resource Name (ARN) for the registration.
     */
    public val registrationArn: kotlin.String = requireNotNull(builder.registrationArn) { "A non-null value must be provided for registrationArn" }
    /**
     * The unique identifier for the registration.
     */
    public val registrationId: kotlin.String = requireNotNull(builder.registrationId) { "A non-null value must be provided for registrationId" }
    /**
     * The status of the registration.
     * + `CREATED`: Your registration is created but not submitted.
     * + `SUBMITTED`: Your registration has been submitted and is awaiting review.
     * + `REVIEWING`: Your registration has been accepted and is being reviewed.
     * + `PROVISIONING`: Your registration has been approved and your origination identity is being created.
     * + `COMPLETE`: Your registration has been approved and and your origination identity has been created.
     * + `REQUIRES_UPDATES`: You must fix your registration and resubmit it.
     * + `CLOSED`: The phone number or sender ID has been deleted and you must also delete the registration for the number.
     * + `DELETED`: The registration has been deleted.
     */
    public val registrationStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationStatus = requireNotNull(builder.registrationStatus) { "A non-null value must be provided for registrationStatus" }
    /**
     * The type of registration form to create. The list of **RegistrationTypes** can be found using the DescribeRegistrationTypeDefinitions action.
     */
    public val registrationType: kotlin.String = requireNotNull(builder.registrationType) { "A non-null value must be provided for registrationType" }
    /**
     * An array of tags (key and value pairs) to associate with the registration.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRegistrationResponse(")
        append("additionalAttributes=$additionalAttributes,")
        append("createdTimestamp=$createdTimestamp,")
        append("currentVersionNumber=$currentVersionNumber,")
        append("registrationArn=$registrationArn,")
        append("registrationId=$registrationId,")
        append("registrationStatus=$registrationStatus,")
        append("registrationType=$registrationType,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = additionalAttributes?.hashCode() ?: 0
        result = 31 * result + (createdTimestamp.hashCode())
        result = 31 * result + (currentVersionNumber.hashCode())
        result = 31 * result + (registrationArn.hashCode())
        result = 31 * result + (registrationId.hashCode())
        result = 31 * result + (registrationStatus.hashCode())
        result = 31 * result + (registrationType.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 CreateRegistrationResponse

        if (additionalAttributes != other.additionalAttributes) return false
        if (createdTimestamp != other.createdTimestamp) return false
        if (currentVersionNumber != other.currentVersionNumber) return false
        if (registrationArn != other.registrationArn) return false
        if (registrationId != other.registrationId) return false
        if (registrationStatus != other.registrationStatus) return false
        if (registrationType != other.registrationType) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Metadata about a given registration which is specific to that registration type.
         */
        public var additionalAttributes: Map? = null
        /**
         * The time when the registration was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
         */
        public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The current version number of the registration.
         */
        public var currentVersionNumber: kotlin.Long? = null
        /**
         * The Amazon Resource Name (ARN) for the registration.
         */
        public var registrationArn: kotlin.String? = null
        /**
         * The unique identifier for the registration.
         */
        public var registrationId: kotlin.String? = null
        /**
         * The status of the registration.
         * + `CREATED`: Your registration is created but not submitted.
         * + `SUBMITTED`: Your registration has been submitted and is awaiting review.
         * + `REVIEWING`: Your registration has been accepted and is being reviewed.
         * + `PROVISIONING`: Your registration has been approved and your origination identity is being created.
         * + `COMPLETE`: Your registration has been approved and and your origination identity has been created.
         * + `REQUIRES_UPDATES`: You must fix your registration and resubmit it.
         * + `CLOSED`: The phone number or sender ID has been deleted and you must also delete the registration for the number.
         * + `DELETED`: The registration has been deleted.
         */
        public var registrationStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationStatus? = null
        /**
         * The type of registration form to create. The list of **RegistrationTypes** can be found using the DescribeRegistrationTypeDefinitions action.
         */
        public var registrationType: kotlin.String? = null
        /**
         * An array of tags (key and value pairs) to associate with the registration.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationResponse) : this() {
            this.additionalAttributes = x.additionalAttributes
            this.createdTimestamp = x.createdTimestamp
            this.currentVersionNumber = x.currentVersionNumber
            this.registrationArn = x.registrationArn
            this.registrationId = x.registrationId
            this.registrationStatus = x.registrationStatus
            this.registrationType = x.registrationType
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            if (createdTimestamp == null) createdTimestamp = Instant.fromEpochSeconds(0)
            if (currentVersionNumber == null) currentVersionNumber = 0L
            if (registrationArn == null) registrationArn = ""
            if (registrationId == null) registrationId = ""
            if (registrationStatus == null) registrationStatus = RegistrationStatus.SdkUnknown("no value provided")
            if (registrationType == null) registrationType = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy