All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.emr.model.InstanceFleetProvisioningSpecifications.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.emr.model



/**
 * The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.
 *
 * The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand and Spot Instance allocation strategies are available in Amazon EMR version 5.12.1 and later.
 */
public class InstanceFleetProvisioningSpecifications private constructor(builder: Builder) {
    /**
     * The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
     *
     * The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.
     */
    public val onDemandSpecification: aws.sdk.kotlin.services.emr.model.OnDemandProvisioningSpecification? = builder.onDemandSpecification
    /**
     * The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.
     */
    public val spotSpecification: aws.sdk.kotlin.services.emr.model.SpotProvisioningSpecification? = builder.spotSpecification

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.emr.model.InstanceFleetProvisioningSpecifications = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("InstanceFleetProvisioningSpecifications(")
        append("onDemandSpecification=$onDemandSpecification,")
        append("spotSpecification=$spotSpecification)")
    }

    override fun hashCode(): kotlin.Int {
        var result = onDemandSpecification?.hashCode() ?: 0
        result = 31 * result + (spotSpecification?.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 InstanceFleetProvisioningSpecifications

        if (onDemandSpecification != other.onDemandSpecification) return false
        if (spotSpecification != other.spotSpecification) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.emr.model.InstanceFleetProvisioningSpecifications = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
         *
         * The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.
         */
        public var onDemandSpecification: aws.sdk.kotlin.services.emr.model.OnDemandProvisioningSpecification? = null
        /**
         * The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.
         */
        public var spotSpecification: aws.sdk.kotlin.services.emr.model.SpotProvisioningSpecification? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.InstanceFleetProvisioningSpecifications) : this() {
            this.onDemandSpecification = x.onDemandSpecification
            this.spotSpecification = x.spotSpecification
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.emr.model.InstanceFleetProvisioningSpecifications = InstanceFleetProvisioningSpecifications(this)

        /**
         * construct an [aws.sdk.kotlin.services.emr.model.OnDemandProvisioningSpecification] inside the given [block]
         */
        public fun onDemandSpecification(block: aws.sdk.kotlin.services.emr.model.OnDemandProvisioningSpecification.Builder.() -> kotlin.Unit) {
            this.onDemandSpecification = aws.sdk.kotlin.services.emr.model.OnDemandProvisioningSpecification.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.emr.model.SpotProvisioningSpecification] inside the given [block]
         */
        public fun spotSpecification(block: aws.sdk.kotlin.services.emr.model.SpotProvisioningSpecification.Builder.() -> kotlin.Unit) {
            this.spotSpecification = aws.sdk.kotlin.services.emr.model.SpotProvisioningSpecification.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy