AWS SDK for C++  0.12.9
AWS SDK for C++
CreateVolumeResponse.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
24 #include <aws/ec2/model/Tag.h>
25 
26 namespace Aws
27 {
28 template<typename RESULT_TYPE>
29 class AmazonWebServiceResult;
30 
31 namespace Utils
32 {
33 namespace Xml
34 {
35  class XmlDocument;
36 } // namespace Xml
37 } // namespace Utils
38 namespace EC2
39 {
40 namespace Model
41 {
46  {
47  public:
51 
55  inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
56 
60  inline void SetVolumeId(const Aws::String& value) { m_volumeId = value; }
61 
65  inline void SetVolumeId(Aws::String&& value) { m_volumeId = value; }
66 
70  inline void SetVolumeId(const char* value) { m_volumeId.assign(value); }
71 
75  inline CreateVolumeResponse& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
76 
80  inline CreateVolumeResponse& WithVolumeId(Aws::String&& value) { SetVolumeId(value); return *this;}
81 
85  inline CreateVolumeResponse& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
86 
90  inline long GetSize() const{ return m_size; }
91 
95  inline void SetSize(long value) { m_size = value; }
96 
100  inline CreateVolumeResponse& WithSize(long value) { SetSize(value); return *this;}
101 
105  inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
106 
110  inline void SetSnapshotId(const Aws::String& value) { m_snapshotId = value; }
111 
115  inline void SetSnapshotId(Aws::String&& value) { m_snapshotId = value; }
116 
120  inline void SetSnapshotId(const char* value) { m_snapshotId.assign(value); }
121 
125  inline CreateVolumeResponse& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
126 
130  inline CreateVolumeResponse& WithSnapshotId(Aws::String&& value) { SetSnapshotId(value); return *this;}
131 
135  inline CreateVolumeResponse& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
136 
140  inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
141 
145  inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZone = value; }
146 
150  inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZone = value; }
151 
155  inline void SetAvailabilityZone(const char* value) { m_availabilityZone.assign(value); }
156 
160  inline CreateVolumeResponse& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
161 
165  inline CreateVolumeResponse& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(value); return *this;}
166 
170  inline CreateVolumeResponse& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
171 
175  inline const VolumeState& GetState() const{ return m_state; }
176 
180  inline void SetState(const VolumeState& value) { m_state = value; }
181 
185  inline void SetState(VolumeState&& value) { m_state = value; }
186 
190  inline CreateVolumeResponse& WithState(const VolumeState& value) { SetState(value); return *this;}
191 
195  inline CreateVolumeResponse& WithState(VolumeState&& value) { SetState(value); return *this;}
196 
200  inline const Aws::Utils::DateTime& GetCreateTime() const{ return m_createTime; }
201 
205  inline void SetCreateTime(const Aws::Utils::DateTime& value) { m_createTime = value; }
206 
210  inline void SetCreateTime(Aws::Utils::DateTime&& value) { m_createTime = value; }
211 
215  inline CreateVolumeResponse& WithCreateTime(const Aws::Utils::DateTime& value) { SetCreateTime(value); return *this;}
216 
220  inline CreateVolumeResponse& WithCreateTime(Aws::Utils::DateTime&& value) { SetCreateTime(value); return *this;}
221 
225  inline const Aws::Vector<VolumeAttachment>& GetAttachments() const{ return m_attachments; }
226 
230  inline void SetAttachments(const Aws::Vector<VolumeAttachment>& value) { m_attachments = value; }
231 
235  inline void SetAttachments(Aws::Vector<VolumeAttachment>&& value) { m_attachments = value; }
236 
240  inline CreateVolumeResponse& WithAttachments(const Aws::Vector<VolumeAttachment>& value) { SetAttachments(value); return *this;}
241 
245  inline CreateVolumeResponse& WithAttachments(Aws::Vector<VolumeAttachment>&& value) { SetAttachments(value); return *this;}
246 
250  inline CreateVolumeResponse& AddAttachments(const VolumeAttachment& value) { m_attachments.push_back(value); return *this; }
251 
255  inline CreateVolumeResponse& AddAttachments(VolumeAttachment&& value) { m_attachments.push_back(value); return *this; }
256 
260  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
261 
265  inline void SetTags(const Aws::Vector<Tag>& value) { m_tags = value; }
266 
270  inline void SetTags(Aws::Vector<Tag>&& value) { m_tags = value; }
271 
275  inline CreateVolumeResponse& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
276 
280  inline CreateVolumeResponse& WithTags(Aws::Vector<Tag>&& value) { SetTags(value); return *this;}
281 
285  inline CreateVolumeResponse& AddTags(const Tag& value) { m_tags.push_back(value); return *this; }
286 
290  inline CreateVolumeResponse& AddTags(Tag&& value) { m_tags.push_back(value); return *this; }
291 
298  inline const VolumeType& GetVolumeType() const{ return m_volumeType; }
299 
306  inline void SetVolumeType(const VolumeType& value) { m_volumeType = value; }
307 
314  inline void SetVolumeType(VolumeType&& value) { m_volumeType = value; }
315 
322  inline CreateVolumeResponse& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;}
323 
330  inline CreateVolumeResponse& WithVolumeType(VolumeType&& value) { SetVolumeType(value); return *this;}
331 
347  inline long GetIops() const{ return m_iops; }
348 
364  inline void SetIops(long value) { m_iops = value; }
365 
381  inline CreateVolumeResponse& WithIops(long value) { SetIops(value); return *this;}
382 
386  inline bool GetEncrypted() const{ return m_encrypted; }
387 
391  inline void SetEncrypted(bool value) { m_encrypted = value; }
392 
396  inline CreateVolumeResponse& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
397 
402  inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
403 
408  inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyId = value; }
409 
414  inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyId = value; }
415 
420  inline void SetKmsKeyId(const char* value) { m_kmsKeyId.assign(value); }
421 
426  inline CreateVolumeResponse& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
427 
432  inline CreateVolumeResponse& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(value); return *this;}
433 
438  inline CreateVolumeResponse& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
439 
440 
441  inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
442 
443 
444  inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }
445 
446 
447  inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = value; }
448 
449 
450  inline CreateVolumeResponse& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
451 
452 
453  inline CreateVolumeResponse& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(value); return *this;}
454 
455  private:
456  Aws::String m_volumeId;
457  long m_size;
458  Aws::String m_snapshotId;
459  Aws::String m_availabilityZone;
460  VolumeState m_state;
461  Aws::Utils::DateTime m_createTime;
462  Aws::Vector<VolumeAttachment> m_attachments;
463  Aws::Vector<Tag> m_tags;
464  VolumeType m_volumeType;
465  long m_iops;
466  bool m_encrypted;
467  Aws::String m_kmsKeyId;
468  ResponseMetadata m_responseMetadata;
469  };
470 
471 } // namespace Model
472 } // namespace EC2
473 } // namespace Aws
CreateVolumeResponse & WithKmsKeyId(Aws::String &&value)
CreateVolumeResponse & WithVolumeId(Aws::String &&value)
const VolumeState & GetState() const
CreateVolumeResponse & WithAttachments(Aws::Vector< VolumeAttachment > &&value)
CreateVolumeResponse & AddAttachments(const VolumeAttachment &value)
CreateVolumeResponse & WithState(VolumeState &&value)
CreateVolumeResponse & WithVolumeId(const Aws::String &value)
void SetTags(const Aws::Vector< Tag > &value)
void SetVolumeId(const Aws::String &value)
const Aws::String & GetAvailabilityZone() const
CreateVolumeResponse & WithResponseMetadata(ResponseMetadata &&value)
CreateVolumeResponse & WithKmsKeyId(const Aws::String &value)
CreateVolumeResponse & WithIops(long value)
CreateVolumeResponse & AddAttachments(VolumeAttachment &&value)
CreateVolumeResponse & WithSize(long value)
CreateVolumeResponse & WithCreateTime(Aws::Utils::DateTime &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetCreateTime(Aws::Utils::DateTime &&value)
CreateVolumeResponse & WithSnapshotId(Aws::String &&value)
void SetSnapshotId(const Aws::String &value)
void SetAttachments(const Aws::Vector< VolumeAttachment > &value)
const VolumeType & GetVolumeType() const
CreateVolumeResponse & AddTags(const Tag &value)
const ResponseMetadata & GetResponseMetadata() const
void SetKmsKeyId(const Aws::String &value)
const Aws::Vector< VolumeAttachment > & GetAttachments() const
CreateVolumeResponse & WithCreateTime(const Aws::Utils::DateTime &value)
void SetAvailabilityZone(Aws::String &&value)
const Aws::String & GetKmsKeyId() const
CreateVolumeResponse & WithSnapshotId(const char *value)
CreateVolumeResponse & WithVolumeType(VolumeType &&value)
CreateVolumeResponse & WithKmsKeyId(const char *value)
CreateVolumeResponse & WithSnapshotId(const Aws::String &value)
void SetResponseMetadata(const ResponseMetadata &value)
void SetCreateTime(const Aws::Utils::DateTime &value)
void SetTags(Aws::Vector< Tag > &&value)
const Aws::String & GetVolumeId() const
void SetAttachments(Aws::Vector< VolumeAttachment > &&value)
CreateVolumeResponse & WithEncrypted(bool value)
CreateVolumeResponse & WithVolumeId(const char *value)
void SetVolumeType(const VolumeType &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
CreateVolumeResponse & WithAvailabilityZone(const char *value)
CreateVolumeResponse & WithVolumeType(const VolumeType &value)
CreateVolumeResponse & WithAvailabilityZone(Aws::String &&value)
CreateVolumeResponse & WithTags(const Aws::Vector< Tag > &value)
CreateVolumeResponse & WithResponseMetadata(const ResponseMetadata &value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
CreateVolumeResponse & AddTags(Tag &&value)
void SetResponseMetadata(ResponseMetadata &&value)
const Aws::String & GetSnapshotId() const
CreateVolumeResponse & WithState(const VolumeState &value)
CreateVolumeResponse & WithAttachments(const Aws::Vector< VolumeAttachment > &value)
void SetState(const VolumeState &value)
CreateVolumeResponse & WithAvailabilityZone(const Aws::String &value)
void SetAvailabilityZone(const Aws::String &value)
JSON (JavaScript Object Notation).
CreateVolumeResponse & WithTags(Aws::Vector< Tag > &&value)
const Aws::Utils::DateTime & GetCreateTime() const
const Aws::Vector< Tag > & GetTags() const