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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationAssociationResponse.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 CreateRegistrationAssociationResponse private constructor(builder: Builder) {
    /**
     * The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
     */
    public val isoCountryCode: kotlin.String? = builder.isoCountryCode
    /**
     * The phone number associated with the registration in E.164 format.
     */
    public val phoneNumber: kotlin.String? = builder.phoneNumber
    /**
     * 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 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" }
    /**
     * The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.
     */
    public val resourceArn: kotlin.String = requireNotNull(builder.resourceArn) { "A non-null value must be provided for resourceArn" }
    /**
     * The unique identifier for the origination identity. For example this could be a **PhoneNumberId** or **SenderId**.
     */
    public val resourceId: kotlin.String = requireNotNull(builder.resourceId) { "A non-null value must be provided for resourceId" }
    /**
     * The registration type or origination identity type.
     */
    public val resourceType: kotlin.String = requireNotNull(builder.resourceType) { "A non-null value must be provided for resourceType" }

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRegistrationAssociationResponse(")
        append("isoCountryCode=$isoCountryCode,")
        append("phoneNumber=$phoneNumber,")
        append("registrationArn=$registrationArn,")
        append("registrationId=$registrationId,")
        append("registrationType=$registrationType,")
        append("resourceArn=$resourceArn,")
        append("resourceId=$resourceId,")
        append("resourceType=$resourceType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = isoCountryCode?.hashCode() ?: 0
        result = 31 * result + (phoneNumber?.hashCode() ?: 0)
        result = 31 * result + (registrationArn.hashCode())
        result = 31 * result + (registrationId.hashCode())
        result = 31 * result + (registrationType.hashCode())
        result = 31 * result + (resourceArn.hashCode())
        result = 31 * result + (resourceId.hashCode())
        result = 31 * result + (resourceType.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 CreateRegistrationAssociationResponse

        if (isoCountryCode != other.isoCountryCode) return false
        if (phoneNumber != other.phoneNumber) return false
        if (registrationArn != other.registrationArn) return false
        if (registrationId != other.registrationId) return false
        if (registrationType != other.registrationType) return false
        if (resourceArn != other.resourceArn) return false
        if (resourceId != other.resourceId) return false
        if (resourceType != other.resourceType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
         */
        public var isoCountryCode: kotlin.String? = null
        /**
         * The phone number associated with the registration in E.164 format.
         */
        public var phoneNumber: kotlin.String? = 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 type of registration form. The list of **RegistrationTypes** can be found using the DescribeRegistrationTypeDefinitions action.
         */
        public var registrationType: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.
         */
        public var resourceArn: kotlin.String? = null
        /**
         * The unique identifier for the origination identity. For example this could be a **PhoneNumberId** or **SenderId**.
         */
        public var resourceId: kotlin.String? = null
        /**
         * The registration type or origination identity type.
         */
        public var resourceType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationAssociationResponse) : this() {
            this.isoCountryCode = x.isoCountryCode
            this.phoneNumber = x.phoneNumber
            this.registrationArn = x.registrationArn
            this.registrationId = x.registrationId
            this.registrationType = x.registrationType
            this.resourceArn = x.resourceArn
            this.resourceId = x.resourceId
            this.resourceType = x.resourceType
        }

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

        internal fun correctErrors(): Builder {
            if (registrationArn == null) registrationArn = ""
            if (registrationId == null) registrationId = ""
            if (registrationType == null) registrationType = ""
            if (resourceArn == null) resourceArn = ""
            if (resourceId == null) resourceId = ""
            if (resourceType == null) resourceType = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy