commonMain.aws.sdk.kotlin.services.kinesis.model.SequenceNumberRange.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesis-jvm Show documentation
Show all versions of kinesis-jvm Show documentation
The AWS SDK for Kotlin client for Kinesis
// 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 sequence numbers for the shard.
*/
public class SequenceNumberRange private constructor(builder: Builder) {
/**
* The ending sequence number for the range. Shards that are in the OPEN state have an ending sequence number of `null`.
*/
public val endingSequenceNumber: kotlin.String? = builder.endingSequenceNumber
/**
* The starting sequence number for the range.
*/
public val startingSequenceNumber: kotlin.String = requireNotNull(builder.startingSequenceNumber) { "A non-null value must be provided for startingSequenceNumber" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesis.model.SequenceNumberRange = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SequenceNumberRange(")
append("endingSequenceNumber=$endingSequenceNumber,")
append("startingSequenceNumber=$startingSequenceNumber")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = endingSequenceNumber?.hashCode() ?: 0
result = 31 * result + (startingSequenceNumber.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 SequenceNumberRange
if (endingSequenceNumber != other.endingSequenceNumber) return false
if (startingSequenceNumber != other.startingSequenceNumber) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesis.model.SequenceNumberRange = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ending sequence number for the range. Shards that are in the OPEN state have an ending sequence number of `null`.
*/
public var endingSequenceNumber: kotlin.String? = null
/**
* The starting sequence number for the range.
*/
public var startingSequenceNumber: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesis.model.SequenceNumberRange) : this() {
this.endingSequenceNumber = x.endingSequenceNumber
this.startingSequenceNumber = x.startingSequenceNumber
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesis.model.SequenceNumberRange = SequenceNumberRange(this)
internal fun correctErrors(): Builder {
if (startingSequenceNumber == null) startingSequenceNumber = ""
return this
}
}
}