/** * 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 #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes a placement group.

See Also:

AWS * API Reference

*/ class PlacementGroup { public: AWS_EC2_API PlacementGroup(); AWS_EC2_API PlacementGroup(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API PlacementGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The name of the placement group.

*/ inline const Aws::String& GetGroupName() const{ return m_groupName; } /** *

The name of the placement group.

*/ inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } /** *

The name of the placement group.

*/ inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } /** *

The name of the placement group.

*/ inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } /** *

The name of the placement group.

*/ inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } /** *

The name of the placement group.

*/ inline PlacementGroup& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} /** *

The name of the placement group.

*/ inline PlacementGroup& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} /** *

The name of the placement group.

*/ inline PlacementGroup& WithGroupName(const char* value) { SetGroupName(value); return *this;} /** *

The state of the placement group.

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

The state of the placement group.

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

The state of the placement group.

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

The state of the placement group.

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

The state of the placement group.

*/ inline PlacementGroup& WithState(const PlacementGroupState& value) { SetState(value); return *this;} /** *

The state of the placement group.

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

The placement strategy.

*/ inline const PlacementStrategy& GetStrategy() const{ return m_strategy; } /** *

The placement strategy.

*/ inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; } /** *

The placement strategy.

*/ inline void SetStrategy(const PlacementStrategy& value) { m_strategyHasBeenSet = true; m_strategy = value; } /** *

The placement strategy.

*/ inline void SetStrategy(PlacementStrategy&& value) { m_strategyHasBeenSet = true; m_strategy = std::move(value); } /** *

The placement strategy.

*/ inline PlacementGroup& WithStrategy(const PlacementStrategy& value) { SetStrategy(value); return *this;} /** *

The placement strategy.

*/ inline PlacementGroup& WithStrategy(PlacementStrategy&& value) { SetStrategy(std::move(value)); return *this;} /** *

The number of partitions. Valid only if strategy is set to * partition.

*/ inline int GetPartitionCount() const{ return m_partitionCount; } /** *

The number of partitions. Valid only if strategy is set to * partition.

*/ inline bool PartitionCountHasBeenSet() const { return m_partitionCountHasBeenSet; } /** *

The number of partitions. Valid only if strategy is set to * partition.

*/ inline void SetPartitionCount(int value) { m_partitionCountHasBeenSet = true; m_partitionCount = value; } /** *

The number of partitions. Valid only if strategy is set to * partition.

*/ inline PlacementGroup& WithPartitionCount(int value) { SetPartitionCount(value); return *this;} /** *

The ID of the placement group.

*/ inline const Aws::String& GetGroupId() const{ return m_groupId; } /** *

The ID of the placement group.

*/ inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; } /** *

The ID of the placement group.

*/ inline void SetGroupId(const Aws::String& value) { m_groupIdHasBeenSet = true; m_groupId = value; } /** *

The ID of the placement group.

*/ inline void SetGroupId(Aws::String&& value) { m_groupIdHasBeenSet = true; m_groupId = std::move(value); } /** *

The ID of the placement group.

*/ inline void SetGroupId(const char* value) { m_groupIdHasBeenSet = true; m_groupId.assign(value); } /** *

The ID of the placement group.

*/ inline PlacementGroup& WithGroupId(const Aws::String& value) { SetGroupId(value); return *this;} /** *

The ID of the placement group.

*/ inline PlacementGroup& WithGroupId(Aws::String&& value) { SetGroupId(std::move(value)); return *this;} /** *

The ID of the placement group.

*/ inline PlacementGroup& WithGroupId(const char* value) { SetGroupId(value); return *this;} /** *

Any tags applied to the placement group.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Any tags applied to the placement group.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Any tags applied to the placement group.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Any tags applied to the placement group.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Any tags applied to the placement group.

*/ inline PlacementGroup& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Any tags applied to the placement group.

*/ inline PlacementGroup& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Any tags applied to the placement group.

*/ inline PlacementGroup& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Any tags applied to the placement group.

*/ inline PlacementGroup& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The Amazon Resource Name (ARN) of the placement group.

*/ inline const Aws::String& GetGroupArn() const{ return m_groupArn; } /** *

The Amazon Resource Name (ARN) of the placement group.

*/ inline bool GroupArnHasBeenSet() const { return m_groupArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the placement group.

*/ inline void SetGroupArn(const Aws::String& value) { m_groupArnHasBeenSet = true; m_groupArn = value; } /** *

The Amazon Resource Name (ARN) of the placement group.

*/ inline void SetGroupArn(Aws::String&& value) { m_groupArnHasBeenSet = true; m_groupArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the placement group.

*/ inline void SetGroupArn(const char* value) { m_groupArnHasBeenSet = true; m_groupArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the placement group.

*/ inline PlacementGroup& WithGroupArn(const Aws::String& value) { SetGroupArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the placement group.

*/ inline PlacementGroup& WithGroupArn(Aws::String&& value) { SetGroupArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the placement group.

*/ inline PlacementGroup& WithGroupArn(const char* value) { SetGroupArn(value); return *this;} /** *

The spread level for the placement group. Only Outpost placement * groups can be spread across hosts.

*/ inline const SpreadLevel& GetSpreadLevel() const{ return m_spreadLevel; } /** *

The spread level for the placement group. Only Outpost placement * groups can be spread across hosts.

*/ inline bool SpreadLevelHasBeenSet() const { return m_spreadLevelHasBeenSet; } /** *

The spread level for the placement group. Only Outpost placement * groups can be spread across hosts.

*/ inline void SetSpreadLevel(const SpreadLevel& value) { m_spreadLevelHasBeenSet = true; m_spreadLevel = value; } /** *

The spread level for the placement group. Only Outpost placement * groups can be spread across hosts.

*/ inline void SetSpreadLevel(SpreadLevel&& value) { m_spreadLevelHasBeenSet = true; m_spreadLevel = std::move(value); } /** *

The spread level for the placement group. Only Outpost placement * groups can be spread across hosts.

*/ inline PlacementGroup& WithSpreadLevel(const SpreadLevel& value) { SetSpreadLevel(value); return *this;} /** *

The spread level for the placement group. Only Outpost placement * groups can be spread across hosts.

*/ inline PlacementGroup& WithSpreadLevel(SpreadLevel&& value) { SetSpreadLevel(std::move(value)); return *this;} private: Aws::String m_groupName; bool m_groupNameHasBeenSet = false; PlacementGroupState m_state; bool m_stateHasBeenSet = false; PlacementStrategy m_strategy; bool m_strategyHasBeenSet = false; int m_partitionCount; bool m_partitionCountHasBeenSet = false; Aws::String m_groupId; bool m_groupIdHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::String m_groupArn; bool m_groupArnHasBeenSet = false; SpreadLevel m_spreadLevel; bool m_spreadLevelHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws