![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.aws.sdk.kotlin.services.rdsdata.model.SqlParameter.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
/**
* A parameter used in a SQL statement.
*/
public class SqlParameter private constructor(builder: Builder) {
/**
* The name of the parameter.
*/
public val name: kotlin.String? = builder.name
/**
* A hint that specifies the correct object type for data type mapping. Possible values are as follows:
* + `DATE` - The corresponding `String` parameter value is sent as an object of `DATE` type to the database. The accepted format is `YYYY-MM-DD`.
* + `DECIMAL` - The corresponding `String` parameter value is sent as an object of `DECIMAL` type to the database.
* + `JSON` - The corresponding `String` parameter value is sent as an object of `JSON` type to the database.
* + `TIME` - The corresponding `String` parameter value is sent as an object of `TIME` type to the database. The accepted format is `HH:MM:SS[.FFF]`.
* + `TIMESTAMP` - The corresponding `String` parameter value is sent as an object of `TIMESTAMP` type to the database. The accepted format is `YYYY-MM-DD HH:MM:SS[.FFF]`.
* + `UUID` - The corresponding `String` parameter value is sent as an object of `UUID` type to the database.
*/
public val typeHint: aws.sdk.kotlin.services.rdsdata.model.TypeHint? = builder.typeHint
/**
* The value of the parameter.
*/
public val value: aws.sdk.kotlin.services.rdsdata.model.Field? = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rdsdata.model.SqlParameter = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SqlParameter(")
append("name=$name,")
append("typeHint=$typeHint,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (typeHint?.hashCode() ?: 0)
result = 31 * result + (value?.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 SqlParameter
if (name != other.name) return false
if (typeHint != other.typeHint) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rdsdata.model.SqlParameter = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the parameter.
*/
public var name: kotlin.String? = null
/**
* A hint that specifies the correct object type for data type mapping. Possible values are as follows:
* + `DATE` - The corresponding `String` parameter value is sent as an object of `DATE` type to the database. The accepted format is `YYYY-MM-DD`.
* + `DECIMAL` - The corresponding `String` parameter value is sent as an object of `DECIMAL` type to the database.
* + `JSON` - The corresponding `String` parameter value is sent as an object of `JSON` type to the database.
* + `TIME` - The corresponding `String` parameter value is sent as an object of `TIME` type to the database. The accepted format is `HH:MM:SS[.FFF]`.
* + `TIMESTAMP` - The corresponding `String` parameter value is sent as an object of `TIMESTAMP` type to the database. The accepted format is `YYYY-MM-DD HH:MM:SS[.FFF]`.
* + `UUID` - The corresponding `String` parameter value is sent as an object of `UUID` type to the database.
*/
public var typeHint: aws.sdk.kotlin.services.rdsdata.model.TypeHint? = null
/**
* The value of the parameter.
*/
public var value: aws.sdk.kotlin.services.rdsdata.model.Field? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rdsdata.model.SqlParameter) : this() {
this.name = x.name
this.typeHint = x.typeHint
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rdsdata.model.SqlParameter = SqlParameter(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy