commonMain.aws.sdk.kotlin.services.cloudsearchdomain.model.SuggestRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudsearchdomain-jvm Show documentation
Show all versions of cloudsearchdomain-jvm Show documentation
The AWS Kotlin client for CloudSearch Domain
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudsearchdomain.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Container for the parameters to the `Suggest` request.
*/
public class SuggestRequest private constructor(builder: Builder) {
/**
* Specifies the string for which you want to get suggestions.
*/
public val query: kotlin.String? = builder.query
/**
* Specifies the maximum number of suggestions to return.
*/
public val size: kotlin.Long? = builder.size
/**
* Specifies the name of the suggester to use to find suggested matches.
*/
public val suggester: kotlin.String? = builder.suggester
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudsearchdomain.model.SuggestRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SuggestRequest(")
append("query=$query,")
append("size=$size,")
append("suggester=$suggester")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = query?.hashCode() ?: 0
result = 31 * result + (size?.hashCode() ?: 0)
result = 31 * result + (suggester?.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 SuggestRequest
if (query != other.query) return false
if (size != other.size) return false
if (suggester != other.suggester) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudsearchdomain.model.SuggestRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the string for which you want to get suggestions.
*/
public var query: kotlin.String? = null
/**
* Specifies the maximum number of suggestions to return.
*/
public var size: kotlin.Long? = null
/**
* Specifies the name of the suggester to use to find suggested matches.
*/
public var suggester: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudsearchdomain.model.SuggestRequest) : this() {
this.query = x.query
this.size = x.size
this.suggester = x.suggester
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudsearchdomain.model.SuggestRequest = SuggestRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy