AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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& GetOutpostArn() const { return m_outpostArn; }
56 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
57 template<typename OutpostArnT = Aws::String>
58 void SetOutpostArn(OutpostArnT&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::forward<OutpostArnT>(value); }
59 template<typename OutpostArnT = Aws::String>
60 Volume& WithOutpostArn(OutpostArnT&& value) { SetOutpostArn(std::forward<OutpostArnT>(value)); return *this;}
62
64
71 inline int GetIops() const { return m_iops; }
72 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
73 inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }
74 inline Volume& WithIops(int value) { SetIops(value); return *this;}
76
78
81 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
82 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
83 template<typename TagsT = Aws::Vector<Tag>>
84 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
85 template<typename TagsT = Aws::Vector<Tag>>
86 Volume& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
87 template<typename TagsT = Tag>
88 Volume& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
90
92
95 inline VolumeType GetVolumeType() const { return m_volumeType; }
96 inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
97 inline void SetVolumeType(VolumeType value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
98 inline Volume& WithVolumeType(VolumeType value) { SetVolumeType(value); return *this;}
100
102
106 inline bool GetFastRestored() const { return m_fastRestored; }
107 inline bool FastRestoredHasBeenSet() const { return m_fastRestoredHasBeenSet; }
108 inline void SetFastRestored(bool value) { m_fastRestoredHasBeenSet = true; m_fastRestored = value; }
109 inline Volume& WithFastRestored(bool value) { SetFastRestored(value); return *this;}
111
113
116 inline bool GetMultiAttachEnabled() const { return m_multiAttachEnabled; }
117 inline bool MultiAttachEnabledHasBeenSet() const { return m_multiAttachEnabledHasBeenSet; }
118 inline void SetMultiAttachEnabled(bool value) { m_multiAttachEnabledHasBeenSet = true; m_multiAttachEnabled = value; }
119 inline Volume& WithMultiAttachEnabled(bool value) { SetMultiAttachEnabled(value); return *this;}
121
123
126 inline int GetThroughput() const { return m_throughput; }
127 inline bool ThroughputHasBeenSet() const { return m_throughputHasBeenSet; }
128 inline void SetThroughput(int value) { m_throughputHasBeenSet = true; m_throughput = value; }
129 inline Volume& WithThroughput(int value) { SetThroughput(value); return *this;}
131
133
137 inline SSEType GetSseType() const { return m_sseType; }
138 inline bool SseTypeHasBeenSet() const { return m_sseTypeHasBeenSet; }
139 inline void SetSseType(SSEType value) { m_sseTypeHasBeenSet = true; m_sseType = value; }
140 inline Volume& WithSseType(SSEType value) { SetSseType(value); return *this;}
142
144
147 inline const OperatorResponse& GetOperator() const { return m_operator; }
148 inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
149 template<typename OperatorT = OperatorResponse>
150 void SetOperator(OperatorT&& value) { m_operatorHasBeenSet = true; m_operator = std::forward<OperatorT>(value); }
151 template<typename OperatorT = OperatorResponse>
152 Volume& WithOperator(OperatorT&& value) { SetOperator(std::forward<OperatorT>(value)); return *this;}
154
156
161 inline int GetVolumeInitializationRate() const { return m_volumeInitializationRate; }
162 inline bool VolumeInitializationRateHasBeenSet() const { return m_volumeInitializationRateHasBeenSet; }
163 inline void SetVolumeInitializationRate(int value) { m_volumeInitializationRateHasBeenSet = true; m_volumeInitializationRate = value; }
164 inline Volume& WithVolumeInitializationRate(int value) { SetVolumeInitializationRate(value); return *this;}
166
168
171 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
172 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
173 template<typename VolumeIdT = Aws::String>
174 void SetVolumeId(VolumeIdT&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::forward<VolumeIdT>(value); }
175 template<typename VolumeIdT = Aws::String>
176 Volume& WithVolumeId(VolumeIdT&& value) { SetVolumeId(std::forward<VolumeIdT>(value)); return *this;}
178
180
183 inline int GetSize() const { return m_size; }
184 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
185 inline void SetSize(int value) { m_sizeHasBeenSet = true; m_size = value; }
186 inline Volume& WithSize(int value) { SetSize(value); return *this;}
188
190
193 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
194 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
195 template<typename SnapshotIdT = Aws::String>
196 void SetSnapshotId(SnapshotIdT&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::forward<SnapshotIdT>(value); }
197 template<typename SnapshotIdT = Aws::String>
198 Volume& WithSnapshotId(SnapshotIdT&& value) { SetSnapshotId(std::forward<SnapshotIdT>(value)); return *this;}
200
202
205 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
206 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
207 template<typename AvailabilityZoneT = Aws::String>
208 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
209 template<typename AvailabilityZoneT = Aws::String>
210 Volume& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
212
214
217 inline VolumeState GetState() const { return m_state; }
218 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
219 inline void SetState(VolumeState value) { m_stateHasBeenSet = true; m_state = value; }
220 inline Volume& WithState(VolumeState value) { SetState(value); return *this;}
222
224
227 inline const Aws::Utils::DateTime& GetCreateTime() const { return m_createTime; }
228 inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; }
229 template<typename CreateTimeT = Aws::Utils::DateTime>
230 void SetCreateTime(CreateTimeT&& value) { m_createTimeHasBeenSet = true; m_createTime = std::forward<CreateTimeT>(value); }
231 template<typename CreateTimeT = Aws::Utils::DateTime>
232 Volume& WithCreateTime(CreateTimeT&& value) { SetCreateTime(std::forward<CreateTimeT>(value)); return *this;}
234
236
240 inline const Aws::Vector<VolumeAttachment>& GetAttachments() const { return m_attachments; }
241 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
242 template<typename AttachmentsT = Aws::Vector<VolumeAttachment>>
243 void SetAttachments(AttachmentsT&& value) { m_attachmentsHasBeenSet = true; m_attachments = std::forward<AttachmentsT>(value); }
244 template<typename AttachmentsT = Aws::Vector<VolumeAttachment>>
245 Volume& WithAttachments(AttachmentsT&& value) { SetAttachments(std::forward<AttachmentsT>(value)); return *this;}
246 template<typename AttachmentsT = VolumeAttachment>
247 Volume& AddAttachments(AttachmentsT&& value) { m_attachmentsHasBeenSet = true; m_attachments.emplace_back(std::forward<AttachmentsT>(value)); return *this; }
249
251
254 inline bool GetEncrypted() const { return m_encrypted; }
255 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
256 inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
257 inline Volume& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
259
261
265 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
266 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
267 template<typename KmsKeyIdT = Aws::String>
268 void SetKmsKeyId(KmsKeyIdT&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::forward<KmsKeyIdT>(value); }
269 template<typename KmsKeyIdT = Aws::String>
270 Volume& WithKmsKeyId(KmsKeyIdT&& value) { SetKmsKeyId(std::forward<KmsKeyIdT>(value)); return *this;}
272
274
275 inline const ResponseMetadata& GetResponseMetadata() const { return m_responseMetadata; }
276 template<typename ResponseMetadataT = ResponseMetadata>
277 void SetResponseMetadata(ResponseMetadataT&& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = std::forward<ResponseMetadataT>(value); }
278 template<typename ResponseMetadataT = ResponseMetadata>
279 Volume& WithResponseMetadata(ResponseMetadataT&& value) { SetResponseMetadata(std::forward<ResponseMetadataT>(value)); return *this;}
281 private:
282
283 Aws::String m_outpostArn;
284 bool m_outpostArnHasBeenSet = false;
285
286 int m_iops{0};
287 bool m_iopsHasBeenSet = false;
288
289 Aws::Vector<Tag> m_tags;
290 bool m_tagsHasBeenSet = false;
291
292 VolumeType m_volumeType{VolumeType::NOT_SET};
293 bool m_volumeTypeHasBeenSet = false;
294
295 bool m_fastRestored{false};
296 bool m_fastRestoredHasBeenSet = false;
297
298 bool m_multiAttachEnabled{false};
299 bool m_multiAttachEnabledHasBeenSet = false;
300
301 int m_throughput{0};
302 bool m_throughputHasBeenSet = false;
303
304 SSEType m_sseType{SSEType::NOT_SET};
305 bool m_sseTypeHasBeenSet = false;
306
307 OperatorResponse m_operator;
308 bool m_operatorHasBeenSet = false;
309
310 int m_volumeInitializationRate{0};
311 bool m_volumeInitializationRateHasBeenSet = false;
312
313 Aws::String m_volumeId;
314 bool m_volumeIdHasBeenSet = false;
315
316 int m_size{0};
317 bool m_sizeHasBeenSet = false;
318
319 Aws::String m_snapshotId;
320 bool m_snapshotIdHasBeenSet = false;
321
322 Aws::String m_availabilityZone;
323 bool m_availabilityZoneHasBeenSet = false;
324
326 bool m_stateHasBeenSet = false;
327
328 Aws::Utils::DateTime m_createTime{};
329 bool m_createTimeHasBeenSet = false;
330
331 Aws::Vector<VolumeAttachment> m_attachments;
332 bool m_attachmentsHasBeenSet = false;
333
334 bool m_encrypted{false};
335 bool m_encryptedHasBeenSet = false;
336
337 Aws::String m_kmsKeyId;
338 bool m_kmsKeyIdHasBeenSet = false;
339
340 ResponseMetadata m_responseMetadata;
341 bool m_responseMetadataHasBeenSet = true;
342 };
343
344} // namespace Model
345} // namespace EC2
346} // namespace Aws
const Aws::Vector< Tag > & GetTags() const
Definition Volume.h:81
void SetAttachments(AttachmentsT &&value)
Definition Volume.h:243
void SetMultiAttachEnabled(bool value)
Definition Volume.h:118
void SetOperator(OperatorT &&value)
Definition Volume.h:150
Volume & WithTags(TagsT &&value)
Definition Volume.h:86
bool SseTypeHasBeenSet() const
Definition Volume.h:138
bool GetFastRestored() const
Definition Volume.h:106
void SetVolumeId(VolumeIdT &&value)
Definition Volume.h:174
bool VolumeTypeHasBeenSet() const
Definition Volume.h:96
void SetSnapshotId(SnapshotIdT &&value)
Definition Volume.h:196
void SetVolumeInitializationRate(int value)
Definition Volume.h:163
SSEType GetSseType() const
Definition Volume.h:137
Volume & WithOutpostArn(OutpostArnT &&value)
Definition Volume.h:60
Volume & WithOperator(OperatorT &&value)
Definition Volume.h:152
const Aws::String & GetKmsKeyId() const
Definition Volume.h:265
bool GetEncrypted() const
Definition Volume.h:254
bool MultiAttachEnabledHasBeenSet() const
Definition Volume.h:117
Volume & WithSnapshotId(SnapshotIdT &&value)
Definition Volume.h:198
Volume & WithThroughput(int value)
Definition Volume.h:129
Volume & AddAttachments(AttachmentsT &&value)
Definition Volume.h:247
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition Volume.h:208
bool AttachmentsHasBeenSet() const
Definition Volume.h:241
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Volume & WithFastRestored(bool value)
Definition Volume.h:109
bool KmsKeyIdHasBeenSet() const
Definition Volume.h:266
Volume & AddTags(TagsT &&value)
Definition Volume.h:88
Volume & WithAttachments(AttachmentsT &&value)
Definition Volume.h:245
Volume & WithSize(int value)
Definition Volume.h:186
bool OperatorHasBeenSet() const
Definition Volume.h:148
bool VolumeIdHasBeenSet() const
Definition Volume.h:172
const Aws::Utils::DateTime & GetCreateTime() const
Definition Volume.h:227
Volume & WithIops(int value)
Definition Volume.h:74
int GetThroughput() const
Definition Volume.h:126
void SetFastRestored(bool value)
Definition Volume.h:108
int GetIops() const
Definition Volume.h:71
const Aws::String & GetSnapshotId() const
Definition Volume.h:193
AWS_EC2_API Volume()=default
const Aws::String & GetVolumeId() const
Definition Volume.h:171
Volume & WithKmsKeyId(KmsKeyIdT &&value)
Definition Volume.h:270
Volume & WithState(VolumeState value)
Definition Volume.h:220
bool AvailabilityZoneHasBeenSet() const
Definition Volume.h:206
void SetSseType(SSEType value)
Definition Volume.h:139
int GetSize() const
Definition Volume.h:183
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:277
Volume & WithMultiAttachEnabled(bool value)
Definition Volume.h:119
void SetOutpostArn(OutpostArnT &&value)
Definition Volume.h:58
bool SizeHasBeenSet() const
Definition Volume.h:184
void SetState(VolumeState value)
Definition Volume.h:219
Volume & WithCreateTime(CreateTimeT &&value)
Definition Volume.h:232
const Aws::Vector< VolumeAttachment > & GetAttachments() const
Definition Volume.h:240
bool IopsHasBeenSet() const
Definition Volume.h:72
Volume & WithVolumeId(VolumeIdT &&value)
Definition Volume.h:176
const Aws::String & GetOutpostArn() const
Definition Volume.h:55
int GetVolumeInitializationRate() const
Definition Volume.h:161
bool SnapshotIdHasBeenSet() const
Definition Volume.h:194
bool StateHasBeenSet() const
Definition Volume.h:218
void SetCreateTime(CreateTimeT &&value)
Definition Volume.h:230
AWS_EC2_API Volume & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool FastRestoredHasBeenSet() const
Definition Volume.h:107
bool GetMultiAttachEnabled() const
Definition Volume.h:116
void SetThroughput(int value)
Definition Volume.h:128
Volume & WithVolumeType(VolumeType value)
Definition Volume.h:98
void SetTags(TagsT &&value)
Definition Volume.h:84
Volume & WithVolumeInitializationRate(int value)
Definition Volume.h:164
Volume & WithSseType(SSEType value)
Definition Volume.h:140
bool VolumeInitializationRateHasBeenSet() const
Definition Volume.h:162
void SetVolumeType(VolumeType value)
Definition Volume.h:97
VolumeType GetVolumeType() const
Definition Volume.h:95
bool EncryptedHasBeenSet() const
Definition Volume.h:255
const Aws::String & GetAvailabilityZone() const
Definition Volume.h:205
bool CreateTimeHasBeenSet() const
Definition Volume.h:228
void SetEncrypted(bool value)
Definition Volume.h:256
bool OutpostArnHasBeenSet() const
Definition Volume.h:56
bool ThroughputHasBeenSet() const
Definition Volume.h:127
void SetKmsKeyId(KmsKeyIdT &&value)
Definition Volume.h:268
void SetIops(int value)
Definition Volume.h:73
Volume & WithEncrypted(bool value)
Definition Volume.h:257
VolumeState GetState() const
Definition Volume.h:217
const OperatorResponse & GetOperator() const
Definition Volume.h:147
void SetSize(int value)
Definition Volume.h:185
bool TagsHasBeenSet() const
Definition Volume.h:82
Volume & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Volume.h:210
Volume & WithResponseMetadata(ResponseMetadataT &&value)
Definition Volume.h:279
const ResponseMetadata & GetResponseMetadata() const
Definition Volume.h:275
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