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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationVersionResponse.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 CreateRegistrationVersionResponse private constructor(builder: Builder) {
    /**
     * 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.
     * + `APPROVED`: Your registration has been approved.
     * + `ARCHIVED`: Your previously approved registration version moves into this status when a more recently submitted version is approved.
     * + `DENIED`: You must fix your registration and resubmit it.
     * + `DISCARDED`: You've abandon this version of their registration to start over with a new version.
     * + `DRAFT`: The initial status of a registration version after it’s created.
     * + `REQUIRES_AUTHENTICATION`: You need to complete email authentication.
     * + `REVIEWING`: Your registration has been accepted and is being reviewed.
     * + `REVOKED`: Your previously approved registration has been revoked.
     * + `SUBMITTED`: Your registration has been submitted.
     */
    public val registrationVersionStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatus = requireNotNull(builder.registrationVersionStatus) { "A non-null value must be provided for registrationVersionStatus" }
    /**
     * A **RegistrationVersionStatusHistory** object that contains timestamps for the registration.
     */
    public val registrationVersionStatusHistory: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory? = builder.registrationVersionStatusHistory
    /**
     * The new version number of the registration.
     */
    public val versionNumber: kotlin.Long = requireNotNull(builder.versionNumber) { "A non-null value must be provided for versionNumber" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRegistrationVersionResponse(")
        append("registrationArn=$registrationArn,")
        append("registrationId=$registrationId,")
        append("registrationVersionStatus=$registrationVersionStatus,")
        append("registrationVersionStatusHistory=$registrationVersionStatusHistory,")
        append("versionNumber=$versionNumber")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = registrationArn.hashCode()
        result = 31 * result + (registrationId.hashCode())
        result = 31 * result + (registrationVersionStatus.hashCode())
        result = 31 * result + (registrationVersionStatusHistory?.hashCode() ?: 0)
        result = 31 * result + (versionNumber.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 CreateRegistrationVersionResponse

        if (registrationArn != other.registrationArn) return false
        if (registrationId != other.registrationId) return false
        if (registrationVersionStatus != other.registrationVersionStatus) return false
        if (registrationVersionStatusHistory != other.registrationVersionStatusHistory) return false
        if (versionNumber != other.versionNumber) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * 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.
         * + `APPROVED`: Your registration has been approved.
         * + `ARCHIVED`: Your previously approved registration version moves into this status when a more recently submitted version is approved.
         * + `DENIED`: You must fix your registration and resubmit it.
         * + `DISCARDED`: You've abandon this version of their registration to start over with a new version.
         * + `DRAFT`: The initial status of a registration version after it’s created.
         * + `REQUIRES_AUTHENTICATION`: You need to complete email authentication.
         * + `REVIEWING`: Your registration has been accepted and is being reviewed.
         * + `REVOKED`: Your previously approved registration has been revoked.
         * + `SUBMITTED`: Your registration has been submitted.
         */
        public var registrationVersionStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatus? = null
        /**
         * A **RegistrationVersionStatusHistory** object that contains timestamps for the registration.
         */
        public var registrationVersionStatusHistory: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory? = null
        /**
         * The new version number of the registration.
         */
        public var versionNumber: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationVersionResponse) : this() {
            this.registrationArn = x.registrationArn
            this.registrationId = x.registrationId
            this.registrationVersionStatus = x.registrationVersionStatus
            this.registrationVersionStatusHistory = x.registrationVersionStatusHistory
            this.versionNumber = x.versionNumber
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory] inside the given [block]
         */
        public fun registrationVersionStatusHistory(block: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory.Builder.() -> kotlin.Unit) {
            this.registrationVersionStatusHistory = aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (registrationArn == null) registrationArn = ""
            if (registrationId == null) registrationId = ""
            if (registrationVersionStatus == null) registrationVersionStatus = RegistrationVersionStatus.SdkUnknown("no value provided")
            if (versionNumber == null) versionNumber = 0L
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy