
commonMain.aws.sdk.kotlin.services.dynamodb.model.ReplicaGlobalSecondaryIndex.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dynamodb.model
/**
* Represents the properties of a replica global secondary index.
*/
public class ReplicaGlobalSecondaryIndex private constructor(builder: Builder) {
/**
* The name of the global secondary index.
*/
public val indexName: kotlin.String = requireNotNull(builder.indexName) { "A non-null value must be provided for indexName" }
/**
* Replica table GSI-specific provisioned throughput. If not specified, uses the source table GSI's read capacity settings.
*/
public val provisionedThroughputOverride: aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughputOverride? = builder.provisionedThroughputOverride
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dynamodb.model.ReplicaGlobalSecondaryIndex = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ReplicaGlobalSecondaryIndex(")
append("indexName=$indexName,")
append("provisionedThroughputOverride=$provisionedThroughputOverride")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = indexName.hashCode()
result = 31 * result + (provisionedThroughputOverride?.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 ReplicaGlobalSecondaryIndex
if (indexName != other.indexName) return false
if (provisionedThroughputOverride != other.provisionedThroughputOverride) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dynamodb.model.ReplicaGlobalSecondaryIndex = Builder(this).apply(block).build()
public class Builder {
/**
* The name of the global secondary index.
*/
public var indexName: kotlin.String? = null
/**
* Replica table GSI-specific provisioned throughput. If not specified, uses the source table GSI's read capacity settings.
*/
public var provisionedThroughputOverride: aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughputOverride? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.ReplicaGlobalSecondaryIndex) : this() {
this.indexName = x.indexName
this.provisionedThroughputOverride = x.provisionedThroughputOverride
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dynamodb.model.ReplicaGlobalSecondaryIndex = ReplicaGlobalSecondaryIndex(this)
/**
* construct an [aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughputOverride] inside the given [block]
*/
public fun provisionedThroughputOverride(block: aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughputOverride.Builder.() -> kotlin.Unit) {
this.provisionedThroughputOverride = aws.sdk.kotlin.services.dynamodb.model.ProvisionedThroughputOverride.invoke(block)
}
internal fun correctErrors(): Builder {
if (indexName == null) indexName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy