AWS SDK for C++

AWS SDK for C++ Version 1.11.744

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
100 inline int GetEbsCardIndex() const { return m_ebsCardIndex; }
101 inline bool EbsCardIndexHasBeenSet() const { return m_ebsCardIndexHasBeenSet; }
102 inline void SetEbsCardIndex(int value) {
103 m_ebsCardIndexHasBeenSet = true;
104 m_ebsCardIndex = value;
105 }
107 SetEbsCardIndex(value);
108 return *this;
109 }
111
113
116 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
117 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
118 template <typename VolumeIdT = Aws::String>
119 void SetVolumeId(VolumeIdT&& value) {
120 m_volumeIdHasBeenSet = true;
121 m_volumeId = std::forward<VolumeIdT>(value);
122 }
123 template <typename VolumeIdT = Aws::String>
124 VolumeAttachment& WithVolumeId(VolumeIdT&& value) {
125 SetVolumeId(std::forward<VolumeIdT>(value));
126 return *this;
127 }
129
131
135 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
136 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
137 template <typename InstanceIdT = Aws::String>
138 void SetInstanceId(InstanceIdT&& value) {
139 m_instanceIdHasBeenSet = true;
140 m_instanceId = std::forward<InstanceIdT>(value);
141 }
142 template <typename InstanceIdT = Aws::String>
143 VolumeAttachment& WithInstanceId(InstanceIdT&& value) {
144 SetInstanceId(std::forward<InstanceIdT>(value));
145 return *this;
146 }
148
150
154 inline const Aws::String& GetDevice() const { return m_device; }
155 inline bool DeviceHasBeenSet() const { return m_deviceHasBeenSet; }
156 template <typename DeviceT = Aws::String>
157 void SetDevice(DeviceT&& value) {
158 m_deviceHasBeenSet = true;
159 m_device = std::forward<DeviceT>(value);
160 }
161 template <typename DeviceT = Aws::String>
162 VolumeAttachment& WithDevice(DeviceT&& value) {
163 SetDevice(std::forward<DeviceT>(value));
164 return *this;
165 }
167
169
172 inline VolumeAttachmentState GetState() const { return m_state; }
173 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
174 inline void SetState(VolumeAttachmentState value) {
175 m_stateHasBeenSet = true;
176 m_state = value;
177 }
179 SetState(value);
180 return *this;
181 }
183
185
188 inline const Aws::Utils::DateTime& GetAttachTime() const { return m_attachTime; }
189 inline bool AttachTimeHasBeenSet() const { return m_attachTimeHasBeenSet; }
190 template <typename AttachTimeT = Aws::Utils::DateTime>
191 void SetAttachTime(AttachTimeT&& value) {
192 m_attachTimeHasBeenSet = true;
193 m_attachTime = std::forward<AttachTimeT>(value);
194 }
195 template <typename AttachTimeT = Aws::Utils::DateTime>
196 VolumeAttachment& WithAttachTime(AttachTimeT&& value) {
197 SetAttachTime(std::forward<AttachTimeT>(value));
198 return *this;
199 }
201
203
204 inline const ResponseMetadata& GetResponseMetadata() const { return m_responseMetadata; }
205 template <typename ResponseMetadataT = ResponseMetadata>
206 void SetResponseMetadata(ResponseMetadataT&& value) {
207 m_responseMetadataHasBeenSet = true;
208 m_responseMetadata = std::forward<ResponseMetadataT>(value);
209 }
210 template <typename ResponseMetadataT = ResponseMetadata>
211 VolumeAttachment& WithResponseMetadata(ResponseMetadataT&& value) {
212 SetResponseMetadata(std::forward<ResponseMetadataT>(value));
213 return *this;
214 }
216 private:
217 bool m_deleteOnTermination{false};
218
219 Aws::String m_associatedResource;
220
221 Aws::String m_instanceOwningService;
222
223 int m_ebsCardIndex{0};
224
225 Aws::String m_volumeId;
226
227 Aws::String m_instanceId;
228
229 Aws::String m_device;
230
232
233 Aws::Utils::DateTime m_attachTime{};
234
235 ResponseMetadata m_responseMetadata;
236 bool m_deleteOnTerminationHasBeenSet = false;
237 bool m_associatedResourceHasBeenSet = false;
238 bool m_instanceOwningServiceHasBeenSet = false;
239 bool m_ebsCardIndexHasBeenSet = false;
240 bool m_volumeIdHasBeenSet = false;
241 bool m_instanceIdHasBeenSet = false;
242 bool m_deviceHasBeenSet = false;
243 bool m_stateHasBeenSet = false;
244 bool m_attachTimeHasBeenSet = false;
245 bool m_responseMetadataHasBeenSet = true;
246};
247
248} // namespace Model
249} // namespace EC2
250} // 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 & WithEbsCardIndex(int 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