commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory.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
/**
* The **RegistrationVersionStatusHistory** object contains the time stamps for when the reservations status changes.
*/
public class RegistrationVersionStatusHistory private constructor(builder: Builder) {
/**
* The time when the registration was in the approved state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val approvedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.approvedTimestamp
/**
* The time when the registration was in the archived state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val archivedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.archivedTimestamp
/**
* The time when the registration was in the denied state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val deniedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.deniedTimestamp
/**
* The time when the registration was in the discarded state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val discardedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.discardedTimestamp
/**
* The time when the registration was in the draft state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val draftTimestamp: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.draftTimestamp) { "A non-null value must be provided for draftTimestamp" }
/**
* The time when the registration was in the requires authentication state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val requiresAuthenticationTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.requiresAuthenticationTimestamp
/**
* The time when the registration was in the reviewing state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val reviewingTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.reviewingTimestamp
/**
* The time when the registration was in the revoked state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val revokedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.revokedTimestamp
/**
* The time when the registration was in the submitted state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val submittedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.submittedTimestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RegistrationVersionStatusHistory(")
append("approvedTimestamp=$approvedTimestamp,")
append("archivedTimestamp=$archivedTimestamp,")
append("deniedTimestamp=$deniedTimestamp,")
append("discardedTimestamp=$discardedTimestamp,")
append("draftTimestamp=$draftTimestamp,")
append("requiresAuthenticationTimestamp=$requiresAuthenticationTimestamp,")
append("reviewingTimestamp=$reviewingTimestamp,")
append("revokedTimestamp=$revokedTimestamp,")
append("submittedTimestamp=$submittedTimestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = approvedTimestamp?.hashCode() ?: 0
result = 31 * result + (archivedTimestamp?.hashCode() ?: 0)
result = 31 * result + (deniedTimestamp?.hashCode() ?: 0)
result = 31 * result + (discardedTimestamp?.hashCode() ?: 0)
result = 31 * result + (draftTimestamp.hashCode())
result = 31 * result + (requiresAuthenticationTimestamp?.hashCode() ?: 0)
result = 31 * result + (reviewingTimestamp?.hashCode() ?: 0)
result = 31 * result + (revokedTimestamp?.hashCode() ?: 0)
result = 31 * result + (submittedTimestamp?.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 RegistrationVersionStatusHistory
if (approvedTimestamp != other.approvedTimestamp) return false
if (archivedTimestamp != other.archivedTimestamp) return false
if (deniedTimestamp != other.deniedTimestamp) return false
if (discardedTimestamp != other.discardedTimestamp) return false
if (draftTimestamp != other.draftTimestamp) return false
if (requiresAuthenticationTimestamp != other.requiresAuthenticationTimestamp) return false
if (reviewingTimestamp != other.reviewingTimestamp) return false
if (revokedTimestamp != other.revokedTimestamp) return false
if (submittedTimestamp != other.submittedTimestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The time when the registration was in the approved state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var approvedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time when the registration was in the archived state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var archivedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time when the registration was in the denied state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var deniedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time when the registration was in the discarded state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var discardedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time when the registration was in the draft state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var draftTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time when the registration was in the requires authentication state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var requiresAuthenticationTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time when the registration was in the reviewing state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var reviewingTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time when the registration was in the revoked state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var revokedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The time when the registration was in the submitted state, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var submittedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory) : this() {
this.approvedTimestamp = x.approvedTimestamp
this.archivedTimestamp = x.archivedTimestamp
this.deniedTimestamp = x.deniedTimestamp
this.discardedTimestamp = x.discardedTimestamp
this.draftTimestamp = x.draftTimestamp
this.requiresAuthenticationTimestamp = x.requiresAuthenticationTimestamp
this.reviewingTimestamp = x.reviewingTimestamp
this.revokedTimestamp = x.revokedTimestamp
this.submittedTimestamp = x.submittedTimestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationVersionStatusHistory = RegistrationVersionStatusHistory(this)
internal fun correctErrors(): Builder {
if (draftTimestamp == null) draftTimestamp = Instant.fromEpochSeconds(0)
return this
}
}
}