commonMain.aws.sdk.kotlin.services.cloudsearchdomain.model.Bucket.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudsearchdomain-jvm Show documentation
Show all versions of cloudsearchdomain-jvm Show documentation
The AWS Kotlin client for CloudSearch Domain
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudsearchdomain.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A container for facet information.
*/
public class Bucket private constructor(builder: Builder) {
/**
* The number of hits that contain the facet value in the specified facet field.
*/
public val count: kotlin.Long = builder.count
/**
* The facet value being counted.
*/
public val value: kotlin.String? = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudsearchdomain.model.Bucket = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Bucket(")
append("count=$count,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = count.hashCode()
result = 31 * result + (value?.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 (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudsearchdomain.model.Bucket = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of hits that contain the facet value in the specified facet field.
*/
public var count: kotlin.Long = 0L
/**
* The facet value being counted.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudsearchdomain.model.Bucket) : this() {
this.count = x.count
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudsearchdomain.model.Bucket = Bucket(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy