aws.sdk.kotlin.services.sagemaker.model.SearchResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.model
class SearchResponse private constructor(builder: BuilderImpl) {
/**
* If the result of the previous Search request was truncated, the response
* includes a NextToken. To retrieve the next set of results, use the token in the next
* request.
*/
val nextToken: String? = builder.nextToken
/**
* A list of SearchRecord objects.
*/
val results: List? = builder.results
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): SearchResponse = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SearchResponse(")
append("nextToken=$nextToken,")
append("results=$results)")
}
override fun hashCode(): kotlin.Int {
var result = nextToken?.hashCode() ?: 0
result = 31 * result + (results?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as SearchResponse
if (nextToken != other.nextToken) return false
if (results != other.results) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): SearchResponse = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): SearchResponse
/**
* If the result of the previous Search request was truncated, the response
* includes a NextToken. To retrieve the next set of results, use the token in the next
* request.
*/
fun nextToken(nextToken: String): FluentBuilder
/**
* A list of SearchRecord objects.
*/
fun results(results: List): FluentBuilder
}
interface DslBuilder {
/**
* If the result of the previous Search request was truncated, the response
* includes a NextToken. To retrieve the next set of results, use the token in the next
* request.
*/
var nextToken: String?
/**
* A list of SearchRecord objects.
*/
var results: List?
fun build(): SearchResponse
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var nextToken: String? = null
override var results: List? = null
constructor(x: SearchResponse) : this() {
this.nextToken = x.nextToken
this.results = x.results
}
override fun build(): SearchResponse = SearchResponse(this)
override fun nextToken(nextToken: String): FluentBuilder = apply { this.nextToken = nextToken }
override fun results(results: List): FluentBuilder = apply { this.results = results }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy