commonMain.aws.sdk.kotlin.services.cloudwatch.model.InsightRuleContributorDatapoint.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatch-jvm Show documentation
Show all versions of cloudwatch-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatch.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* One data point related to one contributor.
*
* For more information, see [GetInsightRuleReport](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html) and [InsightRuleContributor](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_InsightRuleContributor.html).
*/
public class InsightRuleContributorDatapoint private constructor(builder: Builder) {
/**
* The approximate value that this contributor added during this timestamp.
*/
public val approximateValue: kotlin.Double? = builder.approximateValue
/**
* The timestamp of the data point.
*/
public val timestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.timestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatch.model.InsightRuleContributorDatapoint = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InsightRuleContributorDatapoint(")
append("approximateValue=$approximateValue,")
append("timestamp=$timestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = approximateValue?.hashCode() ?: 0
result = 31 * result + (timestamp?.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 InsightRuleContributorDatapoint
if (!(approximateValue?.equals(other.approximateValue) ?: (other.approximateValue == null))) return false
if (timestamp != other.timestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatch.model.InsightRuleContributorDatapoint = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The approximate value that this contributor added during this timestamp.
*/
public var approximateValue: kotlin.Double? = null
/**
* The timestamp of the data point.
*/
public var timestamp: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.InsightRuleContributorDatapoint) : this() {
this.approximateValue = x.approximateValue
this.timestamp = x.timestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatch.model.InsightRuleContributorDatapoint = InsightRuleContributorDatapoint(this)
internal fun correctErrors(): Builder {
return this
}
}
}