/** * 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 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 AWS_EC2_API PlacementGroup { public: PlacementGroup(); PlacementGroup(const Aws::Utils::Xml::XmlNode& xmlNode); PlacementGroup& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 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; } private: Aws::String m_groupName; bool m_groupNameHasBeenSet; PlacementGroupState m_state; bool m_stateHasBeenSet; PlacementStrategy m_strategy; bool m_strategyHasBeenSet; int m_partitionCount; bool m_partitionCountHasBeenSet; Aws::String m_groupId; bool m_groupIdHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws