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

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

/**
 * List of data objects which provide details about source metrics. This field can be used to determine the PI metric to render for the insight. This data type also includes static values for the metrics for the Insight that were calculated and included in text and annotations on the DB load chart.
 */
public class Data private constructor(builder: Builder) {
    /**
     * This field determines the Performance Insights metric to render for the insight. The `name` field refers to a Performance Insights metric.
     */
    public val performanceInsightsMetric: aws.sdk.kotlin.services.pi.model.PerformanceInsightsMetric? = builder.performanceInsightsMetric

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

    override fun toString(): kotlin.String = buildString {
        append("Data(")
        append("performanceInsightsMetric=$performanceInsightsMetric")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = performanceInsightsMetric?.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 Data

        if (performanceInsightsMetric != other.performanceInsightsMetric) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * This field determines the Performance Insights metric to render for the insight. The `name` field refers to a Performance Insights metric.
         */
        public var performanceInsightsMetric: aws.sdk.kotlin.services.pi.model.PerformanceInsightsMetric? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pi.model.Data) : this() {
            this.performanceInsightsMetric = x.performanceInsightsMetric
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy