
commonMain.aws.sdk.kotlin.services.dynamodb.model.ReplicaUpdate.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dynamodb.model
/**
* Represents one of the following:
* + A new replica to be added to an existing global table.
* + New parameters for an existing replica.
* + An existing replica to be removed from an existing global table.
*/
public class ReplicaUpdate private constructor(builder: Builder) {
/**
* The parameters required for creating a replica on an existing global table.
*/
public val create: aws.sdk.kotlin.services.dynamodb.model.CreateReplicaAction? = builder.create
/**
* The name of the existing replica to be removed.
*/
public val delete: aws.sdk.kotlin.services.dynamodb.model.DeleteReplicaAction? = builder.delete
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dynamodb.model.ReplicaUpdate = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ReplicaUpdate(")
append("create=$create,")
append("delete=$delete")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = create?.hashCode() ?: 0
result = 31 * result + (delete?.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 ReplicaUpdate
if (create != other.create) return false
if (delete != other.delete) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dynamodb.model.ReplicaUpdate = Builder(this).apply(block).build()
public class Builder {
/**
* The parameters required for creating a replica on an existing global table.
*/
public var create: aws.sdk.kotlin.services.dynamodb.model.CreateReplicaAction? = null
/**
* The name of the existing replica to be removed.
*/
public var delete: aws.sdk.kotlin.services.dynamodb.model.DeleteReplicaAction? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.ReplicaUpdate) : this() {
this.create = x.create
this.delete = x.delete
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dynamodb.model.ReplicaUpdate = ReplicaUpdate(this)
/**
* construct an [aws.sdk.kotlin.services.dynamodb.model.CreateReplicaAction] inside the given [block]
*/
public fun create(block: aws.sdk.kotlin.services.dynamodb.model.CreateReplicaAction.Builder.() -> kotlin.Unit) {
this.create = aws.sdk.kotlin.services.dynamodb.model.CreateReplicaAction.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.dynamodb.model.DeleteReplicaAction] inside the given [block]
*/
public fun delete(block: aws.sdk.kotlin.services.dynamodb.model.DeleteReplicaAction.Builder.() -> kotlin.Unit) {
this.delete = aws.sdk.kotlin.services.dynamodb.model.DeleteReplicaAction.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy