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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionInformation.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

/**
 * Provides information about the specified version of the registration.
 */
public class RegistrationVersionInformation private constructor(builder: Builder) {
    /**
     * An array of RegistrationDeniedReasonInformation objects.
     */
    public val deniedReasons: List? = builder.deniedReasons
    /**
     * The status of the registration.
     * + `DRAFT`: The initial status of a registration version after it’s created.
     * + `SUBMITTED`: Your registration has been submitted.
     * + `REVIEWING`: Your registration has been accepted and is being reviewed.
     * + `APPROVED`: Your registration has been approved.
     * + `DISCARDED`: You've abandon this version of their registration to start over with a new version.
     * + `DENIED`: You must fix your registration and resubmit it.
     * + `REVOKED`: Your previously approved registration has been revoked.
     * + `ARCHIVED`: Your previously approved registration version moves into this status when a more recently submitted version is approved.
     */
    public val registrationVersionStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatus = requireNotNull(builder.registrationVersionStatus) { "A non-null value must be provided for registrationVersionStatus" }
    /**
     * The **RegistrationVersionStatusHistory** object contains the time stamps for when the reservations status changes.
     */
    public val registrationVersionStatusHistory: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory? = builder.registrationVersionStatusHistory
    /**
     * The 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.RegistrationVersionInformation = Builder().apply(block).build()
    }

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

    override fun hashCode(): kotlin.Int {
        var result = deniedReasons?.hashCode() ?: 0
        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 RegistrationVersionInformation

        if (deniedReasons != other.deniedReasons) 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.RegistrationVersionInformation = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An array of RegistrationDeniedReasonInformation objects.
         */
        public var deniedReasons: List? = null
        /**
         * The status of the registration.
         * + `DRAFT`: The initial status of a registration version after it’s created.
         * + `SUBMITTED`: Your registration has been submitted.
         * + `REVIEWING`: Your registration has been accepted and is being reviewed.
         * + `APPROVED`: Your registration has been approved.
         * + `DISCARDED`: You've abandon this version of their registration to start over with a new version.
         * + `DENIED`: You must fix your registration and resubmit it.
         * + `REVOKED`: Your previously approved registration has been revoked.
         * + `ARCHIVED`: Your previously approved registration version moves into this status when a more recently submitted version is approved.
         */
        public var registrationVersionStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatus? = null
        /**
         * The **RegistrationVersionStatusHistory** object contains the time stamps for when the reservations status changes.
         */
        public var registrationVersionStatusHistory: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory? = null
        /**
         * The version number of the registration.
         */
        public var versionNumber: kotlin.Long? = null

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionInformation = RegistrationVersionInformation(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 (registrationVersionStatus == null) registrationVersionStatus = RegistrationVersionStatus.SdkUnknown("no value provided")
            if (versionNumber == null) versionNumber = 0L
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy