AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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
96 inline int GetEbsCardIndex() const { return m_ebsCardIndex; }
97 inline bool EbsCardIndexHasBeenSet() const { return m_ebsCardIndexHasBeenSet; }
98 inline void SetEbsCardIndex(int value) {
99 m_ebsCardIndexHasBeenSet = true;
100 m_ebsCardIndex = value;
101 }
103 SetEbsCardIndex(value);
104 return *this;
105 }
107
109
115 inline bool GetDryRun() const { return m_dryRun; }
116 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
117 inline void SetDryRun(bool value) {
118 m_dryRunHasBeenSet = true;
119 m_dryRun = value;
120 }
121 inline AttachVolumeRequest& WithDryRun(bool value) {
122 SetDryRun(value);
123 return *this;
124 }
126 private:
127 Aws::String m_device;
128
129 Aws::String m_instanceId;
130
131 Aws::String m_volumeId;
132
133 int m_ebsCardIndex{0};
134
135 bool m_dryRun{false};
136 bool m_deviceHasBeenSet = false;
137 bool m_instanceIdHasBeenSet = false;
138 bool m_volumeIdHasBeenSet = false;
139 bool m_ebsCardIndexHasBeenSet = false;
140 bool m_dryRunHasBeenSet = false;
141};
142
143} // namespace Model
144} // namespace EC2
145} // 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
AttachVolumeRequest & WithEbsCardIndex(int value)
AWS_EC2_API Aws::String SerializePayload() const override
AttachVolumeRequest & WithVolumeId(VolumeIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String