
commonMain.aws.sdk.kotlin.services.pipes.model.PipeTargetKinesisStreamParameters.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pipes.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The parameters for using a Kinesis stream as a target.
*/
public class PipeTargetKinesisStreamParameters private constructor(builder: Builder) {
/**
* Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.
*/
public val partitionKey: kotlin.String = requireNotNull(builder.partitionKey) { "A non-null value must be provided for partitionKey" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pipes.model.PipeTargetKinesisStreamParameters = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PipeTargetKinesisStreamParameters(")
append("partitionKey=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = partitionKey.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 PipeTargetKinesisStreamParameters
if (partitionKey != other.partitionKey) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pipes.model.PipeTargetKinesisStreamParameters = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.
*/
public var partitionKey: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pipes.model.PipeTargetKinesisStreamParameters) : this() {
this.partitionKey = x.partitionKey
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pipes.model.PipeTargetKinesisStreamParameters = PipeTargetKinesisStreamParameters(this)
internal fun correctErrors(): Builder {
if (partitionKey == null) partitionKey = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy