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

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

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

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



public class GetBucketsAggregationRequest private constructor(builder: Builder) {
    /**
     * The aggregation field.
     */
    public val aggregationField: kotlin.String? = builder.aggregationField
    /**
     * The basic control of the response shape and the bucket aggregation type to perform.
     */
    public val bucketsAggregationType: aws.sdk.kotlin.services.iot.model.BucketsAggregationType? = builder.bucketsAggregationType
    /**
     * The name of the index to search.
     */
    public val indexName: kotlin.String? = builder.indexName
    /**
     * The search query string.
     */
    public val queryString: kotlin.String? = builder.queryString
    /**
     * The version of the query.
     */
    public val queryVersion: kotlin.String? = builder.queryVersion

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

    override fun toString(): kotlin.String = buildString {
        append("GetBucketsAggregationRequest(")
        append("aggregationField=$aggregationField,")
        append("bucketsAggregationType=$bucketsAggregationType,")
        append("indexName=$indexName,")
        append("queryString=$queryString,")
        append("queryVersion=$queryVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = aggregationField?.hashCode() ?: 0
        result = 31 * result + (bucketsAggregationType?.hashCode() ?: 0)
        result = 31 * result + (indexName?.hashCode() ?: 0)
        result = 31 * result + (queryString?.hashCode() ?: 0)
        result = 31 * result + (queryVersion?.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 GetBucketsAggregationRequest

        if (aggregationField != other.aggregationField) return false
        if (bucketsAggregationType != other.bucketsAggregationType) return false
        if (indexName != other.indexName) return false
        if (queryString != other.queryString) return false
        if (queryVersion != other.queryVersion) return false

        return true
    }

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

    public class Builder {
        /**
         * The aggregation field.
         */
        public var aggregationField: kotlin.String? = null
        /**
         * The basic control of the response shape and the bucket aggregation type to perform.
         */
        public var bucketsAggregationType: aws.sdk.kotlin.services.iot.model.BucketsAggregationType? = null
        /**
         * The name of the index to search.
         */
        public var indexName: kotlin.String? = null
        /**
         * The search query string.
         */
        public var queryString: kotlin.String? = null
        /**
         * The version of the query.
         */
        public var queryVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.GetBucketsAggregationRequest) : this() {
            this.aggregationField = x.aggregationField
            this.bucketsAggregationType = x.bucketsAggregationType
            this.indexName = x.indexName
            this.queryString = x.queryString
            this.queryVersion = x.queryVersion
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.iot.model.BucketsAggregationType] inside the given [block]
         */
        public fun bucketsAggregationType(block: aws.sdk.kotlin.services.iot.model.BucketsAggregationType.Builder.() -> kotlin.Unit) {
            this.bucketsAggregationType = aws.sdk.kotlin.services.iot.model.BucketsAggregationType.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy