
commonMain.aws.sdk.kotlin.services.emr.model.InstanceFleetResizingSpecifications.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.emr.model
/**
* The resize specification for On-Demand and Spot Instances in the fleet.
*/
public class InstanceFleetResizingSpecifications private constructor(builder: Builder) {
/**
* The resize specification for On-Demand Instances in the instance fleet, which contains the resize timeout period.
*/
public val onDemandResizeSpecification: aws.sdk.kotlin.services.emr.model.OnDemandResizingSpecification? = builder.onDemandResizeSpecification
/**
* The resize specification for Spot Instances in the instance fleet, which contains the resize timeout period.
*/
public val spotResizeSpecification: aws.sdk.kotlin.services.emr.model.SpotResizingSpecification? = builder.spotResizeSpecification
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.emr.model.InstanceFleetResizingSpecifications = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InstanceFleetResizingSpecifications(")
append("onDemandResizeSpecification=$onDemandResizeSpecification,")
append("spotResizeSpecification=$spotResizeSpecification")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = onDemandResizeSpecification?.hashCode() ?: 0
result = 31 * result + (spotResizeSpecification?.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 InstanceFleetResizingSpecifications
if (onDemandResizeSpecification != other.onDemandResizeSpecification) return false
if (spotResizeSpecification != other.spotResizeSpecification) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.emr.model.InstanceFleetResizingSpecifications = Builder(this).apply(block).build()
public class Builder {
/**
* The resize specification for On-Demand Instances in the instance fleet, which contains the resize timeout period.
*/
public var onDemandResizeSpecification: aws.sdk.kotlin.services.emr.model.OnDemandResizingSpecification? = null
/**
* The resize specification for Spot Instances in the instance fleet, which contains the resize timeout period.
*/
public var spotResizeSpecification: aws.sdk.kotlin.services.emr.model.SpotResizingSpecification? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.emr.model.InstanceFleetResizingSpecifications) : this() {
this.onDemandResizeSpecification = x.onDemandResizeSpecification
this.spotResizeSpecification = x.spotResizeSpecification
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.emr.model.InstanceFleetResizingSpecifications = InstanceFleetResizingSpecifications(this)
/**
* construct an [aws.sdk.kotlin.services.emr.model.OnDemandResizingSpecification] inside the given [block]
*/
public fun onDemandResizeSpecification(block: aws.sdk.kotlin.services.emr.model.OnDemandResizingSpecification.Builder.() -> kotlin.Unit) {
this.onDemandResizeSpecification = aws.sdk.kotlin.services.emr.model.OnDemandResizingSpecification.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.emr.model.SpotResizingSpecification] inside the given [block]
*/
public fun spotResizeSpecification(block: aws.sdk.kotlin.services.emr.model.SpotResizingSpecification.Builder.() -> kotlin.Unit) {
this.spotResizeSpecification = aws.sdk.kotlin.services.emr.model.SpotResizingSpecification.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy