commonMain.aws.sdk.kotlin.services.computeoptimizer.model.GetEcsServiceRecommendationProjectedMetricsRequest.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 GetEcsServiceRecommendationProjectedMetricsRequest 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
/**
* The ARN that identifies the Amazon ECS service.
*
* The following is the format of the ARN:
*
* `arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name`
*/
public val serviceArn: kotlin.String? = builder.serviceArn
/**
* 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.GetEcsServiceRecommendationProjectedMetricsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetEcsServiceRecommendationProjectedMetricsRequest(")
append("endTime=$endTime,")
append("period=$period,")
append("serviceArn=$serviceArn,")
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 + (serviceArn?.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 GetEcsServiceRecommendationProjectedMetricsRequest
if (endTime != other.endTime) return false
if (period != other.period) return false
if (serviceArn != other.serviceArn) 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.GetEcsServiceRecommendationProjectedMetricsRequest = 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
/**
* The ARN that identifies the Amazon ECS service.
*
* The following is the format of the ARN:
*
* `arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name`
*/
public var serviceArn: 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.GetEcsServiceRecommendationProjectedMetricsRequest) : this() {
this.endTime = x.endTime
this.period = x.period
this.serviceArn = x.serviceArn
this.startTime = x.startTime
this.stat = x.stat
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.computeoptimizer.model.GetEcsServiceRecommendationProjectedMetricsRequest = GetEcsServiceRecommendationProjectedMetricsRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}