AWS SDK for C++  0.12.9
AWS SDK for C++
CreateVolumeRequest.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>
17 #include <aws/ec2/EC2Request.h>
20 
21 namespace Aws
22 {
23 namespace EC2
24 {
25 namespace Model
26 {
27 
32  {
33  public:
35  Aws::String SerializePayload() const override;
36 
43  inline bool GetDryRun() const{ return m_dryRun; }
44 
51  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
52 
59  inline CreateVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
60 
69  inline long GetSize() const{ return m_size; }
70 
79  inline void SetSize(long value) { m_sizeHasBeenSet = true; m_size = value; }
80 
89  inline CreateVolumeRequest& WithSize(long value) { SetSize(value); return *this;}
90 
94  inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
95 
99  inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
100 
104  inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
105 
109  inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
110 
114  inline CreateVolumeRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
115 
119  inline CreateVolumeRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(value); return *this;}
120 
124  inline CreateVolumeRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
125 
131  inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
132 
138  inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
139 
145  inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
146 
152  inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
153 
159  inline CreateVolumeRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
160 
166  inline CreateVolumeRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(value); return *this;}
167 
173  inline CreateVolumeRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
174 
181  inline const VolumeType& GetVolumeType() const{ return m_volumeType; }
182 
189  inline void SetVolumeType(const VolumeType& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
190 
197  inline void SetVolumeType(VolumeType&& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
198 
205  inline CreateVolumeRequest& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;}
206 
213  inline CreateVolumeRequest& WithVolumeType(VolumeType&& value) { SetVolumeType(value); return *this;}
214 
221  inline long GetIops() const{ return m_iops; }
222 
229  inline void SetIops(long value) { m_iopsHasBeenSet = true; m_iops = value; }
230 
237  inline CreateVolumeRequest& WithIops(long value) { SetIops(value); return *this;}
238 
249  inline bool GetEncrypted() const{ return m_encrypted; }
250 
261  inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
262 
273  inline CreateVolumeRequest& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
274 
286  inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
287 
299  inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
300 
312  inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
313 
325  inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
326 
338  inline CreateVolumeRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
339 
351  inline CreateVolumeRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(value); return *this;}
352 
364  inline CreateVolumeRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
365 
366  private:
367  bool m_dryRun;
368  bool m_dryRunHasBeenSet;
369  long m_size;
370  bool m_sizeHasBeenSet;
371  Aws::String m_snapshotId;
372  bool m_snapshotIdHasBeenSet;
373  Aws::String m_availabilityZone;
374  bool m_availabilityZoneHasBeenSet;
375  VolumeType m_volumeType;
376  bool m_volumeTypeHasBeenSet;
377  long m_iops;
378  bool m_iopsHasBeenSet;
379  bool m_encrypted;
380  bool m_encryptedHasBeenSet;
381  Aws::String m_kmsKeyId;
382  bool m_kmsKeyIdHasBeenSet;
383  };
384 
385 } // namespace Model
386 } // namespace EC2
387 } // namespace Aws
const Aws::String & GetSnapshotId() const
const Aws::String & GetKmsKeyId() const
CreateVolumeRequest & WithAvailabilityZone(const char *value)
void SetSnapshotId(Aws::String &&value)
CreateVolumeRequest & WithSnapshotId(const char *value)
void SetSnapshotId(const Aws::String &value)
CreateVolumeRequest & WithKmsKeyId(Aws::String &&value)
const Aws::String & GetAvailabilityZone() const
void SetVolumeType(const VolumeType &value)
CreateVolumeRequest & WithKmsKeyId(const char *value)
CreateVolumeRequest & WithAvailabilityZone(Aws::String &&value)
CreateVolumeRequest & WithVolumeType(VolumeType &&value)
CreateVolumeRequest & WithVolumeType(const VolumeType &value)
CreateVolumeRequest & WithIops(long value)
void SetKmsKeyId(const Aws::String &value)
void SetAvailabilityZone(const Aws::String &value)
void SetAvailabilityZone(Aws::String &&value)
CreateVolumeRequest & WithKmsKeyId(const Aws::String &value)
CreateVolumeRequest & WithSize(long value)
CreateVolumeRequest & WithDryRun(bool value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
CreateVolumeRequest & WithEncrypted(bool value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
CreateVolumeRequest & WithAvailabilityZone(const Aws::String &value)
CreateVolumeRequest & WithSnapshotId(const Aws::String &value)
const VolumeType & GetVolumeType() const
CreateVolumeRequest & WithSnapshotId(Aws::String &&value)
void SetAvailabilityZone(const char *value)
JSON (JavaScript Object Notation).