AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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/PlacementGroupState.h>
12#include <aws/ec2/model/PlacementStrategy.h>
13#include <aws/ec2/model/SpreadLevel.h>
14#include <aws/ec2/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Xml {
21class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2 {
25namespace Model {
26
33 public:
34 AWS_EC2_API PlacementGroup() = default;
35 AWS_EC2_API PlacementGroup(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
45 inline const Aws::String& GetGroupName() const { return m_groupName; }
46 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
47 template <typename GroupNameT = Aws::String>
48 void SetGroupName(GroupNameT&& value) {
49 m_groupNameHasBeenSet = true;
50 m_groupName = std::forward<GroupNameT>(value);
51 }
52 template <typename GroupNameT = Aws::String>
53 PlacementGroup& WithGroupName(GroupNameT&& value) {
54 SetGroupName(std::forward<GroupNameT>(value));
55 return *this;
56 }
58
60
63 inline PlacementGroupState GetState() const { return m_state; }
64 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
65 inline void SetState(PlacementGroupState value) {
66 m_stateHasBeenSet = true;
67 m_state = value;
68 }
70 SetState(value);
71 return *this;
72 }
74
76
79 inline PlacementStrategy GetStrategy() const { return m_strategy; }
80 inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
81 inline void SetStrategy(PlacementStrategy value) {
82 m_strategyHasBeenSet = true;
83 m_strategy = value;
84 }
86 SetStrategy(value);
87 return *this;
88 }
90
92
96 inline int GetPartitionCount() const { return m_partitionCount; }
97 inline bool PartitionCountHasBeenSet() const { return m_partitionCountHasBeenSet; }
98 inline void SetPartitionCount(int value) {
99 m_partitionCountHasBeenSet = true;
100 m_partitionCount = value;
101 }
103 SetPartitionCount(value);
104 return *this;
105 }
107
109
112 inline const Aws::String& GetGroupId() const { return m_groupId; }
113 inline bool GroupIdHasBeenSet() const { return m_groupIdHasBeenSet; }
114 template <typename GroupIdT = Aws::String>
115 void SetGroupId(GroupIdT&& value) {
116 m_groupIdHasBeenSet = true;
117 m_groupId = std::forward<GroupIdT>(value);
118 }
119 template <typename GroupIdT = Aws::String>
120 PlacementGroup& WithGroupId(GroupIdT&& value) {
121 SetGroupId(std::forward<GroupIdT>(value));
122 return *this;
123 }
125
127
130 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
131 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
132 template <typename TagsT = Aws::Vector<Tag>>
133 void SetTags(TagsT&& value) {
134 m_tagsHasBeenSet = true;
135 m_tags = std::forward<TagsT>(value);
136 }
137 template <typename TagsT = Aws::Vector<Tag>>
138 PlacementGroup& WithTags(TagsT&& value) {
139 SetTags(std::forward<TagsT>(value));
140 return *this;
141 }
142 template <typename TagsT = Tag>
143 PlacementGroup& AddTags(TagsT&& value) {
144 m_tagsHasBeenSet = true;
145 m_tags.emplace_back(std::forward<TagsT>(value));
146 return *this;
147 }
149
151
154 inline const Aws::String& GetGroupArn() const { return m_groupArn; }
155 inline bool GroupArnHasBeenSet() const { return m_groupArnHasBeenSet; }
156 template <typename GroupArnT = Aws::String>
157 void SetGroupArn(GroupArnT&& value) {
158 m_groupArnHasBeenSet = true;
159 m_groupArn = std::forward<GroupArnT>(value);
160 }
161 template <typename GroupArnT = Aws::String>
162 PlacementGroup& WithGroupArn(GroupArnT&& value) {
163 SetGroupArn(std::forward<GroupArnT>(value));
164 return *this;
165 }
167
169
173 inline SpreadLevel GetSpreadLevel() const { return m_spreadLevel; }
174 inline bool SpreadLevelHasBeenSet() const { return m_spreadLevelHasBeenSet; }
175 inline void SetSpreadLevel(SpreadLevel value) {
176 m_spreadLevelHasBeenSet = true;
177 m_spreadLevel = value;
178 }
180 SetSpreadLevel(value);
181 return *this;
182 }
184
186
189 inline const Aws::String& GetLinkedGroupId() const { return m_linkedGroupId; }
190 inline bool LinkedGroupIdHasBeenSet() const { return m_linkedGroupIdHasBeenSet; }
191 template <typename LinkedGroupIdT = Aws::String>
192 void SetLinkedGroupId(LinkedGroupIdT&& value) {
193 m_linkedGroupIdHasBeenSet = true;
194 m_linkedGroupId = std::forward<LinkedGroupIdT>(value);
195 }
196 template <typename LinkedGroupIdT = Aws::String>
197 PlacementGroup& WithLinkedGroupId(LinkedGroupIdT&& value) {
198 SetLinkedGroupId(std::forward<LinkedGroupIdT>(value));
199 return *this;
200 }
202 private:
203 Aws::String m_groupName;
204
206
208
209 int m_partitionCount{0};
210
211 Aws::String m_groupId;
212
213 Aws::Vector<Tag> m_tags;
214
215 Aws::String m_groupArn;
216
217 SpreadLevel m_spreadLevel{SpreadLevel::NOT_SET};
218
219 Aws::String m_linkedGroupId;
220 bool m_groupNameHasBeenSet = false;
221 bool m_stateHasBeenSet = false;
222 bool m_strategyHasBeenSet = false;
223 bool m_partitionCountHasBeenSet = false;
224 bool m_groupIdHasBeenSet = false;
225 bool m_tagsHasBeenSet = false;
226 bool m_groupArnHasBeenSet = false;
227 bool m_spreadLevelHasBeenSet = false;
228 bool m_linkedGroupIdHasBeenSet = false;
229};
230
231} // namespace Model
232} // namespace EC2
233} // 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
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 & 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