AWS SDK for C++

AWS SDK for C++ Version 1.11.783

Loading...
Searching...
No Matches
CreateVolumeResponse.h
1
6#pragma once
7#include <aws/core/http/HttpResponse.h>
8#include <aws/core/utils/DateTime.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/OperatorResponse.h>
13#include <aws/ec2/model/ResponseMetadata.h>
14#include <aws/ec2/model/SSEType.h>
15#include <aws/ec2/model/Tag.h>
16#include <aws/ec2/model/VolumeAttachment.h>
17#include <aws/ec2/model/VolumeState.h>
18#include <aws/ec2/model/VolumeType.h>
19
20#include <utility>
21
22namespace Aws {
23template <typename RESULT_TYPE>
24class AmazonWebServiceResult;
25
26namespace Utils {
27namespace Xml {
28class XmlDocument;
29} // namespace Xml
30} // namespace Utils
31namespace EC2 {
32namespace Model {
39 public:
40 AWS_EC2_API CreateVolumeResponse() = default;
43
45
48 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
49 template <typename AvailabilityZoneIdT = Aws::String>
50 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
51 m_availabilityZoneIdHasBeenSet = true;
52 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
53 }
54 template <typename AvailabilityZoneIdT = Aws::String>
55 CreateVolumeResponse& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
56 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetOutpostArn() const { return m_outpostArn; }
66 template <typename OutpostArnT = Aws::String>
67 void SetOutpostArn(OutpostArnT&& value) {
68 m_outpostArnHasBeenSet = true;
69 m_outpostArn = std::forward<OutpostArnT>(value);
70 }
71 template <typename OutpostArnT = Aws::String>
72 CreateVolumeResponse& WithOutpostArn(OutpostArnT&& value) {
73 SetOutpostArn(std::forward<OutpostArnT>(value));
74 return *this;
75 }
77
79
83 inline const Aws::String& GetSourceVolumeId() const { return m_sourceVolumeId; }
84 template <typename SourceVolumeIdT = Aws::String>
85 void SetSourceVolumeId(SourceVolumeIdT&& value) {
86 m_sourceVolumeIdHasBeenSet = true;
87 m_sourceVolumeId = std::forward<SourceVolumeIdT>(value);
88 }
89 template <typename SourceVolumeIdT = Aws::String>
90 CreateVolumeResponse& WithSourceVolumeId(SourceVolumeIdT&& value) {
91 SetSourceVolumeId(std::forward<SourceVolumeIdT>(value));
92 return *this;
93 }
95
97
104 inline int GetIops() const { return m_iops; }
105 inline void SetIops(int value) {
106 m_iopsHasBeenSet = true;
107 m_iops = value;
108 }
109 inline CreateVolumeResponse& WithIops(int value) {
110 SetIops(value);
111 return *this;
112 }
114
116
119 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
120 template <typename TagsT = Aws::Vector<Tag>>
121 void SetTags(TagsT&& value) {
122 m_tagsHasBeenSet = true;
123 m_tags = std::forward<TagsT>(value);
124 }
125 template <typename TagsT = Aws::Vector<Tag>>
127 SetTags(std::forward<TagsT>(value));
128 return *this;
129 }
130 template <typename TagsT = Tag>
132 m_tagsHasBeenSet = true;
133 m_tags.emplace_back(std::forward<TagsT>(value));
134 return *this;
135 }
137
139
142 inline VolumeType GetVolumeType() const { return m_volumeType; }
143 inline void SetVolumeType(VolumeType value) {
144 m_volumeTypeHasBeenSet = true;
145 m_volumeType = value;
146 }
148 SetVolumeType(value);
149 return *this;
150 }
152
154
158 inline bool GetFastRestored() const { return m_fastRestored; }
159 inline void SetFastRestored(bool value) {
160 m_fastRestoredHasBeenSet = true;
161 m_fastRestored = value;
162 }
164 SetFastRestored(value);
165 return *this;
166 }
168
170
173 inline bool GetMultiAttachEnabled() const { return m_multiAttachEnabled; }
174 inline void SetMultiAttachEnabled(bool value) {
175 m_multiAttachEnabledHasBeenSet = true;
176 m_multiAttachEnabled = value;
177 }
180 return *this;
181 }
183
185
188 inline int GetThroughput() const { return m_throughput; }
189 inline void SetThroughput(int value) {
190 m_throughputHasBeenSet = true;
191 m_throughput = value;
192 }
194 SetThroughput(value);
195 return *this;
196 }
198
200
204 inline SSEType GetSseType() const { return m_sseType; }
205 inline void SetSseType(SSEType value) {
206 m_sseTypeHasBeenSet = true;
207 m_sseType = value;
208 }
210 SetSseType(value);
211 return *this;
212 }
214
216
219 inline const OperatorResponse& GetOperator() const { return m_operator; }
220 template <typename OperatorT = OperatorResponse>
221 void SetOperator(OperatorT&& value) {
222 m_operatorHasBeenSet = true;
223 m_operator = std::forward<OperatorT>(value);
224 }
225 template <typename OperatorT = OperatorResponse>
226 CreateVolumeResponse& WithOperator(OperatorT&& value) {
227 SetOperator(std::forward<OperatorT>(value));
228 return *this;
229 }
231
233
238 inline int GetVolumeInitializationRate() const { return m_volumeInitializationRate; }
239 inline void SetVolumeInitializationRate(int value) {
240 m_volumeInitializationRateHasBeenSet = true;
241 m_volumeInitializationRate = value;
242 }
245 return *this;
246 }
248
250
253 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
254 template <typename VolumeIdT = Aws::String>
255 void SetVolumeId(VolumeIdT&& value) {
256 m_volumeIdHasBeenSet = true;
257 m_volumeId = std::forward<VolumeIdT>(value);
258 }
259 template <typename VolumeIdT = Aws::String>
260 CreateVolumeResponse& WithVolumeId(VolumeIdT&& value) {
261 SetVolumeId(std::forward<VolumeIdT>(value));
262 return *this;
263 }
265
267
270 inline int GetSize() const { return m_size; }
271 inline void SetSize(int value) {
272 m_sizeHasBeenSet = true;
273 m_size = value;
274 }
275 inline CreateVolumeResponse& WithSize(int value) {
276 SetSize(value);
277 return *this;
278 }
280
282
285 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
286 template <typename SnapshotIdT = Aws::String>
287 void SetSnapshotId(SnapshotIdT&& value) {
288 m_snapshotIdHasBeenSet = true;
289 m_snapshotId = std::forward<SnapshotIdT>(value);
290 }
291 template <typename SnapshotIdT = Aws::String>
292 CreateVolumeResponse& WithSnapshotId(SnapshotIdT&& value) {
293 SetSnapshotId(std::forward<SnapshotIdT>(value));
294 return *this;
295 }
297
299
302 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
303 template <typename AvailabilityZoneT = Aws::String>
304 void SetAvailabilityZone(AvailabilityZoneT&& value) {
305 m_availabilityZoneHasBeenSet = true;
306 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
307 }
308 template <typename AvailabilityZoneT = Aws::String>
309 CreateVolumeResponse& WithAvailabilityZone(AvailabilityZoneT&& value) {
310 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
311 return *this;
312 }
314
316
319 inline VolumeState GetState() const { return m_state; }
320 inline void SetState(VolumeState value) {
321 m_stateHasBeenSet = true;
322 m_state = value;
323 }
325 SetState(value);
326 return *this;
327 }
329
331
334 inline const Aws::Utils::DateTime& GetCreateTime() const { return m_createTime; }
335 template <typename CreateTimeT = Aws::Utils::DateTime>
336 void SetCreateTime(CreateTimeT&& value) {
337 m_createTimeHasBeenSet = true;
338 m_createTime = std::forward<CreateTimeT>(value);
339 }
340 template <typename CreateTimeT = Aws::Utils::DateTime>
341 CreateVolumeResponse& WithCreateTime(CreateTimeT&& value) {
342 SetCreateTime(std::forward<CreateTimeT>(value));
343 return *this;
344 }
346
348
352 inline const Aws::Vector<VolumeAttachment>& GetAttachments() const { return m_attachments; }
353 template <typename AttachmentsT = Aws::Vector<VolumeAttachment>>
354 void SetAttachments(AttachmentsT&& value) {
355 m_attachmentsHasBeenSet = true;
356 m_attachments = std::forward<AttachmentsT>(value);
357 }
358 template <typename AttachmentsT = Aws::Vector<VolumeAttachment>>
359 CreateVolumeResponse& WithAttachments(AttachmentsT&& value) {
360 SetAttachments(std::forward<AttachmentsT>(value));
361 return *this;
362 }
363 template <typename AttachmentsT = VolumeAttachment>
364 CreateVolumeResponse& AddAttachments(AttachmentsT&& value) {
365 m_attachmentsHasBeenSet = true;
366 m_attachments.emplace_back(std::forward<AttachmentsT>(value));
367 return *this;
368 }
370
372
375 inline bool GetEncrypted() const { return m_encrypted; }
376 inline void SetEncrypted(bool value) {
377 m_encryptedHasBeenSet = true;
378 m_encrypted = value;
379 }
381 SetEncrypted(value);
382 return *this;
383 }
385
387
391 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
392 template <typename KmsKeyIdT = Aws::String>
393 void SetKmsKeyId(KmsKeyIdT&& value) {
394 m_kmsKeyIdHasBeenSet = true;
395 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
396 }
397 template <typename KmsKeyIdT = Aws::String>
398 CreateVolumeResponse& WithKmsKeyId(KmsKeyIdT&& value) {
399 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
400 return *this;
401 }
403
405
406 inline const ResponseMetadata& GetResponseMetadata() const { return m_responseMetadata; }
407 template <typename ResponseMetadataT = ResponseMetadata>
408 void SetResponseMetadata(ResponseMetadataT&& value) {
409 m_responseMetadataHasBeenSet = true;
410 m_responseMetadata = std::forward<ResponseMetadataT>(value);
411 }
412 template <typename ResponseMetadataT = ResponseMetadata>
413 CreateVolumeResponse& WithResponseMetadata(ResponseMetadataT&& value) {
414 SetResponseMetadata(std::forward<ResponseMetadataT>(value));
415 return *this;
416 }
418 inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; }
419
420 private:
421 Aws::String m_availabilityZoneId;
422
423 Aws::String m_outpostArn;
424
425 Aws::String m_sourceVolumeId;
426
427 int m_iops{0};
428
429 Aws::Vector<Tag> m_tags;
430
431 VolumeType m_volumeType{VolumeType::NOT_SET};
432
433 bool m_fastRestored{false};
434
435 bool m_multiAttachEnabled{false};
436
437 int m_throughput{0};
438
439 SSEType m_sseType{SSEType::NOT_SET};
440
441 OperatorResponse m_operator;
442
443 int m_volumeInitializationRate{0};
444
445 Aws::String m_volumeId;
446
447 int m_size{0};
448
449 Aws::String m_snapshotId;
450
451 Aws::String m_availabilityZone;
452
454
455 Aws::Utils::DateTime m_createTime{};
456
457 Aws::Vector<VolumeAttachment> m_attachments;
458
459 bool m_encrypted{false};
460
461 Aws::String m_kmsKeyId;
462
463 ResponseMetadata m_responseMetadata;
464 Aws::Http::HttpResponseCode m_HttpResponseCode;
465 bool m_availabilityZoneIdHasBeenSet = false;
466 bool m_outpostArnHasBeenSet = false;
467 bool m_sourceVolumeIdHasBeenSet = false;
468 bool m_iopsHasBeenSet = false;
469 bool m_tagsHasBeenSet = false;
470 bool m_volumeTypeHasBeenSet = false;
471 bool m_fastRestoredHasBeenSet = false;
472 bool m_multiAttachEnabledHasBeenSet = false;
473 bool m_throughputHasBeenSet = false;
474 bool m_sseTypeHasBeenSet = false;
475 bool m_operatorHasBeenSet = false;
476 bool m_volumeInitializationRateHasBeenSet = false;
477 bool m_volumeIdHasBeenSet = false;
478 bool m_sizeHasBeenSet = false;
479 bool m_snapshotIdHasBeenSet = false;
480 bool m_availabilityZoneHasBeenSet = false;
481 bool m_stateHasBeenSet = false;
482 bool m_createTimeHasBeenSet = false;
483 bool m_attachmentsHasBeenSet = false;
484 bool m_encryptedHasBeenSet = false;
485 bool m_kmsKeyIdHasBeenSet = false;
486 bool m_responseMetadataHasBeenSet = false;
487};
488
489} // namespace Model
490} // namespace EC2
491} // namespace Aws
CreateVolumeResponse & WithVolumeType(VolumeType value)
const Aws::String & GetSnapshotId() const
const Aws::String & GetAvailabilityZone() const
CreateVolumeResponse & WithThroughput(int value)
const Aws::String & GetAvailabilityZoneId() const
CreateVolumeResponse & AddTags(TagsT &&value)
CreateVolumeResponse & WithKmsKeyId(KmsKeyIdT &&value)
CreateVolumeResponse & WithAvailabilityZone(AvailabilityZoneT &&value)
AWS_EC2_API CreateVolumeResponse()=default
const Aws::String & GetSourceVolumeId() const
const Aws::Vector< VolumeAttachment > & GetAttachments() const
CreateVolumeResponse & WithCreateTime(CreateTimeT &&value)
CreateVolumeResponse & WithSize(int value)
AWS_EC2_API CreateVolumeResponse & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Xml::XmlDocument > &result)
Aws::Http::HttpResponseCode GetHttpResponseCode() const
CreateVolumeResponse & WithSourceVolumeId(SourceVolumeIdT &&value)
CreateVolumeResponse & AddAttachments(AttachmentsT &&value)
AWS_EC2_API CreateVolumeResponse(const Aws::AmazonWebServiceResult< Aws::Utils::Xml::XmlDocument > &result)
CreateVolumeResponse & WithTags(TagsT &&value)
CreateVolumeResponse & WithMultiAttachEnabled(bool value)
CreateVolumeResponse & WithResponseMetadata(ResponseMetadataT &&value)
CreateVolumeResponse & WithIops(int value)
CreateVolumeResponse & WithVolumeInitializationRate(int value)
CreateVolumeResponse & WithState(VolumeState value)
const ResponseMetadata & GetResponseMetadata() const
void SetAvailabilityZone(AvailabilityZoneT &&value)
CreateVolumeResponse & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
void SetSourceVolumeId(SourceVolumeIdT &&value)
CreateVolumeResponse & WithAttachments(AttachmentsT &&value)
CreateVolumeResponse & WithVolumeId(VolumeIdT &&value)
CreateVolumeResponse & WithOutpostArn(OutpostArnT &&value)
void SetResponseMetadata(ResponseMetadataT &&value)
CreateVolumeResponse & WithSnapshotId(SnapshotIdT &&value)
CreateVolumeResponse & WithOperator(OperatorT &&value)
CreateVolumeResponse & WithFastRestored(bool value)
const OperatorResponse & GetOperator() const
CreateVolumeResponse & WithSseType(SSEType value)
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
const Aws::Utils::DateTime & GetCreateTime() const
CreateVolumeResponse & WithEncrypted(bool value)
const Aws::String & GetOutpostArn() const
const Aws::Vector< Tag > & GetTags() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Xml::XmlDocument XmlDocument