
commonMain.aws.sdk.kotlin.services.connectcases.model.CommentContent.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connectcases.model
/**
* Represents the content of a `Comment` to be returned to agents.
*/
public class CommentContent private constructor(builder: Builder) {
/**
* Text in the body of a `Comment` on a case.
*/
public val body: kotlin.String = requireNotNull(builder.body) { "A non-null value must be provided for body" }
/**
* Type of the text in the box of a `Comment` on a case.
*/
public val contentType: aws.sdk.kotlin.services.connectcases.model.CommentBodyTextType = requireNotNull(builder.contentType) { "A non-null value must be provided for contentType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.connectcases.model.CommentContent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CommentContent(")
append("body=$body,")
append("contentType=$contentType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = body.hashCode()
result = 31 * result + (contentType.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 CommentContent
if (body != other.body) return false
if (contentType != other.contentType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.CommentContent = Builder(this).apply(block).build()
public class Builder {
/**
* Text in the body of a `Comment` on a case.
*/
public var body: kotlin.String? = null
/**
* Type of the text in the box of a `Comment` on a case.
*/
public var contentType: aws.sdk.kotlin.services.connectcases.model.CommentBodyTextType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.connectcases.model.CommentContent) : this() {
this.body = x.body
this.contentType = x.contentType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.connectcases.model.CommentContent = CommentContent(this)
internal fun correctErrors(): Builder {
if (body == null) body = ""
if (contentType == null) contentType = CommentBodyTextType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy