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

commonMain.aws.sdk.kotlin.services.iot.model.Bucket.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iot.model



/**
 * A count of documents that meets a specific aggregation criteria.
 */
public class Bucket private constructor(builder: Builder) {
    /**
     * The number of documents that have the value counted for the particular bucket.
     */
    public val count: kotlin.Int = builder.count
    /**
     * The value counted for the particular bucket.
     */
    public val keyValue: kotlin.String? = builder.keyValue

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

    override fun toString(): kotlin.String = buildString {
        append("Bucket(")
        append("count=$count,")
        append("keyValue=$keyValue")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = count
        result = 31 * result + (keyValue?.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 Bucket

        if (count != other.count) return false
        if (keyValue != other.keyValue) return false

        return true
    }

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

    public class Builder {
        /**
         * The number of documents that have the value counted for the particular bucket.
         */
        public var count: kotlin.Int = 0
        /**
         * The value counted for the particular bucket.
         */
        public var keyValue: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.Bucket) : this() {
            this.count = x.count
            this.keyValue = x.keyValue
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy