AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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/HostInstance.h>
17#include <aws/ec2/model/HostMaintenance.h>
18#include <aws/ec2/model/HostProperties.h>
19#include <aws/ec2/model/HostRecovery.h>
20#include <aws/ec2/model/Tag.h>
21
22#include <utility>
23
24namespace Aws {
25namespace Utils {
26namespace Xml {
27class XmlNode;
28} // namespace Xml
29} // namespace Utils
30namespace EC2 {
31namespace Model {
32
38class Host {
39 public:
40 AWS_EC2_API Host() = default;
41 AWS_EC2_API Host(const Aws::Utils::Xml::XmlNode& xmlNode);
42 AWS_EC2_API Host& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43
44 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
46
48
51 inline AutoPlacement GetAutoPlacement() const { return m_autoPlacement; }
52 inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; }
53 inline void SetAutoPlacement(AutoPlacement value) {
54 m_autoPlacementHasBeenSet = true;
55 m_autoPlacement = value;
56 }
58 SetAutoPlacement(value);
59 return *this;
60 }
62
64
67 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
68 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
69 template <typename AvailabilityZoneT = Aws::String>
70 void SetAvailabilityZone(AvailabilityZoneT&& value) {
71 m_availabilityZoneHasBeenSet = true;
72 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
73 }
74 template <typename AvailabilityZoneT = Aws::String>
75 Host& WithAvailabilityZone(AvailabilityZoneT&& value) {
76 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
77 return *this;
78 }
80
82
85 inline const AvailableCapacity& GetAvailableCapacity() const { return m_availableCapacity; }
86 inline bool AvailableCapacityHasBeenSet() const { return m_availableCapacityHasBeenSet; }
87 template <typename AvailableCapacityT = AvailableCapacity>
88 void SetAvailableCapacity(AvailableCapacityT&& value) {
89 m_availableCapacityHasBeenSet = true;
90 m_availableCapacity = std::forward<AvailableCapacityT>(value);
91 }
92 template <typename AvailableCapacityT = AvailableCapacity>
93 Host& WithAvailableCapacity(AvailableCapacityT&& value) {
94 SetAvailableCapacity(std::forward<AvailableCapacityT>(value));
95 return *this;
96 }
98
100
106 inline const Aws::String& GetClientToken() const { return m_clientToken; }
107 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
108 template <typename ClientTokenT = Aws::String>
109 void SetClientToken(ClientTokenT&& value) {
110 m_clientTokenHasBeenSet = true;
111 m_clientToken = std::forward<ClientTokenT>(value);
112 }
113 template <typename ClientTokenT = Aws::String>
114 Host& WithClientToken(ClientTokenT&& value) {
115 SetClientToken(std::forward<ClientTokenT>(value));
116 return *this;
117 }
119
121
124 inline const Aws::String& GetHostId() const { return m_hostId; }
125 inline bool HostIdHasBeenSet() const { return m_hostIdHasBeenSet; }
126 template <typename HostIdT = Aws::String>
127 void SetHostId(HostIdT&& value) {
128 m_hostIdHasBeenSet = true;
129 m_hostId = std::forward<HostIdT>(value);
130 }
131 template <typename HostIdT = Aws::String>
132 Host& WithHostId(HostIdT&& value) {
133 SetHostId(std::forward<HostIdT>(value));
134 return *this;
135 }
137
139
142 inline const HostProperties& GetHostProperties() const { return m_hostProperties; }
143 inline bool HostPropertiesHasBeenSet() const { return m_hostPropertiesHasBeenSet; }
144 template <typename HostPropertiesT = HostProperties>
145 void SetHostProperties(HostPropertiesT&& value) {
146 m_hostPropertiesHasBeenSet = true;
147 m_hostProperties = std::forward<HostPropertiesT>(value);
148 }
149 template <typename HostPropertiesT = HostProperties>
150 Host& WithHostProperties(HostPropertiesT&& value) {
151 SetHostProperties(std::forward<HostPropertiesT>(value));
152 return *this;
153 }
155
157
161 inline const Aws::String& GetHostReservationId() const { return m_hostReservationId; }
162 inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
163 template <typename HostReservationIdT = Aws::String>
164 void SetHostReservationId(HostReservationIdT&& value) {
165 m_hostReservationIdHasBeenSet = true;
166 m_hostReservationId = std::forward<HostReservationIdT>(value);
167 }
168 template <typename HostReservationIdT = Aws::String>
169 Host& WithHostReservationId(HostReservationIdT&& value) {
170 SetHostReservationId(std::forward<HostReservationIdT>(value));
171 return *this;
172 }
174
176
180 inline const Aws::Vector<HostInstance>& GetInstances() const { return m_instances; }
181 inline bool InstancesHasBeenSet() const { return m_instancesHasBeenSet; }
182 template <typename InstancesT = Aws::Vector<HostInstance>>
183 void SetInstances(InstancesT&& value) {
184 m_instancesHasBeenSet = true;
185 m_instances = std::forward<InstancesT>(value);
186 }
187 template <typename InstancesT = Aws::Vector<HostInstance>>
188 Host& WithInstances(InstancesT&& value) {
189 SetInstances(std::forward<InstancesT>(value));
190 return *this;
191 }
192 template <typename InstancesT = HostInstance>
193 Host& AddInstances(InstancesT&& value) {
194 m_instancesHasBeenSet = true;
195 m_instances.emplace_back(std::forward<InstancesT>(value));
196 return *this;
197 }
199
201
204 inline AllocationState GetState() const { return m_state; }
205 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
206 inline void SetState(AllocationState value) {
207 m_stateHasBeenSet = true;
208 m_state = value;
209 }
211 SetState(value);
212 return *this;
213 }
215
217
220 inline const Aws::Utils::DateTime& GetAllocationTime() const { return m_allocationTime; }
221 inline bool AllocationTimeHasBeenSet() const { return m_allocationTimeHasBeenSet; }
222 template <typename AllocationTimeT = Aws::Utils::DateTime>
223 void SetAllocationTime(AllocationTimeT&& value) {
224 m_allocationTimeHasBeenSet = true;
225 m_allocationTime = std::forward<AllocationTimeT>(value);
226 }
227 template <typename AllocationTimeT = Aws::Utils::DateTime>
228 Host& WithAllocationTime(AllocationTimeT&& value) {
229 SetAllocationTime(std::forward<AllocationTimeT>(value));
230 return *this;
231 }
233
235
238 inline const Aws::Utils::DateTime& GetReleaseTime() const { return m_releaseTime; }
239 inline bool ReleaseTimeHasBeenSet() const { return m_releaseTimeHasBeenSet; }
240 template <typename ReleaseTimeT = Aws::Utils::DateTime>
241 void SetReleaseTime(ReleaseTimeT&& value) {
242 m_releaseTimeHasBeenSet = true;
243 m_releaseTime = std::forward<ReleaseTimeT>(value);
244 }
245 template <typename ReleaseTimeT = Aws::Utils::DateTime>
246 Host& WithReleaseTime(ReleaseTimeT&& value) {
247 SetReleaseTime(std::forward<ReleaseTimeT>(value));
248 return *this;
249 }
251
253
256 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
257 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
258 template <typename TagsT = Aws::Vector<Tag>>
259 void SetTags(TagsT&& value) {
260 m_tagsHasBeenSet = true;
261 m_tags = std::forward<TagsT>(value);
262 }
263 template <typename TagsT = Aws::Vector<Tag>>
264 Host& WithTags(TagsT&& value) {
265 SetTags(std::forward<TagsT>(value));
266 return *this;
267 }
268 template <typename TagsT = Tag>
269 Host& AddTags(TagsT&& value) {
270 m_tagsHasBeenSet = true;
271 m_tags.emplace_back(std::forward<TagsT>(value));
272 return *this;
273 }
275
277
281 inline HostRecovery GetHostRecovery() const { return m_hostRecovery; }
282 inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; }
283 inline void SetHostRecovery(HostRecovery value) {
284 m_hostRecoveryHasBeenSet = true;
285 m_hostRecovery = value;
286 }
288 SetHostRecovery(value);
289 return *this;
290 }
292
294
300 inline AllowsMultipleInstanceTypes GetAllowsMultipleInstanceTypes() const { return m_allowsMultipleInstanceTypes; }
301 inline bool AllowsMultipleInstanceTypesHasBeenSet() const { return m_allowsMultipleInstanceTypesHasBeenSet; }
303 m_allowsMultipleInstanceTypesHasBeenSet = true;
304 m_allowsMultipleInstanceTypes = value;
305 }
308 return *this;
309 }
311
313
316 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
317 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
318 template <typename OwnerIdT = Aws::String>
319 void SetOwnerId(OwnerIdT&& value) {
320 m_ownerIdHasBeenSet = true;
321 m_ownerId = std::forward<OwnerIdT>(value);
322 }
323 template <typename OwnerIdT = Aws::String>
324 Host& WithOwnerId(OwnerIdT&& value) {
325 SetOwnerId(std::forward<OwnerIdT>(value));
326 return *this;
327 }
329
331
334 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
335 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
336 template <typename AvailabilityZoneIdT = Aws::String>
337 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
338 m_availabilityZoneIdHasBeenSet = true;
339 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
340 }
341 template <typename AvailabilityZoneIdT = Aws::String>
342 Host& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
343 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
344 return *this;
345 }
347
349
354 inline bool GetMemberOfServiceLinkedResourceGroup() const { return m_memberOfServiceLinkedResourceGroup; }
355 inline bool MemberOfServiceLinkedResourceGroupHasBeenSet() const { return m_memberOfServiceLinkedResourceGroupHasBeenSet; }
357 m_memberOfServiceLinkedResourceGroupHasBeenSet = true;
358 m_memberOfServiceLinkedResourceGroup = value;
359 }
362 return *this;
363 }
365
367
371 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
372 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
373 template <typename OutpostArnT = Aws::String>
374 void SetOutpostArn(OutpostArnT&& value) {
375 m_outpostArnHasBeenSet = true;
376 m_outpostArn = std::forward<OutpostArnT>(value);
377 }
378 template <typename OutpostArnT = Aws::String>
379 Host& WithOutpostArn(OutpostArnT&& value) {
380 SetOutpostArn(std::forward<OutpostArnT>(value));
381 return *this;
382 }
384
386
390 inline HostMaintenance GetHostMaintenance() const { return m_hostMaintenance; }
391 inline bool HostMaintenanceHasBeenSet() const { return m_hostMaintenanceHasBeenSet; }
393 m_hostMaintenanceHasBeenSet = true;
394 m_hostMaintenance = value;
395 }
397 SetHostMaintenance(value);
398 return *this;
399 }
401
403
407 inline const Aws::String& GetAssetId() const { return m_assetId; }
408 inline bool AssetIdHasBeenSet() const { return m_assetIdHasBeenSet; }
409 template <typename AssetIdT = Aws::String>
410 void SetAssetId(AssetIdT&& value) {
411 m_assetIdHasBeenSet = true;
412 m_assetId = std::forward<AssetIdT>(value);
413 }
414 template <typename AssetIdT = Aws::String>
415 Host& WithAssetId(AssetIdT&& value) {
416 SetAssetId(std::forward<AssetIdT>(value));
417 return *this;
418 }
420 private:
421 AutoPlacement m_autoPlacement{AutoPlacement::NOT_SET};
422
423 Aws::String m_availabilityZone;
424
425 AvailableCapacity m_availableCapacity;
426
427 Aws::String m_clientToken;
428
429 Aws::String m_hostId;
430
431 HostProperties m_hostProperties;
432
433 Aws::String m_hostReservationId;
434
435 Aws::Vector<HostInstance> m_instances;
436
438
439 Aws::Utils::DateTime m_allocationTime{};
440
441 Aws::Utils::DateTime m_releaseTime{};
442
443 Aws::Vector<Tag> m_tags;
444
445 HostRecovery m_hostRecovery{HostRecovery::NOT_SET};
446
448
449 Aws::String m_ownerId;
450
451 Aws::String m_availabilityZoneId;
452
453 bool m_memberOfServiceLinkedResourceGroup{false};
454
455 Aws::String m_outpostArn;
456
457 HostMaintenance m_hostMaintenance{HostMaintenance::NOT_SET};
458
459 Aws::String m_assetId;
460 bool m_autoPlacementHasBeenSet = false;
461 bool m_availabilityZoneHasBeenSet = false;
462 bool m_availableCapacityHasBeenSet = false;
463 bool m_clientTokenHasBeenSet = false;
464 bool m_hostIdHasBeenSet = false;
465 bool m_hostPropertiesHasBeenSet = false;
466 bool m_hostReservationIdHasBeenSet = false;
467 bool m_instancesHasBeenSet = false;
468 bool m_stateHasBeenSet = false;
469 bool m_allocationTimeHasBeenSet = false;
470 bool m_releaseTimeHasBeenSet = false;
471 bool m_tagsHasBeenSet = false;
472 bool m_hostRecoveryHasBeenSet = false;
473 bool m_allowsMultipleInstanceTypesHasBeenSet = false;
474 bool m_ownerIdHasBeenSet = false;
475 bool m_availabilityZoneIdHasBeenSet = false;
476 bool m_memberOfServiceLinkedResourceGroupHasBeenSet = false;
477 bool m_outpostArnHasBeenSet = false;
478 bool m_hostMaintenanceHasBeenSet = false;
479 bool m_assetIdHasBeenSet = false;
480};
481
482} // namespace Model
483} // namespace EC2
484} // 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:180
void SetHostReservationId(HostReservationIdT &&value)
Definition Host.h:164
AWS_EC2_API Host()=default
const Aws::String & GetAssetId() const
Definition Host.h:407
bool AvailabilityZoneIdHasBeenSet() const
Definition Host.h:335
Host & WithReleaseTime(ReleaseTimeT &&value)
Definition Host.h:246
Host & WithAvailableCapacity(AvailableCapacityT &&value)
Definition Host.h:93
bool AutoPlacementHasBeenSet() const
Definition Host.h:52
const Aws::String & GetHostId() const
Definition Host.h:124
void SetHostRecovery(HostRecovery value)
Definition Host.h:283
Host & WithInstances(InstancesT &&value)
Definition Host.h:188
Host & WithAllowsMultipleInstanceTypes(AllowsMultipleInstanceTypes value)
Definition Host.h:306
void SetHostId(HostIdT &&value)
Definition Host.h:127
const Aws::String & GetClientToken() const
Definition Host.h:106
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition Host.h:70
bool AvailableCapacityHasBeenSet() const
Definition Host.h:86
const HostProperties & GetHostProperties() const
Definition Host.h:142
bool HostPropertiesHasBeenSet() const
Definition Host.h:143
void SetReleaseTime(ReleaseTimeT &&value)
Definition Host.h:241
void SetAllocationTime(AllocationTimeT &&value)
Definition Host.h:223
void SetHostMaintenance(HostMaintenance value)
Definition Host.h:392
bool OwnerIdHasBeenSet() const
Definition Host.h:317
Host & WithHostMaintenance(HostMaintenance value)
Definition Host.h:396
AWS_EC2_API Host(const Aws::Utils::Xml::XmlNode &xmlNode)
Host & WithHostId(HostIdT &&value)
Definition Host.h:132
Host & AddInstances(InstancesT &&value)
Definition Host.h:193
void SetHostProperties(HostPropertiesT &&value)
Definition Host.h:145
bool ReleaseTimeHasBeenSet() const
Definition Host.h:239
bool MemberOfServiceLinkedResourceGroupHasBeenSet() const
Definition Host.h:355
Host & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Host.h:75
const Aws::String & GetOutpostArn() const
Definition Host.h:371
Host & WithAllocationTime(AllocationTimeT &&value)
Definition Host.h:228
bool InstancesHasBeenSet() const
Definition Host.h:181
void SetTags(TagsT &&value)
Definition Host.h:259
Host & WithState(AllocationState value)
Definition Host.h:210
HostMaintenance GetHostMaintenance() const
Definition Host.h:390
void SetState(AllocationState value)
Definition Host.h:206
void SetMemberOfServiceLinkedResourceGroup(bool value)
Definition Host.h:356
void SetOwnerId(OwnerIdT &&value)
Definition Host.h:319
HostRecovery GetHostRecovery() const
Definition Host.h:281
Host & WithTags(TagsT &&value)
Definition Host.h:264
const Aws::String & GetAvailabilityZone() const
Definition Host.h:67
void SetAvailableCapacity(AvailableCapacityT &&value)
Definition Host.h:88
Host & WithAutoPlacement(AutoPlacement value)
Definition Host.h:57
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Host.h:337
bool TagsHasBeenSet() const
Definition Host.h:257
AutoPlacement GetAutoPlacement() const
Definition Host.h:51
bool AvailabilityZoneHasBeenSet() const
Definition Host.h:68
bool StateHasBeenSet() const
Definition Host.h:205
bool AllowsMultipleInstanceTypesHasBeenSet() const
Definition Host.h:301
const Aws::String & GetOwnerId() const
Definition Host.h:316
bool HostIdHasBeenSet() const
Definition Host.h:125
bool HostReservationIdHasBeenSet() const
Definition Host.h:162
Host & WithHostProperties(HostPropertiesT &&value)
Definition Host.h:150
Host & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Host.h:342
AWS_EC2_API Host & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Host & WithOwnerId(OwnerIdT &&value)
Definition Host.h:324
bool OutpostArnHasBeenSet() const
Definition Host.h:372
bool AssetIdHasBeenSet() const
Definition Host.h:408
Host & WithOutpostArn(OutpostArnT &&value)
Definition Host.h:379
bool ClientTokenHasBeenSet() const
Definition Host.h:107
Host & AddTags(TagsT &&value)
Definition Host.h:269
Host & WithHostRecovery(HostRecovery value)
Definition Host.h:287
void SetClientToken(ClientTokenT &&value)
Definition Host.h:109
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetAssetId(AssetIdT &&value)
Definition Host.h:410
bool GetMemberOfServiceLinkedResourceGroup() const
Definition Host.h:354
void SetInstances(InstancesT &&value)
Definition Host.h:183
const Aws::String & GetAvailabilityZoneId() const
Definition Host.h:334
const Aws::Utils::DateTime & GetReleaseTime() const
Definition Host.h:238
bool HostRecoveryHasBeenSet() const
Definition Host.h:282
const Aws::Vector< Tag > & GetTags() const
Definition Host.h:256
const Aws::String & GetHostReservationId() const
Definition Host.h:161
AllowsMultipleInstanceTypes GetAllowsMultipleInstanceTypes() const
Definition Host.h:300
const AvailableCapacity & GetAvailableCapacity() const
Definition Host.h:85
void SetOutpostArn(OutpostArnT &&value)
Definition Host.h:374
bool AllocationTimeHasBeenSet() const
Definition Host.h:221
bool HostMaintenanceHasBeenSet() const
Definition Host.h:391
Host & WithHostReservationId(HostReservationIdT &&value)
Definition Host.h:169
void SetAllowsMultipleInstanceTypes(AllowsMultipleInstanceTypes value)
Definition Host.h:302
AllocationState GetState() const
Definition Host.h:204
const Aws::Utils::DateTime & GetAllocationTime() const
Definition Host.h:220
Host & WithClientToken(ClientTokenT &&value)
Definition Host.h:114
void SetAutoPlacement(AutoPlacement value)
Definition Host.h:53
Host & WithAssetId(AssetIdT &&value)
Definition Host.h:415
Host & WithMemberOfServiceLinkedResourceGroup(bool value)
Definition Host.h:360
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