
commonMain.aws.sdk.kotlin.services.ssm.model.AlarmStateInformation.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.model
/**
* The details about the state of your CloudWatch alarm.
*/
public class AlarmStateInformation private constructor(builder: Builder) {
/**
* The name of your CloudWatch alarm.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The state of your CloudWatch alarm.
*/
public val state: aws.sdk.kotlin.services.ssm.model.ExternalAlarmState = requireNotNull(builder.state) { "A non-null value must be provided for state" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.AlarmStateInformation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AlarmStateInformation(")
append("name=$name,")
append("state=$state")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name.hashCode()
result = 31 * result + (state.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 AlarmStateInformation
if (name != other.name) return false
if (state != other.state) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.AlarmStateInformation = Builder(this).apply(block).build()
public class Builder {
/**
* The name of your CloudWatch alarm.
*/
public var name: kotlin.String? = null
/**
* The state of your CloudWatch alarm.
*/
public var state: aws.sdk.kotlin.services.ssm.model.ExternalAlarmState? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssm.model.AlarmStateInformation) : this() {
this.name = x.name
this.state = x.state
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssm.model.AlarmStateInformation = AlarmStateInformation(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (state == null) state = ExternalAlarmState.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy