commonMain.aws.sdk.kotlin.services.timestreamquery.model.ParameterMapping.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timestreamquery-jvm Show documentation
Show all versions of timestreamquery-jvm Show documentation
The AWS SDK for Kotlin client for Timestream Query
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.timestreamquery.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Mapping for named parameters.
*/
public class ParameterMapping private constructor(builder: Builder) {
/**
* Parameter name.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Contains the data type of a column in a query result set. The data type can be scalar or complex. The supported scalar data types are integers, Boolean, string, double, timestamp, date, time, and intervals. The supported complex data types are arrays, rows, and timeseries.
*/
public val type: aws.sdk.kotlin.services.timestreamquery.model.Type? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.timestreamquery.model.ParameterMapping = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ParameterMapping(")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name.hashCode()
result = 31 * result + (type?.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 ParameterMapping
if (name != other.name) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.timestreamquery.model.ParameterMapping = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Parameter name.
*/
public var name: kotlin.String? = null
/**
* Contains the data type of a column in a query result set. The data type can be scalar or complex. The supported scalar data types are integers, Boolean, string, double, timestamp, date, time, and intervals. The supported complex data types are arrays, rows, and timeseries.
*/
public var type: aws.sdk.kotlin.services.timestreamquery.model.Type? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.timestreamquery.model.ParameterMapping) : this() {
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.timestreamquery.model.ParameterMapping = ParameterMapping(this)
/**
* construct an [aws.sdk.kotlin.services.timestreamquery.model.Type] inside the given [block]
*/
public fun type(block: aws.sdk.kotlin.services.timestreamquery.model.Type.Builder.() -> kotlin.Unit) {
this.type = aws.sdk.kotlin.services.timestreamquery.model.Type.invoke(block)
}
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}