commonMain.aws.sdk.kotlin.services.athena.model.ResultSet.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of athena-jvm Show documentation
Show all versions of athena-jvm Show documentation
The AWS SDK for Kotlin client for Athena
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.athena.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The metadata and rows that make up a query result set. The metadata describes the column structure and data types. To return a `ResultSet` object, use GetQueryResults.
*/
public class ResultSet private constructor(builder: Builder) {
/**
* The metadata that describes the column structure and data types of a table of query results.
*/
public val resultSetMetadata: aws.sdk.kotlin.services.athena.model.ResultSetMetadata? = builder.resultSetMetadata
/**
* The rows in the table.
*/
public val rows: List? = builder.rows
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.athena.model.ResultSet = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResultSet(")
append("resultSetMetadata=$resultSetMetadata,")
append("rows=$rows")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = resultSetMetadata?.hashCode() ?: 0
result = 31 * result + (rows?.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 ResultSet
if (resultSetMetadata != other.resultSetMetadata) return false
if (rows != other.rows) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.athena.model.ResultSet = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The metadata that describes the column structure and data types of a table of query results.
*/
public var resultSetMetadata: aws.sdk.kotlin.services.athena.model.ResultSetMetadata? = null
/**
* The rows in the table.
*/
public var rows: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.athena.model.ResultSet) : this() {
this.resultSetMetadata = x.resultSetMetadata
this.rows = x.rows
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.athena.model.ResultSet = ResultSet(this)
/**
* construct an [aws.sdk.kotlin.services.athena.model.ResultSetMetadata] inside the given [block]
*/
public fun resultSetMetadata(block: aws.sdk.kotlin.services.athena.model.ResultSetMetadata.Builder.() -> kotlin.Unit) {
this.resultSetMetadata = aws.sdk.kotlin.services.athena.model.ResultSetMetadata.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}