AWS SDK for C++

AWS SDK for C++ Version 1.11.635

Loading...
Searching...
No Matches
Volume.h
1
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/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/model/VolumeType.h>
12#include <aws/ec2/model/SSEType.h>
13#include <aws/ec2/model/OperatorResponse.h>
14#include <aws/ec2/model/VolumeState.h>
15#include <aws/core/utils/DateTime.h>
16#include <aws/ec2/model/ResponseMetadata.h>
17#include <aws/ec2/model/Tag.h>
18#include <aws/ec2/model/VolumeAttachment.h>
19#include <utility>
20
21namespace Aws
22{
23namespace Utils
24{
25namespace Xml
26{
27 class XmlNode;
28} // namespace Xml
29} // namespace Utils
30namespace EC2
31{
32namespace Model
33{
34
40 class Volume
41 {
42 public:
43 AWS_EC2_API Volume() = default;
44 AWS_EC2_API Volume(const Aws::Utils::Xml::XmlNode& xmlNode);
45 AWS_EC2_API Volume& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46
47 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
49
50
52
55 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
56 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
57 template<typename AvailabilityZoneIdT = Aws::String>
58 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value); }
59 template<typename AvailabilityZoneIdT = Aws::String>
60 Volume& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) { SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value)); return *this;}
62
64
67 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
68 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
69 template<typename OutpostArnT = Aws::String>
70 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
71 template<typename OutpostArnT = Aws::String>
72 Volume& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
74
76
83 inline int GetIops() const { return m_iops; }
84 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
85 inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }
86 inline Volume& WithIops(int value) { SetIops(value); return *this;}
88
90
93 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
94 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
95 template<typename TagsT = Aws::Vector<Tag>>
96 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
97 template<typename TagsT = Aws::Vector<Tag>>
98 Volume& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
99 template<typename TagsT = Tag>
100 Volume& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
102
104
107 inline VolumeType GetVolumeType() const { return m_volumeType; }
108 inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
109 inline void SetVolumeType(VolumeType value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
110 inline Volume& WithVolumeType(VolumeType value) { SetVolumeType(value); return *this;}
112
114
118 inline bool GetFastRestored() const { return m_fastRestored; }
119 inline bool FastRestoredHasBeenSet() const { return m_fastRestoredHasBeenSet; }
120 inline void SetFastRestored(bool value) { m_fastRestoredHasBeenSet = true; m_fastRestored = value; }
121 inline Volume& WithFastRestored(bool value) { SetFastRestored(value); return *this;}
123
125
128 inline bool GetMultiAttachEnabled() const { return m_multiAttachEnabled; }
129 inline bool MultiAttachEnabledHasBeenSet() const { return m_multiAttachEnabledHasBeenSet; }
130 inline void SetMultiAttachEnabled(bool value) { m_multiAttachEnabledHasBeenSet = true; m_multiAttachEnabled = value; }
131 inline Volume& WithMultiAttachEnabled(bool value) { SetMultiAttachEnabled(value); return *this;}
133
135
138 inline int GetThroughput() const { return m_throughput; }
139 inline bool ThroughputHasBeenSet() const { return m_throughputHasBeenSet; }
140 inline void SetThroughput(int value) { m_throughputHasBeenSet = true; m_throughput = value; }
141 inline Volume& WithThroughput(int value) { SetThroughput(value); return *this;}
143
145
149 inline SSEType GetSseType() const { return m_sseType; }
150 inline bool SseTypeHasBeenSet() const { return m_sseTypeHasBeenSet; }
151 inline void SetSseType(SSEType value) { m_sseTypeHasBeenSet = true; m_sseType = value; }
152 inline Volume& WithSseType(SSEType value) { SetSseType(value); return *this;}
154
156
159 inline const OperatorResponse& GetOperator() const { return m_operator; }
160 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
161 template<typename OperatorT = OperatorResponse>
162 void SetOperator(OperatorT&& value) { m_operatorHasBeenSet = true; m_operator = std::forward<OperatorT>(value); }
163 template<typename OperatorT = OperatorResponse>
164 Volume& WithOperator(OperatorT&& value) { SetOperator(std::forward<OperatorT>(value)); return *this;}
166
168
173 inline int GetVolumeInitializationRate() const { return m_volumeInitializationRate; }
174 inline bool VolumeInitializationRateHasBeenSet() const { return m_volumeInitializationRateHasBeenSet; }
175 inline void SetVolumeInitializationRate(int value) { m_volumeInitializationRateHasBeenSet = true; m_volumeInitializationRate = value; }
176 inline Volume& WithVolumeInitializationRate(int value) { SetVolumeInitializationRate(value); return *this;}
178
180
183 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
184 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
185 template<typename VolumeIdT = Aws::String>
186 void SetVolumeId(VolumeIdT&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::forward<VolumeIdT>(value); }
187 template<typename VolumeIdT = Aws::String>
188 Volume& WithVolumeId(VolumeIdT&& value) { SetVolumeId(std::forward<VolumeIdT>(value)); return *this;}
190
192
195 inline int GetSize() const { return m_size; }
196 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
197 inline void SetSize(int value) { m_sizeHasBeenSet = true; m_size = value; }
198 inline Volume& WithSize(int value) { SetSize(value); return *this;}
200
202
205 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
206 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
207 template<typename SnapshotIdT = Aws::String>
208 void SetSnapshotId(SnapshotIdT&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::forward<SnapshotIdT>(value); }
209 template<typename SnapshotIdT = Aws::String>
210 Volume& WithSnapshotId(SnapshotIdT&& value) { SetSnapshotId(std::forward<SnapshotIdT>(value)); return *this;}
212
214
217 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
218 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
219 template<typename AvailabilityZoneT = Aws::String>
220 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
221 template<typename AvailabilityZoneT = Aws::String>
222 Volume& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
224
226
229 inline VolumeState GetState() const { return m_state; }
230 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
231 inline void SetState(VolumeState value) { m_stateHasBeenSet = true; m_state = value; }
232 inline Volume& WithState(VolumeState value) { SetState(value); return *this;}
234
236
239 inline const Aws::Utils::DateTime& GetCreateTime() const { return m_createTime; }
240 inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; }
241 template<typename CreateTimeT = Aws::Utils::DateTime>
242 void SetCreateTime(CreateTimeT&& value) { m_createTimeHasBeenSet = true; m_createTime = std::forward<CreateTimeT>(value); }
243 template<typename CreateTimeT = Aws::Utils::DateTime>
244 Volume& WithCreateTime(CreateTimeT&& value) { SetCreateTime(std::forward<CreateTimeT>(value)); return *this;}
246
248
252 inline const Aws::Vector<VolumeAttachment>& GetAttachments() const { return m_attachments; }
253 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
254 template<typename AttachmentsT = Aws::Vector<VolumeAttachment>>
255 void SetAttachments(AttachmentsT&& value) { m_attachmentsHasBeenSet = true; m_attachments = std::forward<AttachmentsT>(value); }
256 template<typename AttachmentsT = Aws::Vector<VolumeAttachment>>
257 Volume& WithAttachments(AttachmentsT&& value) { SetAttachments(std::forward<AttachmentsT>(value)); return *this;}
258 template<typename AttachmentsT = VolumeAttachment>
259 Volume& AddAttachments(AttachmentsT&& value) { m_attachmentsHasBeenSet = true; m_attachments.emplace_back(std::forward<AttachmentsT>(value)); return *this; }
261
263
266 inline bool GetEncrypted() const { return m_encrypted; }
267 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
268 inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
269 inline Volume& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
271
273
277 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
278 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
279 template<typename KmsKeyIdT = Aws::String>
280 void SetKmsKeyId(KmsKeyIdT&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::forward<KmsKeyIdT>(value); }
281 template<typename KmsKeyIdT = Aws::String>
282 Volume& WithKmsKeyId(KmsKeyIdT&& value) { SetKmsKeyId(std::forward<KmsKeyIdT>(value)); return *this;}
284
286
287 inline const ResponseMetadata& GetResponseMetadata() const { return m_responseMetadata; }
288 template<typename ResponseMetadataT = ResponseMetadata>
289 void SetResponseMetadata(ResponseMetadataT&& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = std::forward<ResponseMetadataT>(value); }
290 template<typename ResponseMetadataT = ResponseMetadata>
291 Volume& WithResponseMetadata(ResponseMetadataT&& value) { SetResponseMetadata(std::forward<ResponseMetadataT>(value)); return *this;}
293 private:
294
295 Aws::String m_availabilityZoneId;
296 bool m_availabilityZoneIdHasBeenSet = false;
297
298 Aws::String m_outpostArn;
299 bool m_outpostArnHasBeenSet = false;
300
301 int m_iops{0};
302 bool m_iopsHasBeenSet = false;
303
304 Aws::Vector<Tag> m_tags;
305 bool m_tagsHasBeenSet = false;
306
307 VolumeType m_volumeType{VolumeType::NOT_SET};
308 bool m_volumeTypeHasBeenSet = false;
309
310 bool m_fastRestored{false};
311 bool m_fastRestoredHasBeenSet = false;
312
313 bool m_multiAttachEnabled{false};
314 bool m_multiAttachEnabledHasBeenSet = false;
315
316 int m_throughput{0};
317 bool m_throughputHasBeenSet = false;
318
319 SSEType m_sseType{SSEType::NOT_SET};
320 bool m_sseTypeHasBeenSet = false;
321
322 OperatorResponse m_operator;
323 bool m_operatorHasBeenSet = false;
324
325 int m_volumeInitializationRate{0};
326 bool m_volumeInitializationRateHasBeenSet = false;
327
328 Aws::String m_volumeId;
329 bool m_volumeIdHasBeenSet = false;
330
331 int m_size{0};
332 bool m_sizeHasBeenSet = false;
333
334 Aws::String m_snapshotId;
335 bool m_snapshotIdHasBeenSet = false;
336
337 Aws::String m_availabilityZone;
338 bool m_availabilityZoneHasBeenSet = false;
339
341 bool m_stateHasBeenSet = false;
342
343 Aws::Utils::DateTime m_createTime{};
344 bool m_createTimeHasBeenSet = false;
345
346 Aws::Vector<VolumeAttachment> m_attachments;
347 bool m_attachmentsHasBeenSet = false;
348
349 bool m_encrypted{false};
350 bool m_encryptedHasBeenSet = false;
351
352 Aws::String m_kmsKeyId;
353 bool m_kmsKeyIdHasBeenSet = false;
354
355 ResponseMetadata m_responseMetadata;
356 bool m_responseMetadataHasBeenSet = true;
357 };
358
359} // namespace Model
360} // namespace EC2
361} // namespace Aws
const Aws::Vector< Tag > & GetTags() const
Definition Volume.h:93
void SetAttachments(AttachmentsT &&value)
Definition Volume.h:255
void SetMultiAttachEnabled(bool value)
Definition Volume.h:130
void SetOperator(OperatorT &&value)
Definition Volume.h:162
Volume & WithTags(TagsT &&value)
Definition Volume.h:98
bool SseTypeHasBeenSet() const
Definition Volume.h:150
bool GetFastRestored() const
Definition Volume.h:118
void SetVolumeId(VolumeIdT &&value)
Definition Volume.h:186
Volume & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Volume.h:60
bool VolumeTypeHasBeenSet() const
Definition Volume.h:108
void SetSnapshotId(SnapshotIdT &&value)
Definition Volume.h:208
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Volume.h:58
void SetVolumeInitializationRate(int value)
Definition Volume.h:175
SSEType GetSseType() const
Definition Volume.h:149
Volume & WithOutpostArn(OutpostArnT &&value)
Definition Volume.h:72
Volume & WithOperator(OperatorT &&value)
Definition Volume.h:164
const Aws::String & GetKmsKeyId() const
Definition Volume.h:277
bool GetEncrypted() const
Definition Volume.h:266
bool MultiAttachEnabledHasBeenSet() const
Definition Volume.h:129
Volume & WithSnapshotId(SnapshotIdT &&value)
Definition Volume.h:210
Volume & WithThroughput(int value)
Definition Volume.h:141
Volume & AddAttachments(AttachmentsT &&value)
Definition Volume.h:259
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition Volume.h:220
bool AttachmentsHasBeenSet() const
Definition Volume.h:253
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Volume & WithFastRestored(bool value)
Definition Volume.h:121
bool KmsKeyIdHasBeenSet() const
Definition Volume.h:278
Volume & AddTags(TagsT &&value)
Definition Volume.h:100
Volume & WithAttachments(AttachmentsT &&value)
Definition Volume.h:257
Volume & WithSize(int value)
Definition Volume.h:198
bool OperatorHasBeenSet() const
Definition Volume.h:160
bool VolumeIdHasBeenSet() const
Definition Volume.h:184
const Aws::Utils::DateTime & GetCreateTime() const
Definition Volume.h:239
Volume & WithIops(int value)
Definition Volume.h:86
int GetThroughput() const
Definition Volume.h:138
void SetFastRestored(bool value)
Definition Volume.h:120
int GetIops() const
Definition Volume.h:83
const Aws::String & GetSnapshotId() const
Definition Volume.h:205
AWS_EC2_API Volume()=default
const Aws::String & GetVolumeId() const
Definition Volume.h:183
const Aws::String & GetAvailabilityZoneId() const
Definition Volume.h:55
Volume & WithKmsKeyId(KmsKeyIdT &&value)
Definition Volume.h:282
Volume & WithState(VolumeState value)
Definition Volume.h:232
bool AvailabilityZoneHasBeenSet() const
Definition Volume.h:218
void SetSseType(SSEType value)
Definition Volume.h:151
int GetSize() const
Definition Volume.h:195
AWS_EC2_API Volume(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetResponseMetadata(ResponseMetadataT &&value)
Definition Volume.h:289
Volume & WithMultiAttachEnabled(bool value)
Definition Volume.h:131
void SetOutpostArn(OutpostArnT &&value)
Definition Volume.h:70
bool SizeHasBeenSet() const
Definition Volume.h:196
void SetState(VolumeState value)
Definition Volume.h:231
bool AvailabilityZoneIdHasBeenSet() const
Definition Volume.h:56
Volume & WithCreateTime(CreateTimeT &&value)
Definition Volume.h:244
const Aws::Vector< VolumeAttachment > & GetAttachments() const
Definition Volume.h:252
bool IopsHasBeenSet() const
Definition Volume.h:84
Volume & WithVolumeId(VolumeIdT &&value)
Definition Volume.h:188
const Aws::String & GetOutpostArn() const
Definition Volume.h:67
int GetVolumeInitializationRate() const
Definition Volume.h:173
bool SnapshotIdHasBeenSet() const
Definition Volume.h:206
bool StateHasBeenSet() const
Definition Volume.h:230
void SetCreateTime(CreateTimeT &&value)
Definition Volume.h:242
AWS_EC2_API Volume & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool FastRestoredHasBeenSet() const
Definition Volume.h:119
bool GetMultiAttachEnabled() const
Definition Volume.h:128
void SetThroughput(int value)
Definition Volume.h:140
Volume & WithVolumeType(VolumeType value)
Definition Volume.h:110
void SetTags(TagsT &&value)
Definition Volume.h:96
Volume & WithVolumeInitializationRate(int value)
Definition Volume.h:176
Volume & WithSseType(SSEType value)
Definition Volume.h:152
bool VolumeInitializationRateHasBeenSet() const
Definition Volume.h:174
void SetVolumeType(VolumeType value)
Definition Volume.h:109
VolumeType GetVolumeType() const
Definition Volume.h:107
bool EncryptedHasBeenSet() const
Definition Volume.h:267
const Aws::String & GetAvailabilityZone() const
Definition Volume.h:217
bool CreateTimeHasBeenSet() const
Definition Volume.h:240
void SetEncrypted(bool value)
Definition Volume.h:268
bool OutpostArnHasBeenSet() const
Definition Volume.h:68
bool ThroughputHasBeenSet() const
Definition Volume.h:139
void SetKmsKeyId(KmsKeyIdT &&value)
Definition Volume.h:280
void SetIops(int value)
Definition Volume.h:85
Volume & WithEncrypted(bool value)
Definition Volume.h:269
VolumeState GetState() const
Definition Volume.h:229
const OperatorResponse & GetOperator() const
Definition Volume.h:159
void SetSize(int value)
Definition Volume.h:197
bool TagsHasBeenSet() const
Definition Volume.h:94
Volume & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Volume.h:222
Volume & WithResponseMetadata(ResponseMetadataT &&value)
Definition Volume.h:291
const ResponseMetadata & GetResponseMetadata() const
Definition Volume.h:287
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