
commonMain.aws.sdk.kotlin.services.pi.model.MetricKeyDataPoints.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pi.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A time-ordered series of data points, corresponding to a dimension of a Performance Insights metric.
*/
public class MetricKeyDataPoints private constructor(builder: Builder) {
/**
* An array of timestamp-value pairs, representing measurements over a period of time.
*/
public val dataPoints: List? = builder.dataPoints
/**
* The dimensions to which the data points apply.
*/
public val key: aws.sdk.kotlin.services.pi.model.ResponseResourceMetricKey? = builder.key
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pi.model.MetricKeyDataPoints = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MetricKeyDataPoints(")
append("dataPoints=$dataPoints,")
append("key=$key")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dataPoints?.hashCode() ?: 0
result = 31 * result + (key?.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 MetricKeyDataPoints
if (dataPoints != other.dataPoints) return false
if (key != other.key) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pi.model.MetricKeyDataPoints = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of timestamp-value pairs, representing measurements over a period of time.
*/
public var dataPoints: List? = null
/**
* The dimensions to which the data points apply.
*/
public var key: aws.sdk.kotlin.services.pi.model.ResponseResourceMetricKey? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pi.model.MetricKeyDataPoints) : this() {
this.dataPoints = x.dataPoints
this.key = x.key
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pi.model.MetricKeyDataPoints = MetricKeyDataPoints(this)
/**
* construct an [aws.sdk.kotlin.services.pi.model.ResponseResourceMetricKey] inside the given [block]
*/
public fun key(block: aws.sdk.kotlin.services.pi.model.ResponseResourceMetricKey.Builder.() -> kotlin.Unit) {
this.key = aws.sdk.kotlin.services.pi.model.ResponseResourceMetricKey.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy