commonMain.aws.sdk.kotlin.services.timestreamquery.model.PrepareQueryResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timestreamquery-jvm Show documentation
Show all versions of timestreamquery-jvm Show documentation
The AWS SDK for Kotlin client for Timestream Query
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.timestreamquery.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PrepareQueryResponse private constructor(builder: Builder) {
/**
* A list of SELECT clause columns of the submitted query string.
*/
public val columns: List = requireNotNull(builder.columns) { "A non-null value must be provided for columns" }
/**
* A list of parameters used in the submitted query string.
*/
public val parameters: List = requireNotNull(builder.parameters) { "A non-null value must be provided for parameters" }
/**
* The query string that you want prepare.
*/
public val queryString: kotlin.String = requireNotNull(builder.queryString) { "A non-null value must be provided for queryString" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.timestreamquery.model.PrepareQueryResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PrepareQueryResponse(")
append("columns=$columns,")
append("parameters=$parameters,")
append("queryString=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = columns.hashCode()
result = 31 * result + (parameters.hashCode())
result = 31 * result + (queryString.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 PrepareQueryResponse
if (columns != other.columns) return false
if (parameters != other.parameters) return false
if (queryString != other.queryString) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.timestreamquery.model.PrepareQueryResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of SELECT clause columns of the submitted query string.
*/
public var columns: List? = null
/**
* A list of parameters used in the submitted query string.
*/
public var parameters: List? = null
/**
* The query string that you want prepare.
*/
public var queryString: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.timestreamquery.model.PrepareQueryResponse) : this() {
this.columns = x.columns
this.parameters = x.parameters
this.queryString = x.queryString
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.timestreamquery.model.PrepareQueryResponse = PrepareQueryResponse(this)
internal fun correctErrors(): Builder {
if (columns == null) columns = emptyList()
if (parameters == null) parameters = emptyList()
if (queryString == null) queryString = ""
return this
}
}
}