AWS SDK for C++  0.14.3
AWS SDK for C++
EbsBlockDevice.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>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace EC2
31 {
32 namespace Model
33 {
34 
39  {
40  public:
43  EbsBlockDevice& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
51  inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
52 
56  inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
57 
61  inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
62 
66  inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
67 
71  inline EbsBlockDevice& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
72 
76  inline EbsBlockDevice& WithSnapshotId(Aws::String&& value) { SetSnapshotId(value); return *this;}
77 
81  inline EbsBlockDevice& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
82 
93  inline int GetVolumeSize() const{ return m_volumeSize; }
94 
105  inline void SetVolumeSize(int value) { m_volumeSizeHasBeenSet = true; m_volumeSize = value; }
106 
117  inline EbsBlockDevice& WithVolumeSize(int value) { SetVolumeSize(value); return *this;}
118 
122  inline bool GetDeleteOnTermination() const{ return m_deleteOnTermination; }
123 
127  inline void SetDeleteOnTermination(bool value) { m_deleteOnTerminationHasBeenSet = true; m_deleteOnTermination = value; }
128 
132  inline EbsBlockDevice& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;}
133 
139  inline const VolumeType& GetVolumeType() const{ return m_volumeType; }
140 
146  inline void SetVolumeType(const VolumeType& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
147 
153  inline void SetVolumeType(VolumeType&& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; }
154 
160  inline EbsBlockDevice& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;}
161 
167  inline EbsBlockDevice& WithVolumeType(VolumeType&& value) { SetVolumeType(value); return *this;}
168 
184  inline int GetIops() const{ return m_iops; }
185 
201  inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }
202 
218  inline EbsBlockDevice& WithIops(int value) { SetIops(value); return *this;}
219 
224  inline bool GetEncrypted() const{ return m_encrypted; }
225 
230  inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }
231 
236  inline EbsBlockDevice& WithEncrypted(bool value) { SetEncrypted(value); return *this;}
237 
238  private:
239  Aws::String m_snapshotId;
240  bool m_snapshotIdHasBeenSet;
241  int m_volumeSize;
242  bool m_volumeSizeHasBeenSet;
243  bool m_deleteOnTermination;
244  bool m_deleteOnTerminationHasBeenSet;
245  VolumeType m_volumeType;
246  bool m_volumeTypeHasBeenSet;
247  int m_iops;
248  bool m_iopsHasBeenSet;
249  bool m_encrypted;
250  bool m_encryptedHasBeenSet;
251  };
252 
253 } // namespace Model
254 } // namespace EC2
255 } // namespace Aws
EbsBlockDevice & WithSnapshotId(const Aws::String &value)
void SetSnapshotId(const char *value)
const VolumeType & GetVolumeType() const
void SetSnapshotId(const Aws::String &value)
const Aws::String & GetSnapshotId() const
void SetVolumeType(const VolumeType &value)
EbsBlockDevice & WithSnapshotId(const char *value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
EbsBlockDevice & WithVolumeType(VolumeType &&value)
EbsBlockDevice & WithSnapshotId(Aws::String &&value)
void SetDeleteOnTermination(bool value)
EbsBlockDevice & WithVolumeType(const VolumeType &value)
EbsBlockDevice & WithDeleteOnTermination(bool value)
void SetVolumeType(VolumeType &&value)
EbsBlockDevice & WithIops(int value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
EbsBlockDevice & WithEncrypted(bool value)
void SetSnapshotId(Aws::String &&value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
EbsBlockDevice & WithVolumeSize(int value)
JSON (JavaScript Object Notation).