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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.CreateRegistrationAttachmentResponse.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 CreateRegistrationAttachmentResponse private constructor(builder: Builder) {
    /**
     * The status of the registration attachment.
     * + `UPLOAD_IN_PROGRESS` The attachment is being uploaded.
     * + `UPLOAD_COMPLETE` The attachment has been uploaded.
     * + `UPLOAD_FAILED` The attachment failed to uploaded.
     * + `DELETED` The attachment has been deleted..
     */
    public val attachmentStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AttachmentStatus = requireNotNull(builder.attachmentStatus) { "A non-null value must be provided for attachmentStatus" }
    /**
     * The time when the registration attachment 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 Amazon Resource Name (ARN) for the registration attachment.
     */
    public val registrationAttachmentArn: kotlin.String = requireNotNull(builder.registrationAttachmentArn) { "A non-null value must be provided for registrationAttachmentArn" }
    /**
     * The unique identifier for the registration attachment.
     */
    public val registrationAttachmentId: kotlin.String = requireNotNull(builder.registrationAttachmentId) { "A non-null value must be provided for registrationAttachmentId" }
    /**
     * 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.CreateRegistrationAttachmentResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateRegistrationAttachmentResponse(")
        append("attachmentStatus=$attachmentStatus,")
        append("createdTimestamp=$createdTimestamp,")
        append("registrationAttachmentArn=$registrationAttachmentArn,")
        append("registrationAttachmentId=$registrationAttachmentId,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attachmentStatus.hashCode()
        result = 31 * result + (createdTimestamp.hashCode())
        result = 31 * result + (registrationAttachmentArn.hashCode())
        result = 31 * result + (registrationAttachmentId.hashCode())
        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 CreateRegistrationAttachmentResponse

        if (attachmentStatus != other.attachmentStatus) return false
        if (createdTimestamp != other.createdTimestamp) return false
        if (registrationAttachmentArn != other.registrationAttachmentArn) return false
        if (registrationAttachmentId != other.registrationAttachmentId) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The status of the registration attachment.
         * + `UPLOAD_IN_PROGRESS` The attachment is being uploaded.
         * + `UPLOAD_COMPLETE` The attachment has been uploaded.
         * + `UPLOAD_FAILED` The attachment failed to uploaded.
         * + `DELETED` The attachment has been deleted..
         */
        public var attachmentStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AttachmentStatus? = null
        /**
         * The time when the registration attachment was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
         */
        public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Amazon Resource Name (ARN) for the registration attachment.
         */
        public var registrationAttachmentArn: kotlin.String? = null
        /**
         * The unique identifier for the registration attachment.
         */
        public var registrationAttachmentId: 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.CreateRegistrationAttachmentResponse) : this() {
            this.attachmentStatus = x.attachmentStatus
            this.createdTimestamp = x.createdTimestamp
            this.registrationAttachmentArn = x.registrationAttachmentArn
            this.registrationAttachmentId = x.registrationAttachmentId
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            if (attachmentStatus == null) attachmentStatus = AttachmentStatus.SdkUnknown("no value provided")
            if (createdTimestamp == null) createdTimestamp = Instant.fromEpochSeconds(0)
            if (registrationAttachmentArn == null) registrationAttachmentArn = ""
            if (registrationAttachmentId == null) registrationAttachmentId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy