
commonMain.aws.sdk.kotlin.services.kinesis.model.HashKeyRange.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kinesis.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.
*/
public class HashKeyRange private constructor(builder: Builder) {
/**
* The ending hash key of the hash key range.
*/
public val endingHashKey: kotlin.String = requireNotNull(builder.endingHashKey) { "A non-null value must be provided for endingHashKey" }
/**
* The starting hash key of the hash key range.
*/
public val startingHashKey: kotlin.String = requireNotNull(builder.startingHashKey) { "A non-null value must be provided for startingHashKey" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesis.model.HashKeyRange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HashKeyRange(")
append("endingHashKey=$endingHashKey,")
append("startingHashKey=$startingHashKey")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = endingHashKey.hashCode()
result = 31 * result + (startingHashKey.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 HashKeyRange
if (endingHashKey != other.endingHashKey) return false
if (startingHashKey != other.startingHashKey) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesis.model.HashKeyRange = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ending hash key of the hash key range.
*/
public var endingHashKey: kotlin.String? = null
/**
* The starting hash key of the hash key range.
*/
public var startingHashKey: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesis.model.HashKeyRange) : this() {
this.endingHashKey = x.endingHashKey
this.startingHashKey = x.startingHashKey
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesis.model.HashKeyRange = HashKeyRange(this)
internal fun correctErrors(): Builder {
if (endingHashKey == null) endingHashKey = ""
if (startingHashKey == null) startingHashKey = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy