1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/ec2/model/UserBucketDetails.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19   class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace EC2
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Details about the import snapshot task.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SnapshotTaskDetail">AWS
30    * API Reference</a></p>
31    */
32   class AWS_EC2_API SnapshotTaskDetail
33   {
34   public:
35     SnapshotTaskDetail();
36     SnapshotTaskDetail(const Aws::Utils::Xml::XmlNode& xmlNode);
37     SnapshotTaskDetail& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
38 
39     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40     void OutputToStream(Aws::OStream& oStream, const char* location) const;
41 
42 
43     /**
44      * <p>The description of the snapshot.</p>
45      */
GetDescription()46     inline const Aws::String& GetDescription() const{ return m_description; }
47 
48     /**
49      * <p>The description of the snapshot.</p>
50      */
DescriptionHasBeenSet()51     inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
52 
53     /**
54      * <p>The description of the snapshot.</p>
55      */
SetDescription(const Aws::String & value)56     inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
57 
58     /**
59      * <p>The description of the snapshot.</p>
60      */
SetDescription(Aws::String && value)61     inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
62 
63     /**
64      * <p>The description of the snapshot.</p>
65      */
SetDescription(const char * value)66     inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
67 
68     /**
69      * <p>The description of the snapshot.</p>
70      */
WithDescription(const Aws::String & value)71     inline SnapshotTaskDetail& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
72 
73     /**
74      * <p>The description of the snapshot.</p>
75      */
WithDescription(Aws::String && value)76     inline SnapshotTaskDetail& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
77 
78     /**
79      * <p>The description of the snapshot.</p>
80      */
WithDescription(const char * value)81     inline SnapshotTaskDetail& WithDescription(const char* value) { SetDescription(value); return *this;}
82 
83 
84     /**
85      * <p>The size of the disk in the snapshot, in GiB.</p>
86      */
GetDiskImageSize()87     inline double GetDiskImageSize() const{ return m_diskImageSize; }
88 
89     /**
90      * <p>The size of the disk in the snapshot, in GiB.</p>
91      */
DiskImageSizeHasBeenSet()92     inline bool DiskImageSizeHasBeenSet() const { return m_diskImageSizeHasBeenSet; }
93 
94     /**
95      * <p>The size of the disk in the snapshot, in GiB.</p>
96      */
SetDiskImageSize(double value)97     inline void SetDiskImageSize(double value) { m_diskImageSizeHasBeenSet = true; m_diskImageSize = value; }
98 
99     /**
100      * <p>The size of the disk in the snapshot, in GiB.</p>
101      */
WithDiskImageSize(double value)102     inline SnapshotTaskDetail& WithDiskImageSize(double value) { SetDiskImageSize(value); return *this;}
103 
104 
105     /**
106      * <p>Indicates whether the snapshot is encrypted.</p>
107      */
GetEncrypted()108     inline bool GetEncrypted() const{ return m_encrypted; }
109 
110     /**
111      * <p>Indicates whether the snapshot is encrypted.</p>
112      */
EncryptedHasBeenSet()113     inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
114 
115     /**
116      * <p>Indicates whether the snapshot is encrypted.</p>
117      */
SetEncrypted(bool value)118     inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
119 
120     /**
121      * <p>Indicates whether the snapshot is encrypted.</p>
122      */
WithEncrypted(bool value)123     inline SnapshotTaskDetail& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
124 
125 
126     /**
127      * <p>The format of the disk image from which the snapshot is created.</p>
128      */
GetFormat()129     inline const Aws::String& GetFormat() const{ return m_format; }
130 
131     /**
132      * <p>The format of the disk image from which the snapshot is created.</p>
133      */
FormatHasBeenSet()134     inline bool FormatHasBeenSet() const { return m_formatHasBeenSet; }
135 
136     /**
137      * <p>The format of the disk image from which the snapshot is created.</p>
138      */
SetFormat(const Aws::String & value)139     inline void SetFormat(const Aws::String& value) { m_formatHasBeenSet = true; m_format = value; }
140 
141     /**
142      * <p>The format of the disk image from which the snapshot is created.</p>
143      */
SetFormat(Aws::String && value)144     inline void SetFormat(Aws::String&& value) { m_formatHasBeenSet = true; m_format = std::move(value); }
145 
146     /**
147      * <p>The format of the disk image from which the snapshot is created.</p>
148      */
SetFormat(const char * value)149     inline void SetFormat(const char* value) { m_formatHasBeenSet = true; m_format.assign(value); }
150 
151     /**
152      * <p>The format of the disk image from which the snapshot is created.</p>
153      */
WithFormat(const Aws::String & value)154     inline SnapshotTaskDetail& WithFormat(const Aws::String& value) { SetFormat(value); return *this;}
155 
156     /**
157      * <p>The format of the disk image from which the snapshot is created.</p>
158      */
WithFormat(Aws::String && value)159     inline SnapshotTaskDetail& WithFormat(Aws::String&& value) { SetFormat(std::move(value)); return *this;}
160 
161     /**
162      * <p>The format of the disk image from which the snapshot is created.</p>
163      */
WithFormat(const char * value)164     inline SnapshotTaskDetail& WithFormat(const char* value) { SetFormat(value); return *this;}
165 
166 
167     /**
168      * <p>The identifier for the KMS key that was used to create the encrypted
169      * snapshot.</p>
170      */
GetKmsKeyId()171     inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
172 
173     /**
174      * <p>The identifier for the KMS key that was used to create the encrypted
175      * snapshot.</p>
176      */
KmsKeyIdHasBeenSet()177     inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
178 
179     /**
180      * <p>The identifier for the KMS key that was used to create the encrypted
181      * snapshot.</p>
182      */
SetKmsKeyId(const Aws::String & value)183     inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
184 
185     /**
186      * <p>The identifier for the KMS key that was used to create the encrypted
187      * snapshot.</p>
188      */
SetKmsKeyId(Aws::String && value)189     inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }
190 
191     /**
192      * <p>The identifier for the KMS key that was used to create the encrypted
193      * snapshot.</p>
194      */
SetKmsKeyId(const char * value)195     inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
196 
197     /**
198      * <p>The identifier for the KMS key that was used to create the encrypted
199      * snapshot.</p>
200      */
WithKmsKeyId(const Aws::String & value)201     inline SnapshotTaskDetail& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
202 
203     /**
204      * <p>The identifier for the KMS key that was used to create the encrypted
205      * snapshot.</p>
206      */
WithKmsKeyId(Aws::String && value)207     inline SnapshotTaskDetail& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
208 
209     /**
210      * <p>The identifier for the KMS key that was used to create the encrypted
211      * snapshot.</p>
212      */
WithKmsKeyId(const char * value)213     inline SnapshotTaskDetail& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
214 
215 
216     /**
217      * <p>The percentage of completion for the import snapshot task.</p>
218      */
GetProgress()219     inline const Aws::String& GetProgress() const{ return m_progress; }
220 
221     /**
222      * <p>The percentage of completion for the import snapshot task.</p>
223      */
ProgressHasBeenSet()224     inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; }
225 
226     /**
227      * <p>The percentage of completion for the import snapshot task.</p>
228      */
SetProgress(const Aws::String & value)229     inline void SetProgress(const Aws::String& value) { m_progressHasBeenSet = true; m_progress = value; }
230 
231     /**
232      * <p>The percentage of completion for the import snapshot task.</p>
233      */
SetProgress(Aws::String && value)234     inline void SetProgress(Aws::String&& value) { m_progressHasBeenSet = true; m_progress = std::move(value); }
235 
236     /**
237      * <p>The percentage of completion for the import snapshot task.</p>
238      */
SetProgress(const char * value)239     inline void SetProgress(const char* value) { m_progressHasBeenSet = true; m_progress.assign(value); }
240 
241     /**
242      * <p>The percentage of completion for the import snapshot task.</p>
243      */
WithProgress(const Aws::String & value)244     inline SnapshotTaskDetail& WithProgress(const Aws::String& value) { SetProgress(value); return *this;}
245 
246     /**
247      * <p>The percentage of completion for the import snapshot task.</p>
248      */
WithProgress(Aws::String && value)249     inline SnapshotTaskDetail& WithProgress(Aws::String&& value) { SetProgress(std::move(value)); return *this;}
250 
251     /**
252      * <p>The percentage of completion for the import snapshot task.</p>
253      */
WithProgress(const char * value)254     inline SnapshotTaskDetail& WithProgress(const char* value) { SetProgress(value); return *this;}
255 
256 
257     /**
258      * <p>The snapshot ID of the disk being imported.</p>
259      */
GetSnapshotId()260     inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
261 
262     /**
263      * <p>The snapshot ID of the disk being imported.</p>
264      */
SnapshotIdHasBeenSet()265     inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
266 
267     /**
268      * <p>The snapshot ID of the disk being imported.</p>
269      */
SetSnapshotId(const Aws::String & value)270     inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
271 
272     /**
273      * <p>The snapshot ID of the disk being imported.</p>
274      */
SetSnapshotId(Aws::String && value)275     inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); }
276 
277     /**
278      * <p>The snapshot ID of the disk being imported.</p>
279      */
SetSnapshotId(const char * value)280     inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
281 
282     /**
283      * <p>The snapshot ID of the disk being imported.</p>
284      */
WithSnapshotId(const Aws::String & value)285     inline SnapshotTaskDetail& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
286 
287     /**
288      * <p>The snapshot ID of the disk being imported.</p>
289      */
WithSnapshotId(Aws::String && value)290     inline SnapshotTaskDetail& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;}
291 
292     /**
293      * <p>The snapshot ID of the disk being imported.</p>
294      */
WithSnapshotId(const char * value)295     inline SnapshotTaskDetail& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
296 
297 
298     /**
299      * <p>A brief status for the import snapshot task.</p>
300      */
GetStatus()301     inline const Aws::String& GetStatus() const{ return m_status; }
302 
303     /**
304      * <p>A brief status for the import snapshot task.</p>
305      */
StatusHasBeenSet()306     inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
307 
308     /**
309      * <p>A brief status for the import snapshot task.</p>
310      */
SetStatus(const Aws::String & value)311     inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; }
312 
313     /**
314      * <p>A brief status for the import snapshot task.</p>
315      */
SetStatus(Aws::String && value)316     inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
317 
318     /**
319      * <p>A brief status for the import snapshot task.</p>
320      */
SetStatus(const char * value)321     inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); }
322 
323     /**
324      * <p>A brief status for the import snapshot task.</p>
325      */
WithStatus(const Aws::String & value)326     inline SnapshotTaskDetail& WithStatus(const Aws::String& value) { SetStatus(value); return *this;}
327 
328     /**
329      * <p>A brief status for the import snapshot task.</p>
330      */
WithStatus(Aws::String && value)331     inline SnapshotTaskDetail& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;}
332 
333     /**
334      * <p>A brief status for the import snapshot task.</p>
335      */
WithStatus(const char * value)336     inline SnapshotTaskDetail& WithStatus(const char* value) { SetStatus(value); return *this;}
337 
338 
339     /**
340      * <p>A detailed status message for the import snapshot task.</p>
341      */
GetStatusMessage()342     inline const Aws::String& GetStatusMessage() const{ return m_statusMessage; }
343 
344     /**
345      * <p>A detailed status message for the import snapshot task.</p>
346      */
StatusMessageHasBeenSet()347     inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
348 
349     /**
350      * <p>A detailed status message for the import snapshot task.</p>
351      */
SetStatusMessage(const Aws::String & value)352     inline void SetStatusMessage(const Aws::String& value) { m_statusMessageHasBeenSet = true; m_statusMessage = value; }
353 
354     /**
355      * <p>A detailed status message for the import snapshot task.</p>
356      */
SetStatusMessage(Aws::String && value)357     inline void SetStatusMessage(Aws::String&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::move(value); }
358 
359     /**
360      * <p>A detailed status message for the import snapshot task.</p>
361      */
SetStatusMessage(const char * value)362     inline void SetStatusMessage(const char* value) { m_statusMessageHasBeenSet = true; m_statusMessage.assign(value); }
363 
364     /**
365      * <p>A detailed status message for the import snapshot task.</p>
366      */
WithStatusMessage(const Aws::String & value)367     inline SnapshotTaskDetail& WithStatusMessage(const Aws::String& value) { SetStatusMessage(value); return *this;}
368 
369     /**
370      * <p>A detailed status message for the import snapshot task.</p>
371      */
WithStatusMessage(Aws::String && value)372     inline SnapshotTaskDetail& WithStatusMessage(Aws::String&& value) { SetStatusMessage(std::move(value)); return *this;}
373 
374     /**
375      * <p>A detailed status message for the import snapshot task.</p>
376      */
WithStatusMessage(const char * value)377     inline SnapshotTaskDetail& WithStatusMessage(const char* value) { SetStatusMessage(value); return *this;}
378 
379 
380     /**
381      * <p>The URL of the disk image from which the snapshot is created.</p>
382      */
GetUrl()383     inline const Aws::String& GetUrl() const{ return m_url; }
384 
385     /**
386      * <p>The URL of the disk image from which the snapshot is created.</p>
387      */
UrlHasBeenSet()388     inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
389 
390     /**
391      * <p>The URL of the disk image from which the snapshot is created.</p>
392      */
SetUrl(const Aws::String & value)393     inline void SetUrl(const Aws::String& value) { m_urlHasBeenSet = true; m_url = value; }
394 
395     /**
396      * <p>The URL of the disk image from which the snapshot is created.</p>
397      */
SetUrl(Aws::String && value)398     inline void SetUrl(Aws::String&& value) { m_urlHasBeenSet = true; m_url = std::move(value); }
399 
400     /**
401      * <p>The URL of the disk image from which the snapshot is created.</p>
402      */
SetUrl(const char * value)403     inline void SetUrl(const char* value) { m_urlHasBeenSet = true; m_url.assign(value); }
404 
405     /**
406      * <p>The URL of the disk image from which the snapshot is created.</p>
407      */
WithUrl(const Aws::String & value)408     inline SnapshotTaskDetail& WithUrl(const Aws::String& value) { SetUrl(value); return *this;}
409 
410     /**
411      * <p>The URL of the disk image from which the snapshot is created.</p>
412      */
WithUrl(Aws::String && value)413     inline SnapshotTaskDetail& WithUrl(Aws::String&& value) { SetUrl(std::move(value)); return *this;}
414 
415     /**
416      * <p>The URL of the disk image from which the snapshot is created.</p>
417      */
WithUrl(const char * value)418     inline SnapshotTaskDetail& WithUrl(const char* value) { SetUrl(value); return *this;}
419 
420 
421     /**
422      * <p>The Amazon S3 bucket for the disk image.</p>
423      */
GetUserBucket()424     inline const UserBucketDetails& GetUserBucket() const{ return m_userBucket; }
425 
426     /**
427      * <p>The Amazon S3 bucket for the disk image.</p>
428      */
UserBucketHasBeenSet()429     inline bool UserBucketHasBeenSet() const { return m_userBucketHasBeenSet; }
430 
431     /**
432      * <p>The Amazon S3 bucket for the disk image.</p>
433      */
SetUserBucket(const UserBucketDetails & value)434     inline void SetUserBucket(const UserBucketDetails& value) { m_userBucketHasBeenSet = true; m_userBucket = value; }
435 
436     /**
437      * <p>The Amazon S3 bucket for the disk image.</p>
438      */
SetUserBucket(UserBucketDetails && value)439     inline void SetUserBucket(UserBucketDetails&& value) { m_userBucketHasBeenSet = true; m_userBucket = std::move(value); }
440 
441     /**
442      * <p>The Amazon S3 bucket for the disk image.</p>
443      */
WithUserBucket(const UserBucketDetails & value)444     inline SnapshotTaskDetail& WithUserBucket(const UserBucketDetails& value) { SetUserBucket(value); return *this;}
445 
446     /**
447      * <p>The Amazon S3 bucket for the disk image.</p>
448      */
WithUserBucket(UserBucketDetails && value)449     inline SnapshotTaskDetail& WithUserBucket(UserBucketDetails&& value) { SetUserBucket(std::move(value)); return *this;}
450 
451   private:
452 
453     Aws::String m_description;
454     bool m_descriptionHasBeenSet;
455 
456     double m_diskImageSize;
457     bool m_diskImageSizeHasBeenSet;
458 
459     bool m_encrypted;
460     bool m_encryptedHasBeenSet;
461 
462     Aws::String m_format;
463     bool m_formatHasBeenSet;
464 
465     Aws::String m_kmsKeyId;
466     bool m_kmsKeyIdHasBeenSet;
467 
468     Aws::String m_progress;
469     bool m_progressHasBeenSet;
470 
471     Aws::String m_snapshotId;
472     bool m_snapshotIdHasBeenSet;
473 
474     Aws::String m_status;
475     bool m_statusHasBeenSet;
476 
477     Aws::String m_statusMessage;
478     bool m_statusMessageHasBeenSet;
479 
480     Aws::String m_url;
481     bool m_urlHasBeenSet;
482 
483     UserBucketDetails m_userBucket;
484     bool m_userBucketHasBeenSet;
485   };
486 
487 } // namespace Model
488 } // namespace EC2
489 } // namespace Aws
490