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

commonMain.aws.sdk.kotlin.services.pi.model.ResponseResourceMetric.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 contains the full name, description, and unit of a metric.
 */
public class ResponseResourceMetric private constructor(builder: Builder) {
    /**
     * The description of the metric.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The full name of the metric.
     */
    public val metric: kotlin.String? = builder.metric
    /**
     * The unit of the metric.
     */
    public val unit: kotlin.String? = builder.unit

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

    override fun toString(): kotlin.String = buildString {
        append("ResponseResourceMetric(")
        append("description=$description,")
        append("metric=$metric,")
        append("unit=$unit")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (metric?.hashCode() ?: 0)
        result = 31 * result + (unit?.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 ResponseResourceMetric

        if (description != other.description) return false
        if (metric != other.metric) return false
        if (unit != other.unit) return false

        return true
    }

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

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

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pi.model.ResponseResourceMetric) : this() {
            this.description = x.description
            this.metric = x.metric
            this.unit = x.unit
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy