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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DeleteRegistrationResponse.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 DeleteRegistrationResponse private constructor(builder: Builder) {
    /**
     * Metadata about a given registration which is specific to that registration type.
     */
    public val additionalAttributes: Map? = builder.additionalAttributes
    /**
     * The version number of the registration that was approved.
     */
    public val approvedVersionNumber: kotlin.Long? = builder.approvedVersionNumber
    /**
     * 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 latest version number of the registration that was denied.
     */
    public val latestDeniedVersionNumber: kotlin.Long? = builder.latestDeniedVersionNumber
    /**
     * 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. 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" }

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

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

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

        if (additionalAttributes != other.additionalAttributes) return false
        if (approvedVersionNumber != other.approvedVersionNumber) return false
        if (createdTimestamp != other.createdTimestamp) return false
        if (currentVersionNumber != other.currentVersionNumber) return false
        if (latestDeniedVersionNumber != other.latestDeniedVersionNumber) 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

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DeleteRegistrationResponse = 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 version number of the registration that was approved.
         */
        public var approvedVersionNumber: kotlin.Long? = 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 latest version number of the registration that was denied.
         */
        public var latestDeniedVersionNumber: 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. The list of **RegistrationTypes** can be found using the DescribeRegistrationTypeDefinitions action.
         */
        public var registrationType: kotlin.String? = null

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DeleteRegistrationResponse = DeleteRegistrationResponse(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