commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DiscardRegistrationVersionResponse.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
public class DiscardRegistrationVersionResponse private constructor(builder: Builder) {
/**
* 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.
*/
public val registrationId: kotlin.String = requireNotNull(builder.registrationId) { "A non-null value must be provided for registrationId" }
/**
* The status of the registration version.
* + `DRAFT`: The initial status of a registration version after it’s created.
* + `SUBMITTED`: Your registration has been submitted.
* + `REVIEWING`: Your registration has been accepted and is being reviewed.
* + `APPROVED`: Your registration has been approved.
* + `DISCARDED`: You've abandon this version of their registration to start over with a new version.
* + `DENIED`: You must fix your registration and resubmit it.
* + `REVOKED`: Your previously approved registration has been revoked.
* + `ARCHIVED`: Your previously approved registration version moves into this status when a more recently submitted version is approved.
*/
public val registrationVersionStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatus = requireNotNull(builder.registrationVersionStatus) { "A non-null value must be provided for registrationVersionStatus" }
/**
* The **RegistrationVersionStatusHistory** object contains the time stamps for when the reservations status changes.
*/
public val registrationVersionStatusHistory: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory? = builder.registrationVersionStatusHistory
/**
* 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.DiscardRegistrationVersionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DiscardRegistrationVersionResponse(")
append("registrationArn=$registrationArn,")
append("registrationId=$registrationId,")
append("registrationVersionStatus=$registrationVersionStatus,")
append("registrationVersionStatusHistory=$registrationVersionStatusHistory,")
append("versionNumber=$versionNumber")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = registrationArn.hashCode()
result = 31 * result + (registrationId.hashCode())
result = 31 * result + (registrationVersionStatus.hashCode())
result = 31 * result + (registrationVersionStatusHistory?.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 DiscardRegistrationVersionResponse
if (registrationArn != other.registrationArn) return false
if (registrationId != other.registrationId) return false
if (registrationVersionStatus != other.registrationVersionStatus) return false
if (registrationVersionStatusHistory != other.registrationVersionStatusHistory) return false
if (versionNumber != other.versionNumber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DiscardRegistrationVersionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) for the registration.
*/
public var registrationArn: kotlin.String? = null
/**
* The unique identifier for the registration.
*/
public var registrationId: kotlin.String? = null
/**
* The status of the registration version.
* + `DRAFT`: The initial status of a registration version after it’s created.
* + `SUBMITTED`: Your registration has been submitted.
* + `REVIEWING`: Your registration has been accepted and is being reviewed.
* + `APPROVED`: Your registration has been approved.
* + `DISCARDED`: You've abandon this version of their registration to start over with a new version.
* + `DENIED`: You must fix your registration and resubmit it.
* + `REVOKED`: Your previously approved registration has been revoked.
* + `ARCHIVED`: Your previously approved registration version moves into this status when a more recently submitted version is approved.
*/
public var registrationVersionStatus: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatus? = null
/**
* The **RegistrationVersionStatusHistory** object contains the time stamps for when the reservations status changes.
*/
public var registrationVersionStatusHistory: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory? = 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.DiscardRegistrationVersionResponse) : this() {
this.registrationArn = x.registrationArn
this.registrationId = x.registrationId
this.registrationVersionStatus = x.registrationVersionStatus
this.registrationVersionStatusHistory = x.registrationVersionStatusHistory
this.versionNumber = x.versionNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.DiscardRegistrationVersionResponse = DiscardRegistrationVersionResponse(this)
/**
* construct an [aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory] inside the given [block]
*/
public fun registrationVersionStatusHistory(block: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory.Builder.() -> kotlin.Unit) {
this.registrationVersionStatusHistory = aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory.invoke(block)
}
internal fun correctErrors(): Builder {
if (registrationArn == null) registrationArn = ""
if (registrationId == null) registrationId = ""
if (registrationVersionStatus == null) registrationVersionStatus = RegistrationVersionStatus.SdkUnknown("no value provided")
if (versionNumber == null) versionNumber = 0L
return this
}
}
}