AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
InstanceSnapshot.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/Disk.h>
12#include <aws/lightsail/model/InstanceSnapshotState.h>
13#include <aws/lightsail/model/ResourceLocation.h>
14#include <aws/lightsail/model/ResourceType.h>
15#include <aws/lightsail/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace Lightsail {
27namespace Model {
28
35 public:
36 AWS_LIGHTSAIL_API InstanceSnapshot() = default;
37 AWS_LIGHTSAIL_API InstanceSnapshot(Aws::Utils::Json::JsonView jsonValue);
39 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::String& GetName() const { return m_name; }
46 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
47 template <typename NameT = Aws::String>
48 void SetName(NameT&& value) {
49 m_nameHasBeenSet = true;
50 m_name = std::forward<NameT>(value);
51 }
52 template <typename NameT = Aws::String>
53 InstanceSnapshot& WithName(NameT&& value) {
54 SetName(std::forward<NameT>(value));
55 return *this;
56 }
58
60
64 inline const Aws::String& GetArn() const { return m_arn; }
65 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
66 template <typename ArnT = Aws::String>
67 void SetArn(ArnT&& value) {
68 m_arnHasBeenSet = true;
69 m_arn = std::forward<ArnT>(value);
70 }
71 template <typename ArnT = Aws::String>
72 InstanceSnapshot& WithArn(ArnT&& value) {
73 SetArn(std::forward<ArnT>(value));
74 return *this;
75 }
77
79
84 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
85 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
86 template <typename SupportCodeT = Aws::String>
87 void SetSupportCode(SupportCodeT&& value) {
88 m_supportCodeHasBeenSet = true;
89 m_supportCode = std::forward<SupportCodeT>(value);
90 }
91 template <typename SupportCodeT = Aws::String>
92 InstanceSnapshot& WithSupportCode(SupportCodeT&& value) {
93 SetSupportCode(std::forward<SupportCodeT>(value));
94 return *this;
95 }
97
99
103 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
104 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
105 template <typename CreatedAtT = Aws::Utils::DateTime>
106 void SetCreatedAt(CreatedAtT&& value) {
107 m_createdAtHasBeenSet = true;
108 m_createdAt = std::forward<CreatedAtT>(value);
109 }
110 template <typename CreatedAtT = Aws::Utils::DateTime>
111 InstanceSnapshot& WithCreatedAt(CreatedAtT&& value) {
112 SetCreatedAt(std::forward<CreatedAtT>(value));
113 return *this;
114 }
116
118
121 inline const ResourceLocation& GetLocation() const { return m_location; }
122 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
123 template <typename LocationT = ResourceLocation>
124 void SetLocation(LocationT&& value) {
125 m_locationHasBeenSet = true;
126 m_location = std::forward<LocationT>(value);
127 }
128 template <typename LocationT = ResourceLocation>
129 InstanceSnapshot& WithLocation(LocationT&& value) {
130 SetLocation(std::forward<LocationT>(value));
131 return *this;
132 }
134
136
139 inline ResourceType GetResourceType() const { return m_resourceType; }
140 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
141 inline void SetResourceType(ResourceType value) {
142 m_resourceTypeHasBeenSet = true;
143 m_resourceType = value;
144 }
146 SetResourceType(value);
147 return *this;
148 }
150
152
158 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
159 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
160 template <typename TagsT = Aws::Vector<Tag>>
161 void SetTags(TagsT&& value) {
162 m_tagsHasBeenSet = true;
163 m_tags = std::forward<TagsT>(value);
164 }
165 template <typename TagsT = Aws::Vector<Tag>>
166 InstanceSnapshot& WithTags(TagsT&& value) {
167 SetTags(std::forward<TagsT>(value));
168 return *this;
169 }
170 template <typename TagsT = Tag>
171 InstanceSnapshot& AddTags(TagsT&& value) {
172 m_tagsHasBeenSet = true;
173 m_tags.emplace_back(std::forward<TagsT>(value));
174 return *this;
175 }
177
179
182 inline InstanceSnapshotState GetState() const { return m_state; }
183 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
184 inline void SetState(InstanceSnapshotState value) {
185 m_stateHasBeenSet = true;
186 m_state = value;
187 }
189 SetState(value);
190 return *this;
191 }
193
195
199 inline const Aws::String& GetProgress() const { return m_progress; }
200 inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; }
201 template <typename ProgressT = Aws::String>
202 void SetProgress(ProgressT&& value) {
203 m_progressHasBeenSet = true;
204 m_progress = std::forward<ProgressT>(value);
205 }
206 template <typename ProgressT = Aws::String>
207 InstanceSnapshot& WithProgress(ProgressT&& value) {
208 SetProgress(std::forward<ProgressT>(value));
209 return *this;
210 }
212
214
218 inline const Aws::Vector<Disk>& GetFromAttachedDisks() const { return m_fromAttachedDisks; }
219 inline bool FromAttachedDisksHasBeenSet() const { return m_fromAttachedDisksHasBeenSet; }
220 template <typename FromAttachedDisksT = Aws::Vector<Disk>>
221 void SetFromAttachedDisks(FromAttachedDisksT&& value) {
222 m_fromAttachedDisksHasBeenSet = true;
223 m_fromAttachedDisks = std::forward<FromAttachedDisksT>(value);
224 }
225 template <typename FromAttachedDisksT = Aws::Vector<Disk>>
226 InstanceSnapshot& WithFromAttachedDisks(FromAttachedDisksT&& value) {
227 SetFromAttachedDisks(std::forward<FromAttachedDisksT>(value));
228 return *this;
229 }
230 template <typename FromAttachedDisksT = Disk>
231 InstanceSnapshot& AddFromAttachedDisks(FromAttachedDisksT&& value) {
232 m_fromAttachedDisksHasBeenSet = true;
233 m_fromAttachedDisks.emplace_back(std::forward<FromAttachedDisksT>(value));
234 return *this;
235 }
237
239
242 inline const Aws::String& GetFromInstanceName() const { return m_fromInstanceName; }
243 inline bool FromInstanceNameHasBeenSet() const { return m_fromInstanceNameHasBeenSet; }
244 template <typename FromInstanceNameT = Aws::String>
245 void SetFromInstanceName(FromInstanceNameT&& value) {
246 m_fromInstanceNameHasBeenSet = true;
247 m_fromInstanceName = std::forward<FromInstanceNameT>(value);
248 }
249 template <typename FromInstanceNameT = Aws::String>
250 InstanceSnapshot& WithFromInstanceName(FromInstanceNameT&& value) {
251 SetFromInstanceName(std::forward<FromInstanceNameT>(value));
252 return *this;
253 }
255
257
262 inline const Aws::String& GetFromInstanceArn() const { return m_fromInstanceArn; }
263 inline bool FromInstanceArnHasBeenSet() const { return m_fromInstanceArnHasBeenSet; }
264 template <typename FromInstanceArnT = Aws::String>
265 void SetFromInstanceArn(FromInstanceArnT&& value) {
266 m_fromInstanceArnHasBeenSet = true;
267 m_fromInstanceArn = std::forward<FromInstanceArnT>(value);
268 }
269 template <typename FromInstanceArnT = Aws::String>
270 InstanceSnapshot& WithFromInstanceArn(FromInstanceArnT&& value) {
271 SetFromInstanceArn(std::forward<FromInstanceArnT>(value));
272 return *this;
273 }
275
277
282 inline const Aws::String& GetFromBlueprintId() const { return m_fromBlueprintId; }
283 inline bool FromBlueprintIdHasBeenSet() const { return m_fromBlueprintIdHasBeenSet; }
284 template <typename FromBlueprintIdT = Aws::String>
285 void SetFromBlueprintId(FromBlueprintIdT&& value) {
286 m_fromBlueprintIdHasBeenSet = true;
287 m_fromBlueprintId = std::forward<FromBlueprintIdT>(value);
288 }
289 template <typename FromBlueprintIdT = Aws::String>
290 InstanceSnapshot& WithFromBlueprintId(FromBlueprintIdT&& value) {
291 SetFromBlueprintId(std::forward<FromBlueprintIdT>(value));
292 return *this;
293 }
295
297
301 inline const Aws::String& GetFromBundleId() const { return m_fromBundleId; }
302 inline bool FromBundleIdHasBeenSet() const { return m_fromBundleIdHasBeenSet; }
303 template <typename FromBundleIdT = Aws::String>
304 void SetFromBundleId(FromBundleIdT&& value) {
305 m_fromBundleIdHasBeenSet = true;
306 m_fromBundleId = std::forward<FromBundleIdT>(value);
307 }
308 template <typename FromBundleIdT = Aws::String>
309 InstanceSnapshot& WithFromBundleId(FromBundleIdT&& value) {
310 SetFromBundleId(std::forward<FromBundleIdT>(value));
311 return *this;
312 }
314
316
320 inline bool GetIsFromAutoSnapshot() const { return m_isFromAutoSnapshot; }
321 inline bool IsFromAutoSnapshotHasBeenSet() const { return m_isFromAutoSnapshotHasBeenSet; }
322 inline void SetIsFromAutoSnapshot(bool value) {
323 m_isFromAutoSnapshotHasBeenSet = true;
324 m_isFromAutoSnapshot = value;
325 }
328 return *this;
329 }
331
333
336 inline int GetSizeInGb() const { return m_sizeInGb; }
337 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
338 inline void SetSizeInGb(int value) {
339 m_sizeInGbHasBeenSet = true;
340 m_sizeInGb = value;
341 }
342 inline InstanceSnapshot& WithSizeInGb(int value) {
343 SetSizeInGb(value);
344 return *this;
345 }
347 private:
348 Aws::String m_name;
349
350 Aws::String m_arn;
351
352 Aws::String m_supportCode;
353
354 Aws::Utils::DateTime m_createdAt{};
355
356 ResourceLocation m_location;
357
358 ResourceType m_resourceType{ResourceType::NOT_SET};
359
360 Aws::Vector<Tag> m_tags;
361
363
364 Aws::String m_progress;
365
366 Aws::Vector<Disk> m_fromAttachedDisks;
367
368 Aws::String m_fromInstanceName;
369
370 Aws::String m_fromInstanceArn;
371
372 Aws::String m_fromBlueprintId;
373
374 Aws::String m_fromBundleId;
375
376 bool m_isFromAutoSnapshot{false};
377
378 int m_sizeInGb{0};
379 bool m_nameHasBeenSet = false;
380 bool m_arnHasBeenSet = false;
381 bool m_supportCodeHasBeenSet = false;
382 bool m_createdAtHasBeenSet = false;
383 bool m_locationHasBeenSet = false;
384 bool m_resourceTypeHasBeenSet = false;
385 bool m_tagsHasBeenSet = false;
386 bool m_stateHasBeenSet = false;
387 bool m_progressHasBeenSet = false;
388 bool m_fromAttachedDisksHasBeenSet = false;
389 bool m_fromInstanceNameHasBeenSet = false;
390 bool m_fromInstanceArnHasBeenSet = false;
391 bool m_fromBlueprintIdHasBeenSet = false;
392 bool m_fromBundleIdHasBeenSet = false;
393 bool m_isFromAutoSnapshotHasBeenSet = false;
394 bool m_sizeInGbHasBeenSet = false;
395};
396
397} // namespace Model
398} // namespace Lightsail
399} // namespace Aws
const Aws::String & GetProgress() const
AWS_LIGHTSAIL_API InstanceSnapshot & operator=(Aws::Utils::Json::JsonView jsonValue)
InstanceSnapshot & WithArn(ArnT &&value)
void SetFromInstanceArn(FromInstanceArnT &&value)
InstanceSnapshot & WithIsFromAutoSnapshot(bool value)
InstanceSnapshot & WithProgress(ProgressT &&value)
InstanceSnapshot & WithResourceType(ResourceType value)
const ResourceLocation & GetLocation() const
void SetState(InstanceSnapshotState value)
AWS_LIGHTSAIL_API InstanceSnapshot(Aws::Utils::Json::JsonView jsonValue)
InstanceSnapshot & AddFromAttachedDisks(FromAttachedDisksT &&value)
const Aws::String & GetName() const
const Aws::String & GetSupportCode() const
InstanceSnapshot & WithState(InstanceSnapshotState value)
void SetSupportCode(SupportCodeT &&value)
InstanceSnapshot & WithSupportCode(SupportCodeT &&value)
InstanceSnapshot & WithFromInstanceArn(FromInstanceArnT &&value)
InstanceSnapshot & WithName(NameT &&value)
InstanceSnapshot & WithFromInstanceName(FromInstanceNameT &&value)
InstanceSnapshot & WithCreatedAt(CreatedAtT &&value)
void SetFromBlueprintId(FromBlueprintIdT &&value)
void SetFromAttachedDisks(FromAttachedDisksT &&value)
InstanceSnapshot & WithFromBundleId(FromBundleIdT &&value)
InstanceSnapshot & WithFromAttachedDisks(FromAttachedDisksT &&value)
InstanceSnapshot & WithSizeInGb(int value)
InstanceSnapshot & WithFromBlueprintId(FromBlueprintIdT &&value)
InstanceSnapshot & WithLocation(LocationT &&value)
void SetFromInstanceName(FromInstanceNameT &&value)
InstanceSnapshotState GetState() const
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
InstanceSnapshot & WithTags(TagsT &&value)
const Aws::String & GetFromInstanceName() const
const Aws::Utils::DateTime & GetCreatedAt() const
const Aws::Vector< Tag > & GetTags() const
const Aws::String & GetFromBundleId() const
const Aws::String & GetFromInstanceArn() const
InstanceSnapshot & AddTags(TagsT &&value)
const Aws::String & GetFromBlueprintId() const
const Aws::Vector< Disk > & GetFromAttachedDisks() const
void SetFromBundleId(FromBundleIdT &&value)
AWS_LIGHTSAIL_API InstanceSnapshot()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue