![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.aws.sdk.kotlin.services.rdsdata.model.ResultSetOptions.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
/**
* Options that control how the result set is returned.
*/
public class ResultSetOptions private constructor(builder: Builder) {
/**
* A value that indicates how a field of `DECIMAL` type is represented in the response. The value of `STRING`, the default, specifies that it is converted to a String value. The value of `DOUBLE_OR_LONG` specifies that it is converted to a Long value if its scale is 0, or to a Double value otherwise.
*
* Conversion to Double or Long can result in roundoff errors due to precision loss. We recommend converting to String, especially when working with currency values.
*/
public val decimalReturnType: aws.sdk.kotlin.services.rdsdata.model.DecimalReturnType? = builder.decimalReturnType
/**
* A value that indicates how a field of `LONG` type is represented. Allowed values are `LONG` and `STRING`. The default is `LONG`. Specify `STRING` if the length or precision of numeric values might cause truncation or rounding errors.
*/
public val longReturnType: aws.sdk.kotlin.services.rdsdata.model.LongReturnType? = builder.longReturnType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rdsdata.model.ResultSetOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResultSetOptions(")
append("decimalReturnType=$decimalReturnType,")
append("longReturnType=$longReturnType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = decimalReturnType?.hashCode() ?: 0
result = 31 * result + (longReturnType?.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 ResultSetOptions
if (decimalReturnType != other.decimalReturnType) return false
if (longReturnType != other.longReturnType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rdsdata.model.ResultSetOptions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A value that indicates how a field of `DECIMAL` type is represented in the response. The value of `STRING`, the default, specifies that it is converted to a String value. The value of `DOUBLE_OR_LONG` specifies that it is converted to a Long value if its scale is 0, or to a Double value otherwise.
*
* Conversion to Double or Long can result in roundoff errors due to precision loss. We recommend converting to String, especially when working with currency values.
*/
public var decimalReturnType: aws.sdk.kotlin.services.rdsdata.model.DecimalReturnType? = null
/**
* A value that indicates how a field of `LONG` type is represented. Allowed values are `LONG` and `STRING`. The default is `LONG`. Specify `STRING` if the length or precision of numeric values might cause truncation or rounding errors.
*/
public var longReturnType: aws.sdk.kotlin.services.rdsdata.model.LongReturnType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rdsdata.model.ResultSetOptions) : this() {
this.decimalReturnType = x.decimalReturnType
this.longReturnType = x.longReturnType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rdsdata.model.ResultSetOptions = ResultSetOptions(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy