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

Detailed information about an instance group.

See Also:

AWS * API Reference

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

Unique identifier for the instance group.

*/ inline const Aws::String& GetInstanceGroupId() const{ return m_instanceGroupId; } /** *

Unique identifier for the instance group.

*/ inline bool InstanceGroupIdHasBeenSet() const { return m_instanceGroupIdHasBeenSet; } /** *

Unique identifier for the instance group.

*/ inline void SetInstanceGroupId(const Aws::String& value) { m_instanceGroupIdHasBeenSet = true; m_instanceGroupId = value; } /** *

Unique identifier for the instance group.

*/ inline void SetInstanceGroupId(Aws::String&& value) { m_instanceGroupIdHasBeenSet = true; m_instanceGroupId = std::move(value); } /** *

Unique identifier for the instance group.

*/ inline void SetInstanceGroupId(const char* value) { m_instanceGroupIdHasBeenSet = true; m_instanceGroupId.assign(value); } /** *

Unique identifier for the instance group.

*/ inline InstanceGroupDetail& WithInstanceGroupId(const Aws::String& value) { SetInstanceGroupId(value); return *this;} /** *

Unique identifier for the instance group.

*/ inline InstanceGroupDetail& WithInstanceGroupId(Aws::String&& value) { SetInstanceGroupId(std::move(value)); return *this;} /** *

Unique identifier for the instance group.

*/ inline InstanceGroupDetail& WithInstanceGroupId(const char* value) { SetInstanceGroupId(value); return *this;} /** *

Friendly name for the instance group.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

Friendly name for the instance group.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

Friendly name for the instance group.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

Friendly name for the instance group.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

Friendly name for the instance group.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

Friendly name for the instance group.

*/ inline InstanceGroupDetail& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

Friendly name for the instance group.

*/ inline InstanceGroupDetail& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

Friendly name for the instance group.

*/ inline InstanceGroupDetail& WithName(const char* value) { SetName(value); return *this;} /** *

Market type of the Amazon EC2 instances used to create a cluster node.

*/ inline const MarketType& GetMarket() const{ return m_market; } /** *

Market type of the Amazon EC2 instances used to create a cluster node.

*/ inline bool MarketHasBeenSet() const { return m_marketHasBeenSet; } /** *

Market type of the Amazon EC2 instances used to create a cluster node.

*/ inline void SetMarket(const MarketType& value) { m_marketHasBeenSet = true; m_market = value; } /** *

Market type of the Amazon EC2 instances used to create a cluster node.

*/ inline void SetMarket(MarketType&& value) { m_marketHasBeenSet = true; m_market = std::move(value); } /** *

Market type of the Amazon EC2 instances used to create a cluster node.

*/ inline InstanceGroupDetail& WithMarket(const MarketType& value) { SetMarket(value); return *this;} /** *

Market type of the Amazon EC2 instances used to create a cluster node.

*/ inline InstanceGroupDetail& WithMarket(MarketType&& value) { SetMarket(std::move(value)); return *this;} /** *

Instance group role in the cluster

*/ inline const InstanceRoleType& GetInstanceRole() const{ return m_instanceRole; } /** *

Instance group role in the cluster

*/ inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; } /** *

Instance group role in the cluster

*/ inline void SetInstanceRole(const InstanceRoleType& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = value; } /** *

Instance group role in the cluster

*/ inline void SetInstanceRole(InstanceRoleType&& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = std::move(value); } /** *

Instance group role in the cluster

*/ inline InstanceGroupDetail& WithInstanceRole(const InstanceRoleType& value) { SetInstanceRole(value); return *this;} /** *

Instance group role in the cluster

*/ inline InstanceGroupDetail& WithInstanceRole(InstanceRoleType&& value) { SetInstanceRole(std::move(value)); return *this;} /** *

If specified, indicates that the instance group uses Spot Instances. This is * the maximum price you are willing to pay for Spot Instances. Specify * OnDemandPrice to set the amount equal to the On-Demand price, or * specify an amount in USD.

*/ inline const Aws::String& GetBidPrice() const{ return m_bidPrice; } /** *

If specified, indicates that the instance group uses Spot Instances. This is * the maximum price you are willing to pay for Spot Instances. Specify * OnDemandPrice to set the amount equal to the On-Demand price, or * specify an amount in USD.

*/ inline bool BidPriceHasBeenSet() const { return m_bidPriceHasBeenSet; } /** *

If specified, indicates that the instance group uses Spot Instances. This is * the maximum price you are willing to pay for Spot Instances. Specify * OnDemandPrice to set the amount equal to the On-Demand price, or * specify an amount in USD.

*/ inline void SetBidPrice(const Aws::String& value) { m_bidPriceHasBeenSet = true; m_bidPrice = value; } /** *

If specified, indicates that the instance group uses Spot Instances. This is * the maximum price you are willing to pay for Spot Instances. Specify * OnDemandPrice to set the amount equal to the On-Demand price, or * specify an amount in USD.

*/ inline void SetBidPrice(Aws::String&& value) { m_bidPriceHasBeenSet = true; m_bidPrice = std::move(value); } /** *

If specified, indicates that the instance group uses Spot Instances. This is * the maximum price you are willing to pay for Spot Instances. Specify * OnDemandPrice to set the amount equal to the On-Demand price, or * specify an amount in USD.

*/ inline void SetBidPrice(const char* value) { m_bidPriceHasBeenSet = true; m_bidPrice.assign(value); } /** *

If specified, indicates that the instance group uses Spot Instances. This is * the maximum price you are willing to pay for Spot Instances. Specify * OnDemandPrice to set the amount equal to the On-Demand price, or * specify an amount in USD.

*/ inline InstanceGroupDetail& WithBidPrice(const Aws::String& value) { SetBidPrice(value); return *this;} /** *

If specified, indicates that the instance group uses Spot Instances. This is * the maximum price you are willing to pay for Spot Instances. Specify * OnDemandPrice to set the amount equal to the On-Demand price, or * specify an amount in USD.

*/ inline InstanceGroupDetail& WithBidPrice(Aws::String&& value) { SetBidPrice(std::move(value)); return *this;} /** *

If specified, indicates that the instance group uses Spot Instances. This is * the maximum price you are willing to pay for Spot Instances. Specify * OnDemandPrice to set the amount equal to the On-Demand price, or * specify an amount in USD.

*/ inline InstanceGroupDetail& WithBidPrice(const char* value) { SetBidPrice(value); return *this;} /** *

Amazon EC2 instance type.

*/ inline const Aws::String& GetInstanceType() const{ return m_instanceType; } /** *

Amazon EC2 instance type.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

Amazon EC2 instance type.

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

Amazon EC2 instance type.

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

Amazon EC2 instance type.

*/ inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); } /** *

Amazon EC2 instance type.

*/ inline InstanceGroupDetail& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

