AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
AllocateHostsRequest.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/AutoPlacement.h>
12#include <aws/ec2/model/HostMaintenance.h>
13#include <aws/ec2/model/HostRecovery.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 AllocateHostsRequest() = 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 "AllocateHosts"; }
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
49 inline const Aws::String& GetInstanceFamily() const { return m_instanceFamily; }
50 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
51 template <typename InstanceFamilyT = Aws::String>
52 void SetInstanceFamily(InstanceFamilyT&& value) {
53 m_instanceFamilyHasBeenSet = true;
54 m_instanceFamily = std::forward<InstanceFamilyT>(value);
55 }
56 template <typename InstanceFamilyT = Aws::String>
57 AllocateHostsRequest& WithInstanceFamily(InstanceFamilyT&& value) {
58 SetInstanceFamily(std::forward<InstanceFamilyT>(value));
59 return *this;
60 }
62
64
67 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
68 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
69 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
70 void SetTagSpecifications(TagSpecificationsT&& value) {
71 m_tagSpecificationsHasBeenSet = true;
72 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
73 }
74 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
75 AllocateHostsRequest& WithTagSpecifications(TagSpecificationsT&& value) {
76 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
77 return *this;
78 }
79 template <typename TagSpecificationsT = TagSpecification>
80 AllocateHostsRequest& AddTagSpecifications(TagSpecificationsT&& value) {
81 m_tagSpecificationsHasBeenSet = true;
82 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
83 return *this;
84 }
86
88
95 inline HostRecovery GetHostRecovery() const { return m_hostRecovery; }
96 inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; }
97 inline void SetHostRecovery(HostRecovery value) {
98 m_hostRecoveryHasBeenSet = true;
99 m_hostRecovery = value;
100 }
102 SetHostRecovery(value);
103 return *this;
104 }
106
108
114 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
115 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
116 template <typename OutpostArnT = Aws::String>
117 void SetOutpostArn(OutpostArnT&& value) {
118 m_outpostArnHasBeenSet = true;
119 m_outpostArn = std::forward<OutpostArnT>(value);
120 }
121 template <typename OutpostArnT = Aws::String>
122 AllocateHostsRequest& WithOutpostArn(OutpostArnT&& value) {
123 SetOutpostArn(std::forward<OutpostArnT>(value));
124 return *this;
125 }
127
129
135 inline HostMaintenance GetHostMaintenance() const { return m_hostMaintenance; }
136 inline bool HostMaintenanceHasBeenSet() const { return m_hostMaintenanceHasBeenSet; }
138 m_hostMaintenanceHasBeenSet = true;
139 m_hostMaintenance = value;
140 }
142 SetHostMaintenance(value);
143 return *this;
144 }
146
148
159 inline const Aws::Vector<Aws::String>& GetAssetIds() const { return m_assetIds; }
160 inline bool AssetIdsHasBeenSet() const { return m_assetIdsHasBeenSet; }
161 template <typename AssetIdsT = Aws::Vector<Aws::String>>
162 void SetAssetIds(AssetIdsT&& value) {
163 m_assetIdsHasBeenSet = true;
164 m_assetIds = std::forward<AssetIdsT>(value);
165 }
166 template <typename AssetIdsT = Aws::Vector<Aws::String>>
167 AllocateHostsRequest& WithAssetIds(AssetIdsT&& value) {
168 SetAssetIds(std::forward<AssetIdsT>(value));
169 return *this;
170 }
171 template <typename AssetIdsT = Aws::String>
172 AllocateHostsRequest& AddAssetIds(AssetIdsT&& value) {
173 m_assetIdsHasBeenSet = true;
174 m_assetIds.emplace_back(std::forward<AssetIdsT>(value));
175 return *this;
176 }
178
180
183 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
184 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
185 template <typename AvailabilityZoneIdT = Aws::String>
186 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
187 m_availabilityZoneIdHasBeenSet = true;
188 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
189 }
190 template <typename AvailabilityZoneIdT = Aws::String>
191 AllocateHostsRequest& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
192 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
193 return *this;
194 }
196
198
206 inline AutoPlacement GetAutoPlacement() const { return m_autoPlacement; }
207 inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; }
208 inline void SetAutoPlacement(AutoPlacement value) {
209 m_autoPlacementHasBeenSet = true;
210 m_autoPlacement = value;
211 }
213 SetAutoPlacement(value);
214 return *this;
215 }
217
219
225 inline const Aws::String& GetClientToken() const { return m_clientToken; }
226 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
227 template <typename ClientTokenT = Aws::String>
228 void SetClientToken(ClientTokenT&& value) {
229 m_clientTokenHasBeenSet = true;
230 m_clientToken = std::forward<ClientTokenT>(value);
231 }
232 template <typename ClientTokenT = Aws::String>
233 AllocateHostsRequest& WithClientToken(ClientTokenT&& value) {
234 SetClientToken(std::forward<ClientTokenT>(value));
235 return *this;
236 }
238
240
248 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
249 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
250 template <typename InstanceTypeT = Aws::String>
251 void SetInstanceType(InstanceTypeT&& value) {
252 m_instanceTypeHasBeenSet = true;
253 m_instanceType = std::forward<InstanceTypeT>(value);
254 }
255 template <typename InstanceTypeT = Aws::String>
256 AllocateHostsRequest& WithInstanceType(InstanceTypeT&& value) {
257 SetInstanceType(std::forward<InstanceTypeT>(value));
258 return *this;
259 }
261
263
271 inline int GetQuantity() const { return m_quantity; }
272 inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; }
273 inline void SetQuantity(int value) {
274 m_quantityHasBeenSet = true;
275 m_quantity = value;
276 }
278 SetQuantity(value);
279 return *this;
280 }
282
284
287 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
288 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
289 template <typename AvailabilityZoneT = Aws::String>
290 void SetAvailabilityZone(AvailabilityZoneT&& value) {
291 m_availabilityZoneHasBeenSet = true;
292 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
293 }
294 template <typename AvailabilityZoneT = Aws::String>
295 AllocateHostsRequest& WithAvailabilityZone(AvailabilityZoneT&& value) {
296 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
297 return *this;
298 }
300 private:
301 Aws::String m_instanceFamily;
302
303 Aws::Vector<TagSpecification> m_tagSpecifications;
304
305 HostRecovery m_hostRecovery{HostRecovery::NOT_SET};
306
307 Aws::String m_outpostArn;
308
309 HostMaintenance m_hostMaintenance{HostMaintenance::NOT_SET};
310
311 Aws::Vector<Aws::String> m_assetIds;
312
313 Aws::String m_availabilityZoneId;
314
315 AutoPlacement m_autoPlacement{AutoPlacement::NOT_SET};
316
317 Aws::String m_clientToken;
318
319 Aws::String m_instanceType;
320
321 int m_quantity{0};
322
323 Aws::String m_availabilityZone;
324 bool m_instanceFamilyHasBeenSet = false;
325 bool m_tagSpecificationsHasBeenSet = false;
326 bool m_hostRecoveryHasBeenSet = false;
327 bool m_outpostArnHasBeenSet = false;
328 bool m_hostMaintenanceHasBeenSet = false;
329 bool m_assetIdsHasBeenSet = false;
330 bool m_availabilityZoneIdHasBeenSet = false;
331 bool m_autoPlacementHasBeenSet = false;
332 bool m_clientTokenHasBeenSet = false;
333 bool m_instanceTypeHasBeenSet = false;
334 bool m_quantityHasBeenSet = false;
335 bool m_availabilityZoneHasBeenSet = false;
336};
337
338} // namespace Model
339} // namespace EC2
340} // namespace Aws
AllocateHostsRequest & WithAssetIds(AssetIdsT &&value)
void SetTagSpecifications(TagSpecificationsT &&value)
void SetAvailabilityZone(AvailabilityZoneT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
AllocateHostsRequest & WithHostMaintenance(HostMaintenance value)
AllocateHostsRequest & WithAutoPlacement(AutoPlacement value)
AWS_EC2_API AllocateHostsRequest()=default
AllocateHostsRequest & WithOutpostArn(OutpostArnT &&value)
AllocateHostsRequest & WithInstanceFamily(InstanceFamilyT &&value)
void SetInstanceFamily(InstanceFamilyT &&value)
const Aws::String & GetInstanceFamily() const
AllocateHostsRequest & WithHostRecovery(HostRecovery value)
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
const Aws::String & GetInstanceType() const
AllocateHostsRequest & WithAvailabilityZone(AvailabilityZoneT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AllocateHostsRequest & AddTagSpecifications(TagSpecificationsT &&value)
AllocateHostsRequest & WithQuantity(int value)
const Aws::String & GetAvailabilityZoneId() const
void SetInstanceType(InstanceTypeT &&value)
const Aws::Vector< Aws::String > & GetAssetIds() const
AllocateHostsRequest & WithTagSpecifications(TagSpecificationsT &&value)
AllocateHostsRequest & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
void SetHostMaintenance(HostMaintenance value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetOutpostArn() const
AllocateHostsRequest & WithClientToken(ClientTokenT &&value)
AllocateHostsRequest & AddAssetIds(AssetIdsT &&value)
AllocateHostsRequest & WithInstanceType(InstanceTypeT &&value)
const Aws::String & GetAvailabilityZone() const
const Aws::String & GetClientToken() const
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector