
commonMain.aws.sdk.kotlin.services.ssm.model.AssociationStatus.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Describes an association status.
*/
public class AssociationStatus private constructor(builder: Builder) {
/**
* A user-defined string.
*/
public val additionalInfo: kotlin.String? = builder.additionalInfo
/**
* The date when the status changed.
*/
public val date: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.date) { "A non-null value must be provided for date" }
/**
* The reason for the status.
*/
public val message: kotlin.String = requireNotNull(builder.message) { "A non-null value must be provided for message" }
/**
* The status.
*/
public val name: aws.sdk.kotlin.services.ssm.model.AssociationStatusName = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.AssociationStatus = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssociationStatus(")
append("additionalInfo=$additionalInfo,")
append("date=$date,")
append("message=$message,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = additionalInfo?.hashCode() ?: 0
result = 31 * result + (date.hashCode())
result = 31 * result + (message.hashCode())
result = 31 * result + (name.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 AssociationStatus
if (additionalInfo != other.additionalInfo) return false
if (date != other.date) return false
if (message != other.message) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.AssociationStatus = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A user-defined string.
*/
public var additionalInfo: kotlin.String? = null
/**
* The date when the status changed.
*/
public var date: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The reason for the status.
*/
public var message: kotlin.String? = null
/**
* The status.
*/
public var name: aws.sdk.kotlin.services.ssm.model.AssociationStatusName? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.AssociationStatus) : this() {
this.additionalInfo = x.additionalInfo
this.date = x.date
this.message = x.message
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.AssociationStatus = AssociationStatus(this)
internal fun correctErrors(): Builder {
if (date == null) date = Instant.fromEpochSeconds(0)
if (message == null) message = ""
if (name == null) name = AssociationStatusName.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy