AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
InstanceSnapshot.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/InstanceSnapshotState.h>
14#include <aws/lightsail/model/Tag.h>
15#include <aws/lightsail/model/Disk.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Json
23{
24 class JsonValue;
25 class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace Lightsail
29{
30namespace Model
31{
32
39 {
40 public:
41 AWS_LIGHTSAIL_API InstanceSnapshot() = default;
42 AWS_LIGHTSAIL_API InstanceSnapshot(Aws::Utils::Json::JsonView jsonValue);
44 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
45
46
48
51 inline const Aws::String& GetName() const { return m_name; }
52 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
53 template<typename NameT = Aws::String>
54 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
55 template<typename NameT = Aws::String>
56 InstanceSnapshot& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
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) { m_arnHasBeenSet = true; m_arn = std::forward<ArnT>(value); }
68 template<typename ArnT = Aws::String>
69 InstanceSnapshot& WithArn(ArnT&& value) { SetArn(std::forward<ArnT>(value)); return *this;}
71
73
78 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
79 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
80 template<typename SupportCodeT = Aws::String>
81 void SetSupportCode(SupportCodeT&& value) { m_supportCodeHasBeenSet = true; m_supportCode = std::forward<SupportCodeT>(value); }
82 template<typename SupportCodeT = Aws::String>
83 InstanceSnapshot& WithSupportCode(SupportCodeT&& value) { SetSupportCode(std::forward<SupportCodeT>(value)); return *this;}
85
87
91 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
92 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
93 template<typename CreatedAtT = Aws::Utils::DateTime>
94 void SetCreatedAt(CreatedAtT&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::forward<CreatedAtT>(value); }
95 template<typename CreatedAtT = Aws::Utils::DateTime>
96 InstanceSnapshot& WithCreatedAt(CreatedAtT&& value) { SetCreatedAt(std::forward<CreatedAtT>(value)); return *this;}
98
100
103 inline const ResourceLocation& GetLocation() const { return m_location; }
104 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
105 template<typename LocationT = ResourceLocation>
106 void SetLocation(LocationT&& value) { m_locationHasBeenSet = true; m_location = std::forward<LocationT>(value); }
107 template<typename LocationT = ResourceLocation>
108 InstanceSnapshot& WithLocation(LocationT&& value) { SetLocation(std::forward<LocationT>(value)); return *this;}
110
112
115 inline ResourceType GetResourceType() const { return m_resourceType; }
116 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
117 inline void SetResourceType(ResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
118 inline InstanceSnapshot& WithResourceType(ResourceType value) { SetResourceType(value); return *this;}
120
122
128 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
129 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
130 template<typename TagsT = Aws::Vector<Tag>>
131 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
132 template<typename TagsT = Aws::Vector<Tag>>
133 InstanceSnapshot& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
134 template<typename TagsT = Tag>
135 InstanceSnapshot& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
137
139
142 inline InstanceSnapshotState GetState() const { return m_state; }
143 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
144 inline void SetState(InstanceSnapshotState value) { m_stateHasBeenSet = true; m_state = value; }
145 inline InstanceSnapshot& WithState(InstanceSnapshotState value) { SetState(value); return *this;}
147
149
153 inline const Aws::String& GetProgress() const { return m_progress; }
154 inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; }
155 template<typename ProgressT = Aws::String>
156 void SetProgress(ProgressT&& value) { m_progressHasBeenSet = true; m_progress = std::forward<ProgressT>(value); }
157 template<typename ProgressT = Aws::String>
158 InstanceSnapshot& WithProgress(ProgressT&& value) { SetProgress(std::forward<ProgressT>(value)); return *this;}
160
162
166 inline const Aws::Vector<Disk>& GetFromAttachedDisks() const { return m_fromAttachedDisks; }
167 inline bool FromAttachedDisksHasBeenSet() const { return m_fromAttachedDisksHasBeenSet; }
168 template<typename FromAttachedDisksT = Aws::Vector<Disk>>
169 void SetFromAttachedDisks(FromAttachedDisksT&& value) { m_fromAttachedDisksHasBeenSet = true; m_fromAttachedDisks = std::forward<FromAttachedDisksT>(value); }
170 template<typename FromAttachedDisksT = Aws::Vector<Disk>>
171 InstanceSnapshot& WithFromAttachedDisks(FromAttachedDisksT&& value) { SetFromAttachedDisks(std::forward<FromAttachedDisksT>(value)); return *this;}
172 template<typename FromAttachedDisksT = Disk>
173 InstanceSnapshot& AddFromAttachedDisks(FromAttachedDisksT&& value) { m_fromAttachedDisksHasBeenSet = true; m_fromAttachedDisks.emplace_back(std::forward<FromAttachedDisksT>(value)); return *this; }
175
177
180 inline const Aws::String& GetFromInstanceName() const { return m_fromInstanceName; }
181 inline bool FromInstanceNameHasBeenSet() const { return m_fromInstanceNameHasBeenSet; }
182 template<typename FromInstanceNameT = Aws::String>
183 void SetFromInstanceName(FromInstanceNameT&& value) { m_fromInstanceNameHasBeenSet = true; m_fromInstanceName = std::forward<FromInstanceNameT>(value); }
184 template<typename FromInstanceNameT = Aws::String>
185 InstanceSnapshot& WithFromInstanceName(FromInstanceNameT&& value) { SetFromInstanceName(std::forward<FromInstanceNameT>(value)); return *this;}
187
189
194 inline const Aws::String& GetFromInstanceArn() const { return m_fromInstanceArn; }
195 inline bool FromInstanceArnHasBeenSet() const { return m_fromInstanceArnHasBeenSet; }
196 template<typename FromInstanceArnT = Aws::String>
197 void SetFromInstanceArn(FromInstanceArnT&& value) { m_fromInstanceArnHasBeenSet = true; m_fromInstanceArn = std::forward<FromInstanceArnT>(value); }
198 template<typename FromInstanceArnT = Aws::String>
199 InstanceSnapshot& WithFromInstanceArn(FromInstanceArnT&& value) { SetFromInstanceArn(std::forward<FromInstanceArnT>(value)); return *this;}
201
203
208 inline const Aws::String& GetFromBlueprintId() const { return m_fromBlueprintId; }
209 inline bool FromBlueprintIdHasBeenSet() const { return m_fromBlueprintIdHasBeenSet; }
210 template<typename FromBlueprintIdT = Aws::String>
211 void SetFromBlueprintId(FromBlueprintIdT&& value) { m_fromBlueprintIdHasBeenSet = true; m_fromBlueprintId = std::forward<FromBlueprintIdT>(value); }
212 template<typename FromBlueprintIdT = Aws::String>
213 InstanceSnapshot& WithFromBlueprintId(FromBlueprintIdT&& value) { SetFromBlueprintId(std::forward<FromBlueprintIdT>(value)); return *this;}
215
217
221 inline const Aws::String& GetFromBundleId() const { return m_fromBundleId; }
222 inline bool FromBundleIdHasBeenSet() const { return m_fromBundleIdHasBeenSet; }
223 template<typename FromBundleIdT = Aws::String>
224 void SetFromBundleId(FromBundleIdT&& value) { m_fromBundleIdHasBeenSet = true; m_fromBundleId = std::forward<FromBundleIdT>(value); }
225 template<typename FromBundleIdT = Aws::String>
226 InstanceSnapshot& WithFromBundleId(FromBundleIdT&& value) { SetFromBundleId(std::forward<FromBundleIdT>(value)); return *this;}
228
230
234 inline bool GetIsFromAutoSnapshot() const { return m_isFromAutoSnapshot; }
235 inline bool IsFromAutoSnapshotHasBeenSet() const { return m_isFromAutoSnapshotHasBeenSet; }
236 inline void SetIsFromAutoSnapshot(bool value) { m_isFromAutoSnapshotHasBeenSet = true; m_isFromAutoSnapshot = value; }
237 inline InstanceSnapshot& WithIsFromAutoSnapshot(bool value) { SetIsFromAutoSnapshot(value); return *this;}
239
241
244 inline int GetSizeInGb() const { return m_sizeInGb; }
245 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
246 inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; }
247 inline InstanceSnapshot& WithSizeInGb(int value) { SetSizeInGb(value); return *this;}
249 private:
250
251 Aws::String m_name;
252 bool m_nameHasBeenSet = false;
253
254 Aws::String m_arn;
255 bool m_arnHasBeenSet = false;
256
257 Aws::String m_supportCode;
258 bool m_supportCodeHasBeenSet = false;
259
260 Aws::Utils::DateTime m_createdAt{};
261 bool m_createdAtHasBeenSet = false;
262
263 ResourceLocation m_location;
264 bool m_locationHasBeenSet = false;
265
266 ResourceType m_resourceType{ResourceType::NOT_SET};
267 bool m_resourceTypeHasBeenSet = false;
268
269 Aws::Vector<Tag> m_tags;
270 bool m_tagsHasBeenSet = false;
271
273 bool m_stateHasBeenSet = false;
274
275 Aws::String m_progress;
276 bool m_progressHasBeenSet = false;
277
278 Aws::Vector<Disk> m_fromAttachedDisks;
279 bool m_fromAttachedDisksHasBeenSet = false;
280
281 Aws::String m_fromInstanceName;
282 bool m_fromInstanceNameHasBeenSet = false;
283
284 Aws::String m_fromInstanceArn;
285 bool m_fromInstanceArnHasBeenSet = false;
286
287 Aws::String m_fromBlueprintId;
288 bool m_fromBlueprintIdHasBeenSet = false;
289
290 Aws::String m_fromBundleId;
291 bool m_fromBundleIdHasBeenSet = false;
292
293 bool m_isFromAutoSnapshot{false};
294 bool m_isFromAutoSnapshotHasBeenSet = false;
295
296 int m_sizeInGb{0};
297 bool m_sizeInGbHasBeenSet = false;
298 };
299
300} // namespace Model
301} // namespace Lightsail
302} // 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