
commonMain.aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.emr.model
/**
* Managed scaling policy for an Amazon EMR cluster. The policy specifies the limits for resources that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
*/
public class ManagedScalingPolicy private constructor(builder: Builder) {
/**
* The EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
*/
public val computeLimits: aws.sdk.kotlin.services.emr.model.ComputeLimits? = builder.computeLimits
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ManagedScalingPolicy(")
append("computeLimits=$computeLimits)")
}
override fun hashCode(): kotlin.Int {
var result = computeLimits?.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 ManagedScalingPolicy
if (computeLimits != other.computeLimits) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy = Builder(this).apply(block).build()
public class Builder {
/**
* The EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
*/
public var computeLimits: aws.sdk.kotlin.services.emr.model.ComputeLimits? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy) : this() {
this.computeLimits = x.computeLimits
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy = ManagedScalingPolicy(this)
/**
* construct an [aws.sdk.kotlin.services.emr.model.ComputeLimits] inside the given [block]
*/
public fun computeLimits(block: aws.sdk.kotlin.services.emr.model.ComputeLimits.Builder.() -> kotlin.Unit) {
this.computeLimits = aws.sdk.kotlin.services.emr.model.ComputeLimits.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy