AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
DiskSnapshot.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/DiskSnapshotState.h>
14#include <aws/lightsail/model/Tag.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Json
22{
23 class JsonValue;
24 class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace Lightsail
28{
29namespace Model
30{
31
38 {
39 public:
40 AWS_LIGHTSAIL_API DiskSnapshot();
41 AWS_LIGHTSAIL_API DiskSnapshot(Aws::Utils::Json::JsonView jsonValue);
42 AWS_LIGHTSAIL_API DiskSnapshot& operator=(Aws::Utils::Json::JsonView jsonValue);
43 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
50 inline const Aws::String& GetName() const{ return m_name; }
51 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
52 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
53 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
54 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
55 inline DiskSnapshot& WithName(const Aws::String& value) { SetName(value); return *this;}
56 inline DiskSnapshot& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
57 inline DiskSnapshot& WithName(const char* value) { SetName(value); return *this;}
59
61
64 inline const Aws::String& GetArn() const{ return m_arn; }
65 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
66 inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
67 inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
68 inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
69 inline DiskSnapshot& WithArn(const Aws::String& value) { SetArn(value); return *this;}
70 inline DiskSnapshot& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
71 inline DiskSnapshot& WithArn(const char* value) { SetArn(value); return *this;}
73
75
80 inline const Aws::String& GetSupportCode() const{ return m_supportCode; }
81 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
82 inline void SetSupportCode(const Aws::String& value) { m_supportCodeHasBeenSet = true; m_supportCode = value; }
83 inline void SetSupportCode(Aws::String&& value) { m_supportCodeHasBeenSet = true; m_supportCode = std::move(value); }
84 inline void SetSupportCode(const char* value) { m_supportCodeHasBeenSet = true; m_supportCode.assign(value); }
85 inline DiskSnapshot& WithSupportCode(const Aws::String& value) { SetSupportCode(value); return *this;}
86 inline DiskSnapshot& WithSupportCode(Aws::String&& value) { SetSupportCode(std::move(value)); return *this;}
87 inline DiskSnapshot& WithSupportCode(const char* value) { SetSupportCode(value); return *this;}
89
91
94 inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; }
95 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
96 inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
97 inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); }
98 inline DiskSnapshot& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;}
99 inline DiskSnapshot& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;}
101
103
106 inline const ResourceLocation& GetLocation() const{ return m_location; }
107 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
108 inline void SetLocation(const ResourceLocation& value) { m_locationHasBeenSet = true; m_location = value; }
109 inline void SetLocation(ResourceLocation&& value) { m_locationHasBeenSet = true; m_location = std::move(value); }
110 inline DiskSnapshot& WithLocation(const ResourceLocation& value) { SetLocation(value); return *this;}
111 inline DiskSnapshot& WithLocation(ResourceLocation&& value) { SetLocation(std::move(value)); return *this;}
113
115
118 inline const ResourceType& GetResourceType() const{ return m_resourceType; }
119 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
120 inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
121 inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
122 inline DiskSnapshot& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;}
123 inline DiskSnapshot& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;}
125
127
133 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
134 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
135 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
136 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
137 inline DiskSnapshot& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
138 inline DiskSnapshot& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
139 inline DiskSnapshot& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
140 inline DiskSnapshot& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
142
144
147 inline int GetSizeInGb() const{ return m_sizeInGb; }
148 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
149 inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; }
150 inline DiskSnapshot& WithSizeInGb(int value) { SetSizeInGb(value); return *this;}
152
154
157 inline const DiskSnapshotState& GetState() const{ return m_state; }
158 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
159 inline void SetState(const DiskSnapshotState& value) { m_stateHasBeenSet = true; m_state = value; }
160 inline void SetState(DiskSnapshotState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
161 inline DiskSnapshot& WithState(const DiskSnapshotState& value) { SetState(value); return *this;}
162 inline DiskSnapshot& WithState(DiskSnapshotState&& value) { SetState(std::move(value)); return *this;}
164
166
169 inline const Aws::String& GetProgress() const{ return m_progress; }
170 inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; }
171 inline void SetProgress(const Aws::String& value) { m_progressHasBeenSet = true; m_progress = value; }
172 inline void SetProgress(Aws::String&& value) { m_progressHasBeenSet = true; m_progress = std::move(value); }
173 inline void SetProgress(const char* value) { m_progressHasBeenSet = true; m_progress.assign(value); }
174 inline DiskSnapshot& WithProgress(const Aws::String& value) { SetProgress(value); return *this;}
175 inline DiskSnapshot& WithProgress(Aws::String&& value) { SetProgress(std::move(value)); return *this;}
176 inline DiskSnapshot& WithProgress(const char* value) { SetProgress(value); return *this;}
178
180
184 inline const Aws::String& GetFromDiskName() const{ return m_fromDiskName; }
185 inline bool FromDiskNameHasBeenSet() const { return m_fromDiskNameHasBeenSet; }
186 inline void SetFromDiskName(const Aws::String& value) { m_fromDiskNameHasBeenSet = true; m_fromDiskName = value; }
187 inline void SetFromDiskName(Aws::String&& value) { m_fromDiskNameHasBeenSet = true; m_fromDiskName = std::move(value); }
188 inline void SetFromDiskName(const char* value) { m_fromDiskNameHasBeenSet = true; m_fromDiskName.assign(value); }
189 inline DiskSnapshot& WithFromDiskName(const Aws::String& value) { SetFromDiskName(value); return *this;}
190 inline DiskSnapshot& WithFromDiskName(Aws::String&& value) { SetFromDiskName(std::move(value)); return *this;}
191 inline DiskSnapshot& WithFromDiskName(const char* value) { SetFromDiskName(value); return *this;}
193
195
199 inline const Aws::String& GetFromDiskArn() const{ return m_fromDiskArn; }
200 inline bool FromDiskArnHasBeenSet() const { return m_fromDiskArnHasBeenSet; }
201 inline void SetFromDiskArn(const Aws::String& value) { m_fromDiskArnHasBeenSet = true; m_fromDiskArn = value; }
202 inline void SetFromDiskArn(Aws::String&& value) { m_fromDiskArnHasBeenSet = true; m_fromDiskArn = std::move(value); }
203 inline void SetFromDiskArn(const char* value) { m_fromDiskArnHasBeenSet = true; m_fromDiskArn.assign(value); }
204 inline DiskSnapshot& WithFromDiskArn(const Aws::String& value) { SetFromDiskArn(value); return *this;}
205 inline DiskSnapshot& WithFromDiskArn(Aws::String&& value) { SetFromDiskArn(std::move(value)); return *this;}
206 inline DiskSnapshot& WithFromDiskArn(const char* value) { SetFromDiskArn(value); return *this;}
208
210
214 inline const Aws::String& GetFromInstanceName() const{ return m_fromInstanceName; }
215 inline bool FromInstanceNameHasBeenSet() const { return m_fromInstanceNameHasBeenSet; }
216 inline void SetFromInstanceName(const Aws::String& value) { m_fromInstanceNameHasBeenSet = true; m_fromInstanceName = value; }
217 inline void SetFromInstanceName(Aws::String&& value) { m_fromInstanceNameHasBeenSet = true; m_fromInstanceName = std::move(value); }
218 inline void SetFromInstanceName(const char* value) { m_fromInstanceNameHasBeenSet = true; m_fromInstanceName.assign(value); }
219 inline DiskSnapshot& WithFromInstanceName(const Aws::String& value) { SetFromInstanceName(value); return *this;}
220 inline DiskSnapshot& WithFromInstanceName(Aws::String&& value) { SetFromInstanceName(std::move(value)); return *this;}
221 inline DiskSnapshot& WithFromInstanceName(const char* value) { SetFromInstanceName(value); return *this;}
223
225
229 inline const Aws::String& GetFromInstanceArn() const{ return m_fromInstanceArn; }
230 inline bool FromInstanceArnHasBeenSet() const { return m_fromInstanceArnHasBeenSet; }
231 inline void SetFromInstanceArn(const Aws::String& value) { m_fromInstanceArnHasBeenSet = true; m_fromInstanceArn = value; }
232 inline void SetFromInstanceArn(Aws::String&& value) { m_fromInstanceArnHasBeenSet = true; m_fromInstanceArn = std::move(value); }
233 inline void SetFromInstanceArn(const char* value) { m_fromInstanceArnHasBeenSet = true; m_fromInstanceArn.assign(value); }
234 inline DiskSnapshot& WithFromInstanceArn(const Aws::String& value) { SetFromInstanceArn(value); return *this;}
235 inline DiskSnapshot& WithFromInstanceArn(Aws::String&& value) { SetFromInstanceArn(std::move(value)); return *this;}
236 inline DiskSnapshot& WithFromInstanceArn(const char* value) { SetFromInstanceArn(value); return *this;}
238
240
244 inline bool GetIsFromAutoSnapshot() const{ return m_isFromAutoSnapshot; }
245 inline bool IsFromAutoSnapshotHasBeenSet() const { return m_isFromAutoSnapshotHasBeenSet; }
246 inline void SetIsFromAutoSnapshot(bool value) { m_isFromAutoSnapshotHasBeenSet = true; m_isFromAutoSnapshot = value; }
247 inline DiskSnapshot& WithIsFromAutoSnapshot(bool value) { SetIsFromAutoSnapshot(value); return *this;}
249 private:
250
251 Aws::String m_name;
252 bool m_nameHasBeenSet = false;
253
254 Aws::String m_arn;
255 bool m_arnHasBeenSet = false;
256
257 Aws::String m_supportCode;
258 bool m_supportCodeHasBeenSet = false;
259
260 Aws::Utils::DateTime m_createdAt;
261 bool m_createdAtHasBeenSet = false;
262
263 ResourceLocation m_location;
264 bool m_locationHasBeenSet = false;
265
266 ResourceType m_resourceType;
267 bool m_resourceTypeHasBeenSet = false;
268
269 Aws::Vector<Tag> m_tags;
270 bool m_tagsHasBeenSet = false;
271
272 int m_sizeInGb;
273 bool m_sizeInGbHasBeenSet = false;
274
275 DiskSnapshotState m_state;
276 bool m_stateHasBeenSet = false;
277
278 Aws::String m_progress;
279 bool m_progressHasBeenSet = false;
280
281 Aws::String m_fromDiskName;
282 bool m_fromDiskNameHasBeenSet = false;
283
284 Aws::String m_fromDiskArn;
285 bool m_fromDiskArnHasBeenSet = false;
286
287 Aws::String m_fromInstanceName;
288 bool m_fromInstanceNameHasBeenSet = false;
289
290 Aws::String m_fromInstanceArn;
291 bool m_fromInstanceArnHasBeenSet = false;
292
293 bool m_isFromAutoSnapshot;
294 bool m_isFromAutoSnapshotHasBeenSet = false;
295 };
296
297} // namespace Model
298} // namespace Lightsail
299} // namespace Aws
DiskSnapshot & WithSupportCode(const char *value)
void SetSupportCode(const Aws::String &value)
void SetName(const Aws::String &value)
DiskSnapshot & WithIsFromAutoSnapshot(bool value)
void SetFromDiskArn(const char *value)
void SetArn(const char *value)
DiskSnapshot & WithName(const char *value)
DiskSnapshot & WithSupportCode(Aws::String &&value)
const DiskSnapshotState & GetState() const
const Aws::String & GetProgress() const
DiskSnapshot & WithCreatedAt(const Aws::Utils::DateTime &value)
void SetFromInstanceArn(const char *value)
DiskSnapshot & WithFromDiskArn(Aws::String &&value)
DiskSnapshot & AddTags(const Tag &value)
void SetFromInstanceName(const char *value)
void SetFromDiskName(const Aws::String &value)
DiskSnapshot & WithFromDiskName(Aws::String &&value)
DiskSnapshot & WithLocation(ResourceLocation &&value)
void SetCreatedAt(Aws::Utils::DateTime &&value)
const Aws::String & GetFromDiskName() const
void SetState(const DiskSnapshotState &value)
void SetArn(Aws::String &&value)
DiskSnapshot & WithArn(Aws::String &&value)
void SetFromInstanceName(const Aws::String &value)
void SetFromDiskArn(const Aws::String &value)
void SetFromInstanceArn(const Aws::String &value)
DiskSnapshot & WithFromInstanceName(const char *value)
DiskSnapshot & WithResourceType(const ResourceType &value)
DiskSnapshot & WithCreatedAt(Aws::Utils::DateTime &&value)
void SetLocation(ResourceLocation &&value)
DiskSnapshot & WithProgress(Aws::String &&value)
DiskSnapshot & WithProgress(const char *value)
const Aws::String & GetFromInstanceArn() const
DiskSnapshot & WithFromInstanceArn(const char *value)
void SetFromDiskArn(Aws::String &&value)
void SetFromInstanceArn(Aws::String &&value)
void SetTags(Aws::Vector< Tag > &&value)
void SetName(Aws::String &&value)
DiskSnapshot & WithFromInstanceName(const Aws::String &value)
DiskSnapshot & WithState(const DiskSnapshotState &value)
AWS_LIGHTSAIL_API DiskSnapshot & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetTags(const Aws::Vector< Tag > &value)
DiskSnapshot & WithName(const Aws::String &value)
const Aws::String & GetSupportCode() const
DiskSnapshot & WithArn(const Aws::String &value)
DiskSnapshot & AddTags(Tag &&value)
void SetFromDiskName(const char *value)
const Aws::String & GetFromInstanceName() const
void SetProgress(const Aws::String &value)
const Aws::String & GetFromDiskArn() const
DiskSnapshot & WithFromInstanceArn(const Aws::String &value)
void SetName(const char *value)
void SetCreatedAt(const Aws::Utils::DateTime &value)
DiskSnapshot & WithFromInstanceArn(Aws::String &&value)
DiskSnapshot & WithArn(const char *value)
void SetLocation(const ResourceLocation &value)
const ResourceType & GetResourceType() const
DiskSnapshot & WithFromDiskArn(const Aws::String &value)
DiskSnapshot & WithTags(Aws::Vector< Tag > &&value)
void SetResourceType(ResourceType &&value)
void SetArn(const Aws::String &value)
void SetProgress(const char *value)
void SetProgress(Aws::String &&value)
void SetFromInstanceName(Aws::String &&value)
void SetSupportCode(const char *value)
const Aws::Vector< Tag > & GetTags() const
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
DiskSnapshot & WithProgress(const Aws::String &value)
DiskSnapshot & WithResourceType(ResourceType &&value)
DiskSnapshot & WithState(DiskSnapshotState &&value)
DiskSnapshot & WithSizeInGb(int value)
DiskSnapshot & WithSupportCode(const Aws::String &value)
DiskSnapshot & WithFromDiskArn(const char *value)
const Aws::String & GetArn() const
void SetSupportCode(Aws::String &&value)
DiskSnapshot & WithFromInstanceName(Aws::String &&value)
const ResourceLocation & GetLocation() const
AWS_LIGHTSAIL_API DiskSnapshot(Aws::Utils::Json::JsonView jsonValue)
DiskSnapshot & WithLocation(const ResourceLocation &value)
DiskSnapshot & WithFromDiskName(const Aws::String &value)
DiskSnapshot & WithName(Aws::String &&value)
void SetFromDiskName(Aws::String &&value)
const Aws::String & GetName() const
void SetResourceType(const ResourceType &value)
DiskSnapshot & WithTags(const Aws::Vector< Tag > &value)
const Aws::Utils::DateTime & GetCreatedAt() const
void SetState(DiskSnapshotState &&value)
DiskSnapshot & WithFromDiskName(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue