AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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/VolumeState.h>
14#include <aws/core/utils/DateTime.h>
15#include <aws/ec2/model/ResponseMetadata.h>
16#include <aws/ec2/model/Tag.h>
17#include <aws/ec2/model/VolumeAttachment.h>
18#include <utility>
19
20namespace Aws
21{
22namespace Utils
23{
24namespace Xml
25{
26 class XmlNode;
27} // namespace Xml
28} // namespace Utils
29namespace EC2
30{
31namespace Model
32{
33
39 class Volume
40 {
41 public:
42 AWS_EC2_API Volume();
43 AWS_EC2_API Volume(const Aws::Utils::Xml::XmlNode& xmlNode);
44 AWS_EC2_API Volume& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45
46 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
48
49
51
54 inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; }
55 inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; }
56 inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; }
57 inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); }
58 inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); }
59 inline Volume& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;}
60 inline Volume& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;}
61 inline Volume& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;}
63
65
72 inline int GetIops() const{ return m_iops; }
73 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
74 inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }
75 inline Volume& WithIops(int value) { SetIops(value); return *this;}
77
79
82 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
83 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
84 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
85 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
86 inline Volume& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
87 inline Volume& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
88 inline Volume& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
89 inline Volume& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
91
93
96 inline const VolumeType& GetVolumeType() const{ return m_volumeType; }
97 inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; }
98 inline void SetVolumeType(const VolumeType& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
99 inline void SetVolumeType(VolumeType&& value) { m_volumeTypeHasBeenSet = true; m_volumeType = std::move(value); }
100 inline Volume& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;}
101 inline Volume& WithVolumeType(VolumeType&& value) { SetVolumeType(std::move(value)); return *this;}
103
105
109 inline bool GetFastRestored() const{ return m_fastRestored; }
110 inline bool FastRestoredHasBeenSet() const { return m_fastRestoredHasBeenSet; }
111 inline void SetFastRestored(bool value) { m_fastRestoredHasBeenSet = true; m_fastRestored = value; }
112 inline Volume& WithFastRestored(bool value) { SetFastRestored(value); return *this;}
114
116
119 inline bool GetMultiAttachEnabled() const{ return m_multiAttachEnabled; }
120 inline bool MultiAttachEnabledHasBeenSet() const { return m_multiAttachEnabledHasBeenSet; }
121 inline void SetMultiAttachEnabled(bool value) { m_multiAttachEnabledHasBeenSet = true; m_multiAttachEnabled = value; }
122 inline Volume& WithMultiAttachEnabled(bool value) { SetMultiAttachEnabled(value); return *this;}
124
126
129 inline int GetThroughput() const{ return m_throughput; }
130 inline bool ThroughputHasBeenSet() const { return m_throughputHasBeenSet; }
131 inline void SetThroughput(int value) { m_throughputHasBeenSet = true; m_throughput = value; }
132 inline Volume& WithThroughput(int value) { SetThroughput(value); return *this;}
134
136
140 inline const SSEType& GetSseType() const{ return m_sseType; }
141 inline bool SseTypeHasBeenSet() const { return m_sseTypeHasBeenSet; }
142 inline void SetSseType(const SSEType& value) { m_sseTypeHasBeenSet = true; m_sseType = value; }
143 inline void SetSseType(SSEType&& value) { m_sseTypeHasBeenSet = true; m_sseType = std::move(value); }
144 inline Volume& WithSseType(const SSEType& value) { SetSseType(value); return *this;}
145 inline Volume& WithSseType(SSEType&& value) { SetSseType(std::move(value)); return *this;}
147
149
152 inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
153 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
154 inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
155 inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); }
156 inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); }
157 inline Volume& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
158 inline Volume& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;}
159 inline Volume& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
161
163
166 inline int GetSize() const{ return m_size; }
167 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
168 inline void SetSize(int value) { m_sizeHasBeenSet = true; m_size = value; }
169 inline Volume& WithSize(int value) { SetSize(value); return *this;}
171
173
176 inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
177 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
178 inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
179 inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); }
180 inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
181 inline Volume& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
182 inline Volume& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;}
183 inline Volume& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
185
187
190 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
191 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
192 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
193 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
194 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
195 inline Volume& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
196 inline Volume& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
197 inline Volume& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
199
201
204 inline const VolumeState& GetState() const{ return m_state; }
205 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
206 inline void SetState(const VolumeState& value) { m_stateHasBeenSet = true; m_state = value; }
207 inline void SetState(VolumeState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
208 inline Volume& WithState(const VolumeState& value) { SetState(value); return *this;}
209 inline Volume& WithState(VolumeState&& value) { SetState(std::move(value)); return *this;}
211
213
216 inline const Aws::Utils::DateTime& GetCreateTime() const{ return m_createTime; }
217 inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; }
218 inline void SetCreateTime(const Aws::Utils::DateTime& value) { m_createTimeHasBeenSet = true; m_createTime = value; }
219 inline void SetCreateTime(Aws::Utils::DateTime&& value) { m_createTimeHasBeenSet = true; m_createTime = std::move(value); }
220 inline Volume& WithCreateTime(const Aws::Utils::DateTime& value) { SetCreateTime(value); return *this;}
221 inline Volume& WithCreateTime(Aws::Utils::DateTime&& value) { SetCreateTime(std::move(value)); return *this;}
223
225
229 inline const Aws::Vector<VolumeAttachment>& GetAttachments() const{ return m_attachments; }
230 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
231 inline void SetAttachments(const Aws::Vector<VolumeAttachment>& value) { m_attachmentsHasBeenSet = true; m_attachments = value; }
232 inline void SetAttachments(Aws::Vector<VolumeAttachment>&& value) { m_attachmentsHasBeenSet = true; m_attachments = std::move(value); }
233 inline Volume& WithAttachments(const Aws::Vector<VolumeAttachment>& value) { SetAttachments(value); return *this;}
234 inline Volume& WithAttachments(Aws::Vector<VolumeAttachment>&& value) { SetAttachments(std::move(value)); return *this;}
235 inline Volume& AddAttachments(const VolumeAttachment& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(value); return *this; }
236 inline Volume& AddAttachments(VolumeAttachment&& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(std::move(value)); return *this; }
238
240
243 inline bool GetEncrypted() const{ return m_encrypted; }
244 inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; }
245 inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
246 inline Volume& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
248
250
254 inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
255 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
256 inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
257 inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }
258 inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
259 inline Volume& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
260 inline Volume& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
261 inline Volume& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
263
265
266 inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
267 inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }
268 inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); }
269 inline Volume& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
270 inline Volume& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}
272 private:
273
274 Aws::String m_outpostArn;
275 bool m_outpostArnHasBeenSet = false;
276
277 int m_iops;
278 bool m_iopsHasBeenSet = false;
279
280 Aws::Vector<Tag> m_tags;
281 bool m_tagsHasBeenSet = false;
282
283 VolumeType m_volumeType;
284 bool m_volumeTypeHasBeenSet = false;
285
286 bool m_fastRestored;
287 bool m_fastRestoredHasBeenSet = false;
288
289 bool m_multiAttachEnabled;
290 bool m_multiAttachEnabledHasBeenSet = false;
291
292 int m_throughput;
293 bool m_throughputHasBeenSet = false;
294
295 SSEType m_sseType;
296 bool m_sseTypeHasBeenSet = false;
297
298 Aws::String m_volumeId;
299 bool m_volumeIdHasBeenSet = false;
300
301 int m_size;
302 bool m_sizeHasBeenSet = false;
303
304 Aws::String m_snapshotId;
305 bool m_snapshotIdHasBeenSet = false;
306
307 Aws::String m_availabilityZone;
308 bool m_availabilityZoneHasBeenSet = false;
309
310 VolumeState m_state;
311 bool m_stateHasBeenSet = false;
312
313 Aws::Utils::DateTime m_createTime;
314 bool m_createTimeHasBeenSet = false;
315
316 Aws::Vector<VolumeAttachment> m_attachments;
317 bool m_attachmentsHasBeenSet = false;
318
319 bool m_encrypted;
320 bool m_encryptedHasBeenSet = false;
321
322 Aws::String m_kmsKeyId;
323 bool m_kmsKeyIdHasBeenSet = false;
324
325 ResponseMetadata m_responseMetadata;
326 };
327
328} // namespace Model
329} // namespace EC2
330} // namespace Aws
void SetCreateTime(Aws::Utils::DateTime &&value)
Definition Volume.h:219
const Aws::Vector< Tag > & GetTags() const
Definition Volume.h:82
void SetAvailabilityZone(Aws::String &&value)
Definition Volume.h:193
void SetMultiAttachEnabled(bool value)
Definition Volume.h:121
bool SseTypeHasBeenSet() const
Definition Volume.h:141
bool GetFastRestored() const
Definition Volume.h:109
bool VolumeTypeHasBeenSet() const
Definition Volume.h:97
Volume & WithSseType(SSEType &&value)
Definition Volume.h:145
Volume & WithCreateTime(Aws::Utils::DateTime &&value)
Definition Volume.h:221
Volume & WithAvailabilityZone(const Aws::String &value)
Definition Volume.h:195
Volume & WithOutpostArn(const char *value)
Definition Volume.h:61
void SetSnapshotId(const char *value)
Definition Volume.h:180
void SetVolumeId(const char *value)
Definition Volume.h:156
void SetVolumeType(VolumeType &&value)
Definition Volume.h:99
const Aws::String & GetKmsKeyId() const
Definition Volume.h:254
bool GetEncrypted() const
Definition Volume.h:243
bool MultiAttachEnabledHasBeenSet() const
Definition Volume.h:120
void SetSseType(const SSEType &value)
Definition Volume.h:142
Volume & WithThroughput(int value)
Definition Volume.h:132
Volume & WithOutpostArn(Aws::String &&value)
Definition Volume.h:60
void SetAttachments(const Aws::Vector< VolumeAttachment > &value)
Definition Volume.h:231
const VolumeState & GetState() const
Definition Volume.h:204
bool AttachmentsHasBeenSet() const
Definition Volume.h:230
void SetOutpostArn(const Aws::String &value)
Definition Volume.h:56
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetState(const VolumeState &value)
Definition Volume.h:206
Volume & WithFastRestored(bool value)
Definition Volume.h:112
Volume & WithSnapshotId(const Aws::String &value)
Definition Volume.h:181
Volume & WithAvailabilityZone(Aws::String &&value)
Definition Volume.h:196
bool KmsKeyIdHasBeenSet() const
Definition Volume.h:255
Volume & WithKmsKeyId(const char *value)
Definition Volume.h:261
Volume & WithTags(const Aws::Vector< Tag > &value)
Definition Volume.h:86
Volume & WithVolumeId(const Aws::String &value)
Definition Volume.h:157
Volume & WithTags(Aws::Vector< Tag > &&value)
Definition Volume.h:87
Volume & WithSize(int value)
Definition Volume.h:169
void SetResponseMetadata(ResponseMetadata &&value)
Definition Volume.h:268
void SetState(VolumeState &&value)
Definition Volume.h:207
void SetAvailabilityZone(const Aws::String &value)
Definition Volume.h:192
bool VolumeIdHasBeenSet() const
Definition Volume.h:153
Volume & WithSnapshotId(const char *value)
Definition Volume.h:183
const Aws::Utils::DateTime & GetCreateTime() const
Definition Volume.h:216
Volume & WithIops(int value)
Definition Volume.h:75
void SetCreateTime(const Aws::Utils::DateTime &value)
Definition Volume.h:218
int GetThroughput() const
Definition Volume.h:129
void SetFastRestored(bool value)
Definition Volume.h:111
void SetAvailabilityZone(const char *value)
Definition Volume.h:194
Volume & WithAttachments(Aws::Vector< VolumeAttachment > &&value)
Definition Volume.h:234
int GetIops() const
Definition Volume.h:72
const Aws::String & GetSnapshotId() const
Definition Volume.h:176
Volume & WithVolumeId(Aws::String &&value)
Definition Volume.h:158
const Aws::String & GetVolumeId() const
Definition Volume.h:152
Volume & WithKmsKeyId(const Aws::String &value)
Definition Volume.h:259
void SetOutpostArn(const char *value)
Definition Volume.h:58
Volume & WithAvailabilityZone(const char *value)
Definition Volume.h:197
bool AvailabilityZoneHasBeenSet() const
Definition Volume.h:191
int GetSize() const
Definition Volume.h:166
AWS_EC2_API Volume(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
Volume & WithMultiAttachEnabled(bool value)
Definition Volume.h:122
Volume & WithResponseMetadata(const ResponseMetadata &value)
Definition Volume.h:269
Volume & WithResponseMetadata(ResponseMetadata &&value)
Definition Volume.h:270
Volume & WithAttachments(const Aws::Vector< VolumeAttachment > &value)
Definition Volume.h:233
void SetVolumeType(const VolumeType &value)
Definition Volume.h:98
void SetTags(Aws::Vector< Tag > &&value)
Definition Volume.h:85
Volume & WithState(const VolumeState &value)
Definition Volume.h:208
Volume & AddAttachments(VolumeAttachment &&value)
Definition Volume.h:236
void SetVolumeId(const Aws::String &value)
Definition Volume.h:154
void SetSseType(SSEType &&value)
Definition Volume.h:143
Volume & WithVolumeType(const VolumeType &value)
Definition Volume.h:100
bool SizeHasBeenSet() const
Definition Volume.h:167
void SetKmsKeyId(Aws::String &&value)
Definition Volume.h:257
Volume & AddAttachments(const VolumeAttachment &value)
Definition Volume.h:235
const Aws::Vector< VolumeAttachment > & GetAttachments() const
Definition Volume.h:229
bool IopsHasBeenSet() const
Definition Volume.h:73
const Aws::String & GetOutpostArn() const
Definition Volume.h:54
bool SnapshotIdHasBeenSet() const
Definition Volume.h:177
bool StateHasBeenSet() const
Definition Volume.h:205
Volume & WithOutpostArn(const Aws::String &value)
Definition Volume.h:59
AWS_EC2_API Volume & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool FastRestoredHasBeenSet() const
Definition Volume.h:110
bool GetMultiAttachEnabled() const
Definition Volume.h:119
void SetThroughput(int value)
Definition Volume.h:131
Volume & AddTags(const Tag &value)
Definition Volume.h:88
Volume & WithVolumeType(VolumeType &&value)
Definition Volume.h:101
void SetKmsKeyId(const Aws::String &value)
Definition Volume.h:256
bool EncryptedHasBeenSet() const
Definition Volume.h:244
void SetKmsKeyId(const char *value)
Definition Volume.h:258
const Aws::String & GetAvailabilityZone() const
Definition Volume.h:190
bool CreateTimeHasBeenSet() const
Definition Volume.h:217
void SetEncrypted(bool value)
Definition Volume.h:245
bool OutpostArnHasBeenSet() const
Definition Volume.h:55
const VolumeType & GetVolumeType() const
Definition Volume.h:96
bool ThroughputHasBeenSet() const
Definition Volume.h:130
void SetSnapshotId(const Aws::String &value)
Definition Volume.h:178
void SetIops(int value)
Definition Volume.h:74
Volume & WithEncrypted(bool value)
Definition Volume.h:246
Volume & WithState(VolumeState &&value)
Definition Volume.h:209
void SetOutpostArn(Aws::String &&value)
Definition Volume.h:57
void SetSnapshotId(Aws::String &&value)
Definition Volume.h:179
void SetSize(int value)
Definition Volume.h:168
Volume & WithCreateTime(const Aws::Utils::DateTime &value)
Definition Volume.h:220
Volume & WithSnapshotId(Aws::String &&value)
Definition Volume.h:182
bool TagsHasBeenSet() const
Definition Volume.h:83
Volume & WithKmsKeyId(Aws::String &&value)
Definition Volume.h:260
Volume & WithSseType(const SSEType &value)
Definition Volume.h:144
const SSEType & GetSseType() const
Definition Volume.h:140
Volume & AddTags(Tag &&value)
Definition Volume.h:89
void SetResponseMetadata(const ResponseMetadata &value)
Definition Volume.h:267
void SetTags(const Aws::Vector< Tag > &value)
Definition Volume.h:84
void SetVolumeId(Aws::String &&value)
Definition Volume.h:155
Volume & WithVolumeId(const char *value)
Definition Volume.h:159
void SetAttachments(Aws::Vector< VolumeAttachment > &&value)
Definition Volume.h:232
const ResponseMetadata & GetResponseMetadata() const
Definition Volume.h:266
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