AWS SDK for C++  1.9.70
AWS SDK for C++
AttachVolumeRequest.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 "AttachVolume"; }
31 
32  Aws::String SerializePayload() const override;
33 
34  protected:
35  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
36 
37  public:
38 
43  inline const Aws::String& GetDevice() const{ return m_device; }
44 
49  inline bool DeviceHasBeenSet() const { return m_deviceHasBeenSet; }
50 
55  inline void SetDevice(const Aws::String& value) { m_deviceHasBeenSet = true; m_device = value; }
56 
61  inline void SetDevice(Aws::String&& value) { m_deviceHasBeenSet = true; m_device = std::move(value); }
62 
67  inline void SetDevice(const char* value) { m_deviceHasBeenSet = true; m_device.assign(value); }
68 
73  inline AttachVolumeRequest& WithDevice(const Aws::String& value) { SetDevice(value); return *this;}
74 
79  inline AttachVolumeRequest& WithDevice(Aws::String&& value) { SetDevice(std::move(value)); return *this;}
80 
85  inline AttachVolumeRequest& WithDevice(const char* value) { SetDevice(value); return *this;}
86 
87 
91  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
92 
96  inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
97 
101  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
102 
106  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
107 
111  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
112 
116  inline AttachVolumeRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
117 
121  inline AttachVolumeRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
122 
126  inline AttachVolumeRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
127 
128 
133  inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
134 
139  inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
140 
145  inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
146 
151  inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); }
152 
157  inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); }
158 
163  inline AttachVolumeRequest& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
164 
169  inline AttachVolumeRequest& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;}
170 
175  inline AttachVolumeRequest& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
176 
177 
184  inline bool GetDryRun() const{ return m_dryRun; }
185 
192  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
193 
200  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
201 
208  inline AttachVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
209 
210  private:
211 
212  Aws::String m_device;
213  bool m_deviceHasBeenSet;
214 
215  Aws::String m_instanceId;
216  bool m_instanceIdHasBeenSet;
217 
218  Aws::String m_volumeId;
219  bool m_volumeIdHasBeenSet;
220 
221  bool m_dryRun;
222  bool m_dryRunHasBeenSet;
223  };
224 
225 } // namespace Model
226 } // namespace EC2
227 } // namespace Aws
Aws::EC2::Model::AttachVolumeRequest::SetDevice
void SetDevice(const Aws::String &value)
Definition: AttachVolumeRequest.h:55
Aws::EC2::Model::AttachVolumeRequest::WithInstanceId
AttachVolumeRequest & WithInstanceId(Aws::String &&value)
Definition: AttachVolumeRequest.h:121
Aws::EC2::Model::AttachVolumeRequest::WithVolumeId
AttachVolumeRequest & WithVolumeId(const Aws::String &value)
Definition: AttachVolumeRequest.h:163
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::AttachVolumeRequest::SetDevice
void SetDevice(const char *value)
Definition: AttachVolumeRequest.h:67
Aws::EC2::Model::AttachVolumeRequest::WithDevice
AttachVolumeRequest & WithDevice(const Aws::String &value)
Definition: AttachVolumeRequest.h:73
Aws::EC2::Model::AttachVolumeRequest::WithInstanceId
AttachVolumeRequest & WithInstanceId(const Aws::String &value)
Definition: AttachVolumeRequest.h:116
Aws::EC2::Model::AttachVolumeRequest::SetDevice
void SetDevice(Aws::String &&value)
Definition: AttachVolumeRequest.h:61
Aws::EC2::Model::AttachVolumeRequest::WithInstanceId
AttachVolumeRequest & WithInstanceId(const char *value)
Definition: AttachVolumeRequest.h:126
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::AttachVolumeRequest::InstanceIdHasBeenSet
bool InstanceIdHasBeenSet() const
Definition: AttachVolumeRequest.h:96
Aws::EC2::Model::AttachVolumeRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: AttachVolumeRequest.h:192
Aws::EC2::Model::AttachVolumeRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::EC2::Model::AttachVolumeRequest::WithVolumeId
AttachVolumeRequest & WithVolumeId(const char *value)
Definition: AttachVolumeRequest.h:175
Aws::EC2::Model::AttachVolumeRequest::SetInstanceId
void SetInstanceId(const char *value)
Definition: AttachVolumeRequest.h:111
Aws::EC2::Model::AttachVolumeRequest::SetInstanceId
void SetInstanceId(const Aws::String &value)
Definition: AttachVolumeRequest.h:101
Aws::EC2::Model::AttachVolumeRequest
Definition: AttachVolumeRequest.h:22
Aws::EC2::Model::AttachVolumeRequest::WithDevice
AttachVolumeRequest & WithDevice(const char *value)
Definition: AttachVolumeRequest.h:85
EC2Request.h
Aws::EC2::Model::AttachVolumeRequest::SetVolumeId
void SetVolumeId(Aws::String &&value)
Definition: AttachVolumeRequest.h:151
Aws::EC2::Model::AttachVolumeRequest::SetVolumeId
void SetVolumeId(const Aws::String &value)
Definition: AttachVolumeRequest.h:145
Aws::EC2::Model::AttachVolumeRequest::WithDryRun
AttachVolumeRequest & WithDryRun(bool value)
Definition: AttachVolumeRequest.h:208
AWSString.h
Aws::EC2::Model::AttachVolumeRequest::GetVolumeId
const Aws::String & GetVolumeId() const
Definition: AttachVolumeRequest.h:133
Aws::EC2::Model::AttachVolumeRequest::SetInstanceId
void SetInstanceId(Aws::String &&value)
Definition: AttachVolumeRequest.h:106
Aws::EC2::Model::AttachVolumeRequest::GetDevice
const Aws::String & GetDevice() const
Definition: AttachVolumeRequest.h:43
Aws::EC2::Model::AttachVolumeRequest::AttachVolumeRequest
AttachVolumeRequest()
Aws::EC2::Model::AttachVolumeRequest::GetInstanceId
const Aws::String & GetInstanceId() const
Definition: AttachVolumeRequest.h:91
Aws::EC2::Model::AttachVolumeRequest::SetVolumeId
void SetVolumeId(const char *value)
Definition: AttachVolumeRequest.h:157
Aws::EC2::Model::AttachVolumeRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: AttachVolumeRequest.h:30
Aws::EC2::Model::AttachVolumeRequest::SerializePayload
Aws::String SerializePayload() const override
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::AttachVolumeRequest::WithDevice
AttachVolumeRequest & WithDevice(Aws::String &&value)
Definition: AttachVolumeRequest.h:79
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::AttachVolumeRequest::DeviceHasBeenSet
bool DeviceHasBeenSet() const
Definition: AttachVolumeRequest.h:49
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::AttachVolumeRequest::VolumeIdHasBeenSet
bool VolumeIdHasBeenSet() const
Definition: AttachVolumeRequest.h:139
Aws::EC2::Model::AttachVolumeRequest::WithVolumeId
AttachVolumeRequest & WithVolumeId(Aws::String &&value)
Definition: AttachVolumeRequest.h:169
EC2_EXPORTS.h
Aws::EC2::Model::AttachVolumeRequest::GetDryRun
bool GetDryRun() const
Definition: AttachVolumeRequest.h:184
Aws::EC2::Model::AttachVolumeRequest::SetDryRun
void SetDryRun(bool value)
Definition: AttachVolumeRequest.h:200