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

commonMain.aws.sdk.kotlin.services.codeguruprofiler.model.FrameMetricDatum.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codeguruprofiler.model



/**
 * Information about a frame metric and its values.
 */
public class FrameMetricDatum private constructor(builder: Builder) {
    /**
     * The frame name, metric type, and thread states. These are used to derive the value of the metric for the frame.
     */
    public val frameMetric: aws.sdk.kotlin.services.codeguruprofiler.model.FrameMetric? = builder.frameMetric
    /**
     * A list of values that are associated with a frame metric.
     */
    public val values: List? = builder.values

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

    override fun toString(): kotlin.String = buildString {
        append("FrameMetricDatum(")
        append("frameMetric=$frameMetric,")
        append("values=$values")
        append(")")
    }

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

        if (frameMetric != other.frameMetric) return false
        if (values != other.values) return false

        return true
    }

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

    public class Builder {
        /**
         * The frame name, metric type, and thread states. These are used to derive the value of the metric for the frame.
         */
        public var frameMetric: aws.sdk.kotlin.services.codeguruprofiler.model.FrameMetric? = null
        /**
         * A list of values that are associated with a frame metric.
         */
        public var values: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeguruprofiler.model.FrameMetricDatum) : this() {
            this.frameMetric = x.frameMetric
            this.values = x.values
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.codeguruprofiler.model.FrameMetric] inside the given [block]
         */
        public fun frameMetric(block: aws.sdk.kotlin.services.codeguruprofiler.model.FrameMetric.Builder.() -> kotlin.Unit) {
            this.frameMetric = aws.sdk.kotlin.services.codeguruprofiler.model.FrameMetric.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy