commonMain.aws.sdk.kotlin.services.computeoptimizer.model.GetEc2RecommendationProjectedMetricsRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of computeoptimizer-jvm Show documentation
Show all versions of computeoptimizer-jvm Show documentation
The AWS SDK for Kotlin client for Compute Optimizer
// 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 GetEc2RecommendationProjectedMetricsRequest 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 Amazon Resource Name (ARN) of the instances for which to return recommendation projected metrics.
*/
public val instanceArn: kotlin.String? = builder.instanceArn
/**
* The granularity, in seconds, of the projected metrics data points.
*/
public val period: kotlin.Int? = builder.period
/**
* An object to specify the preferences for the Amazon EC2 recommendation projected metrics to return in the response.
*/
public val recommendationPreferences: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences? = builder.recommendationPreferences
/**
* 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.GetEc2RecommendationProjectedMetricsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetEc2RecommendationProjectedMetricsRequest(")
append("endTime=$endTime,")
append("instanceArn=$instanceArn,")
append("period=$period,")
append("recommendationPreferences=$recommendationPreferences,")
append("startTime=$startTime,")
append("stat=$stat")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = endTime?.hashCode() ?: 0
result = 31 * result + (instanceArn?.hashCode() ?: 0)
result = 31 * result + (period ?: 0)
result = 31 * result + (recommendationPreferences?.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 GetEc2RecommendationProjectedMetricsRequest
if (endTime != other.endTime) return false
if (instanceArn != other.instanceArn) return false
if (period != other.period) return false
if (recommendationPreferences != other.recommendationPreferences) 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.GetEc2RecommendationProjectedMetricsRequest = 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 Amazon Resource Name (ARN) of the instances for which to return recommendation projected metrics.
*/
public var instanceArn: kotlin.String? = null
/**
* The granularity, in seconds, of the projected metrics data points.
*/
public var period: kotlin.Int? = null
/**
* An object to specify the preferences for the Amazon EC2 recommendation projected metrics to return in the response.
*/
public var recommendationPreferences: aws.sdk.kotlin.services.computeoptimizer.model.RecommendationPreferences? = 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.GetEc2RecommendationProjectedMetricsRequest) : this() {
this.endTime = x.endTime
this.instanceArn = x.instanceArn
this.period = x.period
this.recommendationPreferences = x.recommendationPreferences
this.startTime = x.startTime
this.stat = x.stat
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.GetEc2RecommendationProjectedMetricsRequest = GetEc2RecommendationProjectedMetricsRequest(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
}
}
}