commonMain.aws.sdk.kotlin.services.wisdom.model.SearchQuickResponsesResponse.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
public class SearchQuickResponsesResponse private constructor(builder: Builder) {
/**
* The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
*/
public val nextToken: kotlin.String? = builder.nextToken
/**
* The results of the quick response search.
*/
public val results: List = requireNotNull(builder.results) { "A non-null value must be provided for results" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wisdom.model.SearchQuickResponsesResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SearchQuickResponsesResponse(")
append("nextToken=$nextToken,")
append("results=$results")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = nextToken?.hashCode() ?: 0
result = 31 * result + (results.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 SearchQuickResponsesResponse
if (nextToken != other.nextToken) return false
if (results != other.results) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wisdom.model.SearchQuickResponsesResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
*/
public var nextToken: kotlin.String? = null
/**
* The results of the quick response search.
*/
public var results: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wisdom.model.SearchQuickResponsesResponse) : this() {
this.nextToken = x.nextToken
this.results = x.results
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wisdom.model.SearchQuickResponsesResponse = SearchQuickResponsesResponse(this)
internal fun correctErrors(): Builder {
if (results == null) results = emptyList()
return this
}
}
}