
commonMain.aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmcontacts.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about the contact channel that Incident Manager uses to engage the contact.
*/
public class ChannelTargetInfo private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the contact channel.
*/
public val contactChannelId: kotlin.String = requireNotNull(builder.contactChannelId) { "A non-null value must be provided for contactChannelId" }
/**
* The number of minutes to wait to retry sending engagement in the case the engagement initially fails.
*/
public val retryIntervalInMinutes: kotlin.Int? = builder.retryIntervalInMinutes
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ChannelTargetInfo(")
append("contactChannelId=$contactChannelId,")
append("retryIntervalInMinutes=$retryIntervalInMinutes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = contactChannelId.hashCode()
result = 31 * result + (retryIntervalInMinutes ?: 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 ChannelTargetInfo
if (contactChannelId != other.contactChannelId) return false
if (retryIntervalInMinutes != other.retryIntervalInMinutes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the contact channel.
*/
public var contactChannelId: kotlin.String? = null
/**
* The number of minutes to wait to retry sending engagement in the case the engagement initially fails.
*/
public var retryIntervalInMinutes: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo) : this() {
this.contactChannelId = x.contactChannelId
this.retryIntervalInMinutes = x.retryIntervalInMinutes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo = ChannelTargetInfo(this)
internal fun correctErrors(): Builder {
if (contactChannelId == null) contactChannelId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy