AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
CreatePlacementGroupRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/OperatorRequest.h>
12#include <aws/ec2/model/PlacementStrategy.h>
13#include <aws/ec2/model/SpreadLevel.h>
14#include <aws/ec2/model/TagSpecification.h>
15
16#include <utility>
17
18namespace Aws {
19namespace EC2 {
20namespace Model {
21
25 public:
26 AWS_EC2_API CreatePlacementGroupRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreatePlacementGroup"; }
33
34 AWS_EC2_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
38
39 public:
41
45 inline int GetPartitionCount() const { return m_partitionCount; }
46 inline bool PartitionCountHasBeenSet() const { return m_partitionCountHasBeenSet; }
47 inline void SetPartitionCount(int value) {
48 m_partitionCountHasBeenSet = true;
49 m_partitionCount = value;
50 }
52 SetPartitionCount(value);
53 return *this;
54 }
56
58
61 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
62 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
63 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
64 void SetTagSpecifications(TagSpecificationsT&& value) {
65 m_tagSpecificationsHasBeenSet = true;
66 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
67 }
68 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
70 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
71 return *this;
72 }
73 template <typename TagSpecificationsT = TagSpecification>
75 m_tagSpecificationsHasBeenSet = true;
76 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
77 return *this;
78 }
80
82
87 inline SpreadLevel GetSpreadLevel() const { return m_spreadLevel; }
88 inline bool SpreadLevelHasBeenSet() const { return m_spreadLevelHasBeenSet; }
89 inline void SetSpreadLevel(SpreadLevel value) {
90 m_spreadLevelHasBeenSet = true;
91 m_spreadLevel = value;
92 }
94 SetSpreadLevel(value);
95 return *this;
96 }
98
100
103 inline const Aws::String& GetLinkedGroupId() const { return m_linkedGroupId; }
104 inline bool LinkedGroupIdHasBeenSet() const { return m_linkedGroupIdHasBeenSet; }
105 template <typename LinkedGroupIdT = Aws::String>
106 void SetLinkedGroupId(LinkedGroupIdT&& value) {
107 m_linkedGroupIdHasBeenSet = true;
108 m_linkedGroupId = std::forward<LinkedGroupIdT>(value);
109 }
110 template <typename LinkedGroupIdT = Aws::String>
112 SetLinkedGroupId(std::forward<LinkedGroupIdT>(value));
113 return *this;
114 }
116
118
121 inline const OperatorRequest& GetOperator() const { return m_operator; }
122 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
123 template <typename OperatorT = OperatorRequest>
124 void SetOperator(OperatorT&& value) {
125 m_operatorHasBeenSet = true;
126 m_operator = std::forward<OperatorT>(value);
127 }
128 template <typename OperatorT = OperatorRequest>
130 SetOperator(std::forward<OperatorT>(value));
131 return *this;
132 }
134
136
140 inline const Aws::String& GetParentGroupId() const { return m_parentGroupId; }
141 inline bool ParentGroupIdHasBeenSet() const { return m_parentGroupIdHasBeenSet; }
142 template <typename ParentGroupIdT = Aws::String>
143 void SetParentGroupId(ParentGroupIdT&& value) {
144 m_parentGroupIdHasBeenSet = true;
145 m_parentGroupId = std::forward<ParentGroupIdT>(value);
146 }
147 template <typename ParentGroupIdT = Aws::String>
149 SetParentGroupId(std::forward<ParentGroupIdT>(value));
150 return *this;
151 }
153
155
161 inline bool GetDryRun() const { return m_dryRun; }
162 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
163 inline void SetDryRun(bool value) {
164 m_dryRunHasBeenSet = true;
165 m_dryRun = value;
166 }
168 SetDryRun(value);
169 return *this;
170 }
172
174
178 inline const Aws::String& GetGroupName() const { return m_groupName; }
179 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
180 template <typename GroupNameT = Aws::String>
181 void SetGroupName(GroupNameT&& value) {
182 m_groupNameHasBeenSet = true;
183 m_groupName = std::forward<GroupNameT>(value);
184 }
185 template <typename GroupNameT = Aws::String>
187 SetGroupName(std::forward<GroupNameT>(value));
188 return *this;
189 }
191
193
196 inline PlacementStrategy GetStrategy() const { return m_strategy; }
197 inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
198 inline void SetStrategy(PlacementStrategy value) {
199 m_strategyHasBeenSet = true;
200 m_strategy = value;
201 }
203 SetStrategy(value);
204 return *this;
205 }
207 private:
208 int m_partitionCount{0};
209
210 Aws::Vector<TagSpecification> m_tagSpecifications;
211
212 SpreadLevel m_spreadLevel{SpreadLevel::NOT_SET};
213
214 Aws::String m_linkedGroupId;
215
216 OperatorRequest m_operator;
217
218 Aws::String m_parentGroupId;
219
220 bool m_dryRun{false};
221
222 Aws::String m_groupName;
223
225 bool m_partitionCountHasBeenSet = false;
226 bool m_tagSpecificationsHasBeenSet = false;
227 bool m_spreadLevelHasBeenSet = false;
228 bool m_linkedGroupIdHasBeenSet = false;
229 bool m_operatorHasBeenSet = false;
230 bool m_parentGroupIdHasBeenSet = false;
231 bool m_dryRunHasBeenSet = false;
232 bool m_groupNameHasBeenSet = false;
233 bool m_strategyHasBeenSet = false;
234};
235
236} // namespace Model
237} // namespace EC2
238} // namespace Aws
CreatePlacementGroupRequest & WithLinkedGroupId(LinkedGroupIdT &&value)
AWS_EC2_API CreatePlacementGroupRequest()=default
CreatePlacementGroupRequest & WithTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
CreatePlacementGroupRequest & AddTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreatePlacementGroupRequest & WithSpreadLevel(SpreadLevel value)
CreatePlacementGroupRequest & WithGroupName(GroupNameT &&value)
virtual const char * GetServiceRequestName() const override
CreatePlacementGroupRequest & WithParentGroupId(ParentGroupIdT &&value)
CreatePlacementGroupRequest & WithPartitionCount(int value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CreatePlacementGroupRequest & WithStrategy(PlacementStrategy value)
CreatePlacementGroupRequest & WithOperator(OperatorT &&value)
CreatePlacementGroupRequest & WithDryRun(bool value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector