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

commonMain.aws.sdk.kotlin.services.cloudwatch.model.MetricStreamStatisticsMetric.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cloudwatch.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * This object contains the information for one metric that is to be streamed with additional statistics.
 */
public class MetricStreamStatisticsMetric private constructor(builder: Builder) {
    /**
     * The name of the metric.
     */
    public val metricName: kotlin.String? = builder.metricName
    /**
     * The namespace of the metric.
     */
    public val namespace: kotlin.String? = builder.namespace

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

    override fun toString(): kotlin.String = buildString {
        append("MetricStreamStatisticsMetric(")
        append("metricName=$metricName,")
        append("namespace=$namespace")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = metricName?.hashCode() ?: 0
        result = 31 * result + (namespace?.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 MetricStreamStatisticsMetric

        if (metricName != other.metricName) return false
        if (namespace != other.namespace) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the metric.
         */
        public var metricName: kotlin.String? = null
        /**
         * The namespace of the metric.
         */
        public var namespace: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.MetricStreamStatisticsMetric) : this() {
            this.metricName = x.metricName
            this.namespace = x.namespace
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy