AWS SDK for C++

AWS SDK for C++ Version 1.11.783

Loading...
Searching...
No Matches
DetachVolumeResponse.h
1
6#pragma once
7#include <aws/core/http/HttpResponse.h>
8#include <aws/core/utils/DateTime.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/ResponseMetadata.h>
12#include <aws/ec2/model/VolumeAttachmentState.h>
13
14#include <utility>
15
16namespace Aws {
17template <typename RESULT_TYPE>
18class AmazonWebServiceResult;
19
20namespace Utils {
21namespace Xml {
22class XmlDocument;
23} // namespace Xml
24} // namespace Utils
25namespace EC2 {
26namespace Model {
33 public:
34 AWS_EC2_API DetachVolumeResponse() = default;
37
39
42 inline bool GetDeleteOnTermination() const { return m_deleteOnTermination; }
43 inline void SetDeleteOnTermination(bool value) {
44 m_deleteOnTerminationHasBeenSet = true;
45 m_deleteOnTermination = value;
46 }
49 return *this;
50 }
52
54
58 inline const Aws::String& GetAssociatedResource() const { return m_associatedResource; }
59 template <typename AssociatedResourceT = Aws::String>
60 void SetAssociatedResource(AssociatedResourceT&& value) {
61 m_associatedResourceHasBeenSet = true;
62 m_associatedResource = std::forward<AssociatedResourceT>(value);
63 }
64 template <typename AssociatedResourceT = Aws::String>
65 DetachVolumeResponse& WithAssociatedResource(AssociatedResourceT&& value) {
66 SetAssociatedResource(std::forward<AssociatedResourceT>(value));
67 return *this;
68 }
70
72
78 inline const Aws::String& GetInstanceOwningService() const { return m_instanceOwningService; }
79 template <typename InstanceOwningServiceT = Aws::String>
80 void SetInstanceOwningService(InstanceOwningServiceT&& value) {
81 m_instanceOwningServiceHasBeenSet = true;
82 m_instanceOwningService = std::forward<InstanceOwningServiceT>(value);
83 }
84 template <typename InstanceOwningServiceT = Aws::String>
85 DetachVolumeResponse& WithInstanceOwningService(InstanceOwningServiceT&& value) {
86 SetInstanceOwningService(std::forward<InstanceOwningServiceT>(value));
87 return *this;
88 }
90
92
96 inline int GetEbsCardIndex() const { return m_ebsCardIndex; }
97 inline void SetEbsCardIndex(int value) {
98 m_ebsCardIndexHasBeenSet = true;
99 m_ebsCardIndex = value;
100 }
102 SetEbsCardIndex(value);
103 return *this;
104 }
106
108
111 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
112 template <typename VolumeIdT = Aws::String>
113 void SetVolumeId(VolumeIdT&& value) {
114 m_volumeIdHasBeenSet = true;
115 m_volumeId = std::forward<VolumeIdT>(value);
116 }
117 template <typename VolumeIdT = Aws::String>
118 DetachVolumeResponse& WithVolumeId(VolumeIdT&& value) {
119 SetVolumeId(std::forward<VolumeIdT>(value));
120 return *this;
121 }
123
125
129 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
130 template <typename InstanceIdT = Aws::String>
131 void SetInstanceId(InstanceIdT&& value) {
132 m_instanceIdHasBeenSet = true;
133 m_instanceId = std::forward<InstanceIdT>(value);
134 }
135 template <typename InstanceIdT = Aws::String>
136 DetachVolumeResponse& WithInstanceId(InstanceIdT&& value) {
137 SetInstanceId(std::forward<InstanceIdT>(value));
138 return *this;
139 }
141
143
147 inline const Aws::String& GetDevice() const { return m_device; }
148 template <typename DeviceT = Aws::String>
149 void SetDevice(DeviceT&& value) {
150 m_deviceHasBeenSet = true;
151 m_device = std::forward<DeviceT>(value);
152 }
153 template <typename DeviceT = Aws::String>
155 SetDevice(std::forward<DeviceT>(value));
156 return *this;
157 }
159
161
164 inline VolumeAttachmentState GetState() const { return m_state; }
165 inline void SetState(VolumeAttachmentState value) {
166 m_stateHasBeenSet = true;
167 m_state = value;
168 }
170 SetState(value);
171 return *this;
172 }
174
176
179 inline const Aws::Utils::DateTime& GetAttachTime() const { return m_attachTime; }
180 template <typename AttachTimeT = Aws::Utils::DateTime>
181 void SetAttachTime(AttachTimeT&& value) {
182 m_attachTimeHasBeenSet = true;
183 m_attachTime = std::forward<AttachTimeT>(value);
184 }
185 template <typename AttachTimeT = Aws::Utils::DateTime>
186 DetachVolumeResponse& WithAttachTime(AttachTimeT&& value) {
187 SetAttachTime(std::forward<AttachTimeT>(value));
188 return *this;
189 }
191
193
194 inline const ResponseMetadata& GetResponseMetadata() const { return m_responseMetadata; }
195 template <typename ResponseMetadataT = ResponseMetadata>
196 void SetResponseMetadata(ResponseMetadataT&& value) {
197 m_responseMetadataHasBeenSet = true;
198 m_responseMetadata = std::forward<ResponseMetadataT>(value);
199 }
200 template <typename ResponseMetadataT = ResponseMetadata>
201 DetachVolumeResponse& WithResponseMetadata(ResponseMetadataT&& value) {
202 SetResponseMetadata(std::forward<ResponseMetadataT>(value));
203 return *this;
204 }
206 inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; }
207
208 private:
209 bool m_deleteOnTermination{false};
210
211 Aws::String m_associatedResource;
212
213 Aws::String m_instanceOwningService;
214
215 int m_ebsCardIndex{0};
216
217 Aws::String m_volumeId;
218
219 Aws::String m_instanceId;
220
221 Aws::String m_device;
222
224
225 Aws::Utils::DateTime m_attachTime{};
226
227 ResponseMetadata m_responseMetadata;
228 Aws::Http::HttpResponseCode m_HttpResponseCode;
229 bool m_deleteOnTerminationHasBeenSet = false;
230 bool m_associatedResourceHasBeenSet = false;
231 bool m_instanceOwningServiceHasBeenSet = false;
232 bool m_ebsCardIndexHasBeenSet = false;
233 bool m_volumeIdHasBeenSet = false;
234 bool m_instanceIdHasBeenSet = false;
235 bool m_deviceHasBeenSet = false;
236 bool m_stateHasBeenSet = false;
237 bool m_attachTimeHasBeenSet = false;
238 bool m_responseMetadataHasBeenSet = false;
239};
240
241} // namespace Model
242} // namespace EC2
243} // namespace Aws
DetachVolumeResponse & WithResponseMetadata(ResponseMetadataT &&value)
VolumeAttachmentState GetState() const
const Aws::String & GetInstanceId() const
DetachVolumeResponse & WithAttachTime(AttachTimeT &&value)
void SetResponseMetadata(ResponseMetadataT &&value)
DetachVolumeResponse & WithDevice(DeviceT &&value)
DetachVolumeResponse & WithAssociatedResource(AssociatedResourceT &&value)
AWS_EC2_API DetachVolumeResponse()=default
DetachVolumeResponse & WithDeleteOnTermination(bool value)
void SetState(VolumeAttachmentState value)
const Aws::Utils::DateTime & GetAttachTime() const
AWS_EC2_API DetachVolumeResponse(const Aws::AmazonWebServiceResult< Aws::Utils::Xml::XmlDocument > &result)
DetachVolumeResponse & WithVolumeId(VolumeIdT &&value)
DetachVolumeResponse & WithState(VolumeAttachmentState value)
void SetInstanceOwningService(InstanceOwningServiceT &&value)
DetachVolumeResponse & WithInstanceId(InstanceIdT &&value)
const Aws::String & GetInstanceOwningService() const
const Aws::String & GetAssociatedResource() const
const ResponseMetadata & GetResponseMetadata() const
Aws::Http::HttpResponseCode GetHttpResponseCode() const
void SetAssociatedResource(AssociatedResourceT &&value)
DetachVolumeResponse & WithEbsCardIndex(int value)
DetachVolumeResponse & WithInstanceOwningService(InstanceOwningServiceT &&value)
AWS_EC2_API DetachVolumeResponse & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Xml::XmlDocument > &result)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Xml::XmlDocument XmlDocument