/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace EMR { namespace Model { /** *

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 releases 4.8.0 and later, * excluding 5.0.x versions. On-Demand Instances allocation strategy is available * in Amazon EMR releases 5.12.1 and later.

See Also:

AWS * API Reference

*/ class OnDemandProvisioningSpecification { public: AWS_EMR_API OnDemandProvisioningSpecification(); AWS_EMR_API OnDemandProvisioningSpecification(Aws::Utils::Json::JsonView jsonValue); AWS_EMR_API OnDemandProvisioningSpecification& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Specifies the strategy to use in launching On-Demand instance fleets. * Currently, the only option is lowest-price (the default), which * launches the lowest price first.

*/ inline const OnDemandProvisioningAllocationStrategy& GetAllocationStrategy() const{ return m_allocationStrategy; } /** *

Specifies the strategy to use in launching On-Demand instance fleets. * Currently, the only option is lowest-price (the default), which * launches the lowest price first.

*/ inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; } /** *

Specifies the strategy to use in launching On-Demand instance fleets. * Currently, the only option is lowest-price (the default), which * launches the lowest price first.

*/ inline void SetAllocationStrategy(const OnDemandProvisioningAllocationStrategy& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; } /** *

Specifies the strategy to use in launching On-Demand instance fleets. * Currently, the only option is lowest-price (the default), which * launches the lowest price first.

*/ inline void SetAllocationStrategy(OnDemandProvisioningAllocationStrategy&& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = std::move(value); } /** *

Specifies the strategy to use in launching On-Demand instance fleets. * Currently, the only option is lowest-price (the default), which * launches the lowest price first.

*/ inline OnDemandProvisioningSpecification& WithAllocationStrategy(const OnDemandProvisioningAllocationStrategy& value) { SetAllocationStrategy(value); return *this;} /** *

Specifies the strategy to use in launching On-Demand instance fleets. * Currently, the only option is lowest-price (the default), which * launches the lowest price first.

*/ inline OnDemandProvisioningSpecification& WithAllocationStrategy(OnDemandProvisioningAllocationStrategy&& value) { SetAllocationStrategy(std::move(value)); return *this;} /** *

The launch specification for On-Demand instances in the instance fleet, which * determines the allocation strategy.

*/ inline const OnDemandCapacityReservationOptions& GetCapacityReservationOptions() const{ return m_capacityReservationOptions; } /** *

The launch specification for On-Demand instances in the instance fleet, which * determines the allocation strategy.

*/ inline bool CapacityReservationOptionsHasBeenSet() const { return m_capacityReservationOptionsHasBeenSet; } /** *

The launch specification for On-Demand instances in the instance fleet, which * determines the allocation strategy.

*/ inline void SetCapacityReservationOptions(const OnDemandCapacityReservationOptions& value) { m_capacityReservationOptionsHasBeenSet = true; m_capacityReservationOptions = value; } /** *

The launch specification for On-Demand instances in the instance fleet, which * determines the allocation strategy.

*/ inline void SetCapacityReservationOptions(OnDemandCapacityReservationOptions&& value) { m_capacityReservationOptionsHasBeenSet = true; m_capacityReservationOptions = std::move(value); } /** *

The launch specification for On-Demand instances in the instance fleet, which * determines the allocation strategy.

*/ inline OnDemandProvisioningSpecification& WithCapacityReservationOptions(const OnDemandCapacityReservationOptions& value) { SetCapacityReservationOptions(value); return *this;} /** *

The launch specification for On-Demand instances in the instance fleet, which * determines the allocation strategy.

*/ inline OnDemandProvisioningSpecification& WithCapacityReservationOptions(OnDemandCapacityReservationOptions&& value) { SetCapacityReservationOptions(std::move(value)); return *this;} private: OnDemandProvisioningAllocationStrategy m_allocationStrategy; bool m_allocationStrategyHasBeenSet = false; OnDemandCapacityReservationOptions m_capacityReservationOptions; bool m_capacityReservationOptionsHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws