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

commonMain.aws.sdk.kotlin.services.devopsguru.model.CloudWatchMetricsDetail.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.devopsguru.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about an Amazon CloudWatch metric.
 */
public class CloudWatchMetricsDetail private constructor(builder: Builder) {
    /**
     * An array of CloudWatch dimensions associated with
     */
    public val dimensions: List? = builder.dimensions
    /**
     * This object returns anomaly metric data.
     */
    public val metricDataSummary: aws.sdk.kotlin.services.devopsguru.model.CloudWatchMetricsDataSummary? = builder.metricDataSummary
    /**
     * The name of the CloudWatch metric.
     */
    public val metricName: kotlin.String? = builder.metricName
    /**
     * The namespace of the CloudWatch metric. A namespace is a container for CloudWatch metrics.
     */
    public val namespace: kotlin.String? = builder.namespace
    /**
     * The length of time associated with the CloudWatch metric in number of seconds.
     */
    public val period: kotlin.Int = builder.period
    /**
     * The type of statistic associated with the CloudWatch metric. For more information, see [Statistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Statistic) in the *Amazon CloudWatch User Guide*.
     */
    public val stat: aws.sdk.kotlin.services.devopsguru.model.CloudWatchMetricsStat? = builder.stat
    /**
     * The unit of measure used for the CloudWatch metric. For example, `Bytes`, `Seconds`, `Count`, and `Percent`.
     */
    public val unit: kotlin.String? = builder.unit

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

    override fun toString(): kotlin.String = buildString {
        append("CloudWatchMetricsDetail(")
        append("dimensions=$dimensions,")
        append("metricDataSummary=$metricDataSummary,")
        append("metricName=$metricName,")
        append("namespace=$namespace,")
        append("period=$period,")
        append("stat=$stat,")
        append("unit=$unit")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dimensions?.hashCode() ?: 0
        result = 31 * result + (metricDataSummary?.hashCode() ?: 0)
        result = 31 * result + (metricName?.hashCode() ?: 0)
        result = 31 * result + (namespace?.hashCode() ?: 0)
        result = 31 * result + (period)
        result = 31 * result + (stat?.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 CloudWatchMetricsDetail

        if (dimensions != other.dimensions) return false
        if (metricDataSummary != other.metricDataSummary) return false
        if (metricName != other.metricName) return false
        if (namespace != other.namespace) return false
        if (period != other.period) return false
        if (stat != other.stat) return false
        if (unit != other.unit) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An array of CloudWatch dimensions associated with
         */
        public var dimensions: List? = null
        /**
         * This object returns anomaly metric data.
         */
        public var metricDataSummary: aws.sdk.kotlin.services.devopsguru.model.CloudWatchMetricsDataSummary? = null
        /**
         * The name of the CloudWatch metric.
         */
        public var metricName: kotlin.String? = null
        /**
         * The namespace of the CloudWatch metric. A namespace is a container for CloudWatch metrics.
         */
        public var namespace: kotlin.String? = null
        /**
         * The length of time associated with the CloudWatch metric in number of seconds.
         */
        public var period: kotlin.Int = 0
        /**
         * The type of statistic associated with the CloudWatch metric. For more information, see [Statistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Statistic) in the *Amazon CloudWatch User Guide*.
         */
        public var stat: aws.sdk.kotlin.services.devopsguru.model.CloudWatchMetricsStat? = null
        /**
         * The unit of measure used for the CloudWatch metric. For example, `Bytes`, `Seconds`, `Count`, and `Percent`.
         */
        public var unit: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.CloudWatchMetricsDetail) : this() {
            this.dimensions = x.dimensions
            this.metricDataSummary = x.metricDataSummary
            this.metricName = x.metricName
            this.namespace = x.namespace
            this.period = x.period
            this.stat = x.stat
            this.unit = x.unit
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy