commonMain.aws.sdk.kotlin.services.ssmincidents.model.RegionInfo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssmincidents-jvm Show documentation
Show all versions of ssmincidents-jvm Show documentation
The AWS SDK for Kotlin client for SSM Incidents
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmincidents.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Information about a Amazon Web Services Region in your replication set.
*/
public class RegionInfo private constructor(builder: Builder) {
/**
* The ID of the KMS key used to encrypt the data in this Amazon Web Services Region.
*/
public val sseKmsKeyId: kotlin.String? = builder.sseKmsKeyId
/**
* The status of the Amazon Web Services Region in the replication set.
*/
public val status: aws.sdk.kotlin.services.ssmincidents.model.RegionStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
/**
* Information displayed about the status of the Amazon Web Services Region.
*/
public val statusMessage: kotlin.String? = builder.statusMessage
/**
* The timestamp for when Incident Manager updated the status of the Amazon Web Services Region.
*/
public val statusUpdateDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.statusUpdateDateTime) { "A non-null value must be provided for statusUpdateDateTime" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.RegionInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RegionInfo(")
append("sseKmsKeyId=$sseKmsKeyId,")
append("status=$status,")
append("statusMessage=$statusMessage,")
append("statusUpdateDateTime=$statusUpdateDateTime")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = sseKmsKeyId?.hashCode() ?: 0
result = 31 * result + (status.hashCode())
result = 31 * result + (statusMessage?.hashCode() ?: 0)
result = 31 * result + (statusUpdateDateTime.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 RegionInfo
if (sseKmsKeyId != other.sseKmsKeyId) return false
if (status != other.status) return false
if (statusMessage != other.statusMessage) return false
if (statusUpdateDateTime != other.statusUpdateDateTime) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.RegionInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the KMS key used to encrypt the data in this Amazon Web Services Region.
*/
public var sseKmsKeyId: kotlin.String? = null
/**
* The status of the Amazon Web Services Region in the replication set.
*/
public var status: aws.sdk.kotlin.services.ssmincidents.model.RegionStatus? = null
/**
* Information displayed about the status of the Amazon Web Services Region.
*/
public var statusMessage: kotlin.String? = null
/**
* The timestamp for when Incident Manager updated the status of the Amazon Web Services Region.
*/
public var statusUpdateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.RegionInfo) : this() {
this.sseKmsKeyId = x.sseKmsKeyId
this.status = x.status
this.statusMessage = x.statusMessage
this.statusUpdateDateTime = x.statusUpdateDateTime
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.RegionInfo = RegionInfo(this)
internal fun correctErrors(): Builder {
if (status == null) status = RegionStatus.SdkUnknown("no value provided")
if (statusUpdateDateTime == null) statusUpdateDateTime = Instant.fromEpochSeconds(0)
return this
}
}
}