Amazon EC2 instance type.

*/ inline InstanceGroupDetail& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

Amazon EC2 instance type.

*/ inline InstanceGroupDetail& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

Target number of instances to run in the instance group.

*/ inline int GetInstanceRequestCount() const{ return m_instanceRequestCount; } /** *

Target number of instances to run in the instance group.

*/ inline bool InstanceRequestCountHasBeenSet() const { return m_instanceRequestCountHasBeenSet; } /** *

Target number of instances to run in the instance group.

*/ inline void SetInstanceRequestCount(int value) { m_instanceRequestCountHasBeenSet = true; m_instanceRequestCount = value; } /** *

Target number of instances to run in the instance group.

*/ inline InstanceGroupDetail& WithInstanceRequestCount(int value) { SetInstanceRequestCount(value); return *this;} /** *

Actual count of running instances.

*/ inline int GetInstanceRunningCount() const{ return m_instanceRunningCount; } /** *

Actual count of running instances.

*/ inline bool InstanceRunningCountHasBeenSet() const { return m_instanceRunningCountHasBeenSet; } /** *

Actual count of running instances.

*/ inline void SetInstanceRunningCount(int value) { m_instanceRunningCountHasBeenSet = true; m_instanceRunningCount = value; } /** *

Actual count of running instances.

*/ inline InstanceGroupDetail& WithInstanceRunningCount(int value) { SetInstanceRunningCount(value); return *this;} /** *

State of instance group. The following values are no longer supported: * STARTING, TERMINATED, and FAILED.

*/ inline const InstanceGroupState& GetState() const{ return m_state; } /** *

State of instance group. The following values are no longer supported: * STARTING, TERMINATED, and FAILED.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

State of instance group. The following values are no longer supported: * STARTING, TERMINATED, and FAILED.

*/ inline void SetState(const InstanceGroupState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

State of instance group. The following values are no longer supported: * STARTING, TERMINATED, and FAILED.

*/ inline void SetState(InstanceGroupState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

State of instance group. The following values are no longer supported: * STARTING, TERMINATED, and FAILED.

*/ inline InstanceGroupDetail& WithState(const InstanceGroupState& value) { SetState(value); return *this;} /** *

State of instance group. The following values are no longer supported: * STARTING, TERMINATED, and FAILED.

*/ inline InstanceGroupDetail& WithState(InstanceGroupState&& value) { SetState(std::move(value)); return *this;} /** *

Details regarding the state of the instance group.

*/ inline const Aws::String& GetLastStateChangeReason() const{ return m_lastStateChangeReason; } /** *

Details regarding the state of the instance group.

*/ inline bool LastStateChangeReasonHasBeenSet() const { return m_lastStateChangeReasonHasBeenSet; } /** *

Details regarding the state of the instance group.

*/ inline void SetLastStateChangeReason(const Aws::String& value) { m_lastStateChangeReasonHasBeenSet = true; m_lastStateChangeReason = value; } /** *

Details regarding the state of the instance group.

*/ inline void SetLastStateChangeReason(Aws::String&& value) { m_lastStateChangeReasonHasBeenSet = true; m_lastStateChangeReason = std::move(value); } /** *

Details regarding the state of the instance group.

*/ inline void SetLastStateChangeReason(const char* value) { m_lastStateChangeReasonHasBeenSet = true; m_lastStateChangeReason.assign(value); } /** *

Details regarding the state of the instance group.

*/ inline InstanceGroupDetail& WithLastStateChangeReason(const Aws::String& value) { SetLastStateChangeReason(value); return *this;} /** *

Details regarding the state of the instance group.

*/ inline InstanceGroupDetail& WithLastStateChangeReason(Aws::String&& value) { SetLastStateChangeReason(std::move(value)); return *this;} /** *

Details regarding the state of the instance group.

*/ inline InstanceGroupDetail& WithLastStateChangeReason(const char* value) { SetLastStateChangeReason(value); return *this;} /** *

The date/time the instance group was created.

*/ inline const Aws::Utils::DateTime& GetCreationDateTime() const{ return m_creationDateTime; } /** *

The date/time the instance group was created.

*/ inline bool CreationDateTimeHasBeenSet() const { return m_creationDateTimeHasBeenSet; } /** *

The date/time the instance group was created.

*/ inline void SetCreationDateTime(const Aws::Utils::DateTime& value) { m_creationDateTimeHasBeenSet = true; m_creationDateTime = value; } /** *

The date/time the instance group was created.

*/ inline void SetCreationDateTime(Aws::Utils::DateTime&& value) { m_creationDateTimeHasBeenSet = true; m_creationDateTime = std::move(value); } /** *

The date/time the instance group was created.

*/ inline InstanceGroupDetail& WithCreationDateTime(const Aws::Utils::DateTime& value) { SetCreationDateTime(value); return *this;} /** *

The date/time the instance group was created.

*/ inline InstanceGroupDetail& WithCreationDateTime(Aws::Utils::DateTime&& value) { SetCreationDateTime(std::move(value)); return *this;} /** *

The date/time the instance group was started.

*/ inline const Aws::Utils::DateTime& GetStartDateTime() const{ return m_startDateTime; } /** *

The date/time the instance group was started.

*/ inline bool StartDateTimeHasBeenSet() const { return m_startDateTimeHasBeenSet; } /** *

The date/time the instance group was started.

*/ inline void SetStartDateTime(const Aws::Utils::DateTime& value) { m_startDateTimeHasBeenSet = true; m_startDateTime = value; } /** *

The date/time the instance group was started.

*/ inline void SetStartDateTime(Aws::Utils::DateTime&& value) { m_startDateTimeHasBeenSet = true; m_startDateTime = std::move(value); } /** *

The date/time the instance group was started.

*/ inline InstanceGroupDetail& WithStartDateTime(const Aws::Utils::DateTime& value) { SetStartDateTime(value); return *this;} /** *

The date/time the instance group was started.

*/ inline InstanceGroupDetail& WithStartDateTime(Aws::Utils::DateTime&& value) { SetStartDateTime(std::move(value)); return *this;} /** *

The date/time the instance group was available to the cluster.

*/ inline const Aws::Utils::DateTime& GetReadyDateTime() const{ return m_readyDateTime; } /** *

The date/time the instance group was available to the cluster.

*/ inline bool ReadyDateTimeHasBeenSet() const { return m_readyDateTimeHasBeenSet; } /** *

The date/time the instance group was available to the cluster.

*/ inline void SetReadyDateTime(const Aws::Utils::DateTime& value) { m_readyDateTimeHasBeenSet = true; m_readyDateTime = value; } /** *

The date/time the instance group was available to the cluster.

*/ inline void SetReadyDateTime(Aws::Utils::DateTime&& value) { m_readyDateTimeHasBeenSet = true; m_readyDateTime = std::move(value); } /** *

The date/time the instance group was available to the cluster.

*/ inline InstanceGroupDetail& WithReadyDateTime(const Aws::Utils::DateTime& value) { SetReadyDateTime(value); return *this;} /** *

The date/time the instance group was available to the cluster.

*/ inline InstanceGroupDetail& WithReadyDateTime(Aws::Utils::DateTime&& value) { SetReadyDateTime(std::move(value)); return *this;} /** *

The date/time the instance group was terminated.

*/ inline const Aws::Utils::DateTime& GetEndDateTime() const{ return m_endDateTime; } /** *

The date/time the instance group was terminated.

*/ inline bool EndDateTimeHasBeenSet() const { return m_endDateTimeHasBeenSet; } /** *

The date/time the instance group was terminated.

*/ inline void SetEndDateTime(const Aws::Utils::DateTime& value) { m_endDateTimeHasBeenSet = true; m_endDateTime = value; } /** *

The date/time the instance group was terminated.

*/ inline void SetEndDateTime(Aws::Utils::DateTime&& value) { m_endDateTimeHasBeenSet = true; m_endDateTime = std::move(value); } /** *

The date/time the instance group was terminated.

*/ inline InstanceGroupDetail& WithEndDateTime(const Aws::Utils::DateTime& value) { SetEndDateTime(value); return *this;} /** *

The date/time the instance group was terminated.

*/ inline InstanceGroupDetail& WithEndDateTime(Aws::Utils::DateTime&& value) { SetEndDateTime(std::move(value)); return *this;} /** *

The custom AMI ID to use for the provisioned instance group.

*/ inline const Aws::String& GetCustomAmiId() const{ return m_customAmiId; } /** *

The custom AMI ID to use for the provisioned instance group.

*/ inline bool CustomAmiIdHasBeenSet() const { return m_customAmiIdHasBeenSet; } /** *

The custom AMI ID to use for the provisioned instance group.

*/ inline void SetCustomAmiId(const Aws::String& value) { m_customAmiIdHasBeenSet = true; m_customAmiId = value; } /** *

The custom AMI ID to use for the provisioned instance group.

*/ inline void SetCustomAmiId(Aws::String&& value) { m_customAmiIdHasBeenSet = true; m_customAmiId = std::move(value); } /** *

The custom AMI ID to use for the provisioned instance group.

*/ inline void SetCustomAmiId(const char* value) { m_customAmiIdHasBeenSet = true; m_customAmiId.assign(value); } /** *

The custom AMI ID to use for the provisioned instance group.

*/ inline InstanceGroupDetail& WithCustomAmiId(const Aws::String& value) { SetCustomAmiId(value); return *this;} /** *

The custom AMI ID to use for the provisioned instance group.

*/ inline InstanceGroupDetail& WithCustomAmiId(Aws::String&& value) { SetCustomAmiId(std::move(value)); return *this;} /** *

The custom AMI ID to use for the provisioned instance group.

*/ inline InstanceGroupDetail& WithCustomAmiId(const char* value) { SetCustomAmiId(value); return *this;} private: Aws::String m_instanceGroupId; bool m_instanceGroupIdHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; MarketType m_market; bool m_marketHasBeenSet = false; InstanceRoleType m_instanceRole; bool m_instanceRoleHasBeenSet = false; Aws::String m_bidPrice; bool m_bidPriceHasBeenSet = false; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet = false; int m_instanceRequestCount; bool m_instanceRequestCountHasBeenSet = false; int m_instanceRunningCount; bool m_instanceRunningCountHasBeenSet = false; InstanceGroupState m_state; bool m_stateHasBeenSet = false; Aws::String m_lastStateChangeReason; bool m_lastStateChangeReasonHasBeenSet = false; Aws::Utils::DateTime m_creationDateTime; bool m_creationDateTimeHasBeenSet = false; Aws::Utils::DateTime m_startDateTime; bool m_startDateTimeHasBeenSet = false; Aws::Utils::DateTime m_readyDateTime; bool m_readyDateTimeHasBeenSet = false; Aws::Utils::DateTime m_endDateTime; bool m_endDateTimeHasBeenSet = false; Aws::String m_customAmiId; bool m_customAmiIdHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws