commonMain.aws.sdk.kotlin.services.timestreamwrite.model.UpdateTableRequest.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
public class UpdateTableRequest private constructor(builder: Builder) {
/**
* The name of the Timestream database.
*/
public val databaseName: kotlin.String? = builder.databaseName
/**
* Contains properties to set on the table when enabling magnetic store writes.
*/
public val magneticStoreWriteProperties: aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreWriteProperties? = builder.magneticStoreWriteProperties
/**
* The retention duration of the memory store and the magnetic store.
*/
public val retentionProperties: aws.sdk.kotlin.services.timestreamwrite.model.RetentionProperties? = builder.retentionProperties
/**
* The schema of the table.
*/
public val schema: aws.sdk.kotlin.services.timestreamwrite.model.Schema? = builder.schema
/**
* The name of the Timestream table.
*/
public val tableName: kotlin.String? = builder.tableName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.timestreamwrite.model.UpdateTableRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateTableRequest(")
append("databaseName=$databaseName,")
append("magneticStoreWriteProperties=$magneticStoreWriteProperties,")
append("retentionProperties=$retentionProperties,")
append("schema=$schema,")
append("tableName=$tableName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = databaseName?.hashCode() ?: 0
result = 31 * result + (magneticStoreWriteProperties?.hashCode() ?: 0)
result = 31 * result + (retentionProperties?.hashCode() ?: 0)
result = 31 * result + (schema?.hashCode() ?: 0)
result = 31 * result + (tableName?.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 UpdateTableRequest
if (databaseName != other.databaseName) return false
if (magneticStoreWriteProperties != other.magneticStoreWriteProperties) return false
if (retentionProperties != other.retentionProperties) return false
if (schema != other.schema) return false
if (tableName != other.tableName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.timestreamwrite.model.UpdateTableRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the Timestream database.
*/
public var databaseName: kotlin.String? = null
/**
* Contains properties to set on the table when enabling magnetic store writes.
*/
public var magneticStoreWriteProperties: aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreWriteProperties? = null
/**
* The retention duration of the memory store and the magnetic store.
*/
public var retentionProperties: aws.sdk.kotlin.services.timestreamwrite.model.RetentionProperties? = null
/**
* The schema of the table.
*/
public var schema: aws.sdk.kotlin.services.timestreamwrite.model.Schema? = null
/**
* The name of the Timestream table.
*/
public var tableName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.timestreamwrite.model.UpdateTableRequest) : this() {
this.databaseName = x.databaseName
this.magneticStoreWriteProperties = x.magneticStoreWriteProperties
this.retentionProperties = x.retentionProperties
this.schema = x.schema
this.tableName = x.tableName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.timestreamwrite.model.UpdateTableRequest = UpdateTableRequest(this)
/**
* construct an [aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreWriteProperties] inside the given [block]
*/
public fun magneticStoreWriteProperties(block: aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreWriteProperties.Builder.() -> kotlin.Unit) {
this.magneticStoreWriteProperties = aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreWriteProperties.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.timestreamwrite.model.RetentionProperties] inside the given [block]
*/
public fun retentionProperties(block: aws.sdk.kotlin.services.timestreamwrite.model.RetentionProperties.Builder.() -> kotlin.Unit) {
this.retentionProperties = aws.sdk.kotlin.services.timestreamwrite.model.RetentionProperties.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.timestreamwrite.model.Schema] inside the given [block]
*/
public fun schema(block: aws.sdk.kotlin.services.timestreamwrite.model.Schema.Builder.() -> kotlin.Unit) {
this.schema = aws.sdk.kotlin.services.timestreamwrite.model.Schema.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}