AWS SDK for C++

AWS SDK for C++ Version 1.11.783

Loading...
Searching...
No Matches
PlacementGroup.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/OperatorResponse.h>
12#include <aws/ec2/model/PlacementGroupState.h>
13#include <aws/ec2/model/PlacementStrategy.h>
14#include <aws/ec2/model/SpreadLevel.h>
15#include <aws/ec2/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Xml {
22class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace EC2 {
26namespace Model {
27
34 public:
35 AWS_EC2_API PlacementGroup() = default;
36 AWS_EC2_API PlacementGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
38
39 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
41
43
46 inline const Aws::String& GetGroupName() const { return m_groupName; }
47 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
48 template <typename GroupNameT = Aws::String>
49 void SetGroupName(GroupNameT&& value) {
50 m_groupNameHasBeenSet = true;
51 m_groupName = std::forward<GroupNameT>(value);
52 }
53 template <typename GroupNameT = Aws::String>
54 PlacementGroup& WithGroupName(GroupNameT&& value) {
55 SetGroupName(std::forward<GroupNameT>(value));
56 return *this;
57 }
59
61
64 inline PlacementGroupState GetState() const { return m_state; }
65 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
66 inline void SetState(PlacementGroupState value) {
67 m_stateHasBeenSet = true;
68 m_state = value;
69 }
71 SetState(value);
72 return *this;
73 }
75
77
80 inline PlacementStrategy GetStrategy() const { return m_strategy; }
81 inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
82 inline void SetStrategy(PlacementStrategy value) {
83 m_strategyHasBeenSet = true;
84 m_strategy = value;
85 }
87 SetStrategy(value);
88 return *this;
89 }
91
93
97 inline int GetPartitionCount() const { return m_partitionCount; }
98 inline bool PartitionCountHasBeenSet() const { return m_partitionCountHasBeenSet; }
99 inline void SetPartitionCount(int value) {
100 m_partitionCountHasBeenSet = true;
101 m_partitionCount = value;
102 }
104 SetPartitionCount(value);
105 return *this;
106 }
108
110
113 inline const Aws::String& GetGroupId() const { return m_groupId; }
114 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
115 template <typename GroupIdT = Aws::String>
116 void SetGroupId(GroupIdT&& value) {
117 m_groupIdHasBeenSet = true;
118 m_groupId = std::forward<GroupIdT>(value);
119 }
120 template <typename GroupIdT = Aws::String>
121 PlacementGroup& WithGroupId(GroupIdT&& value) {
122 SetGroupId(std::forward<GroupIdT>(value));
123 return *this;
124 }
126
128
131 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
132 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
133 template <typename TagsT = Aws::Vector<Tag>>
134 void SetTags(TagsT&& value) {
135 m_tagsHasBeenSet = true;
136 m_tags = std::forward<TagsT>(value);
137 }
138 template <typename TagsT = Aws::Vector<Tag>>
139 PlacementGroup& WithTags(TagsT&& value) {
140 SetTags(std::forward<TagsT>(value));
141 return *this;
142 }
143 template <typename TagsT = Tag>
144 PlacementGroup& AddTags(TagsT&& value) {
145 m_tagsHasBeenSet = true;
146 m_tags.emplace_back(std::forward<TagsT>(value));
147 return *this;
148 }
150
152
155 inline const Aws::String& GetGroupArn() const { return m_groupArn; }
156 inline bool GroupArnHasBeenSet() const { return m_groupArnHasBeenSet; }
157 template <typename GroupArnT = Aws::String>
158 void SetGroupArn(GroupArnT&& value) {
159 m_groupArnHasBeenSet = true;
160 m_groupArn = std::forward<GroupArnT>(value);
161 }
162 template <typename GroupArnT = Aws::String>
163 PlacementGroup& WithGroupArn(GroupArnT&& value) {
164 SetGroupArn(std::forward<GroupArnT>(value));
165 return *this;
166 }
168
170
174 inline SpreadLevel GetSpreadLevel() const { return m_spreadLevel; }
175 inline bool SpreadLevelHasBeenSet() const { return m_spreadLevelHasBeenSet; }
176 inline void SetSpreadLevel(SpreadLevel value) {
177 m_spreadLevelHasBeenSet = true;
178 m_spreadLevel = value;
179 }
181 SetSpreadLevel(value);
182 return *this;
183 }
185
187
190 inline const Aws::String& GetLinkedGroupId() const { return m_linkedGroupId; }
191 inline bool LinkedGroupIdHasBeenSet() const { return m_linkedGroupIdHasBeenSet; }
192 template <typename LinkedGroupIdT = Aws::String>
193 void SetLinkedGroupId(LinkedGroupIdT&& value) {
194 m_linkedGroupIdHasBeenSet = true;
195 m_linkedGroupId = std::forward<LinkedGroupIdT>(value);
196 }
197 template <typename LinkedGroupIdT = Aws::String>
198 PlacementGroup& WithLinkedGroupId(LinkedGroupIdT&& value) {
199 SetLinkedGroupId(std::forward<LinkedGroupIdT>(value));
200 return *this;
201 }
203
205
208 inline const OperatorResponse& GetOperator() const { return m_operator; }
209 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
210 template <typename OperatorT = OperatorResponse>
211 void SetOperator(OperatorT&& value) {
212 m_operatorHasBeenSet = true;
213 m_operator = std::forward<OperatorT>(value);
214 }
215 template <typename OperatorT = OperatorResponse>
216 PlacementGroup& WithOperator(OperatorT&& value) {
217 SetOperator(std::forward<OperatorT>(value));
218 return *this;
219 }
221 private:
222 Aws::String m_groupName;
223
225
227
228 int m_partitionCount{0};
229
230 Aws::String m_groupId;
231
232 Aws::Vector<Tag> m_tags;
233
234 Aws::String m_groupArn;
235
236 SpreadLevel m_spreadLevel{SpreadLevel::NOT_SET};
237
238 Aws::String m_linkedGroupId;
239
240 OperatorResponse m_operator;
241 bool m_groupNameHasBeenSet = false;
242 bool m_stateHasBeenSet = false;
243 bool m_strategyHasBeenSet = false;
244 bool m_partitionCountHasBeenSet = false;
245 bool m_groupIdHasBeenSet = false;
246 bool m_tagsHasBeenSet = false;
247 bool m_groupArnHasBeenSet = false;
248 bool m_spreadLevelHasBeenSet = false;
249 bool m_linkedGroupIdHasBeenSet = false;
250 bool m_operatorHasBeenSet = false;
251};
252
253} // namespace Model
254} // namespace EC2
255} // namespace Aws
const Aws::String & GetGroupId() const
PlacementGroup & WithTags(TagsT &&value)
void SetGroupId(GroupIdT &&value)
void SetSpreadLevel(SpreadLevel value)
PlacementGroupState GetState() const
void SetLinkedGroupId(LinkedGroupIdT &&value)
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
void SetOperator(OperatorT &&value)
PlacementGroup & WithGroupArn(GroupArnT &&value)
void SetGroupArn(GroupArnT &&value)
const Aws::String & GetLinkedGroupId() const
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 & WithLinkedGroupId(LinkedGroupIdT &&value)
PlacementGroup & WithOperator(OperatorT &&value)
PlacementGroup & AddTags(TagsT &&value)
AWS_EC2_API PlacementGroup(const Aws::Utils::Xml::XmlNode &xmlNode)
const OperatorResponse & GetOperator() const
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