commonMain.aws.sdk.kotlin.services.xray.model.ForecastStatistics.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xray-jvm Show documentation
Show all versions of xray-jvm Show documentation
The AWS SDK for Kotlin client for XRay
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.xray.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The predicted high and low fault count. This is used to determine if a service has become anomalous and if an insight should be created.
*/
public class ForecastStatistics private constructor(builder: Builder) {
/**
* The upper limit of fault counts for a service.
*/
public val faultCountHigh: kotlin.Long? = builder.faultCountHigh
/**
* The lower limit of fault counts for a service.
*/
public val faultCountLow: kotlin.Long? = builder.faultCountLow
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.ForecastStatistics = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ForecastStatistics(")
append("faultCountHigh=$faultCountHigh,")
append("faultCountLow=$faultCountLow")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = faultCountHigh?.hashCode() ?: 0
result = 31 * result + (faultCountLow?.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 ForecastStatistics
if (faultCountHigh != other.faultCountHigh) return false
if (faultCountLow != other.faultCountLow) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.ForecastStatistics = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The upper limit of fault counts for a service.
*/
public var faultCountHigh: kotlin.Long? = null
/**
* The lower limit of fault counts for a service.
*/
public var faultCountLow: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.ForecastStatistics) : this() {
this.faultCountHigh = x.faultCountHigh
this.faultCountLow = x.faultCountLow
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.ForecastStatistics = ForecastStatistics(this)
internal fun correctErrors(): Builder {
return this
}
}
}