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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationDeniedReasonInformation.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 the reason a registration was rejected.
 */
public class RegistrationDeniedReasonInformation private constructor(builder: Builder) {
    /**
     * The link to the document.
     */
    public val documentationLink: kotlin.String? = builder.documentationLink
    /**
     * The title of the document.
     */
    public val documentationTitle: kotlin.String? = builder.documentationTitle
    /**
     * A long description of the rejection reason.
     */
    public val longDescription: kotlin.String? = builder.longDescription
    /**
     * The reason a registration was rejected.
     */
    public val reason: kotlin.String = requireNotNull(builder.reason) { "A non-null value must be provided for reason" }
    /**
     * A short description of the rejection reason.
     */
    public val shortDescription: kotlin.String = requireNotNull(builder.shortDescription) { "A non-null value must be provided for shortDescription" }

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

    override fun toString(): kotlin.String = buildString {
        append("RegistrationDeniedReasonInformation(")
        append("documentationLink=$documentationLink,")
        append("documentationTitle=$documentationTitle,")
        append("longDescription=$longDescription,")
        append("reason=$reason,")
        append("shortDescription=$shortDescription")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = documentationLink?.hashCode() ?: 0
        result = 31 * result + (documentationTitle?.hashCode() ?: 0)
        result = 31 * result + (longDescription?.hashCode() ?: 0)
        result = 31 * result + (reason.hashCode())
        result = 31 * result + (shortDescription.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 RegistrationDeniedReasonInformation

        if (documentationLink != other.documentationLink) return false
        if (documentationTitle != other.documentationTitle) return false
        if (longDescription != other.longDescription) return false
        if (reason != other.reason) return false
        if (shortDescription != other.shortDescription) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The link to the document.
         */
        public var documentationLink: kotlin.String? = null
        /**
         * The title of the document.
         */
        public var documentationTitle: kotlin.String? = null
        /**
         * A long description of the rejection reason.
         */
        public var longDescription: kotlin.String? = null
        /**
         * The reason a registration was rejected.
         */
        public var reason: kotlin.String? = null
        /**
         * A short description of the rejection reason.
         */
        public var shortDescription: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationDeniedReasonInformation) : this() {
            this.documentationLink = x.documentationLink
            this.documentationTitle = x.documentationTitle
            this.longDescription = x.longDescription
            this.reason = x.reason
            this.shortDescription = x.shortDescription
        }

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

        internal fun correctErrors(): Builder {
            if (reason == null) reason = ""
            if (shortDescription == null) shortDescription = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy