
commonMain.aws.sdk.kotlin.services.docdbelastic.model.Shard.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.docdbelastic.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The name of the shard.
*/
public class Shard private constructor(builder: Builder) {
/**
* The time when the shard was created in Universal Coordinated Time (UTC).
*/
public val createTime: kotlin.String = requireNotNull(builder.createTime) { "A non-null value must be provided for createTime" }
/**
* The ID of the shard.
*/
public val shardId: kotlin.String = requireNotNull(builder.shardId) { "A non-null value must be provided for shardId" }
/**
* The current status of the shard.
*/
public val status: aws.sdk.kotlin.services.docdbelastic.model.Status = requireNotNull(builder.status) { "A non-null value must be provided for status" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.docdbelastic.model.Shard = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Shard(")
append("createTime=$createTime,")
append("shardId=$shardId,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createTime.hashCode()
result = 31 * result + (shardId.hashCode())
result = 31 * result + (status.hashCode())
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 Shard
if (createTime != other.createTime) return false
if (shardId != other.shardId) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.docdbelastic.model.Shard = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The time when the shard was created in Universal Coordinated Time (UTC).
*/
public var createTime: kotlin.String? = null
/**
* The ID of the shard.
*/
public var shardId: kotlin.String? = null
/**
* The current status of the shard.
*/
public var status: aws.sdk.kotlin.services.docdbelastic.model.Status? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.docdbelastic.model.Shard) : this() {
this.createTime = x.createTime
this.shardId = x.shardId
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.docdbelastic.model.Shard = Shard(this)
internal fun correctErrors(): Builder {
if (createTime == null) createTime = ""
if (shardId == null) shardId = ""
if (status == null) status = Status.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy