
commonMain.aws.sdk.kotlin.services.emr.model.PutManagedScalingPolicyRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.emr.model
public class PutManagedScalingPolicyRequest private constructor(builder: Builder) {
/**
* Specifies the ID of an EMR cluster where the managed scaling policy is attached.
*/
public val clusterId: kotlin.String? = builder.clusterId
/**
* Specifies the constraints for the managed scaling policy.
*/
public val managedScalingPolicy: aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy? = builder.managedScalingPolicy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.emr.model.PutManagedScalingPolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutManagedScalingPolicyRequest(")
append("clusterId=$clusterId,")
append("managedScalingPolicy=$managedScalingPolicy)")
}
override fun hashCode(): kotlin.Int {
var result = clusterId?.hashCode() ?: 0
result = 31 * result + (managedScalingPolicy?.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 PutManagedScalingPolicyRequest
if (clusterId != other.clusterId) return false
if (managedScalingPolicy != other.managedScalingPolicy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.emr.model.PutManagedScalingPolicyRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies the ID of an EMR cluster where the managed scaling policy is attached.
*/
public var clusterId: kotlin.String? = null
/**
* Specifies the constraints for the managed scaling policy.
*/
public var managedScalingPolicy: aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.emr.model.PutManagedScalingPolicyRequest) : this() {
this.clusterId = x.clusterId
this.managedScalingPolicy = x.managedScalingPolicy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.emr.model.PutManagedScalingPolicyRequest = PutManagedScalingPolicyRequest(this)
/**
* construct an [aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy] inside the given [block]
*/
public fun managedScalingPolicy(block: aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy.Builder.() -> kotlin.Unit) {
this.managedScalingPolicy = aws.sdk.kotlin.services.emr.model.ManagedScalingPolicy.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy