
commonMain.aws.sdk.kotlin.services.connectcases.model.CreateCaseRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connectcases.model
public class CreateCaseRequest private constructor(builder: Builder) {
/**
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see [Making retries safe with idempotent APIs](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/).
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* The unique identifier of the Cases domain.
*/
public val domainId: kotlin.String = requireNotNull(builder.domainId) { "A non-null value must be provided for domainId" }
/**
* An array of objects with field ID (matching ListFields/DescribeField) and value union data.
*/
public val fields: List = requireNotNull(builder.fields) { "A non-null value must be provided for fields" }
/**
* Represents the identity of the person who performed the action.
*/
public val performedBy: aws.sdk.kotlin.services.connectcases.model.UserUnion? = builder.performedBy
/**
* A unique identifier of a template.
*/
public val templateId: kotlin.String = requireNotNull(builder.templateId) { "A non-null value must be provided for templateId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.connectcases.model.CreateCaseRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateCaseRequest(")
append("clientToken=$clientToken,")
append("domainId=$domainId,")
append("fields=$fields,")
append("performedBy=$performedBy,")
append("templateId=$templateId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (domainId.hashCode())
result = 31 * result + (fields.hashCode())
result = 31 * result + (performedBy?.hashCode() ?: 0)
result = 31 * result + (templateId.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 CreateCaseRequest
if (clientToken != other.clientToken) return false
if (domainId != other.domainId) return false
if (fields != other.fields) return false
if (performedBy != other.performedBy) return false
if (templateId != other.templateId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.CreateCaseRequest = Builder(this).apply(block).build()
public class Builder {
/**
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see [Making retries safe with idempotent APIs](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/).
*/
public var clientToken: kotlin.String? = null
/**
* The unique identifier of the Cases domain.
*/
public var domainId: kotlin.String? = null
/**
* An array of objects with field ID (matching ListFields/DescribeField) and value union data.
*/
public var fields: List? = null
/**
* Represents the identity of the person who performed the action.
*/
public var performedBy: aws.sdk.kotlin.services.connectcases.model.UserUnion? = null
/**
* A unique identifier of a template.
*/
public var templateId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.connectcases.model.CreateCaseRequest) : this() {
this.clientToken = x.clientToken
this.domainId = x.domainId
this.fields = x.fields
this.performedBy = x.performedBy
this.templateId = x.templateId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.connectcases.model.CreateCaseRequest = CreateCaseRequest(this)
internal fun correctErrors(): Builder {
if (domainId == null) domainId = ""
if (fields == null) fields = emptyList()
if (templateId == null) templateId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy