commonMain.aws.sdk.kotlin.services.xray.model.HistogramEntry.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.xray.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.
*/
public class HistogramEntry private constructor(builder: Builder) {
/**
* The prevalence of the entry.
*/
public val count: kotlin.Int = builder.count
/**
* The value of the entry.
*/
public val value: kotlin.Double = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.HistogramEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HistogramEntry(")
append("count=$count,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = count
result = 31 * result + (value.hashCode())
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 HistogramEntry
if (count != other.count) return false
if (!(value?.equals(other.value) ?: (other.value == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.HistogramEntry = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The prevalence of the entry.
*/
public var count: kotlin.Int = 0
/**
* The value of the entry.
*/
public var value: kotlin.Double = 0.0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.HistogramEntry) : this() {
this.count = x.count
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.HistogramEntry = HistogramEntry(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy