commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationAttachmentsInformation.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoicev2-jvm Show documentation
Show all versions of pinpointsmsvoicev2-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice V2
// 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
/**
* Provides information on the specified registration attachments.
*/
public class RegistrationAttachmentsInformation 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" }
/**
* A description of why the upload didn't successfully complete.
*/
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.RegistrationAttachmentsInformation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RegistrationAttachmentsInformation(")
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 RegistrationAttachmentsInformation
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.RegistrationAttachmentsInformation = 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
/**
* A description of why the upload didn't successfully complete.
*/
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.RegistrationAttachmentsInformation) : 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.RegistrationAttachmentsInformation = RegistrationAttachmentsInformation(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
}
}
}