
commonMain.aws.sdk.kotlin.services.emr.model.SetTerminationProtectionRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.emr.model
/**
* The input argument to the TerminationProtection operation.
*/
public class SetTerminationProtectionRequest private constructor(builder: Builder) {
/**
* A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows .
*/
public val jobFlowIds: List? = builder.jobFlowIds
/**
* A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.
*/
public val terminationProtected: kotlin.Boolean = builder.terminationProtected
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.emr.model.SetTerminationProtectionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SetTerminationProtectionRequest(")
append("jobFlowIds=$jobFlowIds,")
append("terminationProtected=$terminationProtected)")
}
override fun hashCode(): kotlin.Int {
var result = jobFlowIds?.hashCode() ?: 0
result = 31 * result + (terminationProtected.hashCode())
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 SetTerminationProtectionRequest
if (jobFlowIds != other.jobFlowIds) return false
if (terminationProtected != other.terminationProtected) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.emr.model.SetTerminationProtectionRequest = Builder(this).apply(block).build()
public class Builder {
/**
* A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows .
*/
public var jobFlowIds: List? = null
/**
* A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.
*/
public var terminationProtected: kotlin.Boolean = false
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.emr.model.SetTerminationProtectionRequest) : this() {
this.jobFlowIds = x.jobFlowIds
this.terminationProtected = x.terminationProtected
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.emr.model.SetTerminationProtectionRequest = SetTerminationProtectionRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy