All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.pi.model.DimensionKeyDescription.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

/**
 * An object that includes the requested dimension key values and aggregated metric values within a dimension group.
 */
public class DimensionKeyDescription private constructor(builder: Builder) {
    /**
     * A map that contains the value for each additional metric.
     */
    public val additionalMetrics: Map? = builder.additionalMetrics
    /**
     * A map of name-value pairs for the dimensions in the group.
     */
    public val dimensions: Map? = builder.dimensions
    /**
     * If `PartitionBy` was specified, `PartitionKeys` contains the dimensions that were.
     */
    public val partitions: List? = builder.partitions
    /**
     * The aggregated metric value for the dimensions, over the requested time range.
     */
    public val total: kotlin.Double? = builder.total

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pi.model.DimensionKeyDescription = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DimensionKeyDescription(")
        append("additionalMetrics=$additionalMetrics,")
        append("dimensions=$dimensions,")
        append("partitions=$partitions,")
        append("total=$total")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = additionalMetrics?.hashCode() ?: 0
        result = 31 * result + (dimensions?.hashCode() ?: 0)
        result = 31 * result + (partitions?.hashCode() ?: 0)
        result = 31 * result + (total?.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 DimensionKeyDescription

        if (additionalMetrics != other.additionalMetrics) return false
        if (dimensions != other.dimensions) return false
        if (partitions != other.partitions) return false
        if (!(total?.equals(other.total) ?: (other.total == null))) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pi.model.DimensionKeyDescription = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A map that contains the value for each additional metric.
         */
        public var additionalMetrics: Map? = null
        /**
         * A map of name-value pairs for the dimensions in the group.
         */
        public var dimensions: Map? = null
        /**
         * If `PartitionBy` was specified, `PartitionKeys` contains the dimensions that were.
         */
        public var partitions: List? = null
        /**
         * The aggregated metric value for the dimensions, over the requested time range.
         */
        public var total: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pi.model.DimensionKeyDescription) : this() {
            this.additionalMetrics = x.additionalMetrics
            this.dimensions = x.dimensions
            this.partitions = x.partitions
            this.total = x.total
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.pi.model.DimensionKeyDescription = DimensionKeyDescription(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy