All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.dynamodbstreams.model.GetShardIteratorRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.dynamodbstreams.model



/**
 * Represents the input of a `GetShardIterator` operation.
 */
public class GetShardIteratorRequest private constructor(builder: Builder) {
    /**
     * The sequence number of a stream record in the shard from which to start reading.
     */
    public val sequenceNumber: kotlin.String? = builder.sequenceNumber
    /**
     * The identifier of the shard. The iterator will be returned for this shard ID.
     */
    public val shardId: kotlin.String? = builder.shardId
    /**
     * Determines how the shard iterator is used to start reading stream records from the shard:
     * + `AT_SEQUENCE_NUMBER` - Start reading exactly from the position denoted by a specific sequence number.
     * + `AFTER_SEQUENCE_NUMBER` - Start reading right after the position denoted by a specific sequence number.
     * + `TRIM_HORIZON` - Start reading at the last (untrimmed) stream record, which is the oldest record in the shard. In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records whose age exceeds this limit are subject to removal (trimming) from the stream.
     * + `LATEST` - Start reading just after the most recent stream record in the shard, so that you always read the most recent data in the shard.
     */
    public val shardIteratorType: aws.sdk.kotlin.services.dynamodbstreams.model.ShardIteratorType? = builder.shardIteratorType
    /**
     * The Amazon Resource Name (ARN) for the stream.
     */
    public val streamArn: kotlin.String? = builder.streamArn

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dynamodbstreams.model.GetShardIteratorRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetShardIteratorRequest(")
        append("sequenceNumber=$sequenceNumber,")
        append("shardId=$shardId,")
        append("shardIteratorType=$shardIteratorType,")
        append("streamArn=$streamArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = sequenceNumber?.hashCode() ?: 0
        result = 31 * result + (shardId?.hashCode() ?: 0)
        result = 31 * result + (shardIteratorType?.hashCode() ?: 0)
        result = 31 * result + (streamArn?.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 GetShardIteratorRequest

        if (sequenceNumber != other.sequenceNumber) return false
        if (shardId != other.shardId) return false
        if (shardIteratorType != other.shardIteratorType) return false
        if (streamArn != other.streamArn) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dynamodbstreams.model.GetShardIteratorRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The sequence number of a stream record in the shard from which to start reading.
         */
        public var sequenceNumber: kotlin.String? = null
        /**
         * The identifier of the shard. The iterator will be returned for this shard ID.
         */
        public var shardId: kotlin.String? = null
        /**
         * Determines how the shard iterator is used to start reading stream records from the shard:
         * + `AT_SEQUENCE_NUMBER` - Start reading exactly from the position denoted by a specific sequence number.
         * + `AFTER_SEQUENCE_NUMBER` - Start reading right after the position denoted by a specific sequence number.
         * + `TRIM_HORIZON` - Start reading at the last (untrimmed) stream record, which is the oldest record in the shard. In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records whose age exceeds this limit are subject to removal (trimming) from the stream.
         * + `LATEST` - Start reading just after the most recent stream record in the shard, so that you always read the most recent data in the shard.
         */
        public var shardIteratorType: aws.sdk.kotlin.services.dynamodbstreams.model.ShardIteratorType? = null
        /**
         * The Amazon Resource Name (ARN) for the stream.
         */
        public var streamArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dynamodbstreams.model.GetShardIteratorRequest) : this() {
            this.sequenceNumber = x.sequenceNumber
            this.shardId = x.shardId
            this.shardIteratorType = x.shardIteratorType
            this.streamArn = x.streamArn
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.dynamodbstreams.model.GetShardIteratorRequest = GetShardIteratorRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy