commonMain.aws.sdk.kotlin.services.appconfig.model.Monitor.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appconfig-jvm Show documentation
Show all versions of appconfig-jvm Show documentation
The AWS SDK for Kotlin client for AppConfig
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appconfig.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Amazon CloudWatch alarms to monitor during the deployment process.
*/
public class Monitor private constructor(builder: Builder) {
/**
* Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.
*/
public val alarmArn: kotlin.String = requireNotNull(builder.alarmArn) { "A non-null value must be provided for alarmArn" }
/**
* ARN of an Identity and Access Management (IAM) role for AppConfig to monitor `AlarmArn`.
*/
public val alarmRoleArn: kotlin.String? = builder.alarmRoleArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appconfig.model.Monitor = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Monitor(")
append("alarmArn=$alarmArn,")
append("alarmRoleArn=$alarmRoleArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = alarmArn.hashCode()
result = 31 * result + (alarmRoleArn?.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 Monitor
if (alarmArn != other.alarmArn) return false
if (alarmRoleArn != other.alarmRoleArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appconfig.model.Monitor = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.
*/
public var alarmArn: kotlin.String? = null
/**
* ARN of an Identity and Access Management (IAM) role for AppConfig to monitor `AlarmArn`.
*/
public var alarmRoleArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appconfig.model.Monitor) : this() {
this.alarmArn = x.alarmArn
this.alarmRoleArn = x.alarmRoleArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appconfig.model.Monitor = Monitor(this)
internal fun correctErrors(): Builder {
if (alarmArn == null) alarmArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy