AWS SDK for C++

AWS SDK for C++ Version 1.11.850

Loading...
Searching...
No Matches
Host.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/AllocationState.h>
13#include <aws/ec2/model/AllowsMultipleInstanceTypes.h>
14#include <aws/ec2/model/AutoPlacement.h>
15#include <aws/ec2/model/AvailableCapacity.h>
16#include <aws/ec2/model/HostCpuOptions.h>
17#include <aws/ec2/model/HostInstance.h>
18#include <aws/ec2/model/HostMaintenance.h>
19#include <aws/ec2/model/HostProperties.h>
20#include <aws/ec2/model/HostRecovery.h>
21#include <aws/ec2/model/Tag.h>
22
23#include <utility>
24
25namespace Aws {
26namespace Utils {
27namespace Xml {
28class XmlNode;
29} // namespace Xml
30} // namespace Utils
31namespace EC2 {
32namespace Model {
33
39class Host {
40 public:
41 AWS_EC2_API Host() = default;
42 AWS_EC2_API Host(const Aws::Utils::Xml::XmlNode& xmlNode);
43 AWS_EC2_API Host& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44
45 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
47
49
52 inline AutoPlacement GetAutoPlacement() const { return m_autoPlacement; }
53 inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; }
54 inline void SetAutoPlacement(AutoPlacement value) {
55 m_autoPlacementHasBeenSet = true;
56 m_autoPlacement = value;
57 }
59 SetAutoPlacement(value);
60 return *this;
61 }
63
65
68 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
69 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
70 template <typename AvailabilityZoneT = Aws::String>
71 void SetAvailabilityZone(AvailabilityZoneT&& value) {
72 m_availabilityZoneHasBeenSet = true;
73 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
74 }
75 template <typename AvailabilityZoneT = Aws::String>
76 Host& WithAvailabilityZone(AvailabilityZoneT&& value) {
77 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
78 return *this;
79 }
81
83
86 inline const AvailableCapacity& GetAvailableCapacity() const { return m_availableCapacity; }
87 inline bool AvailableCapacityHasBeenSet() const { return m_availableCapacityHasBeenSet; }
88 template <typename AvailableCapacityT = AvailableCapacity>
89 void SetAvailableCapacity(AvailableCapacityT&& value) {
90 m_availableCapacityHasBeenSet = true;
91 m_availableCapacity = std::forward<AvailableCapacityT>(value);
92 }
93 template <typename AvailableCapacityT = AvailableCapacity>
94 Host& WithAvailableCapacity(AvailableCapacityT&& value) {
95 SetAvailableCapacity(std::forward<AvailableCapacityT>(value));
96 return *this;
97 }
99
101
107 inline const Aws::String& GetClientToken() const { return m_clientToken; }
108 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
109 template <typename ClientTokenT = Aws::String>
110 void SetClientToken(ClientTokenT&& value) {
111 m_clientTokenHasBeenSet = true;
112 m_clientToken = std::forward<ClientTokenT>(value);
113 }
114 template <typename ClientTokenT = Aws::String>
115 Host& WithClientToken(ClientTokenT&& value) {
116 SetClientToken(std::forward<ClientTokenT>(value));
117 return *this;
118 }
120
122
125 inline const Aws::String& GetHostId() const { return m_hostId; }
126 inline bool HostIdHasBeenSet() const { return m_hostIdHasBeenSet; }
127 template <typename HostIdT = Aws::String>
128 void SetHostId(HostIdT&& value) {
129 m_hostIdHasBeenSet = true;
130 m_hostId = std::forward<HostIdT>(value);
131 }
132 template <typename HostIdT = Aws::String>
133 Host& WithHostId(HostIdT&& value) {
134 SetHostId(std::forward<HostIdT>(value));
135 return *this;
136 }
138
140
143 inline const HostProperties& GetHostProperties() const { return m_hostProperties; }
144 inline bool HostPropertiesHasBeenSet() const { return m_hostPropertiesHasBeenSet; }
145 template <typename HostPropertiesT = HostProperties>
146 void SetHostProperties(HostPropertiesT&& value) {
147 m_hostPropertiesHasBeenSet = true;
148 m_hostProperties = std::forward<HostPropertiesT>(value);
149 }
150 template <typename HostPropertiesT = HostProperties>
151 Host& WithHostProperties(HostPropertiesT&& value) {
152 SetHostProperties(std::forward<HostPropertiesT>(value));
153 return *this;
154 }
156
158
162 inline const Aws::String& GetHostReservationId() const { return m_hostReservationId; }
163 inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
164 template <typename HostReservationIdT = Aws::String>
165 void SetHostReservationId(HostReservationIdT&& value) {
166 m_hostReservationIdHasBeenSet = true;
167 m_hostReservationId = std::forward<HostReservationIdT>(value);
168 }
169 template <typename HostReservationIdT = Aws::String>
170 Host& WithHostReservationId(HostReservationIdT&& value) {
171 SetHostReservationId(std::forward<HostReservationIdT>(value));
172 return *this;
173 }
175
177
181 inline const Aws::Vector<HostInstance>& GetInstances() const { return m_instances; }
182 inline bool InstancesHasBeenSet() const { return m_instancesHasBeenSet; }
183 template <typename InstancesT = Aws::Vector<HostInstance>>
184 void SetInstances(InstancesT&& value) {
185 m_instancesHasBeenSet = true;
186 m_instances = std::forward<InstancesT>(value);
187 }
188 template <typename InstancesT = Aws::Vector<HostInstance>>
189 Host& WithInstances(InstancesT&& value) {
190 SetInstances(std::forward<InstancesT>(value));
191 return *this;
192 }
193 template <typename InstancesT = HostInstance>
194 Host& AddInstances(InstancesT&& value) {
195 m_instancesHasBeenSet = true;
196 m_instances.emplace_back(std::forward<InstancesT>(value));
197 return *this;
198 }
200
202
205 inline AllocationState GetState() const { return m_state; }
206 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
207 inline void SetState(AllocationState value) {
208 m_stateHasBeenSet = true;
209 m_state = value;
210 }
212 SetState(value);
213 return *this;
214 }
216
218
221 inline const Aws::Utils::DateTime& GetAllocationTime() const { return m_allocationTime; }
222 inline bool AllocationTimeHasBeenSet() const { return m_allocationTimeHasBeenSet; }
223 template <typename AllocationTimeT = Aws::Utils::DateTime>
224 void SetAllocationTime(AllocationTimeT&& value) {
225 m_allocationTimeHasBeenSet = true;
226 m_allocationTime = std::forward<AllocationTimeT>(value);
227 }
228 template <typename AllocationTimeT = Aws::Utils::DateTime>
229 Host& WithAllocationTime(AllocationTimeT&& value) {
230 SetAllocationTime(std::forward<AllocationTimeT>(value));
231 return *this;
232 }
234
236
239 inline const Aws::Utils::DateTime& GetReleaseTime() const { return m_releaseTime; }
240 inline bool ReleaseTimeHasBeenSet() const { return m_releaseTimeHasBeenSet; }
241 template <typename ReleaseTimeT = Aws::Utils::DateTime>
242 void SetReleaseTime(ReleaseTimeT&& value) {
243 m_releaseTimeHasBeenSet = true;
244 m_releaseTime = std::forward<ReleaseTimeT>(value);
245 }
246 template <typename ReleaseTimeT = Aws::Utils::DateTime>
247 Host& WithReleaseTime(ReleaseTimeT&& value) {
248 SetReleaseTime(std::forward<ReleaseTimeT>(value));
249 return *this;
250 }
252
254
257 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
258 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
259 template <typename TagsT = Aws::Vector<Tag>>
260 void SetTags(TagsT&& value) {
261 m_tagsHasBeenSet = true;
262 m_tags = std::forward<TagsT>(value);
263 }
264 template <typename TagsT = Aws::Vector<Tag>>
265 Host& WithTags(TagsT&& value) {
266 SetTags(std::forward<TagsT>(value));
267 return *this;
268 }
269 template <typename TagsT = Tag>
270 Host& AddTags(TagsT&& value) {
271 m_tagsHasBeenSet = true;
272 m_tags.emplace_back(std::forward<TagsT>(value));
273 return *this;
274 }
276
278
282 inline HostRecovery GetHostRecovery() const { return m_hostRecovery; }
283 inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; }
284 inline void SetHostRecovery(HostRecovery value) {
285 m_hostRecoveryHasBeenSet = true;
286 m_hostRecovery = value;
287 }
289 SetHostRecovery(value);
290 return *this;
291 }
293
295
301 inline AllowsMultipleInstanceTypes GetAllowsMultipleInstanceTypes() const { return m_allowsMultipleInstanceTypes; }
302 inline bool AllowsMultipleInstanceTypesHasBeenSet() const { return m_allowsMultipleInstanceTypesHasBeenSet; }
304 m_allowsMultipleInstanceTypesHasBeenSet = true;
305 m_allowsMultipleInstanceTypes = value;
306 }
309 return *this;
310 }
312
314
317 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
318 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
319 template <typename OwnerIdT = Aws::String>
320 void SetOwnerId(OwnerIdT&& value) {
321 m_ownerIdHasBeenSet = true;
322 m_ownerId = std::forward<OwnerIdT>(value);
323 }
324 template <typename OwnerIdT = Aws::String>
325 Host& WithOwnerId(OwnerIdT&& value) {
326 SetOwnerId(std::forward<OwnerIdT>(value));
327 return *this;
328 }
330
332
335 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
336 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
337 template <typename AvailabilityZoneIdT = Aws::String>
338 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
339 m_availabilityZoneIdHasBeenSet = true;
340 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
341 }
342 template <typename AvailabilityZoneIdT = Aws::String>
343 Host& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
344 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
345 return *this;
346 }
348
350
355 inline bool GetMemberOfServiceLinkedResourceGroup() const { return m_memberOfServiceLinkedResourceGroup; }
356 inline bool MemberOfServiceLinkedResourceGroupHasBeenSet() const { return m_memberOfServiceLinkedResourceGroupHasBeenSet; }
358 m_memberOfServiceLinkedResourceGroupHasBeenSet = true;
359 m_memberOfServiceLinkedResourceGroup = value;
360 }
363 return *this;
364 }
366
368
372 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
373 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
374 template <typename OutpostArnT = Aws::String>
375 void SetOutpostArn(OutpostArnT&& value) {
376 m_outpostArnHasBeenSet = true;
377 m_outpostArn = std::forward<OutpostArnT>(value);
378 }
379 template <typename OutpostArnT = Aws::String>
380 Host& WithOutpostArn(OutpostArnT&& value) {
381 SetOutpostArn(std::forward<OutpostArnT>(value));
382 return *this;
383 }
385
387
391 inline HostMaintenance GetHostMaintenance() const { return m_hostMaintenance; }
392 inline bool HostMaintenanceHasBeenSet() const { return m_hostMaintenanceHasBeenSet; }
394 m_hostMaintenanceHasBeenSet = true;
395 m_hostMaintenance = value;
396 }
398 SetHostMaintenance(value);
399 return *this;
400 }
402
404
408 inline const Aws::String& GetAssetId() const { return m_assetId; }
409 inline bool AssetIdHasBeenSet() const { return m_assetIdHasBeenSet; }
410 template <typename AssetIdT = Aws::String>
411 void SetAssetId(AssetIdT&& value) {
412 m_assetIdHasBeenSet = true;
413 m_assetId = std::forward<AssetIdT>(value);
414 }
415 template <typename AssetIdT = Aws::String>
416 Host& WithAssetId(AssetIdT&& value) {
417 SetAssetId(std::forward<AssetIdT>(value));
418 return *this;
419 }
421
423
427 inline const HostCpuOptions& GetCpuOptions() const { return m_cpuOptions; }
428 inline bool CpuOptionsHasBeenSet() const { return m_cpuOptionsHasBeenSet; }
429 template <typename CpuOptionsT = HostCpuOptions>
430 void SetCpuOptions(CpuOptionsT&& value) {
431 m_cpuOptionsHasBeenSet = true;
432 m_cpuOptions = std::forward<CpuOptionsT>(value);
433 }
434 template <typename CpuOptionsT = HostCpuOptions>
435 Host& WithCpuOptions(CpuOptionsT&& value) {
436 SetCpuOptions(std::forward<CpuOptionsT>(value));
437 return *this;
438 }
440 private:
441 AutoPlacement m_autoPlacement{AutoPlacement::NOT_SET};
442
443 Aws::String m_availabilityZone;
444
445 AvailableCapacity m_availableCapacity;
446
447 Aws::String m_clientToken;
448
449 Aws::String m_hostId;
450
451 HostProperties m_hostProperties;
452
453 Aws::String m_hostReservationId;
454
455 Aws::Vector<HostInstance> m_instances;
456
458
459 Aws::Utils::DateTime m_allocationTime{};
460
461 Aws::Utils::DateTime m_releaseTime{};
462
463 Aws::Vector<Tag> m_tags;
464
465 HostRecovery m_hostRecovery{HostRecovery::NOT_SET};
466
468
469 Aws::String m_ownerId;
470
471 Aws::String m_availabilityZoneId;
472
473 bool m_memberOfServiceLinkedResourceGroup{false};
474
475 Aws::String m_outpostArn;
476
477 HostMaintenance m_hostMaintenance{HostMaintenance::NOT_SET};
478
479 Aws::String m_assetId;
480
481 HostCpuOptions m_cpuOptions;
482 bool m_autoPlacementHasBeenSet = false;
483 bool m_availabilityZoneHasBeenSet = false;
484 bool m_availableCapacityHasBeenSet = false;
485 bool m_clientTokenHasBeenSet = false;
486 bool m_hostIdHasBeenSet = false;
487 bool m_hostPropertiesHasBeenSet = false;
488 bool m_hostReservationIdHasBeenSet = false;
489 bool m_instancesHasBeenSet = false;
490 bool m_stateHasBeenSet = false;
491 bool m_allocationTimeHasBeenSet = false;
492 bool m_releaseTimeHasBeenSet = false;
493 bool m_tagsHasBeenSet = false;
494 bool m_hostRecoveryHasBeenSet = false;
495 bool m_allowsMultipleInstanceTypesHasBeenSet = false;
496 bool m_ownerIdHasBeenSet = false;
497 bool m_availabilityZoneIdHasBeenSet = false;
498 bool m_memberOfServiceLinkedResourceGroupHasBeenSet = false;
499 bool m_outpostArnHasBeenSet = false;
500 bool m_hostMaintenanceHasBeenSet = false;
501 bool m_assetIdHasBeenSet = false;
502 bool m_cpuOptionsHasBeenSet = false;
503};
504
505} // namespace Model
506} // namespace EC2
507} // namespace Aws
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::Vector< HostInstance > & GetInstances() const
Definition Host.h:181
void SetHostReservationId(HostReservationIdT &&value)
Definition Host.h:165
AWS_EC2_API Host()=default
const Aws::String & GetAssetId() const
Definition Host.h:408
bool AvailabilityZoneIdHasBeenSet() const
Definition Host.h:336
Host & WithReleaseTime(ReleaseTimeT &&value)
Definition Host.h:247
Host & WithAvailableCapacity(AvailableCapacityT &&value)
Definition Host.h:94
bool AutoPlacementHasBeenSet() const
Definition Host.h:53
const Aws::String & GetHostId() const
Definition Host.h:125
const HostCpuOptions & GetCpuOptions() const
Definition Host.h:427
void SetHostRecovery(HostRecovery value)
Definition Host.h:284
Host & WithInstances(InstancesT &&value)
Definition Host.h:189
Host & WithAllowsMultipleInstanceTypes(AllowsMultipleInstanceTypes value)
Definition Host.h:307
void SetHostId(HostIdT &&value)
Definition Host.h:128
const Aws::String & GetClientToken() const
Definition Host.h:107
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition Host.h:71
bool AvailableCapacityHasBeenSet() const
Definition Host.h:87
const HostProperties & GetHostProperties() const
Definition Host.h:143
bool HostPropertiesHasBeenSet() const
Definition Host.h:144
void SetReleaseTime(ReleaseTimeT &&value)
Definition Host.h:242
void SetAllocationTime(AllocationTimeT &&value)
Definition Host.h:224
void SetHostMaintenance(HostMaintenance value)
Definition Host.h:393
bool OwnerIdHasBeenSet() const
Definition Host.h:318
Host & WithHostMaintenance(HostMaintenance value)
Definition Host.h:397
AWS_EC2_API Host(const Aws::Utils::Xml::XmlNode &xmlNode)
Host & WithHostId(HostIdT &&value)
Definition Host.h:133
Host & AddInstances(InstancesT &&value)
Definition Host.h:194
void SetHostProperties(HostPropertiesT &&value)
Definition Host.h:146
bool ReleaseTimeHasBeenSet() const
Definition Host.h:240
bool MemberOfServiceLinkedResourceGroupHasBeenSet() const
Definition Host.h:356
Host & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Host.h:76
const Aws::String & GetOutpostArn() const
Definition Host.h:372
Host & WithAllocationTime(AllocationTimeT &&value)
Definition Host.h:229
bool InstancesHasBeenSet() const
Definition Host.h:182
void SetTags(TagsT &&value)
Definition Host.h:260
Host & WithState(AllocationState value)
Definition Host.h:211
HostMaintenance GetHostMaintenance() const
Definition Host.h:391
void SetState(AllocationState value)
Definition Host.h:207
void SetMemberOfServiceLinkedResourceGroup(bool value)
Definition Host.h:357
void SetOwnerId(OwnerIdT &&value)
Definition Host.h:320
Host & WithCpuOptions(CpuOptionsT &&value)
Definition Host.h:435
HostRecovery GetHostRecovery() const
Definition Host.h:282
Host & WithTags(TagsT &&value)
Definition Host.h:265
const Aws::String & GetAvailabilityZone() const
Definition Host.h:68
void SetAvailableCapacity(AvailableCapacityT &&value)
Definition Host.h:89
Host & WithAutoPlacement(AutoPlacement value)
Definition Host.h:58
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Host.h:338
bool TagsHasBeenSet() const
Definition Host.h:258
AutoPlacement GetAutoPlacement() const
Definition Host.h:52
bool AvailabilityZoneHasBeenSet() const
Definition Host.h:69
bool CpuOptionsHasBeenSet() const
Definition Host.h:428
bool StateHasBeenSet() const
Definition Host.h:206
bool AllowsMultipleInstanceTypesHasBeenSet() const
Definition Host.h:302
const Aws::String & GetOwnerId() const
Definition Host.h:317
bool HostIdHasBeenSet() const
Definition Host.h:126
bool HostReservationIdHasBeenSet() const
Definition Host.h:163
Host & WithHostProperties(HostPropertiesT &&value)
Definition Host.h:151
Host & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Host.h:343
AWS_EC2_API Host & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetCpuOptions(CpuOptionsT &&value)
Definition Host.h:430
Host & WithOwnerId(OwnerIdT &&value)
Definition Host.h:325
bool OutpostArnHasBeenSet() const
Definition Host.h:373
bool AssetIdHasBeenSet() const
Definition Host.h:409
Host & WithOutpostArn(OutpostArnT &&value)
Definition Host.h:380
bool ClientTokenHasBeenSet() const
Definition Host.h:108
Host & AddTags(TagsT &&value)
Definition Host.h:270
Host & WithHostRecovery(HostRecovery value)
Definition Host.h:288
void SetClientToken(ClientTokenT &&value)
Definition Host.h:110
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetAssetId(AssetIdT &&value)
Definition Host.h:411
bool GetMemberOfServiceLinkedResourceGroup() const
Definition Host.h:355
void SetInstances(InstancesT &&value)
Definition Host.h:184
const Aws::String & GetAvailabilityZoneId() const
Definition Host.h:335
const Aws::Utils::DateTime & GetReleaseTime() const
Definition Host.h:239
bool HostRecoveryHasBeenSet() const
Definition Host.h:283
const Aws::Vector< Tag > & GetTags() const
Definition Host.h:257
const Aws::String & GetHostReservationId() const
Definition Host.h:162
AllowsMultipleInstanceTypes GetAllowsMultipleInstanceTypes() const
Definition Host.h:301
const AvailableCapacity & GetAvailableCapacity() const
Definition Host.h:86
void SetOutpostArn(OutpostArnT &&value)
Definition Host.h:375
bool AllocationTimeHasBeenSet() const
Definition Host.h:222
bool HostMaintenanceHasBeenSet() const
Definition Host.h:392
Host & WithHostReservationId(HostReservationIdT &&value)
Definition Host.h:170
void SetAllowsMultipleInstanceTypes(AllowsMultipleInstanceTypes value)
Definition Host.h:303
AllocationState GetState() const
Definition Host.h:205
const Aws::Utils::DateTime & GetAllocationTime() const
Definition Host.h:221
Host & WithClientToken(ClientTokenT &&value)
Definition Host.h:115
void SetAutoPlacement(AutoPlacement value)
Definition Host.h:54
Host & WithAssetId(AssetIdT &&value)
Definition Host.h:416
Host & WithMemberOfServiceLinkedResourceGroup(bool value)
Definition Host.h:361
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