commonMain.aws.sdk.kotlin.services.wisdom.model.QueryAssistantRequest.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 QueryAssistantRequest private constructor(builder: Builder) {
/**
* The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
*/
public val assistantId: kotlin.String = requireNotNull(builder.assistantId) { "A non-null value must be provided for assistantId" }
/**
* The maximum number of results to return per page.
*/
public val maxResults: kotlin.Int? = builder.maxResults
/**
* 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 text to search for.
*/
public val queryText: kotlin.String = requireNotNull(builder.queryText) { "A non-null value must be provided for queryText" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wisdom.model.QueryAssistantRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("QueryAssistantRequest(")
append("assistantId=$assistantId,")
append("maxResults=$maxResults,")
append("nextToken=$nextToken,")
append("queryText=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = assistantId.hashCode()
result = 31 * result + (maxResults ?: 0)
result = 31 * result + (nextToken?.hashCode() ?: 0)
result = 31 * result + (queryText.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 QueryAssistantRequest
if (assistantId != other.assistantId) return false
if (maxResults != other.maxResults) return false
if (nextToken != other.nextToken) return false
if (queryText != other.queryText) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wisdom.model.QueryAssistantRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
*/
public var assistantId: kotlin.String? = null
/**
* The maximum number of results to return per page.
*/
public var maxResults: kotlin.Int? = null
/**
* 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 text to search for.
*/
public var queryText: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wisdom.model.QueryAssistantRequest) : this() {
this.assistantId = x.assistantId
this.maxResults = x.maxResults
this.nextToken = x.nextToken
this.queryText = x.queryText
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wisdom.model.QueryAssistantRequest = QueryAssistantRequest(this)
internal fun correctErrors(): Builder {
if (assistantId == null) assistantId = ""
if (queryText == null) queryText = ""
return this
}
}
}