AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PlacementGroup.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ec2/model/PlacementGroupState.h>
11#include <aws/ec2/model/PlacementStrategy.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/ec2/model/SpreadLevel.h>
14#include <aws/ec2/model/Tag.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Xml
22{
23 class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace EC2
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_EC2_API PlacementGroup() = default;
40 AWS_EC2_API PlacementGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
42
43 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
44 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
45
46
48
51 inline const Aws::String& GetGroupName() const { return m_groupName; }
52 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
53 template<typename GroupNameT = Aws::String>
54 void SetGroupName(GroupNameT&& value) { m_groupNameHasBeenSet = true; m_groupName = std::forward<GroupNameT>(value); }
55 template<typename GroupNameT = Aws::String>
56 PlacementGroup& WithGroupName(GroupNameT&& value) { SetGroupName(std::forward<GroupNameT>(value)); return *this;}
58
60
63 inline PlacementGroupState GetState() const { return m_state; }
64 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
65 inline void SetState(PlacementGroupState value) { m_stateHasBeenSet = true; m_state = value; }
66 inline PlacementGroup& WithState(PlacementGroupState value) { SetState(value); return *this;}
68
70
73 inline PlacementStrategy GetStrategy() const { return m_strategy; }
74 inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
75 inline void SetStrategy(PlacementStrategy value) { m_strategyHasBeenSet = true; m_strategy = value; }
76 inline PlacementGroup& WithStrategy(PlacementStrategy value) { SetStrategy(value); return *this;}
78
80
84 inline int GetPartitionCount() const { return m_partitionCount; }
85 inline bool PartitionCountHasBeenSet() const { return m_partitionCountHasBeenSet; }
86 inline void SetPartitionCount(int value) { m_partitionCountHasBeenSet = true; m_partitionCount = value; }
87 inline PlacementGroup& WithPartitionCount(int value) { SetPartitionCount(value); return *this;}
89
91
94 inline const Aws::String& GetGroupId() const { return m_groupId; }
95 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
96 template<typename GroupIdT = Aws::String>
97 void SetGroupId(GroupIdT&& value) { m_groupIdHasBeenSet = true; m_groupId = std::forward<GroupIdT>(value); }
98 template<typename GroupIdT = Aws::String>
99 PlacementGroup& WithGroupId(GroupIdT&& value) { SetGroupId(std::forward<GroupIdT>(value)); return *this;}
101
103
106 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
107 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
108 template<typename TagsT = Aws::Vector<Tag>>
109 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
110 template<typename TagsT = Aws::Vector<Tag>>
111 PlacementGroup& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
112 template<typename TagsT = Tag>
113 PlacementGroup& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
115
117
120 inline const Aws::String& GetGroupArn() const { return m_groupArn; }
121 inline bool GroupArnHasBeenSet() const { return m_groupArnHasBeenSet; }
122 template<typename GroupArnT = Aws::String>
123 void SetGroupArn(GroupArnT&& value) { m_groupArnHasBeenSet = true; m_groupArn = std::forward<GroupArnT>(value); }
124 template<typename GroupArnT = Aws::String>
125 PlacementGroup& WithGroupArn(GroupArnT&& value) { SetGroupArn(std::forward<GroupArnT>(value)); return *this;}
127
129
133 inline SpreadLevel GetSpreadLevel() const { return m_spreadLevel; }
134 inline bool SpreadLevelHasBeenSet() const { return m_spreadLevelHasBeenSet; }
135 inline void SetSpreadLevel(SpreadLevel value) { m_spreadLevelHasBeenSet = true; m_spreadLevel = value; }
136 inline PlacementGroup& WithSpreadLevel(SpreadLevel value) { SetSpreadLevel(value); return *this;}
138 private:
139
140 Aws::String m_groupName;
141 bool m_groupNameHasBeenSet = false;
142
144 bool m_stateHasBeenSet = false;
145
147 bool m_strategyHasBeenSet = false;
148
149 int m_partitionCount{0};
150 bool m_partitionCountHasBeenSet = false;
151
152 Aws::String m_groupId;
153 bool m_groupIdHasBeenSet = false;
154
155 Aws::Vector<Tag> m_tags;
156 bool m_tagsHasBeenSet = false;
157
158 Aws::String m_groupArn;
159 bool m_groupArnHasBeenSet = false;
160
161 SpreadLevel m_spreadLevel{SpreadLevel::NOT_SET};
162 bool m_spreadLevelHasBeenSet = false;
163 };
164
165} // namespace Model
166} // namespace EC2
167} // namespace Aws
const Aws::String & GetGroupId() const
PlacementGroup & WithTags(TagsT &&value)
void SetGroupId(GroupIdT &&value)
void SetSpreadLevel(SpreadLevel value)
PlacementGroupState GetState() const
const Aws::Vector< Tag > & GetTags() const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
PlacementGroup & WithGroupId(GroupIdT &&value)
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
PlacementGroup & WithSpreadLevel(SpreadLevel value)
void SetState(PlacementGroupState value)
const Aws::String & GetGroupArn() const
PlacementGroup & WithGroupArn(GroupArnT &&value)
void SetGroupArn(GroupArnT &&value)
SpreadLevel GetSpreadLevel() const
PlacementGroup & WithPartitionCount(int value)
PlacementGroup & WithGroupName(GroupNameT &&value)
void SetStrategy(PlacementStrategy value)
AWS_EC2_API PlacementGroup()=default
void SetGroupName(GroupNameT &&value)
PlacementGroup & WithStrategy(PlacementStrategy value)
const Aws::String & GetGroupName() const
PlacementGroup & WithState(PlacementGroupState value)
PlacementStrategy GetStrategy() const
PlacementGroup & AddTags(TagsT &&value)
AWS_EC2_API PlacementGroup(const Aws::Utils::Xml::XmlNode &xmlNode)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream