AWS SDK for C++  0.12.9
AWS SDK for C++
Snapshot.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
23 #include <aws/ec2/model/Tag.h>
24 
25 namespace Aws
26 {
27 namespace Utils
28 {
29 namespace Xml
30 {
31  class XmlNode;
32 } // namespace Xml
33 } // namespace Utils
34 namespace EC2
35 {
36 namespace Model
37 {
38 
43  {
44  public:
45  Snapshot();
46  Snapshot(const Aws::Utils::Xml::XmlNode& xmlNode);
47  Snapshot& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
48 
49  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
50  void OutputToStream(Aws::OStream& oStream, const char* location) const;
51 
56  inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
57 
62  inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
63 
68  inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
69 
74  inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
75 
80  inline Snapshot& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
81 
86  inline Snapshot& WithSnapshotId(Aws::String&& value) { SetSnapshotId(value); return *this;}
87 
92  inline Snapshot& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
93 
97  inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
98 
102  inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
103 
107  inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
108 
112  inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); }
113 
117  inline Snapshot& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
118 
122  inline Snapshot& WithVolumeId(Aws::String&& value) { SetVolumeId(value); return *this;}
123 
127  inline Snapshot& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
128 
132  inline const SnapshotState& GetState() const{ return m_state; }
133 
137  inline void SetState(const SnapshotState& value) { m_stateHasBeenSet = true; m_state = value; }
138 
142  inline void SetState(SnapshotState&& value) { m_stateHasBeenSet = true; m_state = value; }
143 
147  inline Snapshot& WithState(const SnapshotState& value) { SetState(value); return *this;}
148 
152  inline Snapshot& WithState(SnapshotState&& value) { SetState(value); return *this;}
153 
161  inline const Aws::String& GetStateMessage() const{ return m_stateMessage; }
162 
170  inline void SetStateMessage(const Aws::String& value) { m_stateMessageHasBeenSet = true; m_stateMessage = value; }
171 
179  inline void SetStateMessage(Aws::String&& value) { m_stateMessageHasBeenSet = true; m_stateMessage = value; }
180 
188  inline void SetStateMessage(const char* value) { m_stateMessageHasBeenSet = true; m_stateMessage.assign(value); }
189 
197  inline Snapshot& WithStateMessage(const Aws::String& value) { SetStateMessage(value); return *this;}
198 
206  inline Snapshot& WithStateMessage(Aws::String&& value) { SetStateMessage(value); return *this;}
207 
215  inline Snapshot& WithStateMessage(const char* value) { SetStateMessage(value); return *this;}
216 
220  inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; }
221 
225  inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; }
226 
230  inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = value; }
231 
235  inline Snapshot& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;}
236 
240  inline Snapshot& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(value); return *this;}
241 
245  inline const Aws::String& GetProgress() const{ return m_progress; }
246 
250  inline void SetProgress(const Aws::String& value) { m_progressHasBeenSet = true; m_progress = value; }
251 
255  inline void SetProgress(Aws::String&& value) { m_progressHasBeenSet = true; m_progress = value; }
256 
260  inline void SetProgress(const char* value) { m_progressHasBeenSet = true; m_progress.assign(value); }
261 
265  inline Snapshot& WithProgress(const Aws::String& value) { SetProgress(value); return *this;}
266 
270  inline Snapshot& WithProgress(Aws::String&& value) { SetProgress(value); return *this;}
271 
275  inline Snapshot& WithProgress(const char* value) { SetProgress(value); return *this;}
276 
280  inline const Aws::String& GetOwnerId() const{ return m_ownerId; }
281 
285  inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; }
286 
290  inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; }
291 
295  inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); }
296 
300  inline Snapshot& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;}
301 
305  inline Snapshot& WithOwnerId(Aws::String&& value) { SetOwnerId(value); return *this;}
306 
310  inline Snapshot& WithOwnerId(const char* value) { SetOwnerId(value); return *this;}
311 
315  inline const Aws::String& GetDescription() const{ return m_description; }
316 
320  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
321 
325  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = value; }
326 
330  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
331 
335  inline Snapshot& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
336 
340  inline Snapshot& WithDescription(Aws::String&& value) { SetDescription(value); return *this;}
341 
345  inline Snapshot& WithDescription(const char* value) { SetDescription(value); return *this;}
346 
350  inline long GetVolumeSize() const{ return m_volumeSize; }
351 
355  inline void SetVolumeSize(long value) { m_volumeSizeHasBeenSet = true; m_volumeSize = value; }
356 
360  inline Snapshot& WithVolumeSize(long value) { SetVolumeSize(value); return *this;}
361 
366  inline const Aws::String& GetOwnerAlias() const{ return m_ownerAlias; }
367 
372  inline void SetOwnerAlias(const Aws::String& value) { m_ownerAliasHasBeenSet = true; m_ownerAlias = value; }
373 
378  inline void SetOwnerAlias(Aws::String&& value) { m_ownerAliasHasBeenSet = true; m_ownerAlias = value; }
379 
384  inline void SetOwnerAlias(const char* value) { m_ownerAliasHasBeenSet = true; m_ownerAlias.assign(value); }
385 
390  inline Snapshot& WithOwnerAlias(const Aws::String& value) { SetOwnerAlias(value); return *this;}
391 
396  inline Snapshot& WithOwnerAlias(Aws::String&& value) { SetOwnerAlias(value); return *this;}
397 
402  inline Snapshot& WithOwnerAlias(const char* value) { SetOwnerAlias(value); return *this;}
403 
407  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
408 
412  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
413 
417  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = value; }
418 
422  inline Snapshot& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
423 
427  inline Snapshot& WithTags(Aws::Vector<Tag>&& value) { SetTags(value); return *this;}
428 
432  inline Snapshot& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
433 
437  inline Snapshot& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
438 
442  inline bool GetEncrypted() const{ return m_encrypted; }
443 
447  inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
448 
452  inline Snapshot& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
453 
459  inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
460 
466  inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
467 
473  inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
474 
480  inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
481 
487  inline Snapshot& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
488 
494  inline Snapshot& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(value); return *this;}
495 
501  inline Snapshot& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
502 
512  inline const Aws::String& GetDataEncryptionKeyId() const{ return m_dataEncryptionKeyId; }
513 
523  inline void SetDataEncryptionKeyId(const Aws::String& value) { m_dataEncryptionKeyIdHasBeenSet = true; m_dataEncryptionKeyId = value; }
524 
534  inline void SetDataEncryptionKeyId(Aws::String&& value) { m_dataEncryptionKeyIdHasBeenSet = true; m_dataEncryptionKeyId = value; }
535 
545  inline void SetDataEncryptionKeyId(const char* value) { m_dataEncryptionKeyIdHasBeenSet = true; m_dataEncryptionKeyId.assign(value); }
546 
556  inline Snapshot& WithDataEncryptionKeyId(const Aws::String& value) { SetDataEncryptionKeyId(value); return *this;}
557 
567  inline Snapshot& WithDataEncryptionKeyId(Aws::String&& value) { SetDataEncryptionKeyId(value); return *this;}
568 
578  inline Snapshot& WithDataEncryptionKeyId(const char* value) { SetDataEncryptionKeyId(value); return *this;}
579 
580 
581  inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
582 
583 
584  inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = value; }
585 
586 
587  inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = value; }
588 
589 
590  inline Snapshot& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
591 
592 
593  inline Snapshot& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(value); return *this;}
594 
595  private:
596  Aws::String m_snapshotId;
597  bool m_snapshotIdHasBeenSet;
598  Aws::String m_volumeId;
599  bool m_volumeIdHasBeenSet;
600  SnapshotState m_state;
601  bool m_stateHasBeenSet;
602  Aws::String m_stateMessage;
603  bool m_stateMessageHasBeenSet;
604  Aws::Utils::DateTime m_startTime;
605  bool m_startTimeHasBeenSet;
606  Aws::String m_progress;
607  bool m_progressHasBeenSet;
608  Aws::String m_ownerId;
609  bool m_ownerIdHasBeenSet;
610  Aws::String m_description;
611  bool m_descriptionHasBeenSet;
612  long m_volumeSize;
613  bool m_volumeSizeHasBeenSet;
614  Aws::String m_ownerAlias;
615  bool m_ownerAliasHasBeenSet;
616  Aws::Vector<Tag> m_tags;
617  bool m_tagsHasBeenSet;
618  bool m_encrypted;
619  bool m_encryptedHasBeenSet;
620  Aws::String m_kmsKeyId;
621  bool m_kmsKeyIdHasBeenSet;
622  Aws::String m_dataEncryptionKeyId;
623  bool m_dataEncryptionKeyIdHasBeenSet;
624  ResponseMetadata m_responseMetadata;
625  bool m_responseMetadataHasBeenSet;
626  };
627 
628 } // namespace Model
629 } // namespace EC2
630 } // namespace Aws
const Aws::String & GetStateMessage() const
Definition: Snapshot.h:161
Snapshot & WithKmsKeyId(const Aws::String &value)
Definition: Snapshot.h:487
Snapshot & WithVolumeId(const Aws::String &value)
Definition: Snapshot.h:117
const ResponseMetadata & GetResponseMetadata() const
Definition: Snapshot.h:581
const Aws::String & GetDataEncryptionKeyId() const
Definition: Snapshot.h:512
Snapshot & WithOwnerAlias(const char *value)
Definition: Snapshot.h:402
void SetStartTime(Aws::Utils::DateTime &&value)
Definition: Snapshot.h:230
Snapshot & WithStateMessage(Aws::String &&value)
Definition: Snapshot.h:206
void SetSnapshotId(const char *value)
Definition: Snapshot.h:74
const Aws::String & GetDescription() const
Definition: Snapshot.h:315
Snapshot & AddTags(const Tag &value)
Definition: Snapshot.h:432
const SnapshotState & GetState() const
Definition: Snapshot.h:132
void SetVolumeId(const char *value)
Definition: Snapshot.h:112
const Aws::Utils::DateTime & GetStartTime() const
Definition: Snapshot.h:220
Snapshot & WithOwnerId(Aws::String &&value)
Definition: Snapshot.h:305
void SetOwnerAlias(const Aws::String &value)
Definition: Snapshot.h:372
void SetDataEncryptionKeyId(const char *value)
Definition: Snapshot.h:545
void SetStartTime(const Aws::Utils::DateTime &value)
Definition: Snapshot.h:225
void SetTags(const Aws::Vector< Tag > &value)
Definition: Snapshot.h:412
void SetStateMessage(Aws::String &&value)
Definition: Snapshot.h:179
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
Snapshot & WithEncrypted(bool value)
Definition: Snapshot.h:452
Snapshot & WithProgress(const Aws::String &value)
Definition: Snapshot.h:265
void SetKmsKeyId(const Aws::String &value)
Definition: Snapshot.h:466
Snapshot & WithDataEncryptionKeyId(const char *value)
Definition: Snapshot.h:578
bool GetEncrypted() const
Definition: Snapshot.h:442
Snapshot & WithSnapshotId(const Aws::String &value)
Definition: Snapshot.h:80
void SetDescription(Aws::String &&value)
Definition: Snapshot.h:325
void SetProgress(Aws::String &&value)
Definition: Snapshot.h:255
Snapshot & WithVolumeSize(long value)
Definition: Snapshot.h:360
Snapshot & WithVolumeId(const char *value)
Definition: Snapshot.h:127
void SetOwnerId(Aws::String &&value)
Definition: Snapshot.h:290
Snapshot & WithTags(Aws::Vector< Tag > &&value)
Definition: Snapshot.h:427
Snapshot & WithStateMessage(const char *value)
Definition: Snapshot.h:215
void SetState(const SnapshotState &value)
Definition: Snapshot.h:137
Snapshot & WithResponseMetadata(ResponseMetadata &&value)
Definition: Snapshot.h:593
void SetSnapshotId(const Aws::String &value)
Definition: Snapshot.h:62
void SetDataEncryptionKeyId(const Aws::String &value)
Definition: Snapshot.h:523
Snapshot & WithOwnerId(const char *value)
Definition: Snapshot.h:310
Snapshot & WithProgress(const char *value)
Definition: Snapshot.h:275
void SetStateMessage(const char *value)
Definition: Snapshot.h:188
void SetVolumeId(Aws::String &&value)
Definition: Snapshot.h:107
Snapshot & WithDescription(const Aws::String &value)
Definition: Snapshot.h:335
void SetProgress(const Aws::String &value)
Definition: Snapshot.h:250
void SetOwnerId(const Aws::String &value)
Definition: Snapshot.h:285
const Aws::String & GetSnapshotId() const
Definition: Snapshot.h:56
Snapshot & WithStartTime(const Aws::Utils::DateTime &value)
Definition: Snapshot.h:235
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetState(SnapshotState &&value)
Definition: Snapshot.h:142
void SetStateMessage(const Aws::String &value)
Definition: Snapshot.h:170
const Aws::String & GetOwnerAlias() const
Definition: Snapshot.h:366
long GetVolumeSize() const
Definition: Snapshot.h:350
Snapshot & WithResponseMetadata(const ResponseMetadata &value)
Definition: Snapshot.h:590
Snapshot & WithStartTime(Aws::Utils::DateTime &&value)
Definition: Snapshot.h:240
void SetOwnerAlias(const char *value)
Definition: Snapshot.h:384
void SetDescription(const Aws::String &value)
Definition: Snapshot.h:320
Snapshot & WithStateMessage(const Aws::String &value)
Definition: Snapshot.h:197
Snapshot & WithVolumeId(Aws::String &&value)
Definition: Snapshot.h:122
void SetKmsKeyId(const char *value)
Definition: Snapshot.h:480
const Aws::String & GetOwnerId() const
Definition: Snapshot.h:280
void SetProgress(const char *value)
Definition: Snapshot.h:260
void SetResponseMetadata(const ResponseMetadata &value)
Definition: Snapshot.h:584
void SetKmsKeyId(Aws::String &&value)
Definition: Snapshot.h:473
Snapshot & WithDescription(Aws::String &&value)
Definition: Snapshot.h:340
Snapshot & WithDataEncryptionKeyId(Aws::String &&value)
Definition: Snapshot.h:567
void SetEncrypted(bool value)
Definition: Snapshot.h:447
void SetTags(Aws::Vector< Tag > &&value)
Definition: Snapshot.h:417
void SetDataEncryptionKeyId(Aws::String &&value)
Definition: Snapshot.h:534
Snapshot & AddTags(Tag &&value)
Definition: Snapshot.h:437
Snapshot & WithState(SnapshotState &&value)
Definition: Snapshot.h:152
void SetOwnerAlias(Aws::String &&value)
Definition: Snapshot.h:378
Snapshot & WithTags(const Aws::Vector< Tag > &value)
Definition: Snapshot.h:422
const Aws::String & GetProgress() const
Definition: Snapshot.h:245
Snapshot & WithOwnerAlias(const Aws::String &value)
Definition: Snapshot.h:390
Snapshot & WithKmsKeyId(Aws::String &&value)
Definition: Snapshot.h:494
Snapshot & WithOwnerId(const Aws::String &value)
Definition: Snapshot.h:300
Snapshot & WithSnapshotId(Aws::String &&value)
Definition: Snapshot.h:86
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Snapshot & WithOwnerAlias(Aws::String &&value)
Definition: Snapshot.h:396
Snapshot & WithProgress(Aws::String &&value)
Definition: Snapshot.h:270
Snapshot & WithSnapshotId(const char *value)
Definition: Snapshot.h:92
Snapshot & WithState(const SnapshotState &value)
Definition: Snapshot.h:147
Snapshot & WithDataEncryptionKeyId(const Aws::String &value)
Definition: Snapshot.h:556
void SetSnapshotId(Aws::String &&value)
Definition: Snapshot.h:68
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
void SetOwnerId(const char *value)
Definition: Snapshot.h:295
void SetVolumeId(const Aws::String &value)
Definition: Snapshot.h:102
const Aws::String & GetVolumeId() const
Definition: Snapshot.h:97
void SetResponseMetadata(ResponseMetadata &&value)
Definition: Snapshot.h:587
Snapshot & WithKmsKeyId(const char *value)
Definition: Snapshot.h:501
JSON (JavaScript Object Notation).
Snapshot & WithDescription(const char *value)
Definition: Snapshot.h:345
void SetVolumeSize(long value)
Definition: Snapshot.h:355
const Aws::Vector< Tag > & GetTags() const
Definition: Snapshot.h:407
void SetDescription(const char *value)
Definition: Snapshot.h:330
const Aws::String & GetKmsKeyId() const
Definition: Snapshot.h:459