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

commonMain.aws.sdk.kotlin.services.kinesis.model.MergeShardsRequest.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

/**
 * Represents the input for `MergeShards`.
 */
public class MergeShardsRequest private constructor(builder: Builder) {
    /**
     * The shard ID of the adjacent shard for the merge.
     */
    public val adjacentShardToMerge: kotlin.String? = builder.adjacentShardToMerge
    /**
     * The shard ID of the shard to combine with the adjacent shard for the merge.
     */
    public val shardToMerge: kotlin.String? = builder.shardToMerge
    /**
     * The ARN of the stream.
     */
    public val streamArn: kotlin.String? = builder.streamArn
    /**
     * The name of the stream for the merge.
     */
    public val streamName: kotlin.String? = builder.streamName

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

    override fun toString(): kotlin.String = buildString {
        append("MergeShardsRequest(")
        append("adjacentShardToMerge=$adjacentShardToMerge,")
        append("shardToMerge=$shardToMerge,")
        append("streamArn=$streamArn,")
        append("streamName=$streamName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = adjacentShardToMerge?.hashCode() ?: 0
        result = 31 * result + (shardToMerge?.hashCode() ?: 0)
        result = 31 * result + (streamArn?.hashCode() ?: 0)
        result = 31 * result + (streamName?.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 MergeShardsRequest

        if (adjacentShardToMerge != other.adjacentShardToMerge) return false
        if (shardToMerge != other.shardToMerge) return false
        if (streamArn != other.streamArn) return false
        if (streamName != other.streamName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The shard ID of the adjacent shard for the merge.
         */
        public var adjacentShardToMerge: kotlin.String? = null
        /**
         * The shard ID of the shard to combine with the adjacent shard for the merge.
         */
        public var shardToMerge: kotlin.String? = null
        /**
         * The ARN of the stream.
         */
        public var streamArn: kotlin.String? = null
        /**
         * The name of the stream for the merge.
         */
        public var streamName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesis.model.MergeShardsRequest) : this() {
            this.adjacentShardToMerge = x.adjacentShardToMerge
            this.shardToMerge = x.shardToMerge
            this.streamArn = x.streamArn
            this.streamName = x.streamName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy