AWS SDK for C++  1.7.243
AWS SDK for C++
AttachVolumeRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2017 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 
16 #pragma once
17 #include <aws/ec2/EC2_EXPORTS.h>
18 #include <aws/ec2/EC2Request.h>
20 #include <utility>
21 
22 namespace Aws
23 {
24 namespace EC2
25 {
26 namespace Model
27 {
28 
32  {
33  public:
35 
36  // Service request name is the Operation name which will send this request out,
37  // each operation should has unique request name, so that we can get operation's name from this request.
38  // Note: this is not true for response, multiple operations may have the same response name,
39  // so we can not get operation's name from response.
40  inline virtual const char* GetServiceRequestName() const override { return "AttachVolume"; }
41 
42  Aws::String SerializePayload() const override;
43 
44  protected:
45  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
46 
47  public:
48 
53  inline const Aws::String& GetDevice() const{ return m_device; }
54 
59  inline bool DeviceHasBeenSet() const { return m_deviceHasBeenSet; }
60 
65  inline void SetDevice(const Aws::String& value) { m_deviceHasBeenSet = true; m_device = value; }
66 
71  inline void SetDevice(Aws::String&& value) { m_deviceHasBeenSet = true; m_device = std::move(value); }
72 
77  inline void SetDevice(const char* value) { m_deviceHasBeenSet = true; m_device.assign(value); }
78 
83  inline AttachVolumeRequest& WithDevice(const Aws::String& value) { SetDevice(value); return *this;}
84 
89  inline AttachVolumeRequest& WithDevice(Aws::String&& value) { SetDevice(std::move(value)); return *this;}
90 
95  inline AttachVolumeRequest& WithDevice(const char* value) { SetDevice(value); return *this;}
96 
97 
101  inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
102 
106  inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
107 
111  inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
112 
116  inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
117 
121  inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
122 
126  inline AttachVolumeRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
127 
131  inline AttachVolumeRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
132 
136  inline AttachVolumeRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
137 
138 
143  inline const Aws::String& GetVolumeId() const{ return m_volumeId; }
144 
149  inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
150 
155  inline void SetVolumeId(const Aws::String& value) { m_volumeIdHasBeenSet = true; m_volumeId = value; }
156 
161  inline void SetVolumeId(Aws::String&& value) { m_volumeIdHasBeenSet = true; m_volumeId = std::move(value); }
162 
167  inline void SetVolumeId(const char* value) { m_volumeIdHasBeenSet = true; m_volumeId.assign(value); }
168 
173  inline AttachVolumeRequest& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;}
174 
179  inline AttachVolumeRequest& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;}
180 
185  inline AttachVolumeRequest& WithVolumeId(const char* value) { SetVolumeId(value); return *this;}
186 
187 
194  inline bool GetDryRun() const{ return m_dryRun; }
195 
202  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
203 
210  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
211 
218  inline AttachVolumeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
219 
220  private:
221 
222  Aws::String m_device;
223  bool m_deviceHasBeenSet;
224 
225  Aws::String m_instanceId;
226  bool m_instanceIdHasBeenSet;
227 
228  Aws::String m_volumeId;
229  bool m_volumeIdHasBeenSet;
230 
231  bool m_dryRun;
232  bool m_dryRunHasBeenSet;
233  };
234 
235 } // namespace Model
236 } // namespace EC2
237 } // namespace Aws
AttachVolumeRequest & WithDryRun(bool value)
void SetVolumeId(const Aws::String &value)
AttachVolumeRequest & WithDevice(const char *value)
AttachVolumeRequest & WithDevice(const Aws::String &value)
const Aws::String & GetVolumeId() const
const Aws::String & GetDevice() const
void SetInstanceId(Aws::String &&value)
const Aws::String & GetInstanceId() const
AttachVolumeRequest & WithInstanceId(const char *value)
void SetDevice(const Aws::String &value)
AttachVolumeRequest & WithInstanceId(const Aws::String &value)
virtual const char * GetServiceRequestName() const override
AttachVolumeRequest & WithVolumeId(Aws::String &&value)
AttachVolumeRequest & WithInstanceId(Aws::String &&value)
AttachVolumeRequest & WithDevice(Aws::String &&value)
AttachVolumeRequest & WithVolumeId(const Aws::String &value)
AttachVolumeRequest & WithVolumeId(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:107
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:38
void SetInstanceId(const Aws::String &value)