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

commonMain.aws.sdk.kotlin.services.kinesis.model.UpdateShardCountRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kinesis.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateShardCountRequest private constructor(builder: Builder) {
    /**
     * The scaling type. Uniform scaling creates shards of equal size.
     */
    public val scalingType: aws.sdk.kotlin.services.kinesis.model.ScalingType? = builder.scalingType
    /**
     * The ARN of the stream.
     */
    public val streamArn: kotlin.String? = builder.streamArn
    /**
     * The name of the stream.
     */
    public val streamName: kotlin.String? = builder.streamName
    /**
     * The new number of shards. This value has the following default limits. By default, you cannot do the following:
     * + Set this value to more than double your current shard count for a stream.
     * + Set this value below half your current shard count for a stream.
     * + Set this value to more than 10000 shards in a stream (the default limit for shard count per stream is 10000 per account per region), unless you request a limit increase.
     * + Scale a stream with more than 10000 shards down unless you set this value to less than 10000 shards.
     */
    public val targetShardCount: kotlin.Int? = builder.targetShardCount

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateShardCountRequest(")
        append("scalingType=$scalingType,")
        append("streamArn=$streamArn,")
        append("streamName=$streamName,")
        append("targetShardCount=$targetShardCount")
        append(")")
    }

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

        if (scalingType != other.scalingType) return false
        if (streamArn != other.streamArn) return false
        if (streamName != other.streamName) return false
        if (targetShardCount != other.targetShardCount) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The scaling type. Uniform scaling creates shards of equal size.
         */
        public var scalingType: aws.sdk.kotlin.services.kinesis.model.ScalingType? = null
        /**
         * The ARN of the stream.
         */
        public var streamArn: kotlin.String? = null
        /**
         * The name of the stream.
         */
        public var streamName: kotlin.String? = null
        /**
         * The new number of shards. This value has the following default limits. By default, you cannot do the following:
         * + Set this value to more than double your current shard count for a stream.
         * + Set this value below half your current shard count for a stream.
         * + Set this value to more than 10000 shards in a stream (the default limit for shard count per stream is 10000 per account per region), unless you request a limit increase.
         * + Scale a stream with more than 10000 shards down unless you set this value to less than 10000 shards.
         */
        public var targetShardCount: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesis.model.UpdateShardCountRequest) : this() {
            this.scalingType = x.scalingType
            this.streamArn = x.streamArn
            this.streamName = x.streamName
            this.targetShardCount = x.targetShardCount
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy