
commonMain.aws.sdk.kotlin.services.servicequotas.model.MetricInfo.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.servicequotas.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about the CloudWatch metric that reflects quota usage.
*/
public class MetricInfo private constructor(builder: Builder) {
/**
* The metric dimension. This is a name/value pair that is part of the identity of a metric.
*/
public val metricDimensions: Map? = builder.metricDimensions
/**
* The name of the metric.
*/
public val metricName: kotlin.String? = builder.metricName
/**
* The namespace of the metric.
*/
public val metricNamespace: kotlin.String? = builder.metricNamespace
/**
* The metric statistic that we recommend you use when determining quota usage.
*/
public val metricStatisticRecommendation: kotlin.String? = builder.metricStatisticRecommendation
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.servicequotas.model.MetricInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MetricInfo(")
append("metricDimensions=$metricDimensions,")
append("metricName=$metricName,")
append("metricNamespace=$metricNamespace,")
append("metricStatisticRecommendation=$metricStatisticRecommendation")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metricDimensions?.hashCode() ?: 0
result = 31 * result + (metricName?.hashCode() ?: 0)
result = 31 * result + (metricNamespace?.hashCode() ?: 0)
result = 31 * result + (metricStatisticRecommendation?.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 MetricInfo
if (metricDimensions != other.metricDimensions) return false
if (metricName != other.metricName) return false
if (metricNamespace != other.metricNamespace) return false
if (metricStatisticRecommendation != other.metricStatisticRecommendation) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.servicequotas.model.MetricInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The metric dimension. This is a name/value pair that is part of the identity of a metric.
*/
public var metricDimensions: Map? = null
/**
* The name of the metric.
*/
public var metricName: kotlin.String? = null
/**
* The namespace of the metric.
*/
public var metricNamespace: kotlin.String? = null
/**
* The metric statistic that we recommend you use when determining quota usage.
*/
public var metricStatisticRecommendation: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.servicequotas.model.MetricInfo) : this() {
this.metricDimensions = x.metricDimensions
this.metricName = x.metricName
this.metricNamespace = x.metricNamespace
this.metricStatisticRecommendation = x.metricStatisticRecommendation
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.servicequotas.model.MetricInfo = MetricInfo(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy