commonMain.aws.sdk.kotlin.services.deadline.model.Stats.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deadline-jvm Show documentation
Show all versions of deadline-jvm Show documentation
The AWS SDK for Kotlin client for deadline
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.deadline.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The minimum, maximum, average, and sum.
*/
public class Stats private constructor(builder: Builder) {
/**
* The average of the usage statistics.
*/
public val avg: kotlin.Double? = builder.avg
/**
* The maximum among the usage statistics.
*/
public val max: kotlin.Double? = builder.max
/**
* The minimum of the usage statistics.
*/
public val min: kotlin.Double? = builder.min
/**
* The sum of the usage statistics.
*/
public val sum: kotlin.Double? = builder.sum
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.deadline.model.Stats = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Stats(")
append("avg=$avg,")
append("max=$max,")
append("min=$min,")
append("sum=$sum")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = avg?.hashCode() ?: 0
result = 31 * result + (max?.hashCode() ?: 0)
result = 31 * result + (min?.hashCode() ?: 0)
result = 31 * result + (sum?.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 Stats
if (!(avg?.equals(other.avg) ?: (other.avg == null))) return false
if (!(max?.equals(other.max) ?: (other.max == null))) return false
if (!(min?.equals(other.min) ?: (other.min == null))) return false
if (!(sum?.equals(other.sum) ?: (other.sum == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.deadline.model.Stats = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The average of the usage statistics.
*/
public var avg: kotlin.Double? = null
/**
* The maximum among the usage statistics.
*/
public var max: kotlin.Double? = null
/**
* The minimum of the usage statistics.
*/
public var min: kotlin.Double? = null
/**
* The sum of the usage statistics.
*/
public var sum: kotlin.Double? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.deadline.model.Stats) : this() {
this.avg = x.avg
this.max = x.max
this.min = x.min
this.sum = x.sum
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.deadline.model.Stats = Stats(this)
internal fun correctErrors(): Builder {
return this
}
}
}