AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Disk.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/AddOn.h>
12#include <aws/lightsail/model/AutoMountStatus.h>
13#include <aws/lightsail/model/DiskState.h>
14#include <aws/lightsail/model/ResourceLocation.h>
15#include <aws/lightsail/model/ResourceType.h>
16#include <aws/lightsail/model/Tag.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Json {
23class JsonValue;
24class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace Lightsail {
28namespace Model {
29
35class Disk {
36 public:
37 AWS_LIGHTSAIL_API Disk() = default;
38 AWS_LIGHTSAIL_API Disk(Aws::Utils::Json::JsonView jsonValue);
39 AWS_LIGHTSAIL_API Disk& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const Aws::String& GetName() const { return m_name; }
47 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
48 template <typename NameT = Aws::String>
49 void SetName(NameT&& value) {
50 m_nameHasBeenSet = true;
51 m_name = std::forward<NameT>(value);
52 }
53 template <typename NameT = Aws::String>
54 Disk& WithName(NameT&& value) {
55 SetName(std::forward<NameT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetArn() const { return m_arn; }
65 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
66 template <typename ArnT = Aws::String>
67 void SetArn(ArnT&& value) {
68 m_arnHasBeenSet = true;
69 m_arn = std::forward<ArnT>(value);
70 }
71 template <typename ArnT = Aws::String>
72 Disk& WithArn(ArnT&& value) {
73 SetArn(std::forward<ArnT>(value));
74 return *this;
75 }
77
79
84 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
85 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
86 template <typename SupportCodeT = Aws::String>
87 void SetSupportCode(SupportCodeT&& value) {
88 m_supportCodeHasBeenSet = true;
89 m_supportCode = std::forward<SupportCodeT>(value);
90 }
91 template <typename SupportCodeT = Aws::String>
92 Disk& WithSupportCode(SupportCodeT&& value) {
93 SetSupportCode(std::forward<SupportCodeT>(value));
94 return *this;
95 }
97
99
102 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
103 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
104 template <typename CreatedAtT = Aws::Utils::DateTime>
105 void SetCreatedAt(CreatedAtT&& value) {
106 m_createdAtHasBeenSet = true;
107 m_createdAt = std::forward<CreatedAtT>(value);
108 }
109 template <typename CreatedAtT = Aws::Utils::DateTime>
110 Disk& WithCreatedAt(CreatedAtT&& value) {
111 SetCreatedAt(std::forward<CreatedAtT>(value));
112 return *this;
113 }
115
117
120 inline const ResourceLocation& GetLocation() const { return m_location; }
121 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
122 template <typename LocationT = ResourceLocation>
123 void SetLocation(LocationT&& value) {
124 m_locationHasBeenSet = true;
125 m_location = std::forward<LocationT>(value);
126 }
127 template <typename LocationT = ResourceLocation>
128 Disk& WithLocation(LocationT&& value) {
129 SetLocation(std::forward<LocationT>(value));
130 return *this;
131 }
133
135
138 inline ResourceType GetResourceType() const { return m_resourceType; }
139 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
140 inline void SetResourceType(ResourceType value) {
141 m_resourceTypeHasBeenSet = true;
142 m_resourceType = value;
143 }
145 SetResourceType(value);
146 return *this;
147 }
149
151
157 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
158 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
159 template <typename TagsT = Aws::Vector<Tag>>
160 void SetTags(TagsT&& value) {
161 m_tagsHasBeenSet = true;
162 m_tags = std::forward<TagsT>(value);
163 }
164 template <typename TagsT = Aws::Vector<Tag>>
165 Disk& WithTags(TagsT&& value) {
166 SetTags(std::forward<TagsT>(value));
167 return *this;
168 }
169 template <typename TagsT = Tag>
170 Disk& AddTags(TagsT&& value) {
171 m_tagsHasBeenSet = true;
172 m_tags.emplace_back(std::forward<TagsT>(value));
173 return *this;
174 }
176
178
181 inline const Aws::Vector<AddOn>& GetAddOns() const { return m_addOns; }
182 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
183 template <typename AddOnsT = Aws::Vector<AddOn>>
184 void SetAddOns(AddOnsT&& value) {
185 m_addOnsHasBeenSet = true;
186 m_addOns = std::forward<AddOnsT>(value);
187 }
188 template <typename AddOnsT = Aws::Vector<AddOn>>
189 Disk& WithAddOns(AddOnsT&& value) {
190 SetAddOns(std::forward<AddOnsT>(value));
191 return *this;
192 }
193 template <typename AddOnsT = AddOn>
194 Disk& AddAddOns(AddOnsT&& value) {
195 m_addOnsHasBeenSet = true;
196 m_addOns.emplace_back(std::forward<AddOnsT>(value));
197 return *this;
198 }
200
202
205 inline int GetSizeInGb() const { return m_sizeInGb; }
206 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
207 inline void SetSizeInGb(int value) {
208 m_sizeInGbHasBeenSet = true;
209 m_sizeInGb = value;
210 }
211 inline Disk& WithSizeInGb(int value) {
212 SetSizeInGb(value);
213 return *this;
214 }
216
218
222 inline bool GetIsSystemDisk() const { return m_isSystemDisk; }
223 inline bool IsSystemDiskHasBeenSet() const { return m_isSystemDiskHasBeenSet; }
224 inline void SetIsSystemDisk(bool value) {
225 m_isSystemDiskHasBeenSet = true;
226 m_isSystemDisk = value;
227 }
228 inline Disk& WithIsSystemDisk(bool value) {
229 SetIsSystemDisk(value);
230 return *this;
231 }
233
235
238 inline int GetIops() const { return m_iops; }
239 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
240 inline void SetIops(int value) {
241 m_iopsHasBeenSet = true;
242 m_iops = value;
243 }
244 inline Disk& WithIops(int value) {
245 SetIops(value);
246 return *this;
247 }
249
251
254 inline const Aws::String& GetPath() const { return m_path; }
255 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
256 template <typename PathT = Aws::String>
257 void SetPath(PathT&& value) {
258 m_pathHasBeenSet = true;
259 m_path = std::forward<PathT>(value);
260 }
261 template <typename PathT = Aws::String>
262 Disk& WithPath(PathT&& value) {
263 SetPath(std::forward<PathT>(value));
264 return *this;
265 }
267
269
272 inline DiskState GetState() const { return m_state; }
273 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
274 inline void SetState(DiskState value) {
275 m_stateHasBeenSet = true;
276 m_state = value;
277 }
278 inline Disk& WithState(DiskState value) {
279 SetState(value);
280 return *this;
281 }
283
285
288 inline const Aws::String& GetAttachedTo() const { return m_attachedTo; }
289 inline bool AttachedToHasBeenSet() const { return m_attachedToHasBeenSet; }
290 template <typename AttachedToT = Aws::String>
291 void SetAttachedTo(AttachedToT&& value) {
292 m_attachedToHasBeenSet = true;
293 m_attachedTo = std::forward<AttachedToT>(value);
294 }
295 template <typename AttachedToT = Aws::String>
296 Disk& WithAttachedTo(AttachedToT&& value) {
297 SetAttachedTo(std::forward<AttachedToT>(value));
298 return *this;
299 }
301
303
306 inline bool GetIsAttached() const { return m_isAttached; }
307 inline bool IsAttachedHasBeenSet() const { return m_isAttachedHasBeenSet; }
308 inline void SetIsAttached(bool value) {
309 m_isAttachedHasBeenSet = true;
310 m_isAttached = value;
311 }
312 inline Disk& WithIsAttached(bool value) {
313 SetIsAttached(value);
314 return *this;
315 }
317
319
324 inline AutoMountStatus GetAutoMountStatus() const { return m_autoMountStatus; }
325 inline bool AutoMountStatusHasBeenSet() const { return m_autoMountStatusHasBeenSet; }
327 m_autoMountStatusHasBeenSet = true;
328 m_autoMountStatus = value;
329 }
331 SetAutoMountStatus(value);
332 return *this;
333 }
335 private:
336 Aws::String m_name;
337
338 Aws::String m_arn;
339
340 Aws::String m_supportCode;
341
342 Aws::Utils::DateTime m_createdAt{};
343
344 ResourceLocation m_location;
345
346 ResourceType m_resourceType{ResourceType::NOT_SET};
347
348 Aws::Vector<Tag> m_tags;
349
350 Aws::Vector<AddOn> m_addOns;
351
352 int m_sizeInGb{0};
353
354 bool m_isSystemDisk{false};
355
356 int m_iops{0};
357
358 Aws::String m_path;
359
361
362 Aws::String m_attachedTo;
363
364 bool m_isAttached{false};
365
366 AutoMountStatus m_autoMountStatus{AutoMountStatus::NOT_SET};
367 bool m_nameHasBeenSet = false;
368 bool m_arnHasBeenSet = false;
369 bool m_supportCodeHasBeenSet = false;
370 bool m_createdAtHasBeenSet = false;
371 bool m_locationHasBeenSet = false;
372 bool m_resourceTypeHasBeenSet = false;
373 bool m_tagsHasBeenSet = false;
374 bool m_addOnsHasBeenSet = false;
375 bool m_sizeInGbHasBeenSet = false;
376 bool m_isSystemDiskHasBeenSet = false;
377 bool m_iopsHasBeenSet = false;
378 bool m_pathHasBeenSet = false;
379 bool m_stateHasBeenSet = false;
380 bool m_attachedToHasBeenSet = false;
381 bool m_isAttachedHasBeenSet = false;
382 bool m_autoMountStatusHasBeenSet = false;
383};
384
385} // namespace Model
386} // namespace Lightsail
387} // namespace Aws
const Aws::String & GetPath() const
Definition Disk.h:254
Disk & WithSupportCode(SupportCodeT &&value)
Definition Disk.h:92
AWS_LIGHTSAIL_API Disk(Aws::Utils::Json::JsonView jsonValue)
AWS_LIGHTSAIL_API Disk & operator=(Aws::Utils::Json::JsonView jsonValue)
Disk & WithCreatedAt(CreatedAtT &&value)
Definition Disk.h:110
const Aws::String & GetAttachedTo() const
Definition Disk.h:288
bool AutoMountStatusHasBeenSet() const
Definition Disk.h:325
bool TagsHasBeenSet() const
Definition Disk.h:158
void SetArn(ArnT &&value)
Definition Disk.h:67
bool AddOnsHasBeenSet() const
Definition Disk.h:182
Disk & WithAddOns(AddOnsT &&value)
Definition Disk.h:189
void SetIsSystemDisk(bool value)
Definition Disk.h:224
const Aws::String & GetName() const
Definition Disk.h:46
Disk & WithName(NameT &&value)
Definition Disk.h:54
bool IsSystemDiskHasBeenSet() const
Definition Disk.h:223
Disk & AddAddOns(AddOnsT &&value)
Definition Disk.h:194
const Aws::String & GetSupportCode() const
Definition Disk.h:84
Disk & WithAutoMountStatus(AutoMountStatus value)
Definition Disk.h:330
bool IsAttachedHasBeenSet() const
Definition Disk.h:307
bool AttachedToHasBeenSet() const
Definition Disk.h:289
Disk & AddTags(TagsT &&value)
Definition Disk.h:170
Disk & WithResourceType(ResourceType value)
Definition Disk.h:144
bool SupportCodeHasBeenSet() const
Definition Disk.h:85
bool PathHasBeenSet() const
Definition Disk.h:255
void SetTags(TagsT &&value)
Definition Disk.h:160
bool IopsHasBeenSet() const
Definition Disk.h:239
bool GetIsSystemDisk() const
Definition Disk.h:222
void SetLocation(LocationT &&value)
Definition Disk.h:123
const Aws::Vector< Tag > & GetTags() const
Definition Disk.h:157
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Disk.h:102
bool NameHasBeenSet() const
Definition Disk.h:47
bool ResourceTypeHasBeenSet() const
Definition Disk.h:139
DiskState GetState() const
Definition Disk.h:272
AWS_LIGHTSAIL_API Disk()=default
void SetAddOns(AddOnsT &&value)
Definition Disk.h:184
int GetSizeInGb() const
Definition Disk.h:205
Disk & WithIops(int value)
Definition Disk.h:244
bool SizeInGbHasBeenSet() const
Definition Disk.h:206
void SetPath(PathT &&value)
Definition Disk.h:257
bool LocationHasBeenSet() const
Definition Disk.h:121
Disk & WithArn(ArnT &&value)
Definition Disk.h:72
Disk & WithPath(PathT &&value)
Definition Disk.h:262
void SetName(NameT &&value)
Definition Disk.h:49
void SetIsAttached(bool value)
Definition Disk.h:308
Disk & WithSizeInGb(int value)
Definition Disk.h:211
void SetResourceType(ResourceType value)
Definition Disk.h:140
Disk & WithIsSystemDisk(bool value)
Definition Disk.h:228
Disk & WithIsAttached(bool value)
Definition Disk.h:312
const Aws::String & GetArn() const
Definition Disk.h:64
void SetCreatedAt(CreatedAtT &&value)
Definition Disk.h:105
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
Disk & WithState(DiskState value)
Definition Disk.h:278
AutoMountStatus GetAutoMountStatus() const
Definition Disk.h:324
bool StateHasBeenSet() const
Definition Disk.h:273
void SetIops(int value)
Definition Disk.h:240
void SetSizeInGb(int value)
Definition Disk.h:207
Disk & WithTags(TagsT &&value)
Definition Disk.h:165
const ResourceLocation & GetLocation() const
Definition Disk.h:120
bool GetIsAttached() const
Definition Disk.h:306
bool ArnHasBeenSet() const
Definition Disk.h:65
bool CreatedAtHasBeenSet() const
Definition Disk.h:103
void SetState(DiskState value)
Definition Disk.h:274
void SetAttachedTo(AttachedToT &&value)
Definition Disk.h:291
void SetSupportCode(SupportCodeT &&value)
Definition Disk.h:87
Disk & WithAttachedTo(AttachedToT &&value)
Definition Disk.h:296
Disk & WithLocation(LocationT &&value)
Definition Disk.h:128
ResourceType GetResourceType() const
Definition Disk.h:138
void SetAutoMountStatus(AutoMountStatus value)
Definition Disk.h:326
const Aws::Vector< AddOn > & GetAddOns() const
Definition Disk.h:181
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue