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

commonMain.aws.sdk.kotlin.services.computeoptimizer.model.GetRdsDatabaseRecommendationProjectedMetricsRequest.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

public class GetRdsDatabaseRecommendationProjectedMetricsRequest private constructor(builder: Builder) {
    /**
     * The timestamp of the last projected metrics data point to return.
     */
    public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
    /**
     * The granularity, in seconds, of the projected metrics data points.
     */
    public val period: kotlin.Int? = builder.period
    /**
     * Describes the recommendation preferences to return in the response of a GetAutoScalingGroupRecommendations, GetEC2InstanceRecommendations, GetEC2RecommendationProjectedMetrics, GetRDSDatabaseRecommendations, and GetRDSDatabaseRecommendationProjectedMetrics request.
     */
    public val recommendationPreferences: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences? = builder.recommendationPreferences
    /**
     * The ARN that identifies the Amazon RDS.
     *
     *  The following is the format of the ARN:
     *
     * `arn:aws:rds:{region}:{accountId}:db:{resourceName}`
     */
    public val resourceArn: kotlin.String? = builder.resourceArn
    /**
     * The timestamp of the first projected metrics data point to return.
     */
    public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
    /**
     * The statistic of the projected metrics.
     */
    public val stat: aws.sdk.kotlin.services.computeoptimizer.model.MetricStatistic? = builder.stat

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

    override fun toString(): kotlin.String = buildString {
        append("GetRdsDatabaseRecommendationProjectedMetricsRequest(")
        append("endTime=$endTime,")
        append("period=$period,")
        append("recommendationPreferences=$recommendationPreferences,")
        append("resourceArn=$resourceArn,")
        append("startTime=$startTime,")
        append("stat=$stat")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = endTime?.hashCode() ?: 0
        result = 31 * result + (period ?: 0)
        result = 31 * result + (recommendationPreferences?.hashCode() ?: 0)
        result = 31 * result + (resourceArn?.hashCode() ?: 0)
        result = 31 * result + (startTime?.hashCode() ?: 0)
        result = 31 * result + (stat?.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 GetRdsDatabaseRecommendationProjectedMetricsRequest

        if (endTime != other.endTime) return false
        if (period != other.period) return false
        if (recommendationPreferences != other.recommendationPreferences) return false
        if (resourceArn != other.resourceArn) return false
        if (startTime != other.startTime) return false
        if (stat != other.stat) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The timestamp of the last projected metrics data point to return.
         */
        public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The granularity, in seconds, of the projected metrics data points.
         */
        public var period: kotlin.Int? = null
        /**
         * Describes the recommendation preferences to return in the response of a GetAutoScalingGroupRecommendations, GetEC2InstanceRecommendations, GetEC2RecommendationProjectedMetrics, GetRDSDatabaseRecommendations, and GetRDSDatabaseRecommendationProjectedMetrics request.
         */
        public var recommendationPreferences: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences? = null
        /**
         * The ARN that identifies the Amazon RDS.
         *
         *  The following is the format of the ARN:
         *
         * `arn:aws:rds:{region}:{accountId}:db:{resourceName}`
         */
        public var resourceArn: kotlin.String? = null
        /**
         * The timestamp of the first projected metrics data point to return.
         */
        public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The statistic of the projected metrics.
         */
        public var stat: aws.sdk.kotlin.services.computeoptimizer.model.MetricStatistic? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.GetRdsDatabaseRecommendationProjectedMetricsRequest) : this() {
            this.endTime = x.endTime
            this.period = x.period
            this.recommendationPreferences = x.recommendationPreferences
            this.resourceArn = x.resourceArn
            this.startTime = x.startTime
            this.stat = x.stat
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy