AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
DetachVolumeRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace EC2 {
15namespace Model {
16
20 public:
21 AWS_EC2_API DetachVolumeRequest() = default;
22
23 // Service request name is the Operation name which will send this request out,
24 // each operation should has unique request name, so that we can get operation's name from this request.
25 // Note: this is not true for response, multiple operations may have the same response name,
26 // so we can not get operation's name from response.
27 inline virtual const char* GetServiceRequestName() const override { return "DetachVolume"; }
28
29 AWS_EC2_API Aws::String SerializePayload() const override;
30
31 protected:
32 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
33
34 public:
36
39 inline const Aws::String& GetDevice() const { return m_device; }
40 inline bool DeviceHasBeenSet() const { return m_deviceHasBeenSet; }
41 template <typename DeviceT = Aws::String>
42 void SetDevice(DeviceT&& value) {
43 m_deviceHasBeenSet = true;
44 m_device = std::forward<DeviceT>(value);
45 }
46 template <typename DeviceT = Aws::String>
47 DetachVolumeRequest& WithDevice(DeviceT&& value) {
48 SetDevice(std::forward<DeviceT>(value));
49 return *this;
50 }
52
54
63 inline bool GetForce() const { return m_force; }
64 inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; }
65 inline void SetForce(bool value) {
66 m_forceHasBeenSet = true;
67 m_force = value;
68 }
69 inline DetachVolumeRequest& WithForce(bool value) {
70 SetForce(value);
71 return *this;
72 }
74
76
80 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
81 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
82 template <typename InstanceIdT = Aws::String>
83 void SetInstanceId(InstanceIdT&& value) {
84 m_instanceIdHasBeenSet = true;
85 m_instanceId = std::forward<InstanceIdT>(value);
86 }
87 template <typename InstanceIdT = Aws::String>
88 DetachVolumeRequest& WithInstanceId(InstanceIdT&& value) {
89 SetInstanceId(std::forward<InstanceIdT>(value));
90 return *this;
91 }
93
95
98 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
99 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
100 template <typename VolumeIdT = Aws::String>
101 void SetVolumeId(VolumeIdT&& value) {
102 m_volumeIdHasBeenSet = true;
103 m_volumeId = std::forward<VolumeIdT>(value);
104 }
105 template <typename VolumeIdT = Aws::String>
106 DetachVolumeRequest& WithVolumeId(VolumeIdT&& value) {
107 SetVolumeId(std::forward<VolumeIdT>(value));
108 return *this;
109 }
111
113
119 inline bool GetDryRun() const { return m_dryRun; }
120 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
121 inline void SetDryRun(bool value) {
122 m_dryRunHasBeenSet = true;
123 m_dryRun = value;
124 }
125 inline DetachVolumeRequest& WithDryRun(bool value) {
126 SetDryRun(value);
127 return *this;
128 }
130 private:
131 Aws::String m_device;
132
133 bool m_force{false};
134
135 Aws::String m_instanceId;
136
137 Aws::String m_volumeId;
138
139 bool m_dryRun{false};
140 bool m_deviceHasBeenSet = false;
141 bool m_forceHasBeenSet = false;
142 bool m_instanceIdHasBeenSet = false;
143 bool m_volumeIdHasBeenSet = false;
144 bool m_dryRunHasBeenSet = false;
145};
146
147} // namespace Model
148} // namespace EC2
149} // namespace Aws
DetachVolumeRequest & WithDryRun(bool value)
DetachVolumeRequest & WithInstanceId(InstanceIdT &&value)
const Aws::String & GetInstanceId() const
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AWS_EC2_API DetachVolumeRequest()=default
DetachVolumeRequest & WithVolumeId(VolumeIdT &&value)
const Aws::String & GetVolumeId() const
void SetInstanceId(InstanceIdT &&value)
virtual const char * GetServiceRequestName() const override
DetachVolumeRequest & WithForce(bool value)
AWS_EC2_API Aws::String SerializePayload() const override
const Aws::String & GetDevice() const
DetachVolumeRequest & WithDevice(DeviceT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String