AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Instance.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/lightsail/model/ResourceLocation.h>
11#include <aws/lightsail/model/ResourceType.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/lightsail/model/IpAddressType.h>
14#include <aws/lightsail/model/InstanceHardware.h>
15#include <aws/lightsail/model/InstanceNetworking.h>
16#include <aws/lightsail/model/InstanceState.h>
17#include <aws/lightsail/model/InstanceMetadataOptions.h>
18#include <aws/lightsail/model/Tag.h>
19#include <aws/lightsail/model/AddOn.h>
20#include <utility>
21
22namespace Aws
23{
24namespace Utils
25{
26namespace Json
27{
28 class JsonValue;
29 class JsonView;
30} // namespace Json
31} // namespace Utils
32namespace Lightsail
33{
34namespace Model
35{
36
44 {
45 public:
46 AWS_LIGHTSAIL_API Instance() = default;
47 AWS_LIGHTSAIL_API Instance(Aws::Utils::Json::JsonView jsonValue);
48 AWS_LIGHTSAIL_API Instance& operator=(Aws::Utils::Json::JsonView jsonValue);
49 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
50
51
53
56 inline const Aws::String& GetName() const { return m_name; }
57 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
58 template<typename NameT = Aws::String>
59 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
60 template<typename NameT = Aws::String>
61 Instance& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
63
65
69 inline const Aws::String& GetArn() const { return m_arn; }
70 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
71 template<typename ArnT = Aws::String>
72 void SetArn(ArnT&& value) { m_arnHasBeenSet = true; m_arn = std::forward<ArnT>(value); }
73 template<typename ArnT = Aws::String>
74 Instance& WithArn(ArnT&& value) { SetArn(std::forward<ArnT>(value)); return *this;}
76
78
83 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
84 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
85 template<typename SupportCodeT = Aws::String>
86 void SetSupportCode(SupportCodeT&& value) { m_supportCodeHasBeenSet = true; m_supportCode = std::forward<SupportCodeT>(value); }
87 template<typename SupportCodeT = Aws::String>
88 Instance& WithSupportCode(SupportCodeT&& value) { SetSupportCode(std::forward<SupportCodeT>(value)); return *this;}
90
92
96 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
97 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
98 template<typename CreatedAtT = Aws::Utils::DateTime>
99 void SetCreatedAt(CreatedAtT&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::forward<CreatedAtT>(value); }
100 template<typename CreatedAtT = Aws::Utils::DateTime>
101 Instance& WithCreatedAt(CreatedAtT&& value) { SetCreatedAt(std::forward<CreatedAtT>(value)); return *this;}
103
105
108 inline const ResourceLocation& GetLocation() const { return m_location; }
109 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
110 template<typename LocationT = ResourceLocation>
111 void SetLocation(LocationT&& value) { m_locationHasBeenSet = true; m_location = std::forward<LocationT>(value); }
112 template<typename LocationT = ResourceLocation>
113 Instance& WithLocation(LocationT&& value) { SetLocation(std::forward<LocationT>(value)); return *this;}
115
117
120 inline ResourceType GetResourceType() const { return m_resourceType; }
121 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
122 inline void SetResourceType(ResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
123 inline Instance& WithResourceType(ResourceType value) { SetResourceType(value); return *this;}
125
127
133 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
134 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
135 template<typename TagsT = Aws::Vector<Tag>>
136 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
137 template<typename TagsT = Aws::Vector<Tag>>
138 Instance& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
139 template<typename TagsT = Tag>
140 Instance& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
142
144
147 inline const Aws::String& GetBlueprintId() const { return m_blueprintId; }
148 inline bool BlueprintIdHasBeenSet() const { return m_blueprintIdHasBeenSet; }
149 template<typename BlueprintIdT = Aws::String>
150 void SetBlueprintId(BlueprintIdT&& value) { m_blueprintIdHasBeenSet = true; m_blueprintId = std::forward<BlueprintIdT>(value); }
151 template<typename BlueprintIdT = Aws::String>
152 Instance& WithBlueprintId(BlueprintIdT&& value) { SetBlueprintId(std::forward<BlueprintIdT>(value)); return *this;}
154
156
159 inline const Aws::String& GetBlueprintName() const { return m_blueprintName; }
160 inline bool BlueprintNameHasBeenSet() const { return m_blueprintNameHasBeenSet; }
161 template<typename BlueprintNameT = Aws::String>
162 void SetBlueprintName(BlueprintNameT&& value) { m_blueprintNameHasBeenSet = true; m_blueprintName = std::forward<BlueprintNameT>(value); }
163 template<typename BlueprintNameT = Aws::String>
164 Instance& WithBlueprintName(BlueprintNameT&& value) { SetBlueprintName(std::forward<BlueprintNameT>(value)); return *this;}
166
168
171 inline const Aws::String& GetBundleId() const { return m_bundleId; }
172 inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; }
173 template<typename BundleIdT = Aws::String>
174 void SetBundleId(BundleIdT&& value) { m_bundleIdHasBeenSet = true; m_bundleId = std::forward<BundleIdT>(value); }
175 template<typename BundleIdT = Aws::String>
176 Instance& WithBundleId(BundleIdT&& value) { SetBundleId(std::forward<BundleIdT>(value)); return *this;}
178
180
183 inline const Aws::Vector<AddOn>& GetAddOns() const { return m_addOns; }
184 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
185 template<typename AddOnsT = Aws::Vector<AddOn>>
186 void SetAddOns(AddOnsT&& value) { m_addOnsHasBeenSet = true; m_addOns = std::forward<AddOnsT>(value); }
187 template<typename AddOnsT = Aws::Vector<AddOn>>
188 Instance& WithAddOns(AddOnsT&& value) { SetAddOns(std::forward<AddOnsT>(value)); return *this;}
189 template<typename AddOnsT = AddOn>
190 Instance& AddAddOns(AddOnsT&& value) { m_addOnsHasBeenSet = true; m_addOns.emplace_back(std::forward<AddOnsT>(value)); return *this; }
192
194
198 inline bool GetIsStaticIp() const { return m_isStaticIp; }
199 inline bool IsStaticIpHasBeenSet() const { return m_isStaticIpHasBeenSet; }
200 inline void SetIsStaticIp(bool value) { m_isStaticIpHasBeenSet = true; m_isStaticIp = value; }
201 inline Instance& WithIsStaticIp(bool value) { SetIsStaticIp(value); return *this;}
203
205
208 inline const Aws::String& GetPrivateIpAddress() const { return m_privateIpAddress; }
209 inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; }
210 template<typename PrivateIpAddressT = Aws::String>
211 void SetPrivateIpAddress(PrivateIpAddressT&& value) { m_privateIpAddressHasBeenSet = true; m_privateIpAddress = std::forward<PrivateIpAddressT>(value); }
212 template<typename PrivateIpAddressT = Aws::String>
213 Instance& WithPrivateIpAddress(PrivateIpAddressT&& value) { SetPrivateIpAddress(std::forward<PrivateIpAddressT>(value)); return *this;}
215
217
220 inline const Aws::String& GetPublicIpAddress() const { return m_publicIpAddress; }
221 inline bool PublicIpAddressHasBeenSet() const { return m_publicIpAddressHasBeenSet; }
222 template<typename PublicIpAddressT = Aws::String>
223 void SetPublicIpAddress(PublicIpAddressT&& value) { m_publicIpAddressHasBeenSet = true; m_publicIpAddress = std::forward<PublicIpAddressT>(value); }
224 template<typename PublicIpAddressT = Aws::String>
225 Instance& WithPublicIpAddress(PublicIpAddressT&& value) { SetPublicIpAddress(std::forward<PublicIpAddressT>(value)); return *this;}
227
229
232 inline const Aws::Vector<Aws::String>& GetIpv6Addresses() const { return m_ipv6Addresses; }
233 inline bool Ipv6AddressesHasBeenSet() const { return m_ipv6AddressesHasBeenSet; }
234 template<typename Ipv6AddressesT = Aws::Vector<Aws::String>>
235 void SetIpv6Addresses(Ipv6AddressesT&& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses = std::forward<Ipv6AddressesT>(value); }
236 template<typename Ipv6AddressesT = Aws::Vector<Aws::String>>
237 Instance& WithIpv6Addresses(Ipv6AddressesT&& value) { SetIpv6Addresses(std::forward<Ipv6AddressesT>(value)); return *this;}
238 template<typename Ipv6AddressesT = Aws::String>
239 Instance& AddIpv6Addresses(Ipv6AddressesT&& value) { m_ipv6AddressesHasBeenSet = true; m_ipv6Addresses.emplace_back(std::forward<Ipv6AddressesT>(value)); return *this; }
241
243
248 inline IpAddressType GetIpAddressType() const { return m_ipAddressType; }
249 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
250 inline void SetIpAddressType(IpAddressType value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; }
251 inline Instance& WithIpAddressType(IpAddressType value) { SetIpAddressType(value); return *this;}
253
255
258 inline const InstanceHardware& GetHardware() const { return m_hardware; }
259 inline bool HardwareHasBeenSet() const { return m_hardwareHasBeenSet; }
260 template<typename HardwareT = InstanceHardware>
261 void SetHardware(HardwareT&& value) { m_hardwareHasBeenSet = true; m_hardware = std::forward<HardwareT>(value); }
262 template<typename HardwareT = InstanceHardware>
263 Instance& WithHardware(HardwareT&& value) { SetHardware(std::forward<HardwareT>(value)); return *this;}
265
267
271 inline const InstanceNetworking& GetNetworking() const { return m_networking; }
272 inline bool NetworkingHasBeenSet() const { return m_networkingHasBeenSet; }
273 template<typename NetworkingT = InstanceNetworking>
274 void SetNetworking(NetworkingT&& value) { m_networkingHasBeenSet = true; m_networking = std::forward<NetworkingT>(value); }
275 template<typename NetworkingT = InstanceNetworking>
276 Instance& WithNetworking(NetworkingT&& value) { SetNetworking(std::forward<NetworkingT>(value)); return *this;}
278
280
283 inline const InstanceState& GetState() const { return m_state; }
284 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
285 template<typename StateT = InstanceState>
286 void SetState(StateT&& value) { m_stateHasBeenSet = true; m_state = std::forward<StateT>(value); }
287 template<typename StateT = InstanceState>
288 Instance& WithState(StateT&& value) { SetState(std::forward<StateT>(value)); return *this;}
290
292
295 inline const Aws::String& GetUsername() const { return m_username; }
296 inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; }
297 template<typename UsernameT = Aws::String>
298 void SetUsername(UsernameT&& value) { m_usernameHasBeenSet = true; m_username = std::forward<UsernameT>(value); }
299 template<typename UsernameT = Aws::String>
300 Instance& WithUsername(UsernameT&& value) { SetUsername(std::forward<UsernameT>(value)); return *this;}
302
304
308 inline const Aws::String& GetSshKeyName() const { return m_sshKeyName; }
309 inline bool SshKeyNameHasBeenSet() const { return m_sshKeyNameHasBeenSet; }
310 template<typename SshKeyNameT = Aws::String>
311 void SetSshKeyName(SshKeyNameT&& value) { m_sshKeyNameHasBeenSet = true; m_sshKeyName = std::forward<SshKeyNameT>(value); }
312 template<typename SshKeyNameT = Aws::String>
313 Instance& WithSshKeyName(SshKeyNameT&& value) { SetSshKeyName(std::forward<SshKeyNameT>(value)); return *this;}
315
317
320 inline const InstanceMetadataOptions& GetMetadataOptions() const { return m_metadataOptions; }
321 inline bool MetadataOptionsHasBeenSet() const { return m_metadataOptionsHasBeenSet; }
322 template<typename MetadataOptionsT = InstanceMetadataOptions>
323 void SetMetadataOptions(MetadataOptionsT&& value) { m_metadataOptionsHasBeenSet = true; m_metadataOptions = std::forward<MetadataOptionsT>(value); }
324 template<typename MetadataOptionsT = InstanceMetadataOptions>
325 Instance& WithMetadataOptions(MetadataOptionsT&& value) { SetMetadataOptions(std::forward<MetadataOptionsT>(value)); return *this;}
327 private:
328
329 Aws::String m_name;
330 bool m_nameHasBeenSet = false;
331
332 Aws::String m_arn;
333 bool m_arnHasBeenSet = false;
334
335 Aws::String m_supportCode;
336 bool m_supportCodeHasBeenSet = false;
337
338 Aws::Utils::DateTime m_createdAt{};
339 bool m_createdAtHasBeenSet = false;
340
341 ResourceLocation m_location;
342 bool m_locationHasBeenSet = false;
343
344 ResourceType m_resourceType{ResourceType::NOT_SET};
345 bool m_resourceTypeHasBeenSet = false;
346
347 Aws::Vector<Tag> m_tags;
348 bool m_tagsHasBeenSet = false;
349
350 Aws::String m_blueprintId;
351 bool m_blueprintIdHasBeenSet = false;
352
353 Aws::String m_blueprintName;
354 bool m_blueprintNameHasBeenSet = false;
355
356 Aws::String m_bundleId;
357 bool m_bundleIdHasBeenSet = false;
358
359 Aws::Vector<AddOn> m_addOns;
360 bool m_addOnsHasBeenSet = false;
361
362 bool m_isStaticIp{false};
363 bool m_isStaticIpHasBeenSet = false;
364
365 Aws::String m_privateIpAddress;
366 bool m_privateIpAddressHasBeenSet = false;
367
368 Aws::String m_publicIpAddress;
369 bool m_publicIpAddressHasBeenSet = false;
370
371 Aws::Vector<Aws::String> m_ipv6Addresses;
372 bool m_ipv6AddressesHasBeenSet = false;
373
374 IpAddressType m_ipAddressType{IpAddressType::NOT_SET};
375 bool m_ipAddressTypeHasBeenSet = false;
376
377 InstanceHardware m_hardware;
378 bool m_hardwareHasBeenSet = false;
379
380 InstanceNetworking m_networking;
381 bool m_networkingHasBeenSet = false;
382
383 InstanceState m_state;
384 bool m_stateHasBeenSet = false;
385
386 Aws::String m_username;
387 bool m_usernameHasBeenSet = false;
388
389 Aws::String m_sshKeyName;
390 bool m_sshKeyNameHasBeenSet = false;
391
392 InstanceMetadataOptions m_metadataOptions;
393 bool m_metadataOptionsHasBeenSet = false;
394 };
395
396} // namespace Model
397} // namespace Lightsail
398} // namespace Aws
void SetCreatedAt(CreatedAtT &&value)
Definition Instance.h:99
Instance & WithBlueprintId(BlueprintIdT &&value)
Definition Instance.h:152
void SetNetworking(NetworkingT &&value)
Definition Instance.h:274
const InstanceMetadataOptions & GetMetadataOptions() const
Definition Instance.h:320
bool Ipv6AddressesHasBeenSet() const
Definition Instance.h:233
Instance & AddAddOns(AddOnsT &&value)
Definition Instance.h:190
bool IpAddressTypeHasBeenSet() const
Definition Instance.h:249
Instance & WithSshKeyName(SshKeyNameT &&value)
Definition Instance.h:313
void SetPrivateIpAddress(PrivateIpAddressT &&value)
Definition Instance.h:211
const Aws::String & GetBlueprintId() const
Definition Instance.h:147
const Aws::String & GetPublicIpAddress() const
Definition Instance.h:220
void SetTags(TagsT &&value)
Definition Instance.h:136
AWS_LIGHTSAIL_API Instance()=default
Instance & AddIpv6Addresses(Ipv6AddressesT &&value)
Definition Instance.h:239
const Aws::String & GetName() const
Definition Instance.h:56
Instance & WithState(StateT &&value)
Definition Instance.h:288
const ResourceLocation & GetLocation() const
Definition Instance.h:108
Instance & WithSupportCode(SupportCodeT &&value)
Definition Instance.h:88
const Aws::String & GetBundleId() const
Definition Instance.h:171
AWS_LIGHTSAIL_API Instance(Aws::Utils::Json::JsonView jsonValue)
Instance & WithIsStaticIp(bool value)
Definition Instance.h:201
const InstanceHardware & GetHardware() const
Definition Instance.h:258
Instance & WithBundleId(BundleIdT &&value)
Definition Instance.h:176
Instance & WithIpAddressType(IpAddressType value)
Definition Instance.h:251
ResourceType GetResourceType() const
Definition Instance.h:120
bool BlueprintNameHasBeenSet() const
Definition Instance.h:160
Instance & WithBlueprintName(BlueprintNameT &&value)
Definition Instance.h:164
void SetSshKeyName(SshKeyNameT &&value)
Definition Instance.h:311
void SetUsername(UsernameT &&value)
Definition Instance.h:298
bool SupportCodeHasBeenSet() const
Definition Instance.h:84
const Aws::String & GetUsername() const
Definition Instance.h:295
void SetLocation(LocationT &&value)
Definition Instance.h:111
Instance & WithAddOns(AddOnsT &&value)
Definition Instance.h:188
void SetMetadataOptions(MetadataOptionsT &&value)
Definition Instance.h:323
bool ResourceTypeHasBeenSet() const
Definition Instance.h:121
bool PublicIpAddressHasBeenSet() const
Definition Instance.h:221
Instance & WithLocation(LocationT &&value)
Definition Instance.h:113
bool MetadataOptionsHasBeenSet() const
Definition Instance.h:321
void SetIpv6Addresses(Ipv6AddressesT &&value)
Definition Instance.h:235
Instance & WithResourceType(ResourceType value)
Definition Instance.h:123
Instance & WithName(NameT &&value)
Definition Instance.h:61
Instance & AddTags(TagsT &&value)
Definition Instance.h:140
const Aws::Vector< AddOn > & GetAddOns() const
Definition Instance.h:183
Instance & WithIpv6Addresses(Ipv6AddressesT &&value)
Definition Instance.h:237
void SetBundleId(BundleIdT &&value)
Definition Instance.h:174
Instance & WithPrivateIpAddress(PrivateIpAddressT &&value)
Definition Instance.h:213
const Aws::String & GetPrivateIpAddress() const
Definition Instance.h:208
bool PrivateIpAddressHasBeenSet() const
Definition Instance.h:209
void SetIsStaticIp(bool value)
Definition Instance.h:200
Instance & WithMetadataOptions(MetadataOptionsT &&value)
Definition Instance.h:325
Instance & WithPublicIpAddress(PublicIpAddressT &&value)
Definition Instance.h:225
const Aws::String & GetBlueprintName() const
Definition Instance.h:159
const Aws::String & GetSupportCode() const
Definition Instance.h:83
Instance & WithArn(ArnT &&value)
Definition Instance.h:74
void SetIpAddressType(IpAddressType value)
Definition Instance.h:250
const Aws::String & GetArn() const
Definition Instance.h:69
void SetAddOns(AddOnsT &&value)
Definition Instance.h:186
void SetHardware(HardwareT &&value)
Definition Instance.h:261
Instance & WithHardware(HardwareT &&value)
Definition Instance.h:263
const Aws::Vector< Tag > & GetTags() const
Definition Instance.h:133
void SetBlueprintId(BlueprintIdT &&value)
Definition Instance.h:150
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Instance.h:96
void SetBlueprintName(BlueprintNameT &&value)
Definition Instance.h:162
AWS_LIGHTSAIL_API Instance & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetSshKeyName() const
Definition Instance.h:308
IpAddressType GetIpAddressType() const
Definition Instance.h:248
void SetArn(ArnT &&value)
Definition Instance.h:72
const InstanceNetworking & GetNetworking() const
Definition Instance.h:271
void SetPublicIpAddress(PublicIpAddressT &&value)
Definition Instance.h:223
Instance & WithNetworking(NetworkingT &&value)
Definition Instance.h:276
void SetName(NameT &&value)
Definition Instance.h:59
void SetResourceType(ResourceType value)
Definition Instance.h:122
Instance & WithCreatedAt(CreatedAtT &&value)
Definition Instance.h:101
const InstanceState & GetState() const
Definition Instance.h:283
Instance & WithTags(TagsT &&value)
Definition Instance.h:138
void SetState(StateT &&value)
Definition Instance.h:286
void SetSupportCode(SupportCodeT &&value)
Definition Instance.h:86
const Aws::Vector< Aws::String > & GetIpv6Addresses() const
Definition Instance.h:232
Instance & WithUsername(UsernameT &&value)
Definition Instance.h:300
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue