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

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

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

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



/**
 * The frame name, metric type, and thread states. These are used to derive the value of the metric for the frame.
 */
public class FrameMetric private constructor(builder: Builder) {
    /**
     * Name of the method common across the multiple occurrences of a frame in an application profile.
     */
    public val frameName: kotlin.String? = builder.frameName
    /**
     * List of application runtime thread states used to get the counts for a frame a derive a metric value.
     */
    public val threadStates: List? = builder.threadStates
    /**
     * A type of aggregation that specifies how a metric for a frame is analyzed. The supported value `AggregatedRelativeTotalTime` is an aggregation of the metric value for one frame that is calculated across the occurrences of all frames in a profile.
     */
    public val type: aws.sdk.kotlin.services.codeguruprofiler.model.MetricType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("FrameMetric(")
        append("frameName=$frameName,")
        append("threadStates=$threadStates,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = frameName?.hashCode() ?: 0
        result = 31 * result + (threadStates?.hashCode() ?: 0)
        result = 31 * result + (type?.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 FrameMetric

        if (frameName != other.frameName) return false
        if (threadStates != other.threadStates) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * Name of the method common across the multiple occurrences of a frame in an application profile.
         */
        public var frameName: kotlin.String? = null
        /**
         * List of application runtime thread states used to get the counts for a frame a derive a metric value.
         */
        public var threadStates: List? = null
        /**
         * A type of aggregation that specifies how a metric for a frame is analyzed. The supported value `AggregatedRelativeTotalTime` is an aggregation of the metric value for one frame that is calculated across the occurrences of all frames in a profile.
         */
        public var type: aws.sdk.kotlin.services.codeguruprofiler.model.MetricType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeguruprofiler.model.FrameMetric) : this() {
            this.frameName = x.frameName
            this.threadStates = x.threadStates
            this.type = x.type
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy