AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
VolumeAttachment.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.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 {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2 {
23namespace Model {
24
31 public:
32 AWS_EC2_API VolumeAttachment() = default;
33 AWS_EC2_API VolumeAttachment(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline bool GetDeleteOnTermination() const { return m_deleteOnTermination; }
44 inline bool DeleteOnTerminationHasBeenSet() const { return m_deleteOnTerminationHasBeenSet; }
45 inline void SetDeleteOnTermination(bool value) {
46 m_deleteOnTerminationHasBeenSet = true;
47 m_deleteOnTermination = value;
48 }
51 return *this;
52 }
54
56
60 inline const Aws::String& GetAssociatedResource() const { return m_associatedResource; }
61 inline bool AssociatedResourceHasBeenSet() const { return m_associatedResourceHasBeenSet; }
62 template <typename AssociatedResourceT = Aws::String>
63 void SetAssociatedResource(AssociatedResourceT&& value) {
64 m_associatedResourceHasBeenSet = true;
65 m_associatedResource = std::forward<AssociatedResourceT>(value);
66 }
67 template <typename AssociatedResourceT = Aws::String>
68 VolumeAttachment& WithAssociatedResource(AssociatedResourceT&& value) {
69 SetAssociatedResource(std::forward<AssociatedResourceT>(value));
70 return *this;
71 }
73
75
81 inline const Aws::String& GetInstanceOwningService() const { return m_instanceOwningService; }
82 inline bool InstanceOwningServiceHasBeenSet() const { return m_instanceOwningServiceHasBeenSet; }
83 template <typename InstanceOwningServiceT = Aws::String>
84 void SetInstanceOwningService(InstanceOwningServiceT&& value) {
85 m_instanceOwningServiceHasBeenSet = true;
86 m_instanceOwningService = std::forward<InstanceOwningServiceT>(value);
87 }
88 template <typename InstanceOwningServiceT = Aws::String>
89 VolumeAttachment& WithInstanceOwningService(InstanceOwningServiceT&& value) {
90 SetInstanceOwningService(std::forward<InstanceOwningServiceT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
100 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
101 template <typename VolumeIdT = Aws::String>
102 void SetVolumeId(VolumeIdT&& value) {
103 m_volumeIdHasBeenSet = true;
104 m_volumeId = std::forward<VolumeIdT>(value);
105 }
106 template <typename VolumeIdT = Aws::String>
107 VolumeAttachment& WithVolumeId(VolumeIdT&& value) {
108 SetVolumeId(std::forward<VolumeIdT>(value));
109 return *this;
110 }
112
114
118 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
119 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
120 template <typename InstanceIdT = Aws::String>
121 void SetInstanceId(InstanceIdT&& value) {
122 m_instanceIdHasBeenSet = true;
123 m_instanceId = std::forward<InstanceIdT>(value);
124 }
125 template <typename InstanceIdT = Aws::String>
126 VolumeAttachment& WithInstanceId(InstanceIdT&& value) {
127 SetInstanceId(std::forward<InstanceIdT>(value));
128 return *this;
129 }
131
133
137 inline const Aws::String& GetDevice() const { return m_device; }
138 inline bool DeviceHasBeenSet() const { return m_deviceHasBeenSet; }
139 template <typename DeviceT = Aws::String>
140 void SetDevice(DeviceT&& value) {
141 m_deviceHasBeenSet = true;
142 m_device = std::forward<DeviceT>(value);
143 }
144 template <typename DeviceT = Aws::String>
145 VolumeAttachment& WithDevice(DeviceT&& value) {
146 SetDevice(std::forward<DeviceT>(value));
147 return *this;
148 }
150
152
155 inline VolumeAttachmentState GetState() const { return m_state; }
156 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
157 inline void SetState(VolumeAttachmentState value) {
158 m_stateHasBeenSet = true;
159 m_state = value;
160 }
162 SetState(value);
163 return *this;
164 }
166
168
171 inline const Aws::Utils::DateTime& GetAttachTime() const { return m_attachTime; }
172 inline bool AttachTimeHasBeenSet() const { return m_attachTimeHasBeenSet; }
173 template <typename AttachTimeT = Aws::Utils::DateTime>
174 void SetAttachTime(AttachTimeT&& value) {
175 m_attachTimeHasBeenSet = true;
176 m_attachTime = std::forward<AttachTimeT>(value);
177 }
178 template <typename AttachTimeT = Aws::Utils::DateTime>
179 VolumeAttachment& WithAttachTime(AttachTimeT&& value) {
180 SetAttachTime(std::forward<AttachTimeT>(value));
181 return *this;
182 }
184
186
187 inline const ResponseMetadata& GetResponseMetadata() const { return m_responseMetadata; }
188 template <typename ResponseMetadataT = ResponseMetadata>
189 void SetResponseMetadata(ResponseMetadataT&& value) {
190 m_responseMetadataHasBeenSet = true;
191 m_responseMetadata = std::forward<ResponseMetadataT>(value);
192 }
193 template <typename ResponseMetadataT = ResponseMetadata>
194 VolumeAttachment& WithResponseMetadata(ResponseMetadataT&& value) {
195 SetResponseMetadata(std::forward<ResponseMetadataT>(value));
196 return *this;
197 }
199 private:
200 bool m_deleteOnTermination{false};
201
202 Aws::String m_associatedResource;
203
204 Aws::String m_instanceOwningService;
205
206 Aws::String m_volumeId;
207
208 Aws::String m_instanceId;
209
210 Aws::String m_device;
211
213
214 Aws::Utils::DateTime m_attachTime{};
215
216 ResponseMetadata m_responseMetadata;
217 bool m_deleteOnTerminationHasBeenSet = false;
218 bool m_associatedResourceHasBeenSet = false;
219 bool m_instanceOwningServiceHasBeenSet = false;
220 bool m_volumeIdHasBeenSet = false;
221 bool m_instanceIdHasBeenSet = false;
222 bool m_deviceHasBeenSet = false;
223 bool m_stateHasBeenSet = false;
224 bool m_attachTimeHasBeenSet = false;
225 bool m_responseMetadataHasBeenSet = true;
226};
227
228} // namespace Model
229} // namespace EC2
230} // namespace Aws
void SetInstanceOwningService(InstanceOwningServiceT &&value)
VolumeAttachment & WithAssociatedResource(AssociatedResourceT &&value)
void SetState(VolumeAttachmentState value)
VolumeAttachment & WithDeleteOnTermination(bool value)
const Aws::String & GetDevice() const
VolumeAttachment & WithDevice(DeviceT &&value)
AWS_EC2_API VolumeAttachment & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetVolumeId() const
const Aws::String & GetAssociatedResource() const
void SetInstanceId(InstanceIdT &&value)
const Aws::Utils::DateTime & GetAttachTime() const
AWS_EC2_API VolumeAttachment()=default
VolumeAttachmentState GetState() const
void SetAssociatedResource(AssociatedResourceT &&value)
VolumeAttachment & WithInstanceId(InstanceIdT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
VolumeAttachment & WithResponseMetadata(ResponseMetadataT &&value)
const Aws::String & GetInstanceOwningService() const
VolumeAttachment & WithAttachTime(AttachTimeT &&value)
void SetVolumeId(VolumeIdT &&value)
void SetAttachTime(AttachTimeT &&value)
const Aws::String & GetInstanceId() const
AWS_EC2_API VolumeAttachment(const Aws::Utils::Xml::XmlNode &xmlNode)
VolumeAttachment & WithState(VolumeAttachmentState value)
const ResponseMetadata & GetResponseMetadata() const
void SetResponseMetadata(ResponseMetadataT &&value)
VolumeAttachment & WithVolumeId(VolumeIdT &&value)
VolumeAttachment & WithInstanceOwningService(InstanceOwningServiceT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream