
commonMain.aws.sdk.kotlin.services.connectcases.model.ContactContent.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connectcases.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* An object that represents a content of an Amazon Connect contact object.
*/
public class ContactContent private constructor(builder: Builder) {
/**
* A list of channels to filter on for related items of type `Contact`.
*/
public val channel: kotlin.String = requireNotNull(builder.channel) { "A non-null value must be provided for channel" }
/**
* The difference between the `InitiationTimestamp` and the `DisconnectTimestamp` of the contact.
*/
public val connectedToSystemTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.connectedToSystemTime) { "A non-null value must be provided for connectedToSystemTime" }
/**
* A unique identifier of a contact in Amazon Connect.
*/
public val contactArn: kotlin.String = requireNotNull(builder.contactArn) { "A non-null value must be provided for contactArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.connectcases.model.ContactContent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ContactContent(")
append("channel=$channel,")
append("connectedToSystemTime=$connectedToSystemTime,")
append("contactArn=$contactArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = channel.hashCode()
result = 31 * result + (connectedToSystemTime.hashCode())
result = 31 * result + (contactArn.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 ContactContent
if (channel != other.channel) return false
if (connectedToSystemTime != other.connectedToSystemTime) return false
if (contactArn != other.contactArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.ContactContent = Builder(this).apply(block).build()
public class Builder {
/**
* A list of channels to filter on for related items of type `Contact`.
*/
public var channel: kotlin.String? = null
/**
* The difference between the `InitiationTimestamp` and the `DisconnectTimestamp` of the contact.
*/
public var connectedToSystemTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A unique identifier of a contact in Amazon Connect.
*/
public var contactArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.connectcases.model.ContactContent) : this() {
this.channel = x.channel
this.connectedToSystemTime = x.connectedToSystemTime
this.contactArn = x.contactArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.connectcases.model.ContactContent = ContactContent(this)
internal fun correctErrors(): Builder {
if (channel == null) channel = ""
if (connectedToSystemTime == null) connectedToSystemTime = Instant.fromEpochSeconds(0)
if (contactArn == null) contactArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy