
commonMain.aws.sdk.kotlin.services.ssmcontacts.model.GetContactChannelResponse.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
public class GetContactChannelResponse private constructor(builder: Builder) {
/**
* A Boolean value indicating if the contact channel has been activated or not.
*/
public val activationStatus: aws.sdk.kotlin.services.ssmcontacts.model.ActivationStatus? = builder.activationStatus
/**
* The ARN of the contact that the channel belongs to.
*/
public val contactArn: kotlin.String = requireNotNull(builder.contactArn) { "A non-null value must be provided for contactArn" }
/**
* The ARN of the contact channel.
*/
public val contactChannelArn: kotlin.String = requireNotNull(builder.contactChannelArn) { "A non-null value must be provided for contactChannelArn" }
/**
* The details that Incident Manager uses when trying to engage the contact channel.
*/
public val deliveryAddress: aws.sdk.kotlin.services.ssmcontacts.model.ContactChannelAddress? = builder.deliveryAddress
/**
* The name of the contact channel
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The type of contact channel. The type is `SMS`, `VOICE`, or `EMAIL`.
*/
public val type: aws.sdk.kotlin.services.ssmcontacts.model.ChannelType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmcontacts.model.GetContactChannelResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetContactChannelResponse(")
append("activationStatus=$activationStatus,")
append("contactArn=$contactArn,")
append("contactChannelArn=$contactChannelArn,")
append("deliveryAddress=$deliveryAddress,")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = activationStatus?.hashCode() ?: 0
result = 31 * result + (contactArn.hashCode())
result = 31 * result + (contactChannelArn.hashCode())
result = 31 * result + (deliveryAddress?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (type.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 GetContactChannelResponse
if (activationStatus != other.activationStatus) return false
if (contactArn != other.contactArn) return false
if (contactChannelArn != other.contactChannelArn) return false
if (deliveryAddress != other.deliveryAddress) return false
if (name != other.name) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmcontacts.model.GetContactChannelResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A Boolean value indicating if the contact channel has been activated or not.
*/
public var activationStatus: aws.sdk.kotlin.services.ssmcontacts.model.ActivationStatus? = null
/**
* The ARN of the contact that the channel belongs to.
*/
public var contactArn: kotlin.String? = null
/**
* The ARN of the contact channel.
*/
public var contactChannelArn: kotlin.String? = null
/**
* The details that Incident Manager uses when trying to engage the contact channel.
*/
public var deliveryAddress: aws.sdk.kotlin.services.ssmcontacts.model.ContactChannelAddress? = null
/**
* The name of the contact channel
*/
public var name: kotlin.String? = null
/**
* The type of contact channel. The type is `SMS`, `VOICE`, or `EMAIL`.
*/
public var type: aws.sdk.kotlin.services.ssmcontacts.model.ChannelType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmcontacts.model.GetContactChannelResponse) : this() {
this.activationStatus = x.activationStatus
this.contactArn = x.contactArn
this.contactChannelArn = x.contactChannelArn
this.deliveryAddress = x.deliveryAddress
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmcontacts.model.GetContactChannelResponse = GetContactChannelResponse(this)
/**
* construct an [aws.sdk.kotlin.services.ssmcontacts.model.ContactChannelAddress] inside the given [block]
*/
public fun deliveryAddress(block: aws.sdk.kotlin.services.ssmcontacts.model.ContactChannelAddress.Builder.() -> kotlin.Unit) {
this.deliveryAddress = aws.sdk.kotlin.services.ssmcontacts.model.ContactChannelAddress.invoke(block)
}
internal fun correctErrors(): Builder {
if (contactArn == null) contactArn = ""
if (contactChannelArn == null) contactChannelArn = ""
if (name == null) name = ""
if (type == null) type = ChannelType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy