AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
SnapshotInfo.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/SSEType.h>
13#include <aws/ec2/model/SnapshotState.h>
14#include <aws/ec2/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Xml {
21class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2 {
25namespace Model {
26
33 public:
34 AWS_EC2_API SnapshotInfo() = default;
35 AWS_EC2_API SnapshotInfo(const Aws::Utils::Xml::XmlNode& xmlNode);
36 AWS_EC2_API SnapshotInfo& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
46 inline const Aws::String& GetDescription() const { return m_description; }
47 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
48 template <typename DescriptionT = Aws::String>
49 void SetDescription(DescriptionT&& value) {
50 m_descriptionHasBeenSet = true;
51 m_description = std::forward<DescriptionT>(value);
52 }
53 template <typename DescriptionT = Aws::String>
54 SnapshotInfo& WithDescription(DescriptionT&& value) {
55 SetDescription(std::forward<DescriptionT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
65 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
66 template <typename TagsT = Aws::Vector<Tag>>
67 void SetTags(TagsT&& value) {
68 m_tagsHasBeenSet = true;
69 m_tags = std::forward<TagsT>(value);
70 }
71 template <typename TagsT = Aws::Vector<Tag>>
72 SnapshotInfo& WithTags(TagsT&& value) {
73 SetTags(std::forward<TagsT>(value));
74 return *this;
75 }
76 template <typename TagsT = Tag>
77 SnapshotInfo& AddTags(TagsT&& value) {
78 m_tagsHasBeenSet = true;
79 m_tags.emplace_back(std::forward<TagsT>(value));
80 return *this;
81 }
83
85
88 inline bool GetEncrypted() const { return m_encrypted; }
89 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
90 inline void SetEncrypted(bool value) {
91 m_encryptedHasBeenSet = true;
92 m_encrypted = value;
93 }
94 inline SnapshotInfo& WithEncrypted(bool value) {
95 SetEncrypted(value);
96 return *this;
97 }
99
101
104 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
105 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
106 template <typename VolumeIdT = Aws::String>
107 void SetVolumeId(VolumeIdT&& value) {
108 m_volumeIdHasBeenSet = true;
109 m_volumeId = std::forward<VolumeIdT>(value);
110 }
111 template <typename VolumeIdT = Aws::String>
112 SnapshotInfo& WithVolumeId(VolumeIdT&& value) {
113 SetVolumeId(std::forward<VolumeIdT>(value));
114 return *this;
115 }
117
119
122 inline SnapshotState GetState() const { return m_state; }
123 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
124 inline void SetState(SnapshotState value) {
125 m_stateHasBeenSet = true;
126 m_state = value;
127 }
129 SetState(value);
130 return *this;
131 }
133
135
138 inline int GetVolumeSize() const { return m_volumeSize; }
139 inline bool VolumeSizeHasBeenSet() const { return m_volumeSizeHasBeenSet; }
140 inline void SetVolumeSize(int value) {
141 m_volumeSizeHasBeenSet = true;
142 m_volumeSize = value;
143 }
144 inline SnapshotInfo& WithVolumeSize(int value) {
145 SetVolumeSize(value);
146 return *this;
147 }
149
151
155 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
156 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
157 template <typename StartTimeT = Aws::Utils::DateTime>
158 void SetStartTime(StartTimeT&& value) {
159 m_startTimeHasBeenSet = true;
160 m_startTime = std::forward<StartTimeT>(value);
161 }
162 template <typename StartTimeT = Aws::Utils::DateTime>
163 SnapshotInfo& WithStartTime(StartTimeT&& value) {
164 SetStartTime(std::forward<StartTimeT>(value));
165 return *this;
166 }
168
170
173 inline const Aws::String& GetProgress() const { return m_progress; }
174 inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; }
175 template <typename ProgressT = Aws::String>
176 void SetProgress(ProgressT&& value) {
177 m_progressHasBeenSet = true;
178 m_progress = std::forward<ProgressT>(value);
179 }
180 template <typename ProgressT = Aws::String>
181 SnapshotInfo& WithProgress(ProgressT&& value) {
182 SetProgress(std::forward<ProgressT>(value));
183 return *this;
184 }
186
188
191 inline const Aws::String& GetOwnerId() const { return m_ownerId; }
192 inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; }
193 template <typename OwnerIdT = Aws::String>
194 void SetOwnerId(OwnerIdT&& value) {
195 m_ownerIdHasBeenSet = true;
196 m_ownerId = std::forward<OwnerIdT>(value);
197 }
198 template <typename OwnerIdT = Aws::String>
199 SnapshotInfo& WithOwnerId(OwnerIdT&& value) {
200 SetOwnerId(std::forward<OwnerIdT>(value));
201 return *this;
202 }
204
206
209 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
210 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
211 template <typename SnapshotIdT = Aws::String>
212 void SetSnapshotId(SnapshotIdT&& value) {
213 m_snapshotIdHasBeenSet = true;
214 m_snapshotId = std::forward<SnapshotIdT>(value);
215 }
216 template <typename SnapshotIdT = Aws::String>
217 SnapshotInfo& WithSnapshotId(SnapshotIdT&& value) {
218 SetSnapshotId(std::forward<SnapshotIdT>(value));
219 return *this;
220 }
222
224
230 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
231 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
232 template <typename OutpostArnT = Aws::String>
233 void SetOutpostArn(OutpostArnT&& value) {
234 m_outpostArnHasBeenSet = true;
235 m_outpostArn = std::forward<OutpostArnT>(value);
236 }
237 template <typename OutpostArnT = Aws::String>
238 SnapshotInfo& WithOutpostArn(OutpostArnT&& value) {
239 SetOutpostArn(std::forward<OutpostArnT>(value));
240 return *this;
241 }
243
245
248 inline SSEType GetSseType() const { return m_sseType; }
249 inline bool SseTypeHasBeenSet() const { return m_sseTypeHasBeenSet; }
250 inline void SetSseType(SSEType value) {
251 m_sseTypeHasBeenSet = true;
252 m_sseType = value;
253 }
255 SetSseType(value);
256 return *this;
257 }
259
261
266 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
267 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
268 template <typename AvailabilityZoneT = Aws::String>
269 void SetAvailabilityZone(AvailabilityZoneT&& value) {
270 m_availabilityZoneHasBeenSet = true;
271 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
272 }
273 template <typename AvailabilityZoneT = Aws::String>
274 SnapshotInfo& WithAvailabilityZone(AvailabilityZoneT&& value) {
275 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
276 return *this;
277 }
279 private:
280 Aws::String m_description;
281
282 Aws::Vector<Tag> m_tags;
283
284 bool m_encrypted{false};
285
286 Aws::String m_volumeId;
287
289
290 int m_volumeSize{0};
291
292 Aws::Utils::DateTime m_startTime{};
293
294 Aws::String m_progress;
295
296 Aws::String m_ownerId;
297
298 Aws::String m_snapshotId;
299
300 Aws::String m_outpostArn;
301
302 SSEType m_sseType{SSEType::NOT_SET};
303
304 Aws::String m_availabilityZone;
305 bool m_descriptionHasBeenSet = false;
306 bool m_tagsHasBeenSet = false;
307 bool m_encryptedHasBeenSet = false;
308 bool m_volumeIdHasBeenSet = false;
309 bool m_stateHasBeenSet = false;
310 bool m_volumeSizeHasBeenSet = false;
311 bool m_startTimeHasBeenSet = false;
312 bool m_progressHasBeenSet = false;
313 bool m_ownerIdHasBeenSet = false;
314 bool m_snapshotIdHasBeenSet = false;
315 bool m_outpostArnHasBeenSet = false;
316 bool m_sseTypeHasBeenSet = false;
317 bool m_availabilityZoneHasBeenSet = false;
318};
319
320} // namespace Model
321} // namespace EC2
322} // namespace Aws
void SetSnapshotId(SnapshotIdT &&value)
void SetOutpostArn(OutpostArnT &&value)
SnapshotInfo & WithEncrypted(bool value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetTags(TagsT &&value)
void SetStartTime(StartTimeT &&value)
SnapshotInfo & WithVolumeId(VolumeIdT &&value)
SnapshotInfo & WithProgress(ProgressT &&value)
const Aws::String & GetDescription() const
SnapshotInfo & WithOwnerId(OwnerIdT &&value)
bool AvailabilityZoneHasBeenSet() const
void SetDescription(DescriptionT &&value)
SnapshotInfo & AddTags(TagsT &&value)
SnapshotInfo & WithTags(TagsT &&value)
SnapshotInfo & WithSnapshotId(SnapshotIdT &&value)
const Aws::String & GetVolumeId() const
void SetSseType(SSEType value)
AWS_EC2_API SnapshotInfo(const Aws::Utils::Xml::XmlNode &xmlNode)
SnapshotInfo & WithAvailabilityZone(AvailabilityZoneT &&value)
void SetAvailabilityZone(AvailabilityZoneT &&value)
const Aws::String & GetSnapshotId() const
const Aws::String & GetProgress() const
void SetVolumeId(VolumeIdT &&value)
const Aws::String & GetOutpostArn() const
const Aws::Vector< Tag > & GetTags() const
void SetOwnerId(OwnerIdT &&value)
void SetProgress(ProgressT &&value)
SnapshotInfo & WithState(SnapshotState value)
SnapshotInfo & WithStartTime(StartTimeT &&value)
SnapshotState GetState() const
AWS_EC2_API SnapshotInfo & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetState(SnapshotState value)
SnapshotInfo & WithOutpostArn(OutpostArnT &&value)
SnapshotInfo & WithSseType(SSEType value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
SnapshotInfo & WithVolumeSize(int value)
SnapshotInfo & WithDescription(DescriptionT &&value)
const Aws::String & GetAvailabilityZone() const
const Aws::Utils::DateTime & GetStartTime() const
AWS_EC2_API SnapshotInfo()=default
void SetEncrypted(bool value)
const Aws::String & GetOwnerId() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream