AWS SDK for C++

AWS SDK for C++ Version 1.11.687

Loading...
Searching...
No Matches
DiskSnapshot.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/DiskSnapshotState.h>
12#include <aws/lightsail/model/ResourceLocation.h>
13#include <aws/lightsail/model/ResourceType.h>
14#include <aws/lightsail/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace Lightsail {
26namespace Model {
27
34 public:
35 AWS_LIGHTSAIL_API DiskSnapshot() = default;
36 AWS_LIGHTSAIL_API DiskSnapshot(Aws::Utils::Json::JsonView jsonValue);
37 AWS_LIGHTSAIL_API DiskSnapshot& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::String& GetName() const { return m_name; }
45 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
46 template <typename NameT = Aws::String>
47 void SetName(NameT&& value) {
48 m_nameHasBeenSet = true;
49 m_name = std::forward<NameT>(value);
50 }
51 template <typename NameT = Aws::String>
52 DiskSnapshot& WithName(NameT&& value) {
53 SetName(std::forward<NameT>(value));
54 return *this;
55 }
57
59
62 inline const Aws::String& GetArn() const { return m_arn; }
63 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
64 template <typename ArnT = Aws::String>
65 void SetArn(ArnT&& value) {
66 m_arnHasBeenSet = true;
67 m_arn = std::forward<ArnT>(value);
68 }
69 template <typename ArnT = Aws::String>
70 DiskSnapshot& WithArn(ArnT&& value) {
71 SetArn(std::forward<ArnT>(value));
72 return *this;
73 }
75
77
82 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
83 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
84 template <typename SupportCodeT = Aws::String>
85 void SetSupportCode(SupportCodeT&& value) {
86 m_supportCodeHasBeenSet = true;
87 m_supportCode = std::forward<SupportCodeT>(value);
88 }
89 template <typename SupportCodeT = Aws::String>
90 DiskSnapshot& WithSupportCode(SupportCodeT&& value) {
91 SetSupportCode(std::forward<SupportCodeT>(value));
92 return *this;
93 }
95
97
100 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
101 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
102 template <typename CreatedAtT = Aws::Utils::DateTime>
103 void SetCreatedAt(CreatedAtT&& value) {
104 m_createdAtHasBeenSet = true;
105 m_createdAt = std::forward<CreatedAtT>(value);
106 }
107 template <typename CreatedAtT = Aws::Utils::DateTime>
108 DiskSnapshot& WithCreatedAt(CreatedAtT&& value) {
109 SetCreatedAt(std::forward<CreatedAtT>(value));
110 return *this;
111 }
113
115
118 inline const ResourceLocation& GetLocation() const { return m_location; }
119 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
120 template <typename LocationT = ResourceLocation>
121 void SetLocation(LocationT&& value) {
122 m_locationHasBeenSet = true;
123 m_location = std::forward<LocationT>(value);
124 }
125 template <typename LocationT = ResourceLocation>
126 DiskSnapshot& WithLocation(LocationT&& value) {
127 SetLocation(std::forward<LocationT>(value));
128 return *this;
129 }
131
133
136 inline ResourceType GetResourceType() const { return m_resourceType; }
137 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
138 inline void SetResourceType(ResourceType value) {
139 m_resourceTypeHasBeenSet = true;
140 m_resourceType = value;
141 }
143 SetResourceType(value);
144 return *this;
145 }
147
149
155 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
156 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
157 template <typename TagsT = Aws::Vector<Tag>>
158 void SetTags(TagsT&& value) {
159 m_tagsHasBeenSet = true;
160 m_tags = std::forward<TagsT>(value);
161 }
162 template <typename TagsT = Aws::Vector<Tag>>
163 DiskSnapshot& WithTags(TagsT&& value) {
164 SetTags(std::forward<TagsT>(value));
165 return *this;
166 }
167 template <typename TagsT = Tag>
168 DiskSnapshot& AddTags(TagsT&& value) {
169 m_tagsHasBeenSet = true;
170 m_tags.emplace_back(std::forward<TagsT>(value));
171 return *this;
172 }
174
176
179 inline int GetSizeInGb() const { return m_sizeInGb; }
180 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
181 inline void SetSizeInGb(int value) {
182 m_sizeInGbHasBeenSet = true;
183 m_sizeInGb = value;
184 }
185 inline DiskSnapshot& WithSizeInGb(int value) {
186 SetSizeInGb(value);
187 return *this;
188 }
190
192
195 inline DiskSnapshotState GetState() const { return m_state; }
196 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
197 inline void SetState(DiskSnapshotState value) {
198 m_stateHasBeenSet = true;
199 m_state = value;
200 }
202 SetState(value);
203 return *this;
204 }
206
208
211 inline const Aws::String& GetProgress() const { return m_progress; }
212 inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; }
213 template <typename ProgressT = Aws::String>
214 void SetProgress(ProgressT&& value) {
215 m_progressHasBeenSet = true;
216 m_progress = std::forward<ProgressT>(value);
217 }
218 template <typename ProgressT = Aws::String>
219 DiskSnapshot& WithProgress(ProgressT&& value) {
220 SetProgress(std::forward<ProgressT>(value));
221 return *this;
222 }
224
226
230 inline const Aws::String& GetFromDiskName() const { return m_fromDiskName; }
231 inline bool FromDiskNameHasBeenSet() const { return m_fromDiskNameHasBeenSet; }
232 template <typename FromDiskNameT = Aws::String>
233 void SetFromDiskName(FromDiskNameT&& value) {
234 m_fromDiskNameHasBeenSet = true;
235 m_fromDiskName = std::forward<FromDiskNameT>(value);
236 }
237 template <typename FromDiskNameT = Aws::String>
238 DiskSnapshot& WithFromDiskName(FromDiskNameT&& value) {
239 SetFromDiskName(std::forward<FromDiskNameT>(value));
240 return *this;
241 }
243
245
249 inline const Aws::String& GetFromDiskArn() const { return m_fromDiskArn; }
250 inline bool FromDiskArnHasBeenSet() const { return m_fromDiskArnHasBeenSet; }
251 template <typename FromDiskArnT = Aws::String>
252 void SetFromDiskArn(FromDiskArnT&& value) {
253 m_fromDiskArnHasBeenSet = true;
254 m_fromDiskArn = std::forward<FromDiskArnT>(value);
255 }
256 template <typename FromDiskArnT = Aws::String>
257 DiskSnapshot& WithFromDiskArn(FromDiskArnT&& value) {
258 SetFromDiskArn(std::forward<FromDiskArnT>(value));
259 return *this;
260 }
262
264
268 inline const Aws::String& GetFromInstanceName() const { return m_fromInstanceName; }
269 inline bool FromInstanceNameHasBeenSet() const { return m_fromInstanceNameHasBeenSet; }
270 template <typename FromInstanceNameT = Aws::String>
271 void SetFromInstanceName(FromInstanceNameT&& value) {
272 m_fromInstanceNameHasBeenSet = true;
273 m_fromInstanceName = std::forward<FromInstanceNameT>(value);
274 }
275 template <typename FromInstanceNameT = Aws::String>
276 DiskSnapshot& WithFromInstanceName(FromInstanceNameT&& value) {
277 SetFromInstanceName(std::forward<FromInstanceNameT>(value));
278 return *this;
279 }
281
283
287 inline const Aws::String& GetFromInstanceArn() const { return m_fromInstanceArn; }
288 inline bool FromInstanceArnHasBeenSet() const { return m_fromInstanceArnHasBeenSet; }
289 template <typename FromInstanceArnT = Aws::String>
290 void SetFromInstanceArn(FromInstanceArnT&& value) {
291 m_fromInstanceArnHasBeenSet = true;
292 m_fromInstanceArn = std::forward<FromInstanceArnT>(value);
293 }
294 template <typename FromInstanceArnT = Aws::String>
295 DiskSnapshot& WithFromInstanceArn(FromInstanceArnT&& value) {
296 SetFromInstanceArn(std::forward<FromInstanceArnT>(value));
297 return *this;
298 }
300
302
306 inline bool GetIsFromAutoSnapshot() const { return m_isFromAutoSnapshot; }
307 inline bool IsFromAutoSnapshotHasBeenSet() const { return m_isFromAutoSnapshotHasBeenSet; }
308 inline void SetIsFromAutoSnapshot(bool value) {
309 m_isFromAutoSnapshotHasBeenSet = true;
310 m_isFromAutoSnapshot = value;
311 }
314 return *this;
315 }
317 private:
318 Aws::String m_name;
319 bool m_nameHasBeenSet = false;
320
321 Aws::String m_arn;
322 bool m_arnHasBeenSet = false;
323
324 Aws::String m_supportCode;
325 bool m_supportCodeHasBeenSet = false;
326
327 Aws::Utils::DateTime m_createdAt{};
328 bool m_createdAtHasBeenSet = false;
329
330 ResourceLocation m_location;
331 bool m_locationHasBeenSet = false;
332
333 ResourceType m_resourceType{ResourceType::NOT_SET};
334 bool m_resourceTypeHasBeenSet = false;
335
336 Aws::Vector<Tag> m_tags;
337 bool m_tagsHasBeenSet = false;
338
339 int m_sizeInGb{0};
340 bool m_sizeInGbHasBeenSet = false;
341
343 bool m_stateHasBeenSet = false;
344
345 Aws::String m_progress;
346 bool m_progressHasBeenSet = false;
347
348 Aws::String m_fromDiskName;
349 bool m_fromDiskNameHasBeenSet = false;
350
351 Aws::String m_fromDiskArn;
352 bool m_fromDiskArnHasBeenSet = false;
353
354 Aws::String m_fromInstanceName;
355 bool m_fromInstanceNameHasBeenSet = false;
356
357 Aws::String m_fromInstanceArn;
358 bool m_fromInstanceArnHasBeenSet = false;
359
360 bool m_isFromAutoSnapshot{false};
361 bool m_isFromAutoSnapshotHasBeenSet = false;
362};
363
364} // namespace Model
365} // namespace Lightsail
366} // namespace Aws
DiskSnapshot & WithIsFromAutoSnapshot(bool value)
DiskSnapshot & WithProgress(ProgressT &&value)
const Aws::String & GetProgress() const
DiskSnapshot & WithSupportCode(SupportCodeT &&value)
DiskSnapshot & WithLocation(LocationT &&value)
DiskSnapshot & WithCreatedAt(CreatedAtT &&value)
const Aws::String & GetFromDiskName() const
void SetProgress(ProgressT &&value)
void SetSupportCode(SupportCodeT &&value)
void SetLocation(LocationT &&value)
void SetFromDiskName(FromDiskNameT &&value)
const Aws::String & GetFromInstanceArn() const
void SetResourceType(ResourceType value)
DiskSnapshot & WithResourceType(ResourceType value)
DiskSnapshot & WithFromDiskArn(FromDiskArnT &&value)
AWS_LIGHTSAIL_API DiskSnapshot & operator=(Aws::Utils::Json::JsonView jsonValue)
DiskSnapshot & WithState(DiskSnapshotState value)
DiskSnapshot & WithFromInstanceName(FromInstanceNameT &&value)
const Aws::String & GetSupportCode() const
const Aws::String & GetFromInstanceName() const
const Aws::String & GetFromDiskArn() const
void SetState(DiskSnapshotState value)
void SetCreatedAt(CreatedAtT &&value)
DiskSnapshot & WithFromInstanceArn(FromInstanceArnT &&value)
void SetFromInstanceName(FromInstanceNameT &&value)
DiskSnapshot & WithFromDiskName(FromDiskNameT &&value)
DiskSnapshot & WithName(NameT &&value)
const Aws::Vector< Tag > & GetTags() const
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
DiskSnapshot & WithSizeInGb(int value)
const Aws::String & GetArn() const
void SetFromDiskArn(FromDiskArnT &&value)
ResourceType GetResourceType() const
AWS_LIGHTSAIL_API DiskSnapshot()=default
void SetFromInstanceArn(FromInstanceArnT &&value)
DiskSnapshot & AddTags(TagsT &&value)
const ResourceLocation & GetLocation() const
AWS_LIGHTSAIL_API DiskSnapshot(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetName() const
DiskSnapshot & WithTags(TagsT &&value)
DiskSnapshotState GetState() const
DiskSnapshot & WithArn(ArnT &&value)
const Aws::Utils::DateTime & GetCreatedAt() 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