AWS SDK for C++  1.9.67
AWS SDK for C++
DetachVolumeRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace EC2
15 {
16 namespace Model
17 {
18 
22  {
23  public:
25 
26  // Service request name is the Operation name which will send this request out,
27  // each operation should has unique request name, so that we can get operation's name from this request.
28  // Note: this is not true for response, multiple operations may have the same response name,
29  // so we can not get operation's name from response.
30  inline virtual const char* GetServiceRequestName() const override { return "DetachVolume"; }
31 
32  Aws::String SerializePayload() const override;
33 
34  protected:
35  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
36 
37  public:
38 
42  inline const Aws::String& GetDevice() const{ return m_device; }
43 
47  inline bool DeviceHasBeenSet() const { return m_deviceHasBeenSet; }
48 
52  inline void SetDevice(const Aws::String& value) { m_deviceHasBeenSet = true; m_device = value; }
53 
57  inline void SetDevice(Aws::String&& value) { m_deviceHasBeenSet = true; m_device = std::move(value); }
58 
62  inline void SetDevice(const char* value) { m_deviceHasBeenSet = true; m_device.assign(value); }
63 
67  inline DetachVolumeRequest& WithDevice(const Aws::String& value) { SetDevice(value); return *this;}
68 
72  inline DetachVolumeRequest& WithDevice(Aws::String&& value) { SetDevice(std::move(value)); return *this;}
73 
77  inline DetachVolumeRequest& WithDevice(const char* value) { SetDevice(value); return *this;}
78 
79 
89  inline bool GetForce() const{ return m_force; }
90 
100  inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; }
101 
111  inline void SetForce(bool value) { m_forceHasBeenSet = true; m_force = value; }
112 
122  inline DetachVolumeRequest& WithForce(bool value) { SetForce(value); return *this;}
123 
124 
129  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
130 
135  inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
136 
141  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
142 
147  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
148 
153  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
154 
159  inline DetachVolumeRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
160 
165  inline DetachVolumeRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
166 
171  inline DetachVolumeRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
172 
173 
177  inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
178 
182  inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
183 
187  inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
188 
192  inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); }
193 
197  inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); }
198 
202  inline DetachVolumeRequest& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
203 
207  inline DetachVolumeRequest& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;}
208 
212  inline DetachVolumeRequest& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
213 
214 
221  inline bool GetDryRun() const{ return m_dryRun; }
222 
229  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
230 
237  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
238 
245  inline DetachVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
246 
247  private:
248 
249  Aws::String m_device;
250  bool m_deviceHasBeenSet;
251 
252  bool m_force;
253  bool m_forceHasBeenSet;
254 
255  Aws::String m_instanceId;
256  bool m_instanceIdHasBeenSet;
257 
258  Aws::String m_volumeId;
259  bool m_volumeIdHasBeenSet;
260 
261  bool m_dryRun;
262  bool m_dryRunHasBeenSet;
263  };
264 
265 } // namespace Model
266 } // namespace EC2
267 } // namespace Aws
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::DetachVolumeRequest::SetVolumeId
void SetVolumeId(const Aws::String &value)
Definition: DetachVolumeRequest.h:187
Aws::EC2::Model::DetachVolumeRequest::WithDevice
DetachVolumeRequest & WithDevice(const Aws::String &value)
Definition: DetachVolumeRequest.h:67
Aws::EC2::Model::DetachVolumeRequest::GetInstanceId
const Aws::String & GetInstanceId() const
Definition: DetachVolumeRequest.h:129
Aws::EC2::Model::DetachVolumeRequest::GetVolumeId
const Aws::String & GetVolumeId() const
Definition: DetachVolumeRequest.h:177
Aws::EC2::Model::DetachVolumeRequest::WithDevice
DetachVolumeRequest & WithDevice(const char *value)
Definition: DetachVolumeRequest.h:77
Aws::EC2::Model::DetachVolumeRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: DetachVolumeRequest.h:30
Aws::EC2::Model::DetachVolumeRequest::DeviceHasBeenSet
bool DeviceHasBeenSet() const
Definition: DetachVolumeRequest.h:47
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::DetachVolumeRequest::SetInstanceId
void SetInstanceId(const Aws::String &value)
Definition: DetachVolumeRequest.h:141
Aws::EC2::Model::DetachVolumeRequest::SetDryRun
void SetDryRun(bool value)
Definition: DetachVolumeRequest.h:237
Aws::EC2::Model::DetachVolumeRequest::WithVolumeId
DetachVolumeRequest & WithVolumeId(Aws::String &&value)
Definition: DetachVolumeRequest.h:207
Aws::EC2::Model::DetachVolumeRequest::SetInstanceId
void SetInstanceId(Aws::String &&value)
Definition: DetachVolumeRequest.h:147
Aws::EC2::Model::DetachVolumeRequest::WithInstanceId
DetachVolumeRequest & WithInstanceId(const Aws::String &value)
Definition: DetachVolumeRequest.h:159
Aws::EC2::Model::DetachVolumeRequest::SetVolumeId
void SetVolumeId(Aws::String &&value)
Definition: DetachVolumeRequest.h:192
Aws::EC2::Model::DetachVolumeRequest::InstanceIdHasBeenSet
bool InstanceIdHasBeenSet() const
Definition: DetachVolumeRequest.h:135
EC2Request.h
Aws::EC2::Model::DetachVolumeRequest::VolumeIdHasBeenSet
bool VolumeIdHasBeenSet() const
Definition: DetachVolumeRequest.h:182
AWSString.h
Aws::EC2::Model::DetachVolumeRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: DetachVolumeRequest.h:229
Aws::EC2::Model::DetachVolumeRequest::WithForce
DetachVolumeRequest & WithForce(bool value)
Definition: DetachVolumeRequest.h:122
Aws::EC2::Model::DetachVolumeRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::DetachVolumeRequest
Definition: DetachVolumeRequest.h:22
Aws::EC2::Model::DetachVolumeRequest::SetInstanceId
void SetInstanceId(const char *value)
Definition: DetachVolumeRequest.h:153
Aws::EC2::Model::DetachVolumeRequest::WithInstanceId
DetachVolumeRequest & WithInstanceId(Aws::String &&value)
Definition: DetachVolumeRequest.h:165
Aws::EC2::Model::DetachVolumeRequest::SetForce
void SetForce(bool value)
Definition: DetachVolumeRequest.h:111
Aws::EC2::Model::DetachVolumeRequest::SetDevice
void SetDevice(const char *value)
Definition: DetachVolumeRequest.h:62
Aws::EC2::Model::DetachVolumeRequest::SetDevice
void SetDevice(const Aws::String &value)
Definition: DetachVolumeRequest.h:52
Aws::EC2::Model::DetachVolumeRequest::SetDevice
void SetDevice(Aws::String &&value)
Definition: DetachVolumeRequest.h:57
Aws::EC2::Model::DetachVolumeRequest::WithDevice
DetachVolumeRequest & WithDevice(Aws::String &&value)
Definition: DetachVolumeRequest.h:72
Aws::EC2::Model::DetachVolumeRequest::WithDryRun
DetachVolumeRequest & WithDryRun(bool value)
Definition: DetachVolumeRequest.h:245
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::DetachVolumeRequest::GetDevice
const Aws::String & GetDevice() const
Definition: DetachVolumeRequest.h:42
Aws::EC2::Model::DetachVolumeRequest::WithInstanceId
DetachVolumeRequest & WithInstanceId(const char *value)
Definition: DetachVolumeRequest.h:171
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::DetachVolumeRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::EC2::Model::DetachVolumeRequest::GetDryRun
bool GetDryRun() const
Definition: DetachVolumeRequest.h:221
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::DetachVolumeRequest::GetForce
bool GetForce() const
Definition: DetachVolumeRequest.h:89
Aws::EC2::Model::DetachVolumeRequest::DetachVolumeRequest
DetachVolumeRequest()
Aws::EC2::Model::DetachVolumeRequest::ForceHasBeenSet
bool ForceHasBeenSet() const
Definition: DetachVolumeRequest.h:100
Aws::EC2::Model::DetachVolumeRequest::SetVolumeId
void SetVolumeId(const char *value)
Definition: DetachVolumeRequest.h:197
Aws::EC2::Model::DetachVolumeRequest::WithVolumeId
DetachVolumeRequest & WithVolumeId(const Aws::String &value)
Definition: DetachVolumeRequest.h:202
EC2_EXPORTS.h
Aws::EC2::Model::DetachVolumeRequest::WithVolumeId
DetachVolumeRequest & WithVolumeId(const char *value)
Definition: DetachVolumeRequest.h:212