
commonMain.aws.sdk.kotlin.services.ssmcontacts.model.Target.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
/**
* The contact or contact channel that's being engaged.
*/
public class Target private constructor(builder: Builder) {
/**
* Information about the contact channel Incident Manager is engaging.
*/
public val channelTargetInfo: aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo? = builder.channelTargetInfo
/**
* Information about the contact that Incident Manager is engaging.
*/
public val contactTargetInfo: aws.sdk.kotlin.services.ssmcontacts.model.ContactTargetInfo? = builder.contactTargetInfo
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmcontacts.model.Target = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Target(")
append("channelTargetInfo=$channelTargetInfo,")
append("contactTargetInfo=$contactTargetInfo")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = channelTargetInfo?.hashCode() ?: 0
result = 31 * result + (contactTargetInfo?.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 Target
if (channelTargetInfo != other.channelTargetInfo) return false
if (contactTargetInfo != other.contactTargetInfo) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmcontacts.model.Target = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Information about the contact channel Incident Manager is engaging.
*/
public var channelTargetInfo: aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo? = null
/**
* Information about the contact that Incident Manager is engaging.
*/
public var contactTargetInfo: aws.sdk.kotlin.services.ssmcontacts.model.ContactTargetInfo? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.Target) : this() {
this.channelTargetInfo = x.channelTargetInfo
this.contactTargetInfo = x.contactTargetInfo
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmcontacts.model.Target = Target(this)
/**
* construct an [aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo] inside the given [block]
*/
public fun channelTargetInfo(block: aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo.Builder.() -> kotlin.Unit) {
this.channelTargetInfo = aws.sdk.kotlin.services.ssmcontacts.model.ChannelTargetInfo.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.ssmcontacts.model.ContactTargetInfo] inside the given [block]
*/
public fun contactTargetInfo(block: aws.sdk.kotlin.services.ssmcontacts.model.ContactTargetInfo.Builder.() -> kotlin.Unit) {
this.contactTargetInfo = aws.sdk.kotlin.services.ssmcontacts.model.ContactTargetInfo.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy