
commonMain.aws.sdk.kotlin.services.iot.model.MetricDimension.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* The dimension of a metric.
*/
public class MetricDimension private constructor(builder: Builder) {
/**
* A unique identifier for the dimension.
*/
public val dimensionName: kotlin.String = requireNotNull(builder.dimensionName) { "A non-null value must be provided for dimensionName" }
/**
* Defines how the `dimensionValues` of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the `IN` operator, a message will be counted only if its topic matches one of the topic filters. With `NOT_IN` operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is `null`), it will be interpreted as `IN`.
*/
public val operator: aws.sdk.kotlin.services.iot.model.DimensionValueOperator? = builder.operator
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.MetricDimension = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MetricDimension(")
append("dimensionName=$dimensionName,")
append("operator=$operator")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dimensionName.hashCode()
result = 31 * result + (operator?.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 MetricDimension
if (dimensionName != other.dimensionName) return false
if (operator != other.operator) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.MetricDimension = Builder(this).apply(block).build()
public class Builder {
/**
* A unique identifier for the dimension.
*/
public var dimensionName: kotlin.String? = null
/**
* Defines how the `dimensionValues` of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the `IN` operator, a message will be counted only if its topic matches one of the topic filters. With `NOT_IN` operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is `null`), it will be interpreted as `IN`.
*/
public var operator: aws.sdk.kotlin.services.iot.model.DimensionValueOperator? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.MetricDimension) : this() {
this.dimensionName = x.dimensionName
this.operator = x.operator
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.MetricDimension = MetricDimension(this)
internal fun correctErrors(): Builder {
if (dimensionName == null) dimensionName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy