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

commonMain.aws.sdk.kotlin.services.computeoptimizer.model.RdsDatabaseProjectedMetric.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.computeoptimizer.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Describes the projected metrics of an Amazon RDS recommendation option.
 *
 *  To determine the performance difference between your current Amazon RDS and the recommended option, compare the metric data of your service against its projected metric data.
 */
public class RdsDatabaseProjectedMetric private constructor(builder: Builder) {
    /**
     * The name of the projected metric.
     */
    public val name: aws.sdk.kotlin.services.computeoptimizer.model.RdsdbMetricName? = builder.name
    /**
     * The timestamps of the projected metric.
     */
    public val timestamps: List? = builder.timestamps
    /**
     * The values for the projected metric.
     */
    public val values: List? = builder.values

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

    override fun toString(): kotlin.String = buildString {
        append("RdsDatabaseProjectedMetric(")
        append("name=$name,")
        append("timestamps=$timestamps,")
        append("values=$values")
        append(")")
    }

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

        if (name != other.name) return false
        if (timestamps != other.timestamps) return false
        if (values != other.values) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the projected metric.
         */
        public var name: aws.sdk.kotlin.services.computeoptimizer.model.RdsdbMetricName? = null
        /**
         * The timestamps of the projected metric.
         */
        public var timestamps: List? = null
        /**
         * The values for the projected metric.
         */
        public var values: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.RdsDatabaseProjectedMetric) : this() {
            this.name = x.name
            this.timestamps = x.timestamps
            this.values = x.values
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy