AWS SDK for C++

AWS SDK for C++ Version 1.11.784

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
142 inline bool GetDryRun() const { return m_dryRun; }
143 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
144 inline void SetDryRun(bool value) {
145 m_dryRunHasBeenSet = true;
146 m_dryRun = value;
147 }
149 SetDryRun(value);
150 return *this;
151 }
153
155
159 inline const Aws::String& GetGroupName() const { return m_groupName; }
160 inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; }
161 template <typename GroupNameT = Aws::String>
162 void SetGroupName(GroupNameT&& value) {
163 m_groupNameHasBeenSet = true;
164 m_groupName = std::forward<GroupNameT>(value);
165 }
166 template <typename GroupNameT = Aws::String>
168 SetGroupName(std::forward<GroupNameT>(value));
169 return *this;
170 }
172
174
177 inline PlacementStrategy GetStrategy() const { return m_strategy; }
178 inline bool StrategyHasBeenSet() const { return m_strategyHasBeenSet; }
179 inline void SetStrategy(PlacementStrategy value) {
180 m_strategyHasBeenSet = true;
181 m_strategy = value;
182 }
184 SetStrategy(value);
185 return *this;
186 }
188 private:
189 int m_partitionCount{0};
190
191 Aws::Vector<TagSpecification> m_tagSpecifications;
192
193 SpreadLevel m_spreadLevel{SpreadLevel::NOT_SET};
194
195 Aws::String m_linkedGroupId;
196
197 OperatorRequest m_operator;
198
199 bool m_dryRun{false};
200
201 Aws::String m_groupName;
202
204 bool m_partitionCountHasBeenSet = false;
205 bool m_tagSpecificationsHasBeenSet = false;
206 bool m_spreadLevelHasBeenSet = false;
207 bool m_linkedGroupIdHasBeenSet = false;
208 bool m_operatorHasBeenSet = false;
209 bool m_dryRunHasBeenSet = false;
210 bool m_groupNameHasBeenSet = false;
211 bool m_strategyHasBeenSet = false;
212};
213
214} // namespace Model
215} // namespace EC2
216} // 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 & 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