AWS SDK for C++  0.14.3
AWS SDK for C++
VolumeAttachment.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>
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace EC2
33 {
34 namespace Model
35 {
36 
41  {
42  public:
45  VolumeAttachment& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
53  inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
54 
58  inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
59 
63  inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
64 
68  inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); }
69 
73  inline VolumeAttachment& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
74 
78  inline VolumeAttachment& WithVolumeId(Aws::String&& value) { SetVolumeId(value); return *this;}
79 
83  inline VolumeAttachment& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
84 
88  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
89 
93  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
94 
98  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
99 
103  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
104 
108  inline VolumeAttachment& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
109 
113  inline VolumeAttachment& WithInstanceId(Aws::String&& value) { SetInstanceId(value); return *this;}
114 
118  inline VolumeAttachment& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
119 
123  inline const Aws::String& GetDevice() const{ return m_device; }
124 
128  inline void SetDevice(const Aws::String& value) { m_deviceHasBeenSet = true; m_device = value; }
129 
133  inline void SetDevice(Aws::String&& value) { m_deviceHasBeenSet = true; m_device = value; }
134 
138  inline void SetDevice(const char* value) { m_deviceHasBeenSet = true; m_device.assign(value); }
139 
143  inline VolumeAttachment& WithDevice(const Aws::String& value) { SetDevice(value); return *this;}
144 
148  inline VolumeAttachment& WithDevice(Aws::String&& value) { SetDevice(value); return *this;}
149 
153  inline VolumeAttachment& WithDevice(const char* value) { SetDevice(value); return *this;}
154 
158  inline const VolumeAttachmentState& GetState() const{ return m_state; }
159 
163  inline void SetState(const VolumeAttachmentState& value) { m_stateHasBeenSet = true; m_state = value; }
164 
168  inline void SetState(VolumeAttachmentState&& value) { m_stateHasBeenSet = true; m_state = value; }
169 
173  inline VolumeAttachment& WithState(const VolumeAttachmentState& value) { SetState(value); return *this;}
174 
178  inline VolumeAttachment& WithState(VolumeAttachmentState&& value) { SetState(value); return *this;}
179 
183  inline const Aws::Utils::DateTime& GetAttachTime() const{ return m_attachTime; }
184 
188  inline void SetAttachTime(const Aws::Utils::DateTime& value) { m_attachTimeHasBeenSet = true; m_attachTime = value; }
189 
193  inline void SetAttachTime(Aws::Utils::DateTime&& value) { m_attachTimeHasBeenSet = true; m_attachTime = value; }
194 
198  inline VolumeAttachment& WithAttachTime(const Aws::Utils::DateTime& value) { SetAttachTime(value); return *this;}
199 
203  inline VolumeAttachment& WithAttachTime(Aws::Utils::DateTime&& value) { SetAttachTime(value); return *this;}
204 
208  inline bool GetDeleteOnTermination() const{ return m_deleteOnTermination; }
209 
213  inline void SetDeleteOnTermination(bool value) { m_deleteOnTerminationHasBeenSet = true; m_deleteOnTermination = value; }
214 
218  inline VolumeAttachment& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;}
219 
220 
221  inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
222 
223 
224  inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = value; }
225 
226 
227  inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = value; }
228 
229 
230  inline VolumeAttachment& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
231 
232 
233  inline VolumeAttachment& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(value); return *this;}
234 
235  private:
236  Aws::String m_volumeId;
237  bool m_volumeIdHasBeenSet;
238  Aws::String m_instanceId;
239  bool m_instanceIdHasBeenSet;
240  Aws::String m_device;
241  bool m_deviceHasBeenSet;
242  VolumeAttachmentState m_state;
243  bool m_stateHasBeenSet;
244  Aws::Utils::DateTime m_attachTime;
245  bool m_attachTimeHasBeenSet;
246  bool m_deleteOnTermination;
247  bool m_deleteOnTerminationHasBeenSet;
248  ResponseMetadata m_responseMetadata;
249  bool m_responseMetadataHasBeenSet;
250  };
251 
252 } // namespace Model
253 } // namespace EC2
254 } // namespace Aws
void SetVolumeId(const Aws::String &value)
void SetVolumeId(Aws::String &&value)
void SetInstanceId(Aws::String &&value)
VolumeAttachment & WithInstanceId(const char *value)
void SetInstanceId(const char *value)
VolumeAttachment & WithDevice(Aws::String &&value)
VolumeAttachment & WithVolumeId(const Aws::String &value)
void SetState(VolumeAttachmentState &&value)
void SetResponseMetadata(ResponseMetadata &&value)
const Aws::String & GetVolumeId() const
void SetInstanceId(const Aws::String &value)
const Aws::String & GetInstanceId() const
VolumeAttachment & WithDevice(const Aws::String &value)
VolumeAttachment & WithDeleteOnTermination(bool value)
VolumeAttachment & WithAttachTime(Aws::Utils::DateTime &&value)
VolumeAttachment & WithInstanceId(Aws::String &&value)
void SetAttachTime(const Aws::Utils::DateTime &value)
VolumeAttachment & WithVolumeId(Aws::String &&value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
VolumeAttachment & WithState(VolumeAttachmentState &&value)
const ResponseMetadata & GetResponseMetadata() const
void SetVolumeId(const char *value)
const VolumeAttachmentState & GetState() const
VolumeAttachment & WithResponseMetadata(ResponseMetadata &&value)
const Aws::String & GetDevice() const
const Aws::Utils::DateTime & GetAttachTime() const
void SetState(const VolumeAttachmentState &value)
VolumeAttachment & WithState(const VolumeAttachmentState &value)
void SetAttachTime(Aws::Utils::DateTime &&value)
void SetDevice(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
VolumeAttachment & WithDevice(const char *value)
VolumeAttachment & WithResponseMetadata(const ResponseMetadata &value)
VolumeAttachment & WithInstanceId(const Aws::String &value)
void SetResponseMetadata(const ResponseMetadata &value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
VolumeAttachment & WithAttachTime(const Aws::Utils::DateTime &value)
void SetDevice(const Aws::String &value)
void SetDevice(Aws::String &&value)
JSON (JavaScript Object Notation).
VolumeAttachment & WithVolumeId(const char *value)