commonMain.aws.sdk.kotlin.services.kinesis.model.DescribeLimitsResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesis-jvm Show documentation
Show all versions of kinesis-jvm Show documentation
The AWS SDK for Kotlin client for Kinesis
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kinesis.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DescribeLimitsResponse private constructor(builder: Builder) {
/**
* Indicates the number of data streams with the on-demand capacity mode.
*/
public val onDemandStreamCount: kotlin.Int = requireNotNull(builder.onDemandStreamCount) { "A non-null value must be provided for onDemandStreamCount" }
/**
* The maximum number of data streams with the on-demand capacity mode.
*/
public val onDemandStreamCountLimit: kotlin.Int = requireNotNull(builder.onDemandStreamCountLimit) { "A non-null value must be provided for onDemandStreamCountLimit" }
/**
* The number of open shards.
*/
public val openShardCount: kotlin.Int = requireNotNull(builder.openShardCount) { "A non-null value must be provided for openShardCount" }
/**
* The maximum number of shards.
*/
public val shardLimit: kotlin.Int = requireNotNull(builder.shardLimit) { "A non-null value must be provided for shardLimit" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kinesis.model.DescribeLimitsResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeLimitsResponse(")
append("onDemandStreamCount=$onDemandStreamCount,")
append("onDemandStreamCountLimit=$onDemandStreamCountLimit,")
append("openShardCount=$openShardCount,")
append("shardLimit=$shardLimit")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = onDemandStreamCount
result = 31 * result + (onDemandStreamCountLimit)
result = 31 * result + (openShardCount)
result = 31 * result + (shardLimit)
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 DescribeLimitsResponse
if (onDemandStreamCount != other.onDemandStreamCount) return false
if (onDemandStreamCountLimit != other.onDemandStreamCountLimit) return false
if (openShardCount != other.openShardCount) return false
if (shardLimit != other.shardLimit) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kinesis.model.DescribeLimitsResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates the number of data streams with the on-demand capacity mode.
*/
public var onDemandStreamCount: kotlin.Int? = null
/**
* The maximum number of data streams with the on-demand capacity mode.
*/
public var onDemandStreamCountLimit: kotlin.Int? = null
/**
* The number of open shards.
*/
public var openShardCount: kotlin.Int? = null
/**
* The maximum number of shards.
*/
public var shardLimit: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kinesis.model.DescribeLimitsResponse) : this() {
this.onDemandStreamCount = x.onDemandStreamCount
this.onDemandStreamCountLimit = x.onDemandStreamCountLimit
this.openShardCount = x.openShardCount
this.shardLimit = x.shardLimit
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kinesis.model.DescribeLimitsResponse = DescribeLimitsResponse(this)
internal fun correctErrors(): Builder {
if (onDemandStreamCount == null) onDemandStreamCount = 0
if (onDemandStreamCountLimit == null) onDemandStreamCountLimit = 0
if (openShardCount == null) openShardCount = 0
if (shardLimit == null) shardLimit = 0
return this
}
}
}