
commonMain.aws.sdk.kotlin.services.redshiftdata.model.GetStatementResultResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshiftdata.model
public class GetStatementResultResponse private constructor(builder: Builder) {
/**
* The properties (metadata) of a column.
*/
public val columnMetadata: List? = builder.columnMetadata
/**
* A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
*/
public val nextToken: kotlin.String? = builder.nextToken
/**
* The results of the SQL statement.
*/
public val records: List> = requireNotNull(builder.records) { "A non-null value must be provided for records" }
/**
* The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the `GetStatementResult` operation needed to page through the results.
*/
public val totalNumRows: kotlin.Long = builder.totalNumRows
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshiftdata.model.GetStatementResultResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetStatementResultResponse(")
append("columnMetadata=$columnMetadata,")
append("nextToken=$nextToken,")
append("records=$records,")
append("totalNumRows=$totalNumRows")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = columnMetadata?.hashCode() ?: 0
result = 31 * result + (nextToken?.hashCode() ?: 0)
result = 31 * result + (records.hashCode())
result = 31 * result + (totalNumRows.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 GetStatementResultResponse
if (columnMetadata != other.columnMetadata) return false
if (nextToken != other.nextToken) return false
if (records != other.records) return false
if (totalNumRows != other.totalNumRows) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshiftdata.model.GetStatementResultResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The properties (metadata) of a column.
*/
public var columnMetadata: List? = null
/**
* A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
*/
public var nextToken: kotlin.String? = null
/**
* The results of the SQL statement.
*/
public var records: List>? = null
/**
* The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the `GetStatementResult` operation needed to page through the results.
*/
public var totalNumRows: kotlin.Long = 0L
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshiftdata.model.GetStatementResultResponse) : this() {
this.columnMetadata = x.columnMetadata
this.nextToken = x.nextToken
this.records = x.records
this.totalNumRows = x.totalNumRows
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshiftdata.model.GetStatementResultResponse = GetStatementResultResponse(this)
internal fun correctErrors(): Builder {
if (records == null) records = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy