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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutRegistrationFieldValueResponse.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 PutRegistrationFieldValueResponse private constructor(builder: Builder) {
    /**
     * The path to the registration form field. You can use DescribeRegistrationFieldDefinitions for a list of **FieldPaths**.
     */
    public val fieldPath: kotlin.String = requireNotNull(builder.fieldPath) { "A non-null value must be provided for fieldPath" }
    /**
     * 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 attachment.
     */
    public val registrationAttachmentId: kotlin.String? = builder.registrationAttachmentId
    /**
     * The unique identifier for the registration.
     */
    public val registrationId: kotlin.String = requireNotNull(builder.registrationId) { "A non-null value must be provided for registrationId" }
    /**
     * An array of values for the form field.
     */
    public val selectChoices: List? = builder.selectChoices
    /**
     * The text data for a free form field.
     */
    public val textValue: kotlin.String? = builder.textValue
    /**
     * 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.PutRegistrationFieldValueResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PutRegistrationFieldValueResponse(")
        append("fieldPath=$fieldPath,")
        append("registrationArn=$registrationArn,")
        append("registrationAttachmentId=$registrationAttachmentId,")
        append("registrationId=$registrationId,")
        append("selectChoices=$selectChoices,")
        append("textValue=$textValue,")
        append("versionNumber=$versionNumber")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = fieldPath.hashCode()
        result = 31 * result + (registrationArn.hashCode())
        result = 31 * result + (registrationAttachmentId?.hashCode() ?: 0)
        result = 31 * result + (registrationId.hashCode())
        result = 31 * result + (selectChoices?.hashCode() ?: 0)
        result = 31 * result + (textValue?.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 PutRegistrationFieldValueResponse

        if (fieldPath != other.fieldPath) return false
        if (registrationArn != other.registrationArn) return false
        if (registrationAttachmentId != other.registrationAttachmentId) return false
        if (registrationId != other.registrationId) return false
        if (selectChoices != other.selectChoices) return false
        if (textValue != other.textValue) return false
        if (versionNumber != other.versionNumber) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The path to the registration form field. You can use DescribeRegistrationFieldDefinitions for a list of **FieldPaths**.
         */
        public var fieldPath: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) for the registration.
         */
        public var registrationArn: kotlin.String? = null
        /**
         * The unique identifier for the registration attachment.
         */
        public var registrationAttachmentId: kotlin.String? = null
        /**
         * The unique identifier for the registration.
         */
        public var registrationId: kotlin.String? = null
        /**
         * An array of values for the form field.
         */
        public var selectChoices: List? = null
        /**
         * The text data for a free form field.
         */
        public var textValue: kotlin.String? = 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.PutRegistrationFieldValueResponse) : this() {
            this.fieldPath = x.fieldPath
            this.registrationArn = x.registrationArn
            this.registrationAttachmentId = x.registrationAttachmentId
            this.registrationId = x.registrationId
            this.selectChoices = x.selectChoices
            this.textValue = x.textValue
            this.versionNumber = x.versionNumber
        }

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

        internal fun correctErrors(): Builder {
            if (fieldPath == null) fieldPath = ""
            if (registrationArn == null) registrationArn = ""
            if (registrationId == null) registrationId = ""
            if (versionNumber == null) versionNumber = 0L
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy