commonMain.aws.sdk.kotlin.services.rdsdata.model.ExecuteStatementResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdsdata-jvm Show documentation
Show all versions of rdsdata-jvm Show documentation
The AWS SDK for Kotlin client for RDS Data
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rdsdata.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The response elements represent the output of a request to run a SQL statement against a database.
*/
public class ExecuteStatementResponse private constructor(builder: Builder) {
/**
* Metadata for the columns included in the results. This field is blank if the `formatRecordsAs` parameter is set to `JSON`.
*/
public val columnMetadata: List? = builder.columnMetadata
/**
* A string value that represents the result set of a `SELECT` statement in JSON format. This value is only present when the `formatRecordsAs` parameter is set to `JSON`.
*
* The size limit for this field is currently 10 MB. If the JSON-formatted string representing the result set requires more than 10 MB, the call returns an error.
*/
public val formattedRecords: kotlin.String? = builder.formattedRecords
/**
* Values for fields generated during a DML request.
*
* The `generatedFields` data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the `RETURNING` clause. For more information, see [Returning Data From Modified Rows](https://www.postgresql.org/docs/10/dml-returning.html) in the PostgreSQL documentation.
*/
public val generatedFields: List? = builder.generatedFields
/**
* The number of records updated by the request.
*/
public val numberOfRecordsUpdated: kotlin.Long = builder.numberOfRecordsUpdated
/**
* The records returned by the SQL statement. This field is blank if the `formatRecordsAs` parameter is set to `JSON`.
*/
public val records: List>? = builder.records
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rdsdata.model.ExecuteStatementResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ExecuteStatementResponse(")
append("columnMetadata=$columnMetadata,")
append("formattedRecords=$formattedRecords,")
append("generatedFields=$generatedFields,")
append("numberOfRecordsUpdated=$numberOfRecordsUpdated,")
append("records=$records")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = columnMetadata?.hashCode() ?: 0
result = 31 * result + (formattedRecords?.hashCode() ?: 0)
result = 31 * result + (generatedFields?.hashCode() ?: 0)
result = 31 * result + (numberOfRecordsUpdated.hashCode())
result = 31 * result + (records?.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 ExecuteStatementResponse
if (columnMetadata != other.columnMetadata) return false
if (formattedRecords != other.formattedRecords) return false
if (generatedFields != other.generatedFields) return false
if (numberOfRecordsUpdated != other.numberOfRecordsUpdated) return false
if (records != other.records) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rdsdata.model.ExecuteStatementResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Metadata for the columns included in the results. This field is blank if the `formatRecordsAs` parameter is set to `JSON`.
*/
public var columnMetadata: List? = null
/**
* A string value that represents the result set of a `SELECT` statement in JSON format. This value is only present when the `formatRecordsAs` parameter is set to `JSON`.
*
* The size limit for this field is currently 10 MB. If the JSON-formatted string representing the result set requires more than 10 MB, the call returns an error.
*/
public var formattedRecords: kotlin.String? = null
/**
* Values for fields generated during a DML request.
*
* The `generatedFields` data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the `RETURNING` clause. For more information, see [Returning Data From Modified Rows](https://www.postgresql.org/docs/10/dml-returning.html) in the PostgreSQL documentation.
*/
public var generatedFields: List? = null
/**
* The number of records updated by the request.
*/
public var numberOfRecordsUpdated: kotlin.Long = 0L
/**
* The records returned by the SQL statement. This field is blank if the `formatRecordsAs` parameter is set to `JSON`.
*/
public var records: List>? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rdsdata.model.ExecuteStatementResponse) : this() {
this.columnMetadata = x.columnMetadata
this.formattedRecords = x.formattedRecords
this.generatedFields = x.generatedFields
this.numberOfRecordsUpdated = x.numberOfRecordsUpdated
this.records = x.records
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rdsdata.model.ExecuteStatementResponse = ExecuteStatementResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy