AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Disk.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/lightsail/model/ResourceLocation.h>
11#include <aws/lightsail/model/ResourceType.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/lightsail/model/DiskState.h>
14#include <aws/lightsail/model/AutoMountStatus.h>
15#include <aws/lightsail/model/Tag.h>
16#include <aws/lightsail/model/AddOn.h>
17#include <utility>
18
19namespace Aws
20{
21namespace Utils
22{
23namespace Json
24{
25 class JsonValue;
26 class JsonView;
27} // namespace Json
28} // namespace Utils
29namespace Lightsail
30{
31namespace Model
32{
33
39 class Disk
40 {
41 public:
42 AWS_LIGHTSAIL_API Disk() = default;
43 AWS_LIGHTSAIL_API Disk(Aws::Utils::Json::JsonView jsonValue);
44 AWS_LIGHTSAIL_API Disk& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
46
47
49
52 inline const Aws::String& GetName() const { return m_name; }
53 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
54 template<typename NameT = Aws::String>
55 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
56 template<typename NameT = Aws::String>
57 Disk& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
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) { m_arnHasBeenSet = true; m_arn = std::forward<ArnT>(value); }
68 template<typename ArnT = Aws::String>
69 Disk& WithArn(ArnT&& value) { SetArn(std::forward<ArnT>(value)); return *this;}
71
73
78 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
79 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
80 template<typename SupportCodeT = Aws::String>
81 void SetSupportCode(SupportCodeT&& value) { m_supportCodeHasBeenSet = true; m_supportCode = std::forward<SupportCodeT>(value); }
82 template<typename SupportCodeT = Aws::String>
83 Disk& WithSupportCode(SupportCodeT&& value) { SetSupportCode(std::forward<SupportCodeT>(value)); return *this;}
85
87
90 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
91 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
92 template<typename CreatedAtT = Aws::Utils::DateTime>
93 void SetCreatedAt(CreatedAtT&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::forward<CreatedAtT>(value); }
94 template<typename CreatedAtT = Aws::Utils::DateTime>
95 Disk& WithCreatedAt(CreatedAtT&& value) { SetCreatedAt(std::forward<CreatedAtT>(value)); return *this;}
97
99
102 inline const ResourceLocation& GetLocation() const { return m_location; }
103 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
104 template<typename LocationT = ResourceLocation>
105 void SetLocation(LocationT&& value) { m_locationHasBeenSet = true; m_location = std::forward<LocationT>(value); }
106 template<typename LocationT = ResourceLocation>
107 Disk& WithLocation(LocationT&& value) { SetLocation(std::forward<LocationT>(value)); return *this;}
109
111
114 inline ResourceType GetResourceType() const { return m_resourceType; }
115 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
116 inline void SetResourceType(ResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
117 inline Disk& WithResourceType(ResourceType value) { SetResourceType(value); return *this;}
119
121
127 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
128 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
129 template<typename TagsT = Aws::Vector<Tag>>
130 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
131 template<typename TagsT = Aws::Vector<Tag>>
132 Disk& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
133 template<typename TagsT = Tag>
134 Disk& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
136
138
141 inline const Aws::Vector<AddOn>& GetAddOns() const { return m_addOns; }
142 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
143 template<typename AddOnsT = Aws::Vector<AddOn>>
144 void SetAddOns(AddOnsT&& value) { m_addOnsHasBeenSet = true; m_addOns = std::forward<AddOnsT>(value); }
145 template<typename AddOnsT = Aws::Vector<AddOn>>
146 Disk& WithAddOns(AddOnsT&& value) { SetAddOns(std::forward<AddOnsT>(value)); return *this;}
147 template<typename AddOnsT = AddOn>
148 Disk& AddAddOns(AddOnsT&& value) { m_addOnsHasBeenSet = true; m_addOns.emplace_back(std::forward<AddOnsT>(value)); return *this; }
150
152
155 inline int GetSizeInGb() const { return m_sizeInGb; }
156 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
157 inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; }
158 inline Disk& WithSizeInGb(int value) { SetSizeInGb(value); return *this;}
160
162
166 inline bool GetIsSystemDisk() const { return m_isSystemDisk; }
167 inline bool IsSystemDiskHasBeenSet() const { return m_isSystemDiskHasBeenSet; }
168 inline void SetIsSystemDisk(bool value) { m_isSystemDiskHasBeenSet = true; m_isSystemDisk = value; }
169 inline Disk& WithIsSystemDisk(bool value) { SetIsSystemDisk(value); return *this;}
171
173
176 inline int GetIops() const { return m_iops; }
177 inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; }
178 inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }
179 inline Disk& WithIops(int value) { SetIops(value); return *this;}
181
183
186 inline const Aws::String& GetPath() const { return m_path; }
187 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
188 template<typename PathT = Aws::String>
189 void SetPath(PathT&& value) { m_pathHasBeenSet = true; m_path = std::forward<PathT>(value); }
190 template<typename PathT = Aws::String>
191 Disk& WithPath(PathT&& value) { SetPath(std::forward<PathT>(value)); return *this;}
193
195
198 inline DiskState GetState() const { return m_state; }
199 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
200 inline void SetState(DiskState value) { m_stateHasBeenSet = true; m_state = value; }
201 inline Disk& WithState(DiskState value) { SetState(value); return *this;}
203
205
208 inline const Aws::String& GetAttachedTo() const { return m_attachedTo; }
209 inline bool AttachedToHasBeenSet() const { return m_attachedToHasBeenSet; }
210 template<typename AttachedToT = Aws::String>
211 void SetAttachedTo(AttachedToT&& value) { m_attachedToHasBeenSet = true; m_attachedTo = std::forward<AttachedToT>(value); }
212 template<typename AttachedToT = Aws::String>
213 Disk& WithAttachedTo(AttachedToT&& value) { SetAttachedTo(std::forward<AttachedToT>(value)); return *this;}
215
217
220 inline bool GetIsAttached() const { return m_isAttached; }
221 inline bool IsAttachedHasBeenSet() const { return m_isAttachedHasBeenSet; }
222 inline void SetIsAttached(bool value) { m_isAttachedHasBeenSet = true; m_isAttached = value; }
223 inline Disk& WithIsAttached(bool value) { SetIsAttached(value); return *this;}
225
227
232 inline AutoMountStatus GetAutoMountStatus() const { return m_autoMountStatus; }
233 inline bool AutoMountStatusHasBeenSet() const { return m_autoMountStatusHasBeenSet; }
234 inline void SetAutoMountStatus(AutoMountStatus value) { m_autoMountStatusHasBeenSet = true; m_autoMountStatus = value; }
235 inline Disk& WithAutoMountStatus(AutoMountStatus value) { SetAutoMountStatus(value); return *this;}
237 private:
238
239 Aws::String m_name;
240 bool m_nameHasBeenSet = false;
241
242 Aws::String m_arn;
243 bool m_arnHasBeenSet = false;
244
245 Aws::String m_supportCode;
246 bool m_supportCodeHasBeenSet = false;
247
248 Aws::Utils::DateTime m_createdAt{};
249 bool m_createdAtHasBeenSet = false;
250
251 ResourceLocation m_location;
252 bool m_locationHasBeenSet = false;
253
254 ResourceType m_resourceType{ResourceType::NOT_SET};
255 bool m_resourceTypeHasBeenSet = false;
256
257 Aws::Vector<Tag> m_tags;
258 bool m_tagsHasBeenSet = false;
259
260 Aws::Vector<AddOn> m_addOns;
261 bool m_addOnsHasBeenSet = false;
262
263 int m_sizeInGb{0};
264 bool m_sizeInGbHasBeenSet = false;
265
266 bool m_isSystemDisk{false};
267 bool m_isSystemDiskHasBeenSet = false;
268
269 int m_iops{0};
270 bool m_iopsHasBeenSet = false;
271
272 Aws::String m_path;
273 bool m_pathHasBeenSet = false;
274
276 bool m_stateHasBeenSet = false;
277
278 Aws::String m_attachedTo;
279 bool m_attachedToHasBeenSet = false;
280
281 bool m_isAttached{false};
282 bool m_isAttachedHasBeenSet = false;
283
284 AutoMountStatus m_autoMountStatus{AutoMountStatus::NOT_SET};
285 bool m_autoMountStatusHasBeenSet = false;
286 };
287
288} // namespace Model
289} // namespace Lightsail
290} // namespace Aws
const Aws::String & GetPath() const
Definition Disk.h:186
Disk & WithSupportCode(SupportCodeT &&value)
Definition Disk.h:83
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:95
const Aws::String & GetAttachedTo() const
Definition Disk.h:208
bool AutoMountStatusHasBeenSet() const
Definition Disk.h:233
bool TagsHasBeenSet() const
Definition Disk.h:128
void SetArn(ArnT &&value)
Definition Disk.h:67
bool AddOnsHasBeenSet() const
Definition Disk.h:142
Disk & WithAddOns(AddOnsT &&value)
Definition Disk.h:146
void SetIsSystemDisk(bool value)
Definition Disk.h:168
const Aws::String & GetName() const
Definition Disk.h:52
Disk & WithName(NameT &&value)
Definition Disk.h:57
bool IsSystemDiskHasBeenSet() const
Definition Disk.h:167
Disk & AddAddOns(AddOnsT &&value)
Definition Disk.h:148
const Aws::String & GetSupportCode() const
Definition Disk.h:78
Disk & WithAutoMountStatus(AutoMountStatus value)
Definition Disk.h:235
bool IsAttachedHasBeenSet() const
Definition Disk.h:221
bool AttachedToHasBeenSet() const
Definition Disk.h:209
Disk & AddTags(TagsT &&value)
Definition Disk.h:134
Disk & WithResourceType(ResourceType value)
Definition Disk.h:117
bool SupportCodeHasBeenSet() const
Definition Disk.h:79
bool PathHasBeenSet() const
Definition Disk.h:187
void SetTags(TagsT &&value)
Definition Disk.h:130
bool IopsHasBeenSet() const
Definition Disk.h:177
bool GetIsSystemDisk() const
Definition Disk.h:166
void SetLocation(LocationT &&value)
Definition Disk.h:105
const Aws::Vector< Tag > & GetTags() const
Definition Disk.h:127
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Disk.h:90
bool NameHasBeenSet() const
Definition Disk.h:53
bool ResourceTypeHasBeenSet() const
Definition Disk.h:115
DiskState GetState() const
Definition Disk.h:198
AWS_LIGHTSAIL_API Disk()=default
void SetAddOns(AddOnsT &&value)
Definition Disk.h:144
int GetSizeInGb() const
Definition Disk.h:155
Disk & WithIops(int value)
Definition Disk.h:179
bool SizeInGbHasBeenSet() const
Definition Disk.h:156
void SetPath(PathT &&value)
Definition Disk.h:189
bool LocationHasBeenSet() const
Definition Disk.h:103
Disk & WithArn(ArnT &&value)
Definition Disk.h:69
Disk & WithPath(PathT &&value)
Definition Disk.h:191
void SetName(NameT &&value)
Definition Disk.h:55
void SetIsAttached(bool value)
Definition Disk.h:222
Disk & WithSizeInGb(int value)
Definition Disk.h:158
void SetResourceType(ResourceType value)
Definition Disk.h:116
Disk & WithIsSystemDisk(bool value)
Definition Disk.h:169
Disk & WithIsAttached(bool value)
Definition Disk.h:223
const Aws::String & GetArn() const
Definition Disk.h:64
void SetCreatedAt(CreatedAtT &&value)
Definition Disk.h:93
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
Disk & WithState(DiskState value)
Definition Disk.h:201
AutoMountStatus GetAutoMountStatus() const
Definition Disk.h:232
bool StateHasBeenSet() const
Definition Disk.h:199
void SetIops(int value)
Definition Disk.h:178
void SetSizeInGb(int value)
Definition Disk.h:157
Disk & WithTags(TagsT &&value)
Definition Disk.h:132
const ResourceLocation & GetLocation() const
Definition Disk.h:102
bool GetIsAttached() const
Definition Disk.h:220
bool ArnHasBeenSet() const
Definition Disk.h:65
bool CreatedAtHasBeenSet() const
Definition Disk.h:91
void SetState(DiskState value)
Definition Disk.h:200
void SetAttachedTo(AttachedToT &&value)
Definition Disk.h:211
void SetSupportCode(SupportCodeT &&value)
Definition Disk.h:81
Disk & WithAttachedTo(AttachedToT &&value)
Definition Disk.h:213
Disk & WithLocation(LocationT &&value)
Definition Disk.h:107
ResourceType GetResourceType() const
Definition Disk.h:114
void SetAutoMountStatus(AutoMountStatus value)
Definition Disk.h:234
const Aws::Vector< AddOn > & GetAddOns() const
Definition Disk.h:141
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue