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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DeleteRegistrationAttachmentResponse.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 DeleteRegistrationAttachmentResponse 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 error message if the upload failed.
     */
    public val attachmentUploadErrorReason: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AttachmentUploadErrorReason? = builder.attachmentUploadErrorReason
    /**
     * 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" }

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

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

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

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

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DeleteRegistrationAttachmentResponse = 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 error message if the upload failed.
         */
        public var attachmentUploadErrorReason: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AttachmentUploadErrorReason? = 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

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DeleteRegistrationAttachmentResponse) : this() {
            this.attachmentStatus = x.attachmentStatus
            this.attachmentUploadErrorReason = x.attachmentUploadErrorReason
            this.createdTimestamp = x.createdTimestamp
            this.registrationAttachmentArn = x.registrationAttachmentArn
            this.registrationAttachmentId = x.registrationAttachmentId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DeleteRegistrationAttachmentResponse = DeleteRegistrationAttachmentResponse(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