AWS SDK for C++

AWS SDK for C++ Version 1.11.844

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/HostCpuOptionsRequest.h>
13#include <aws/ec2/model/HostMaintenance.h>
14#include <aws/ec2/model/HostRecovery.h>
15#include <aws/ec2/model/TagSpecification.h>
16
17#include <utility>
18
19namespace Aws {
20namespace EC2 {
21namespace Model {
22
26 public:
27 AWS_EC2_API AllocateHostsRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "AllocateHosts"; }
34
35 AWS_EC2_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
39
40 public:
42
50 inline const Aws::String& GetInstanceFamily() const { return m_instanceFamily; }
51 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
52 template <typename InstanceFamilyT = Aws::String>
53 void SetInstanceFamily(InstanceFamilyT&& value) {
54 m_instanceFamilyHasBeenSet = true;
55 m_instanceFamily = std::forward<InstanceFamilyT>(value);
56 }
57 template <typename InstanceFamilyT = Aws::String>
58 AllocateHostsRequest& WithInstanceFamily(InstanceFamilyT&& value) {
59 SetInstanceFamily(std::forward<InstanceFamilyT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
69 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
70 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
71 void SetTagSpecifications(TagSpecificationsT&& value) {
72 m_tagSpecificationsHasBeenSet = true;
73 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
74 }
75 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
76 AllocateHostsRequest& WithTagSpecifications(TagSpecificationsT&& value) {
77 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
78 return *this;
79 }
80 template <typename TagSpecificationsT = TagSpecification>
81 AllocateHostsRequest& AddTagSpecifications(TagSpecificationsT&& value) {
82 m_tagSpecificationsHasBeenSet = true;
83 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
84 return *this;
85 }
87
89
96 inline HostRecovery GetHostRecovery() const { return m_hostRecovery; }
97 inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; }
98 inline void SetHostRecovery(HostRecovery value) {
99 m_hostRecoveryHasBeenSet = true;
100 m_hostRecovery = value;
101 }
103 SetHostRecovery(value);
104 return *this;
105 }
107
109
115 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
116 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
117 template <typename OutpostArnT = Aws::String>
118 void SetOutpostArn(OutpostArnT&& value) {
119 m_outpostArnHasBeenSet = true;
120 m_outpostArn = std::forward<OutpostArnT>(value);
121 }
122 template <typename OutpostArnT = Aws::String>
123 AllocateHostsRequest& WithOutpostArn(OutpostArnT&& value) {
124 SetOutpostArn(std::forward<OutpostArnT>(value));
125 return *this;
126 }
128
130
136 inline HostMaintenance GetHostMaintenance() const { return m_hostMaintenance; }
137 inline bool HostMaintenanceHasBeenSet() const { return m_hostMaintenanceHasBeenSet; }
139 m_hostMaintenanceHasBeenSet = true;
140 m_hostMaintenance = value;
141 }
143 SetHostMaintenance(value);
144 return *this;
145 }
147
149
160 inline const Aws::Vector<Aws::String>& GetAssetIds() const { return m_assetIds; }
161 inline bool AssetIdsHasBeenSet() const { return m_assetIdsHasBeenSet; }
162 template <typename AssetIdsT = Aws::Vector<Aws::String>>
163 void SetAssetIds(AssetIdsT&& value) {
164 m_assetIdsHasBeenSet = true;
165 m_assetIds = std::forward<AssetIdsT>(value);
166 }
167 template <typename AssetIdsT = Aws::Vector<Aws::String>>
168 AllocateHostsRequest& WithAssetIds(AssetIdsT&& value) {
169 SetAssetIds(std::forward<AssetIdsT>(value));
170 return *this;
171 }
172 template <typename AssetIdsT = Aws::String>
173 AllocateHostsRequest& AddAssetIds(AssetIdsT&& value) {
174 m_assetIdsHasBeenSet = true;
175 m_assetIds.emplace_back(std::forward<AssetIdsT>(value));
176 return *this;
177 }
179
181
184 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
185 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
186 template <typename AvailabilityZoneIdT = Aws::String>
187 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
188 m_availabilityZoneIdHasBeenSet = true;
189 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
190 }
191 template <typename AvailabilityZoneIdT = Aws::String>
192 AllocateHostsRequest& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
193 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
194 return *this;
195 }
197
199
202 inline const HostCpuOptionsRequest& GetCpuOptions() const { return m_cpuOptions; }
203 inline bool CpuOptionsHasBeenSet() const { return m_cpuOptionsHasBeenSet; }
204 template <typename CpuOptionsT = HostCpuOptionsRequest>
205 void SetCpuOptions(CpuOptionsT&& value) {
206 m_cpuOptionsHasBeenSet = true;
207 m_cpuOptions = std::forward<CpuOptionsT>(value);
208 }
209 template <typename CpuOptionsT = HostCpuOptionsRequest>
210 AllocateHostsRequest& WithCpuOptions(CpuOptionsT&& value) {
211 SetCpuOptions(std::forward<CpuOptionsT>(value));
212 return *this;
213 }
215
217
225 inline AutoPlacement GetAutoPlacement() const { return m_autoPlacement; }
226 inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; }
227 inline void SetAutoPlacement(AutoPlacement value) {
228 m_autoPlacementHasBeenSet = true;
229 m_autoPlacement = value;
230 }
232 SetAutoPlacement(value);
233 return *this;
234 }
236
238
244 inline const Aws::String& GetClientToken() const { return m_clientToken; }
245 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
246 template <typename ClientTokenT = Aws::String>
247 void SetClientToken(ClientTokenT&& value) {
248 m_clientTokenHasBeenSet = true;
249 m_clientToken = std::forward<ClientTokenT>(value);
250 }
251 template <typename ClientTokenT = Aws::String>
252 AllocateHostsRequest& WithClientToken(ClientTokenT&& value) {
253 SetClientToken(std::forward<ClientTokenT>(value));
254 return *this;
255 }
257
259
267 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
268 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
269 template <typename InstanceTypeT = Aws::String>
270 void SetInstanceType(InstanceTypeT&& value) {
271 m_instanceTypeHasBeenSet = true;
272 m_instanceType = std::forward<InstanceTypeT>(value);
273 }
274 template <typename InstanceTypeT = Aws::String>
275 AllocateHostsRequest& WithInstanceType(InstanceTypeT&& value) {
276 SetInstanceType(std::forward<InstanceTypeT>(value));
277 return *this;
278 }
280
282
290 inline int GetQuantity() const { return m_quantity; }
291 inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; }
292 inline void SetQuantity(int value) {
293 m_quantityHasBeenSet = true;
294 m_quantity = value;
295 }
297 SetQuantity(value);
298 return *this;
299 }
301
303
306 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
307 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
308 template <typename AvailabilityZoneT = Aws::String>
309 void SetAvailabilityZone(AvailabilityZoneT&& value) {
310 m_availabilityZoneHasBeenSet = true;
311 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
312 }
313 template <typename AvailabilityZoneT = Aws::String>
314 AllocateHostsRequest& WithAvailabilityZone(AvailabilityZoneT&& value) {
315 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
316 return *this;
317 }
319 private:
320 Aws::String m_instanceFamily;
321
322 Aws::Vector<TagSpecification> m_tagSpecifications;
323
324 HostRecovery m_hostRecovery{HostRecovery::NOT_SET};
325
326 Aws::String m_outpostArn;
327
328 HostMaintenance m_hostMaintenance{HostMaintenance::NOT_SET};
329
330 Aws::Vector<Aws::String> m_assetIds;
331
332 Aws::String m_availabilityZoneId;
333
334 HostCpuOptionsRequest m_cpuOptions;
335
336 AutoPlacement m_autoPlacement{AutoPlacement::NOT_SET};
337
338 Aws::String m_clientToken;
339
340 Aws::String m_instanceType;
341
342 int m_quantity{0};
343
344 Aws::String m_availabilityZone;
345 bool m_instanceFamilyHasBeenSet = false;
346 bool m_tagSpecificationsHasBeenSet = false;
347 bool m_hostRecoveryHasBeenSet = false;
348 bool m_outpostArnHasBeenSet = false;
349 bool m_hostMaintenanceHasBeenSet = false;
350 bool m_assetIdsHasBeenSet = false;
351 bool m_availabilityZoneIdHasBeenSet = false;
352 bool m_cpuOptionsHasBeenSet = false;
353 bool m_autoPlacementHasBeenSet = false;
354 bool m_clientTokenHasBeenSet = false;
355 bool m_instanceTypeHasBeenSet = false;
356 bool m_quantityHasBeenSet = false;
357 bool m_availabilityZoneHasBeenSet = false;
358};
359
360} // namespace Model
361} // namespace EC2
362} // 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
const HostCpuOptionsRequest & GetCpuOptions() const
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 & WithCpuOptions(CpuOptionsT &&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