AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
Host.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/ec2/model/AutoPlacement.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/ec2/model/AvailableCapacity.h>
12#include <aws/ec2/model/HostProperties.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/ec2/model/AllocationState.h>
15#include <aws/core/utils/DateTime.h>
16#include <aws/ec2/model/HostRecovery.h>
17#include <aws/ec2/model/AllowsMultipleInstanceTypes.h>
18#include <aws/ec2/model/HostMaintenance.h>
19#include <aws/ec2/model/HostInstance.h>
20#include <aws/ec2/model/Tag.h>
21#include <utility>
22
23namespace Aws
24{
25namespace Utils
26{
27namespace Xml
28{
29 class XmlNode;
30} // namespace Xml
31} // namespace Utils
32namespace EC2
33{
34namespace Model
35{
36
42 class Host
43 {
44 public:
45 AWS_EC2_API Host() = default;
46 AWS_EC2_API Host(const Aws::Utils::Xml::XmlNode& xmlNode);
47 AWS_EC2_API Host& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
48
49 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
50 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
51
52
54
57 inline AutoPlacement GetAutoPlacement() const { return m_autoPlacement; }
58 inline bool AutoPlacementHasBeenSet() const { return m_autoPlacementHasBeenSet; }
59 inline void SetAutoPlacement(AutoPlacement value) { m_autoPlacementHasBeenSet = true; m_autoPlacement = value; }
60 inline Host& WithAutoPlacement(AutoPlacement value) { SetAutoPlacement(value); return *this;}
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) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
71 template<typename AvailabilityZoneT = Aws::String>
72 Host& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
74
76
79 inline const AvailableCapacity& GetAvailableCapacity() const { return m_availableCapacity; }
80 inline bool AvailableCapacityHasBeenSet() const { return m_availableCapacityHasBeenSet; }
81 template<typename AvailableCapacityT = AvailableCapacity>
82 void SetAvailableCapacity(AvailableCapacityT&& value) { m_availableCapacityHasBeenSet = true; m_availableCapacity = std::forward<AvailableCapacityT>(value); }
83 template<typename AvailableCapacityT = AvailableCapacity>
84 Host& WithAvailableCapacity(AvailableCapacityT&& value) { SetAvailableCapacity(std::forward<AvailableCapacityT>(value)); return *this;}
86
88
94 inline const Aws::String& GetClientToken() const { return m_clientToken; }
95 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
96 template<typename ClientTokenT = Aws::String>
97 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
98 template<typename ClientTokenT = Aws::String>
99 Host& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
101
103
106 inline const Aws::String& GetHostId() const { return m_hostId; }
107 inline bool HostIdHasBeenSet() const { return m_hostIdHasBeenSet; }
108 template<typename HostIdT = Aws::String>
109 void SetHostId(HostIdT&& value) { m_hostIdHasBeenSet = true; m_hostId = std::forward<HostIdT>(value); }
110 template<typename HostIdT = Aws::String>
111 Host& WithHostId(HostIdT&& value) { SetHostId(std::forward<HostIdT>(value)); return *this;}
113
115
118 inline const HostProperties& GetHostProperties() const { return m_hostProperties; }
119 inline bool HostPropertiesHasBeenSet() const { return m_hostPropertiesHasBeenSet; }
120 template<typename HostPropertiesT = HostProperties>
121 void SetHostProperties(HostPropertiesT&& value) { m_hostPropertiesHasBeenSet = true; m_hostProperties = std::forward<HostPropertiesT>(value); }
122 template<typename HostPropertiesT = HostProperties>
123 Host& WithHostProperties(HostPropertiesT&& value) { SetHostProperties(std::forward<HostPropertiesT>(value)); return *this;}
125
127
131 inline const Aws::String& GetHostReservationId() const { return m_hostReservationId; }
132 inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
133 template<typename HostReservationIdT = Aws::String>
134 void SetHostReservationId(HostReservationIdT&& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = std::forward<HostReservationIdT>(value); }
135 template<typename HostReservationIdT = Aws::String>
136 Host& WithHostReservationId(HostReservationIdT&& value) { SetHostReservationId(std::forward<HostReservationIdT>(value)); return *this;}
138
140
144 inline const Aws::Vector<HostInstance>& GetInstances() const { return m_instances; }
145 inline bool InstancesHasBeenSet() const { return m_instancesHasBeenSet; }
146 template<typename InstancesT = Aws::Vector<HostInstance>>
147 void SetInstances(InstancesT&& value) { m_instancesHasBeenSet = true; m_instances = std::forward<InstancesT>(value); }
148 template<typename InstancesT = Aws::Vector<HostInstance>>
149 Host& WithInstances(InstancesT&& value) { SetInstances(std::forward<InstancesT>(value)); return *this;}
150 template<typename InstancesT = HostInstance>
151 Host& AddInstances(InstancesT&& value) { m_instancesHasBeenSet = true; m_instances.emplace_back(std::forward<InstancesT>(value)); return *this; }
153
155
158 inline AllocationState GetState() const { return m_state; }
159 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
160 inline void SetState(AllocationState value) { m_stateHasBeenSet = true; m_state = value; }
161 inline Host& WithState(AllocationState value) { SetState(value); return *this;}
163
165
168 inline const Aws::Utils::DateTime& GetAllocationTime() const { return m_allocationTime; }
169 inline bool AllocationTimeHasBeenSet() const { return m_allocationTimeHasBeenSet; }
170 template<typename AllocationTimeT = Aws::Utils::DateTime>
171 void SetAllocationTime(AllocationTimeT&& value) { m_allocationTimeHasBeenSet = true; m_allocationTime = std::forward<AllocationTimeT>(value); }
172 template<typename AllocationTimeT = Aws::Utils::DateTime>
173 Host& WithAllocationTime(AllocationTimeT&& value) { SetAllocationTime(std::forward<AllocationTimeT>(value)); return *this;}
175
177
180 inline const Aws::Utils::DateTime& GetReleaseTime() const { return m_releaseTime; }
181 inline bool ReleaseTimeHasBeenSet() const { return m_releaseTimeHasBeenSet; }
182 template<typename ReleaseTimeT = Aws::Utils::DateTime>
183 void SetReleaseTime(ReleaseTimeT&& value) { m_releaseTimeHasBeenSet = true; m_releaseTime = std::forward<ReleaseTimeT>(value); }
184 template<typename ReleaseTimeT = Aws::Utils::DateTime>
185 Host& WithReleaseTime(ReleaseTimeT&& value) { SetReleaseTime(std::forward<ReleaseTimeT>(value)); return *this;}
187
189
192 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
193 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
194 template<typename TagsT = Aws::Vector<Tag>>
195 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
196 template<typename TagsT = Aws::Vector<Tag>>
197 Host& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
198 template<typename TagsT = Tag>
199 Host& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
201
203
207 inline HostRecovery GetHostRecovery() const { return m_hostRecovery; }
208 inline bool HostRecoveryHasBeenSet() const { return m_hostRecoveryHasBeenSet; }
209 inline void SetHostRecovery(HostRecovery value) { m_hostRecoveryHasBeenSet = true; m_hostRecovery = value; }
210 inline Host& WithHostRecovery(HostRecovery value) { SetHostRecovery(value); return *this;}
212
214
220 inline AllowsMultipleInstanceTypes GetAllowsMultipleInstanceTypes() const { return m_allowsMultipleInstanceTypes; }
221 inline bool AllowsMultipleInstanceTypesHasBeenSet() const { return m_allowsMultipleInstanceTypesHasBeenSet; }
222 inline void SetAllowsMultipleInstanceTypes(AllowsMultipleInstanceTypes value) { m_allowsMultipleInstanceTypesHasBeenSet = true; m_allowsMultipleInstanceTypes = value; }
225
227
230 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
231 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
232 template<typename OwnerIdT = Aws::String>
233 void SetOwnerId(OwnerIdT&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::forward<OwnerIdT>(value); }
234 template<typename OwnerIdT = Aws::String>
235 Host& WithOwnerId(OwnerIdT&& value) { SetOwnerId(std::forward<OwnerIdT>(value)); return *this;}
237
239
242 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
243 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
244 template<typename AvailabilityZoneIdT = Aws::String>
245 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value); }
246 template<typename AvailabilityZoneIdT = Aws::String>
247 Host& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) { SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value)); return *this;}
249
251
256 inline bool GetMemberOfServiceLinkedResourceGroup() const { return m_memberOfServiceLinkedResourceGroup; }
257 inline bool MemberOfServiceLinkedResourceGroupHasBeenSet() const { return m_memberOfServiceLinkedResourceGroupHasBeenSet; }
258 inline void SetMemberOfServiceLinkedResourceGroup(bool value) { m_memberOfServiceLinkedResourceGroupHasBeenSet = true; m_memberOfServiceLinkedResourceGroup = value; }
261
263
267 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
268 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
269 template<typename OutpostArnT = Aws::String>
270 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
271 template<typename OutpostArnT = Aws::String>
272 Host& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
274
276
280 inline HostMaintenance GetHostMaintenance() const { return m_hostMaintenance; }
281 inline bool HostMaintenanceHasBeenSet() const { return m_hostMaintenanceHasBeenSet; }
282 inline void SetHostMaintenance(HostMaintenance value) { m_hostMaintenanceHasBeenSet = true; m_hostMaintenance = value; }
283 inline Host& WithHostMaintenance(HostMaintenance value) { SetHostMaintenance(value); return *this;}
285
287
291 inline const Aws::String& GetAssetId() const { return m_assetId; }
292 inline bool AssetIdHasBeenSet() const { return m_assetIdHasBeenSet; }
293 template<typename AssetIdT = Aws::String>
294 void SetAssetId(AssetIdT&& value) { m_assetIdHasBeenSet = true; m_assetId = std::forward<AssetIdT>(value); }
295 template<typename AssetIdT = Aws::String>
296 Host& WithAssetId(AssetIdT&& value) { SetAssetId(std::forward<AssetIdT>(value)); return *this;}
298 private:
299
300 AutoPlacement m_autoPlacement{AutoPlacement::NOT_SET};
301 bool m_autoPlacementHasBeenSet = false;
302
303 Aws::String m_availabilityZone;
304 bool m_availabilityZoneHasBeenSet = false;
305
306 AvailableCapacity m_availableCapacity;
307 bool m_availableCapacityHasBeenSet = false;
308
309 Aws::String m_clientToken;
310 bool m_clientTokenHasBeenSet = false;
311
312 Aws::String m_hostId;
313 bool m_hostIdHasBeenSet = false;
314
315 HostProperties m_hostProperties;
316 bool m_hostPropertiesHasBeenSet = false;
317
318 Aws::String m_hostReservationId;
319 bool m_hostReservationIdHasBeenSet = false;
320
321 Aws::Vector<HostInstance> m_instances;
322 bool m_instancesHasBeenSet = false;
323
325 bool m_stateHasBeenSet = false;
326
327 Aws::Utils::DateTime m_allocationTime{};
328 bool m_allocationTimeHasBeenSet = false;
329
330 Aws::Utils::DateTime m_releaseTime{};
331 bool m_releaseTimeHasBeenSet = false;
332
333 Aws::Vector<Tag> m_tags;
334 bool m_tagsHasBeenSet = false;
335
336 HostRecovery m_hostRecovery{HostRecovery::NOT_SET};
337 bool m_hostRecoveryHasBeenSet = false;
338
340 bool m_allowsMultipleInstanceTypesHasBeenSet = false;
341
342 Aws::String m_ownerId;
343 bool m_ownerIdHasBeenSet = false;
344
345 Aws::String m_availabilityZoneId;
346 bool m_availabilityZoneIdHasBeenSet = false;
347
348 bool m_memberOfServiceLinkedResourceGroup{false};
349 bool m_memberOfServiceLinkedResourceGroupHasBeenSet = false;
350
351 Aws::String m_outpostArn;
352 bool m_outpostArnHasBeenSet = false;
353
354 HostMaintenance m_hostMaintenance{HostMaintenance::NOT_SET};
355 bool m_hostMaintenanceHasBeenSet = false;
356
357 Aws::String m_assetId;
358 bool m_assetIdHasBeenSet = false;
359 };
360
361} // namespace Model
362} // namespace EC2
363} // 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:144
void SetHostReservationId(HostReservationIdT &&value)
Definition Host.h:134
AWS_EC2_API Host()=default
const Aws::String & GetAssetId() const
Definition Host.h:291
bool AvailabilityZoneIdHasBeenSet() const
Definition Host.h:243
Host & WithReleaseTime(ReleaseTimeT &&value)
Definition Host.h:185
Host & WithAvailableCapacity(AvailableCapacityT &&value)
Definition Host.h:84
bool AutoPlacementHasBeenSet() const
Definition Host.h:58
const Aws::String & GetHostId() const
Definition Host.h:106
void SetHostRecovery(HostRecovery value)
Definition Host.h:209
Host & WithInstances(InstancesT &&value)
Definition Host.h:149
Host & WithAllowsMultipleInstanceTypes(AllowsMultipleInstanceTypes value)
Definition Host.h:223
void SetHostId(HostIdT &&value)
Definition Host.h:109
const Aws::String & GetClientToken() const
Definition Host.h:94
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition Host.h:70
bool AvailableCapacityHasBeenSet() const
Definition Host.h:80
const HostProperties & GetHostProperties() const
Definition Host.h:118
bool HostPropertiesHasBeenSet() const
Definition Host.h:119
void SetReleaseTime(ReleaseTimeT &&value)
Definition Host.h:183
void SetAllocationTime(AllocationTimeT &&value)
Definition Host.h:171
void SetHostMaintenance(HostMaintenance value)
Definition Host.h:282
bool OwnerIdHasBeenSet() const
Definition Host.h:231
Host & WithHostMaintenance(HostMaintenance value)
Definition Host.h:283
AWS_EC2_API Host(const Aws::Utils::Xml::XmlNode &xmlNode)
Host & WithHostId(HostIdT &&value)
Definition Host.h:111
Host & AddInstances(InstancesT &&value)
Definition Host.h:151
void SetHostProperties(HostPropertiesT &&value)
Definition Host.h:121
bool ReleaseTimeHasBeenSet() const
Definition Host.h:181
bool MemberOfServiceLinkedResourceGroupHasBeenSet() const
Definition Host.h:257
Host & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Host.h:72
const Aws::String & GetOutpostArn() const
Definition Host.h:267
Host & WithAllocationTime(AllocationTimeT &&value)
Definition Host.h:173
bool InstancesHasBeenSet() const
Definition Host.h:145
void SetTags(TagsT &&value)
Definition Host.h:195
Host & WithState(AllocationState value)
Definition Host.h:161
HostMaintenance GetHostMaintenance() const
Definition Host.h:280
void SetState(AllocationState value)
Definition Host.h:160
void SetMemberOfServiceLinkedResourceGroup(bool value)
Definition Host.h:258
void SetOwnerId(OwnerIdT &&value)
Definition Host.h:233
HostRecovery GetHostRecovery() const
Definition Host.h:207
Host & WithTags(TagsT &&value)
Definition Host.h:197
const Aws::String & GetAvailabilityZone() const
Definition Host.h:67
void SetAvailableCapacity(AvailableCapacityT &&value)
Definition Host.h:82
Host & WithAutoPlacement(AutoPlacement value)
Definition Host.h:60
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Host.h:245
bool TagsHasBeenSet() const
Definition Host.h:193
AutoPlacement GetAutoPlacement() const
Definition Host.h:57
bool AvailabilityZoneHasBeenSet() const
Definition Host.h:68
bool StateHasBeenSet() const
Definition Host.h:159
bool AllowsMultipleInstanceTypesHasBeenSet() const
Definition Host.h:221
const Aws::String & GetOwnerId() const
Definition Host.h:230
bool HostIdHasBeenSet() const
Definition Host.h:107
bool HostReservationIdHasBeenSet() const
Definition Host.h:132
Host & WithHostProperties(HostPropertiesT &&value)
Definition Host.h:123
Host & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Host.h:247
AWS_EC2_API Host & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Host & WithOwnerId(OwnerIdT &&value)
Definition Host.h:235
bool OutpostArnHasBeenSet() const
Definition Host.h:268
bool AssetIdHasBeenSet() const
Definition Host.h:292
Host & WithOutpostArn(OutpostArnT &&value)
Definition Host.h:272
bool ClientTokenHasBeenSet() const
Definition Host.h:95
Host & AddTags(TagsT &&value)
Definition Host.h:199
Host & WithHostRecovery(HostRecovery value)
Definition Host.h:210
void SetClientToken(ClientTokenT &&value)
Definition Host.h:97
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetAssetId(AssetIdT &&value)
Definition Host.h:294
bool GetMemberOfServiceLinkedResourceGroup() const
Definition Host.h:256
void SetInstances(InstancesT &&value)
Definition Host.h:147
const Aws::String & GetAvailabilityZoneId() const
Definition Host.h:242
const Aws::Utils::DateTime & GetReleaseTime() const
Definition Host.h:180
bool HostRecoveryHasBeenSet() const
Definition Host.h:208
const Aws::Vector< Tag > & GetTags() const
Definition Host.h:192
const Aws::String & GetHostReservationId() const
Definition Host.h:131
AllowsMultipleInstanceTypes GetAllowsMultipleInstanceTypes() const
Definition Host.h:220
const AvailableCapacity & GetAvailableCapacity() const
Definition Host.h:79
void SetOutpostArn(OutpostArnT &&value)
Definition Host.h:270
bool AllocationTimeHasBeenSet() const
Definition Host.h:169
bool HostMaintenanceHasBeenSet() const
Definition Host.h:281
Host & WithHostReservationId(HostReservationIdT &&value)
Definition Host.h:136
void SetAllowsMultipleInstanceTypes(AllowsMultipleInstanceTypes value)
Definition Host.h:222
AllocationState GetState() const
Definition Host.h:158
const Aws::Utils::DateTime & GetAllocationTime() const
Definition Host.h:168
Host & WithClientToken(ClientTokenT &&value)
Definition Host.h:99
void SetAutoPlacement(AutoPlacement value)
Definition Host.h:59
Host & WithAssetId(AssetIdT &&value)
Definition Host.h:296
Host & WithMemberOfServiceLinkedResourceGroup(bool value)
Definition Host.h:259
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