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

commonMain.aws.sdk.kotlin.services.mwaa.model.PublishMetricsRequest.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.mwaa.model

import aws.smithy.kotlin.runtime.SdkDsl

@Deprecated("This type is for internal use and not meant for public use. Data set for this type will be ignored.")
public class PublishMetricsRequest private constructor(builder: Builder) {
    /**
     * **Internal only**. The name of the environment.
     */
    public val environmentName: kotlin.String = requireNotNull(builder.environmentName) { "A non-null value must be provided for environmentName" }
    /**
     * **Internal only**. Publishes metrics to Amazon CloudWatch. To learn more about the metrics published to Amazon CloudWatch, see [Amazon MWAA performance metrics in Amazon CloudWatch](https://docs.aws.amazon.com/mwaa/latest/userguide/cw-metrics.html).
     */
    public val metricData: List = requireNotNull(builder.metricData) { "A non-null value must be provided for metricData" }

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

    override fun toString(): kotlin.String = buildString {
        append("PublishMetricsRequest(")
        append("environmentName=$environmentName,")
        append("metricData=$metricData")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = environmentName.hashCode()
        result = 31 * result + (metricData.hashCode())
        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 PublishMetricsRequest

        if (environmentName != other.environmentName) return false
        if (metricData != other.metricData) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * **Internal only**. The name of the environment.
         */
        public var environmentName: kotlin.String? = null
        /**
         * **Internal only**. Publishes metrics to Amazon CloudWatch. To learn more about the metrics published to Amazon CloudWatch, see [Amazon MWAA performance metrics in Amazon CloudWatch](https://docs.aws.amazon.com/mwaa/latest/userguide/cw-metrics.html).
         */
        public var metricData: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mwaa.model.PublishMetricsRequest) : this() {
            this.environmentName = x.environmentName
            this.metricData = x.metricData
        }

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

        internal fun correctErrors(): Builder {
            if (environmentName == null) environmentName = ""
            if (metricData == null) metricData = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy