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

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

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

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



/**
 * Performs an aggregation that will return a list of buckets. The list of buckets is a ranked list of the number of occurrences of an aggregation field value.
 */
public class TermsAggregation private constructor(builder: Builder) {
    /**
     * The number of buckets to return in the response. Default to 10.
     */
    public val maxBuckets: kotlin.Int? = builder.maxBuckets

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

    override fun toString(): kotlin.String = buildString {
        append("TermsAggregation(")
        append("maxBuckets=$maxBuckets")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = maxBuckets ?: 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 TermsAggregation

        if (maxBuckets != other.maxBuckets) return false

        return true
    }

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

    public class Builder {
        /**
         * The number of buckets to return in the response. Default to 10.
         */
        public var maxBuckets: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.TermsAggregation) : this() {
            this.maxBuckets = x.maxBuckets
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy