
commonMain.aws.sdk.kotlin.services.connectcases.model.CreateTemplateRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connectcases.model
public class CreateTemplateRequest private constructor(builder: Builder) {
/**
* A brief description of the template.
*/
public val description: kotlin.String? = builder.description
/**
* The unique identifier of the Cases domain.
*/
public val domainId: kotlin.String = requireNotNull(builder.domainId) { "A non-null value must be provided for domainId" }
/**
* Configuration of layouts associated to the template.
*/
public val layoutConfiguration: aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration? = builder.layoutConfiguration
/**
* A name for the template. It must be unique per domain.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* A list of fields that must contain a value for a case to be successfully created with this template.
*/
public val requiredFields: List? = builder.requiredFields
/**
* The status of the template.
*/
public val status: aws.sdk.kotlin.services.connectcases.model.TemplateStatus? = builder.status
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.connectcases.model.CreateTemplateRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateTemplateRequest(")
append("description=$description,")
append("domainId=$domainId,")
append("layoutConfiguration=$layoutConfiguration,")
append("name=$name,")
append("requiredFields=$requiredFields,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (domainId.hashCode())
result = 31 * result + (layoutConfiguration?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (requiredFields?.hashCode() ?: 0)
result = 31 * result + (status?.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 CreateTemplateRequest
if (description != other.description) return false
if (domainId != other.domainId) return false
if (layoutConfiguration != other.layoutConfiguration) return false
if (name != other.name) return false
if (requiredFields != other.requiredFields) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.CreateTemplateRequest = Builder(this).apply(block).build()
public class Builder {
/**
* A brief description of the template.
*/
public var description: kotlin.String? = null
/**
* The unique identifier of the Cases domain.
*/
public var domainId: kotlin.String? = null
/**
* Configuration of layouts associated to the template.
*/
public var layoutConfiguration: aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration? = null
/**
* A name for the template. It must be unique per domain.
*/
public var name: kotlin.String? = null
/**
* A list of fields that must contain a value for a case to be successfully created with this template.
*/
public var requiredFields: List? = null
/**
* The status of the template.
*/
public var status: aws.sdk.kotlin.services.connectcases.model.TemplateStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.connectcases.model.CreateTemplateRequest) : this() {
this.description = x.description
this.domainId = x.domainId
this.layoutConfiguration = x.layoutConfiguration
this.name = x.name
this.requiredFields = x.requiredFields
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.connectcases.model.CreateTemplateRequest = CreateTemplateRequest(this)
/**
* construct an [aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration] inside the given [block]
*/
public fun layoutConfiguration(block: aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration.Builder.() -> kotlin.Unit) {
this.layoutConfiguration = aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
if (domainId == null) domainId = ""
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy