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

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

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

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



public class GetBucketsAggregationResponse private constructor(builder: Builder) {
    /**
     * The main part of the response with a list of buckets. Each bucket contains a `keyValue` and a `count`.
     *
     * `keyValue`: The aggregation field value counted for the particular bucket.
     *
     * `count`: The number of documents that have that value.
     */
    public val buckets: List? = builder.buckets
    /**
     * The total number of things that fit the query string criteria.
     */
    public val totalCount: kotlin.Int = builder.totalCount

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

    override fun toString(): kotlin.String = buildString {
        append("GetBucketsAggregationResponse(")
        append("buckets=$buckets,")
        append("totalCount=$totalCount")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = buckets?.hashCode() ?: 0
        result = 31 * result + (totalCount)
        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 GetBucketsAggregationResponse

        if (buckets != other.buckets) return false
        if (totalCount != other.totalCount) return false

        return true
    }

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

    public class Builder {
        /**
         * The main part of the response with a list of buckets. Each bucket contains a `keyValue` and a `count`.
         *
         * `keyValue`: The aggregation field value counted for the particular bucket.
         *
         * `count`: The number of documents that have that value.
         */
        public var buckets: List? = null
        /**
         * The total number of things that fit the query string criteria.
         */
        public var totalCount: kotlin.Int = 0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.GetBucketsAggregationResponse) : this() {
            this.buckets = x.buckets
            this.totalCount = x.totalCount
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy