commonMain.aws.sdk.kotlin.services.wisdom.model.QuickResponseOrderField.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wisdom-jvm Show documentation
Show all versions of wisdom-jvm Show documentation
The AWS SDK for Kotlin client for Wisdom
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wisdom.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The quick response fields to order the quick response query results by.
*
* The following is the list of supported field names.
* + name
* + description
* + shortcutKey
* + isActive
* + channels
* + language
* + contentType
* + createdTime
* + lastModifiedTime
* + lastModifiedBy
* + groupingConfiguration.criteria
* + groupingConfiguration.values
*/
public class QuickResponseOrderField private constructor(builder: Builder) {
/**
* The name of the attribute to order the quick response query results by.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The order at which the quick responses are sorted by.
*/
public val order: aws.sdk.kotlin.services.wisdom.model.Order? = builder.order
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wisdom.model.QuickResponseOrderField = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("QuickResponseOrderField(")
append("name=$name,")
append("order=$order")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name.hashCode()
result = 31 * result + (order?.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 QuickResponseOrderField
if (name != other.name) return false
if (order != other.order) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wisdom.model.QuickResponseOrderField = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the attribute to order the quick response query results by.
*/
public var name: kotlin.String? = null
/**
* The order at which the quick responses are sorted by.
*/
public var order: aws.sdk.kotlin.services.wisdom.model.Order? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wisdom.model.QuickResponseOrderField) : this() {
this.name = x.name
this.order = x.order
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wisdom.model.QuickResponseOrderField = QuickResponseOrderField(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}