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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationAttachmentRequest.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 CreateRegistrationAttachmentRequest private constructor(builder: Builder) {
    /**
     * The registration file to upload. The maximum file size is 500KB and valid file extensions are PDF, JPEG and PNG.
     */
    public val attachmentBody: kotlin.ByteArray? = builder.attachmentBody
    /**
     * Registration files have to be stored in an Amazon S3 bucket. The URI to use when sending is in the format `s3://BucketName/FileName`.
     */
    public val attachmentUrl: kotlin.String? = builder.attachmentUrl
    /**
     * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * An array of tags (key and value pairs) to associate with the registration attachment.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateRegistrationAttachmentRequest(")
        append("attachmentBody=$attachmentBody,")
        append("attachmentUrl=$attachmentUrl,")
        append("clientToken=$clientToken,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attachmentBody?.contentHashCode() ?: 0
        result = 31 * result + (attachmentUrl?.hashCode() ?: 0)
        result = 31 * result + (clientToken?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        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 CreateRegistrationAttachmentRequest

        if (attachmentBody != null) {
            if (other.attachmentBody == null) return false
            if (!attachmentBody.contentEquals(other.attachmentBody)) return false
        } else if (other.attachmentBody != null) return false
        if (attachmentUrl != other.attachmentUrl) return false
        if (clientToken != other.clientToken) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The registration file to upload. The maximum file size is 500KB and valid file extensions are PDF, JPEG and PNG.
         */
        public var attachmentBody: kotlin.ByteArray? = null
        /**
         * Registration files have to be stored in an Amazon S3 bucket. The URI to use when sending is in the format `s3://BucketName/FileName`.
         */
        public var attachmentUrl: kotlin.String? = null
        /**
         * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
         */
        public var clientToken: kotlin.String? = null
        /**
         * An array of tags (key and value pairs) to associate with the registration attachment.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationAttachmentRequest) : this() {
            this.attachmentBody = x.attachmentBody
            this.attachmentUrl = x.attachmentUrl
            this.clientToken = x.clientToken
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy