
commonMain.aws.sdk.kotlin.services.kinesis.model.SubscribeToShardRequest.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
public class SubscribeToShardRequest private constructor(builder: Builder) {
/**
* For this parameter, use the value you obtained when you called RegisterStreamConsumer.
*/
public val consumerArn: kotlin.String? = builder.consumerArn
/**
* The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use ListShards.
*/
public val shardId: kotlin.String? = builder.shardId
/**
* The starting position in the data stream from which to start streaming.
*/
public val startingPosition: aws.sdk.kotlin.services.kinesis.model.StartingPosition? = builder.startingPosition
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesis.model.SubscribeToShardRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SubscribeToShardRequest(")
append("consumerArn=$consumerArn,")
append("shardId=$shardId,")
append("startingPosition=$startingPosition")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = consumerArn?.hashCode() ?: 0
result = 31 * result + (shardId?.hashCode() ?: 0)
result = 31 * result + (startingPosition?.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 SubscribeToShardRequest
if (consumerArn != other.consumerArn) return false
if (shardId != other.shardId) return false
if (startingPosition != other.startingPosition) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesis.model.SubscribeToShardRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* For this parameter, use the value you obtained when you called RegisterStreamConsumer.
*/
public var consumerArn: kotlin.String? = null
/**
* The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use ListShards.
*/
public var shardId: kotlin.String? = null
/**
* The starting position in the data stream from which to start streaming.
*/
public var startingPosition: aws.sdk.kotlin.services.kinesis.model.StartingPosition? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesis.model.SubscribeToShardRequest) : this() {
this.consumerArn = x.consumerArn
this.shardId = x.shardId
this.startingPosition = x.startingPosition
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesis.model.SubscribeToShardRequest = SubscribeToShardRequest(this)
/**
* construct an [aws.sdk.kotlin.services.kinesis.model.StartingPosition] inside the given [block]
*/
public fun startingPosition(block: aws.sdk.kotlin.services.kinesis.model.StartingPosition.Builder.() -> kotlin.Unit) {
this.startingPosition = aws.sdk.kotlin.services.kinesis.model.StartingPosition.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy