AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
AttachVolumeRequest.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 AttachVolumeRequest() = 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 "AttachVolume"; }
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
40 inline const Aws::String& GetDevice() const { return m_device; }
41 inline bool DeviceHasBeenSet() const { return m_deviceHasBeenSet; }
42 template <typename DeviceT = Aws::String>
43 void SetDevice(DeviceT&& value) {
44 m_deviceHasBeenSet = true;
45 m_device = std::forward<DeviceT>(value);
46 }
47 template <typename DeviceT = Aws::String>
48 AttachVolumeRequest& WithDevice(DeviceT&& value) {
49 SetDevice(std::forward<DeviceT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
59 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
60 template <typename InstanceIdT = Aws::String>
61 void SetInstanceId(InstanceIdT&& value) {
62 m_instanceIdHasBeenSet = true;
63 m_instanceId = std::forward<InstanceIdT>(value);
64 }
65 template <typename InstanceIdT = Aws::String>
66 AttachVolumeRequest& WithInstanceId(InstanceIdT&& value) {
67 SetInstanceId(std::forward<InstanceIdT>(value));
68 return *this;
69 }
71
73
77 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
78 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
79 template <typename VolumeIdT = Aws::String>
80 void SetVolumeId(VolumeIdT&& value) {
81 m_volumeIdHasBeenSet = true;
82 m_volumeId = std::forward<VolumeIdT>(value);
83 }
84 template <typename VolumeIdT = Aws::String>
85 AttachVolumeRequest& WithVolumeId(VolumeIdT&& value) {
86 SetVolumeId(std::forward<VolumeIdT>(value));
87 return *this;
88 }
90
92
98 inline bool GetDryRun() const { return m_dryRun; }
99 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
100 inline void SetDryRun(bool value) {
101 m_dryRunHasBeenSet = true;
102 m_dryRun = value;
103 }
104 inline AttachVolumeRequest& WithDryRun(bool value) {
105 SetDryRun(value);
106 return *this;
107 }
109 private:
110 Aws::String m_device;
111
112 Aws::String m_instanceId;
113
114 Aws::String m_volumeId;
115
116 bool m_dryRun{false};
117 bool m_deviceHasBeenSet = false;
118 bool m_instanceIdHasBeenSet = false;
119 bool m_volumeIdHasBeenSet = false;
120 bool m_dryRunHasBeenSet = false;
121};
122
123} // namespace Model
124} // namespace EC2
125} // namespace Aws
const Aws::String & GetVolumeId() const
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
AttachVolumeRequest & WithInstanceId(InstanceIdT &&value)
void SetInstanceId(InstanceIdT &&value)
AttachVolumeRequest & WithDryRun(bool value)
const Aws::String & GetInstanceId() const
const Aws::String & GetDevice() const
AWS_EC2_API AttachVolumeRequest()=default
AttachVolumeRequest & WithDevice(DeviceT &&value)
virtual const char * GetServiceRequestName() const override
AWS_EC2_API Aws::String SerializePayload() const override
AttachVolumeRequest & WithVolumeId(VolumeIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String