AWS SDK for C++  1.9.103
AWS SDK for C++
VolumeAttachment.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Xml
20 {
21  class XmlNode;
22 } // namespace Xml
23 } // namespace Utils
24 namespace EC2
25 {
26 namespace Model
27 {
28 
35  {
36  public:
40 
41  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42  void OutputToStream(Aws::OStream& oStream, const char* location) const;
43 
44 
48  inline const Aws::Utils::DateTime& GetAttachTime() const{ return m_attachTime; }
49 
53  inline bool AttachTimeHasBeenSet() const { return m_attachTimeHasBeenSet; }
54 
58  inline void SetAttachTime(const Aws::Utils::DateTime& value) { m_attachTimeHasBeenSet = true; m_attachTime = value; }
59 
63  inline void SetAttachTime(Aws::Utils::DateTime&& value) { m_attachTimeHasBeenSet = true; m_attachTime = std::move(value); }
64 
68  inline VolumeAttachment& WithAttachTime(const Aws::Utils::DateTime& value) { SetAttachTime(value); return *this;}
69 
73  inline VolumeAttachment& WithAttachTime(Aws::Utils::DateTime&& value) { SetAttachTime(std::move(value)); return *this;}
74 
75 
79  inline const Aws::String& GetDevice() const{ return m_device; }
80 
84  inline bool DeviceHasBeenSet() const { return m_deviceHasBeenSet; }
85 
89  inline void SetDevice(const Aws::String& value) { m_deviceHasBeenSet = true; m_device = value; }
90 
94  inline void SetDevice(Aws::String&& value) { m_deviceHasBeenSet = true; m_device = std::move(value); }
95 
99  inline void SetDevice(const char* value) { m_deviceHasBeenSet = true; m_device.assign(value); }
100 
104  inline VolumeAttachment& WithDevice(const Aws::String& value) { SetDevice(value); return *this;}
105 
109  inline VolumeAttachment& WithDevice(Aws::String&& value) { SetDevice(std::move(value)); return *this;}
110 
114  inline VolumeAttachment& WithDevice(const char* value) { SetDevice(value); return *this;}
115 
116 
120  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
121 
125  inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
126 
130  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
131 
135  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
136 
140  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
141 
145  inline VolumeAttachment& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
146 
150  inline VolumeAttachment& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
151 
155  inline VolumeAttachment& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
156 
157 
161  inline const VolumeAttachmentState& GetState() const{ return m_state; }
162 
166  inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
167 
171  inline void SetState(const VolumeAttachmentState& value) { m_stateHasBeenSet = true; m_state = value; }
172 
176  inline void SetState(VolumeAttachmentState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
177 
181  inline VolumeAttachment& WithState(const VolumeAttachmentState& value) { SetState(value); return *this;}
182 
186  inline VolumeAttachment& WithState(VolumeAttachmentState&& value) { SetState(std::move(value)); return *this;}
187 
188 
192  inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
193 
197  inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
198 
202  inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
203 
207  inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); }
208 
212  inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); }
213 
217  inline VolumeAttachment& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
218 
222  inline VolumeAttachment& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;}
223 
227  inline VolumeAttachment& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
228 
229 
233  inline bool GetDeleteOnTermination() const{ return m_deleteOnTermination; }
234 
238  inline bool DeleteOnTerminationHasBeenSet() const { return m_deleteOnTerminationHasBeenSet; }
239 
243  inline void SetDeleteOnTermination(bool value) { m_deleteOnTerminationHasBeenSet = true; m_deleteOnTermination = value; }
244 
248  inline VolumeAttachment& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;}
249 
250 
251 
252  inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
253 
254 
255  inline bool ResponseMetadataHasBeenSet() const { return m_responseMetadataHasBeenSet; }
256 
257 
258  inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = value; }
259 
260 
261  inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadataHasBeenSet = true; m_responseMetadata = std::move(value); }
262 
263 
264  inline VolumeAttachment& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
265 
266 
267  inline VolumeAttachment& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}
268 
269  private:
270 
271  Aws::Utils::DateTime m_attachTime;
272  bool m_attachTimeHasBeenSet;
273 
274  Aws::String m_device;
275  bool m_deviceHasBeenSet;
276 
277  Aws::String m_instanceId;
278  bool m_instanceIdHasBeenSet;
279 
280  VolumeAttachmentState m_state;
281  bool m_stateHasBeenSet;
282 
283  Aws::String m_volumeId;
284  bool m_volumeIdHasBeenSet;
285 
286  bool m_deleteOnTermination;
287  bool m_deleteOnTerminationHasBeenSet;
288 
289  ResponseMetadata m_responseMetadata;
290  bool m_responseMetadataHasBeenSet;
291  };
292 
293 } // namespace Model
294 } // namespace EC2
295 } // namespace Aws
Aws::Utils::DateTime
Definition: DateTime.h:55
Aws::EC2::Model::VolumeAttachment::WithResponseMetadata
VolumeAttachment & WithResponseMetadata(ResponseMetadata &&value)
Definition: VolumeAttachment.h:267
Aws::EC2::Model::VolumeAttachment::WithDevice
VolumeAttachment & WithDevice(const Aws::String &value)
Definition: VolumeAttachment.h:104
Aws::EC2::Model::VolumeAttachment::SetInstanceId
void SetInstanceId(Aws::String &&value)
Definition: VolumeAttachment.h:135
VolumeAttachmentState.h
Aws::EC2::Model::VolumeAttachment::WithAttachTime
VolumeAttachment & WithAttachTime(Aws::Utils::DateTime &&value)
Definition: VolumeAttachment.h:73
Aws::EC2::Model::VolumeAttachment::WithVolumeId
VolumeAttachment & WithVolumeId(const char *value)
Definition: VolumeAttachment.h:227
Aws::EC2::Model::VolumeAttachment::SetDeleteOnTermination
void SetDeleteOnTermination(bool value)
Definition: VolumeAttachment.h:243
Aws::EC2::Model::VolumeAttachment::WithDeleteOnTermination
VolumeAttachment & WithDeleteOnTermination(bool value)
Definition: VolumeAttachment.h:248
Aws::EC2::Model::VolumeAttachment::SetAttachTime
void SetAttachTime(Aws::Utils::DateTime &&value)
Definition: VolumeAttachment.h:63
Aws::EC2::Model::VolumeAttachment::SetState
void SetState(const VolumeAttachmentState &value)
Definition: VolumeAttachment.h:171
Aws::EC2::Model::VolumeAttachmentState
VolumeAttachmentState
Definition: VolumeAttachmentState.h:17
Aws::EC2::Model::VolumeAttachment::SetVolumeId
void SetVolumeId(Aws::String &&value)
Definition: VolumeAttachment.h:207
DateTime.h
Aws::EC2::Model::VolumeAttachment::SetState
void SetState(VolumeAttachmentState &&value)
Definition: VolumeAttachment.h:176
Aws::EC2::Model::VolumeAttachment::operator=
VolumeAttachment & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::VolumeAttachment::SetResponseMetadata
void SetResponseMetadata(const ResponseMetadata &value)
Definition: VolumeAttachment.h:258
ResponseMetadata.h
Aws::EC2::Model::VolumeAttachment::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::VolumeAttachment::AttachTimeHasBeenSet
bool AttachTimeHasBeenSet() const
Definition: VolumeAttachment.h:53
Aws::EC2::Model::VolumeAttachment::WithDevice
VolumeAttachment & WithDevice(Aws::String &&value)
Definition: VolumeAttachment.h:109
Aws::EC2::Model::VolumeAttachment::StateHasBeenSet
bool StateHasBeenSet() const
Definition: VolumeAttachment.h:166
AWSStreamFwd.h
Aws::EC2::Model::VolumeAttachment::SetAttachTime
void SetAttachTime(const Aws::Utils::DateTime &value)
Definition: VolumeAttachment.h:58
Aws::EC2::Model::VolumeAttachment::SetDevice
void SetDevice(Aws::String &&value)
Definition: VolumeAttachment.h:94
Aws::EC2::Model::VolumeAttachment::WithInstanceId
VolumeAttachment & WithInstanceId(Aws::String &&value)
Definition: VolumeAttachment.h:150
Aws::EC2::Model::VolumeAttachment::DeviceHasBeenSet
bool DeviceHasBeenSet() const
Definition: VolumeAttachment.h:84
Aws::EC2::Model::VolumeAttachment::SetDevice
void SetDevice(const Aws::String &value)
Definition: VolumeAttachment.h:89
Aws::EC2::Model::VolumeAttachment::DeleteOnTerminationHasBeenSet
bool DeleteOnTerminationHasBeenSet() const
Definition: VolumeAttachment.h:238
Aws::EC2::Model::VolumeAttachment::SetInstanceId
void SetInstanceId(const char *value)
Definition: VolumeAttachment.h:140
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::VolumeAttachment::SetDevice
void SetDevice(const char *value)
Definition: VolumeAttachment.h:99
Aws::EC2::Model::VolumeAttachment::WithVolumeId
VolumeAttachment & WithVolumeId(Aws::String &&value)
Definition: VolumeAttachment.h:222
Aws::EC2::Model::VolumeAttachment::GetState
const VolumeAttachmentState & GetState() const
Definition: VolumeAttachment.h:161
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::VolumeAttachment::GetInstanceId
const Aws::String & GetInstanceId() const
Definition: VolumeAttachment.h:120
Aws::EC2::Model::VolumeAttachment::SetInstanceId
void SetInstanceId(const Aws::String &value)
Definition: VolumeAttachment.h:130
Aws::EC2::Model::VolumeAttachment::WithState
VolumeAttachment & WithState(const VolumeAttachmentState &value)
Definition: VolumeAttachment.h:181
Aws::EC2::Model::VolumeAttachment::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::ResponseMetadata
Definition: ResponseMetadata.h:27
Aws::EC2::Model::VolumeAttachment::WithResponseMetadata
VolumeAttachment & WithResponseMetadata(const ResponseMetadata &value)
Definition: VolumeAttachment.h:264
AWSString.h
Aws::EC2::Model::VolumeAttachment::SetVolumeId
void SetVolumeId(const Aws::String &value)
Definition: VolumeAttachment.h:202
Aws::EC2::Model::VolumeAttachment::VolumeAttachment
VolumeAttachment(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::VolumeAttachment::GetDevice
const Aws::String & GetDevice() const
Definition: VolumeAttachment.h:79
Aws::EC2::Model::VolumeAttachment::InstanceIdHasBeenSet
bool InstanceIdHasBeenSet() const
Definition: VolumeAttachment.h:125
Aws::EC2::Model::VolumeAttachment::GetAttachTime
const Aws::Utils::DateTime & GetAttachTime() const
Definition: VolumeAttachment.h:48
Aws::EC2::Model::VolumeAttachment::WithAttachTime
VolumeAttachment & WithAttachTime(const Aws::Utils::DateTime &value)
Definition: VolumeAttachment.h:68
Aws::EC2::Model::VolumeAttachment::WithInstanceId
VolumeAttachment & WithInstanceId(const char *value)
Definition: VolumeAttachment.h:155
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::VolumeAttachment::SetResponseMetadata
void SetResponseMetadata(ResponseMetadata &&value)
Definition: VolumeAttachment.h:261
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::VolumeAttachment::WithVolumeId
VolumeAttachment & WithVolumeId(const Aws::String &value)
Definition: VolumeAttachment.h:217
index
int index
Definition: cJSON.h:181
Aws::EC2::Model::VolumeAttachment::VolumeIdHasBeenSet
bool VolumeIdHasBeenSet() const
Definition: VolumeAttachment.h:197
Aws::EC2::Model::VolumeAttachment::WithInstanceId
VolumeAttachment & WithInstanceId(const Aws::String &value)
Definition: VolumeAttachment.h:145
Aws::EC2::Model::VolumeAttachment::SetVolumeId
void SetVolumeId(const char *value)
Definition: VolumeAttachment.h:212
Aws::EC2::Model::VolumeAttachment::GetResponseMetadata
const ResponseMetadata & GetResponseMetadata() const
Definition: VolumeAttachment.h:252
EC2_EXPORTS.h
Aws::EC2::Model::VolumeAttachment::GetVolumeId
const Aws::String & GetVolumeId() const
Definition: VolumeAttachment.h:192
Aws::EC2::Model::VolumeAttachment::WithState
VolumeAttachment & WithState(VolumeAttachmentState &&value)
Definition: VolumeAttachment.h:186
Aws::EC2::Model::VolumeAttachment::VolumeAttachment
VolumeAttachment()
Aws::EC2::Model::VolumeAttachment::GetDeleteOnTermination
bool GetDeleteOnTermination() const
Definition: VolumeAttachment.h:233
Aws::EC2::Model::VolumeAttachment::ResponseMetadataHasBeenSet
bool ResponseMetadataHasBeenSet() const
Definition: VolumeAttachment.h:255
Aws::EC2::Model::VolumeAttachment
Definition: VolumeAttachment.h:35
Aws::EC2::Model::VolumeAttachment::WithDevice
VolumeAttachment & WithDevice(const char *value)
Definition: VolumeAttachment.h:114