commonMain.aws.sdk.kotlin.services.timestreamwrite.model.Schema.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timestreamwrite-jvm Show documentation
Show all versions of timestreamwrite-jvm Show documentation
The AWS SDK for Kotlin client for Timestream Write
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.timestreamwrite.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A Schema specifies the expected data model of the table.
*/
public class Schema private constructor(builder: Builder) {
/**
* A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.
*/
public val compositePartitionKey: List? = builder.compositePartitionKey
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.timestreamwrite.model.Schema = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Schema(")
append("compositePartitionKey=$compositePartitionKey")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = compositePartitionKey?.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 Schema
if (compositePartitionKey != other.compositePartitionKey) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.timestreamwrite.model.Schema = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.
*/
public var compositePartitionKey: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.timestreamwrite.model.Schema) : this() {
this.compositePartitionKey = x.compositePartitionKey
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.timestreamwrite.model.Schema = Schema(this)
internal fun correctErrors(): Builder {
return this
}
}
}