AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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() = default;
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 template<typename NameT = Aws::String>
53 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
54 template<typename NameT = Aws::String>
55 DiskSnapshot& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
57
59
62 inline const Aws::String& GetArn() const { return m_arn; }
63 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
64 template<typename ArnT = Aws::String>
65 void SetArn(ArnT&& value) { m_arnHasBeenSet = true; m_arn = std::forward<ArnT>(value); }
66 template<typename ArnT = Aws::String>
67 DiskSnapshot& WithArn(ArnT&& value) { SetArn(std::forward<ArnT>(value)); return *this;}
69
71
76 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
77 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
78 template<typename SupportCodeT = Aws::String>
79 void SetSupportCode(SupportCodeT&& value) { m_supportCodeHasBeenSet = true; m_supportCode = std::forward<SupportCodeT>(value); }
80 template<typename SupportCodeT = Aws::String>
81 DiskSnapshot& WithSupportCode(SupportCodeT&& value) { SetSupportCode(std::forward<SupportCodeT>(value)); return *this;}
83
85
88 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
89 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
90 template<typename CreatedAtT = Aws::Utils::DateTime>
91 void SetCreatedAt(CreatedAtT&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::forward<CreatedAtT>(value); }
92 template<typename CreatedAtT = Aws::Utils::DateTime>
93 DiskSnapshot& WithCreatedAt(CreatedAtT&& value) { SetCreatedAt(std::forward<CreatedAtT>(value)); return *this;}
95
97
100 inline const ResourceLocation& GetLocation() const { return m_location; }
101 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
102 template<typename LocationT = ResourceLocation>
103 void SetLocation(LocationT&& value) { m_locationHasBeenSet = true; m_location = std::forward<LocationT>(value); }
104 template<typename LocationT = ResourceLocation>
105 DiskSnapshot& WithLocation(LocationT&& value) { SetLocation(std::forward<LocationT>(value)); return *this;}
107
109
112 inline ResourceType GetResourceType() const { return m_resourceType; }
113 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
114 inline void SetResourceType(ResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
115 inline DiskSnapshot& WithResourceType(ResourceType value) { SetResourceType(value); return *this;}
117
119
125 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
126 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
127 template<typename TagsT = Aws::Vector<Tag>>
128 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
129 template<typename TagsT = Aws::Vector<Tag>>
130 DiskSnapshot& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
131 template<typename TagsT = Tag>
132 DiskSnapshot& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
134
136
139 inline int GetSizeInGb() const { return m_sizeInGb; }
140 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
141 inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; }
142 inline DiskSnapshot& WithSizeInGb(int value) { SetSizeInGb(value); return *this;}
144
146
149 inline DiskSnapshotState GetState() const { return m_state; }
150 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
151 inline void SetState(DiskSnapshotState value) { m_stateHasBeenSet = true; m_state = value; }
152 inline DiskSnapshot& WithState(DiskSnapshotState value) { SetState(value); return *this;}
154
156
159 inline const Aws::String& GetProgress() const { return m_progress; }
160 inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; }
161 template<typename ProgressT = Aws::String>
162 void SetProgress(ProgressT&& value) { m_progressHasBeenSet = true; m_progress = std::forward<ProgressT>(value); }
163 template<typename ProgressT = Aws::String>
164 DiskSnapshot& WithProgress(ProgressT&& value) { SetProgress(std::forward<ProgressT>(value)); return *this;}
166
168
172 inline const Aws::String& GetFromDiskName() const { return m_fromDiskName; }
173 inline bool FromDiskNameHasBeenSet() const { return m_fromDiskNameHasBeenSet; }
174 template<typename FromDiskNameT = Aws::String>
175 void SetFromDiskName(FromDiskNameT&& value) { m_fromDiskNameHasBeenSet = true; m_fromDiskName = std::forward<FromDiskNameT>(value); }
176 template<typename FromDiskNameT = Aws::String>
177 DiskSnapshot& WithFromDiskName(FromDiskNameT&& value) { SetFromDiskName(std::forward<FromDiskNameT>(value)); return *this;}
179
181
185 inline const Aws::String& GetFromDiskArn() const { return m_fromDiskArn; }
186 inline bool FromDiskArnHasBeenSet() const { return m_fromDiskArnHasBeenSet; }
187 template<typename FromDiskArnT = Aws::String>
188 void SetFromDiskArn(FromDiskArnT&& value) { m_fromDiskArnHasBeenSet = true; m_fromDiskArn = std::forward<FromDiskArnT>(value); }
189 template<typename FromDiskArnT = Aws::String>
190 DiskSnapshot& WithFromDiskArn(FromDiskArnT&& value) { SetFromDiskArn(std::forward<FromDiskArnT>(value)); return *this;}
192
194
198 inline const Aws::String& GetFromInstanceName() const { return m_fromInstanceName; }
199 inline bool FromInstanceNameHasBeenSet() const { return m_fromInstanceNameHasBeenSet; }
200 template<typename FromInstanceNameT = Aws::String>
201 void SetFromInstanceName(FromInstanceNameT&& value) { m_fromInstanceNameHasBeenSet = true; m_fromInstanceName = std::forward<FromInstanceNameT>(value); }
202 template<typename FromInstanceNameT = Aws::String>
203 DiskSnapshot& WithFromInstanceName(FromInstanceNameT&& value) { SetFromInstanceName(std::forward<FromInstanceNameT>(value)); return *this;}
205
207
211 inline const Aws::String& GetFromInstanceArn() const { return m_fromInstanceArn; }
212 inline bool FromInstanceArnHasBeenSet() const { return m_fromInstanceArnHasBeenSet; }
213 template<typename FromInstanceArnT = Aws::String>
214 void SetFromInstanceArn(FromInstanceArnT&& value) { m_fromInstanceArnHasBeenSet = true; m_fromInstanceArn = std::forward<FromInstanceArnT>(value); }
215 template<typename FromInstanceArnT = Aws::String>
216 DiskSnapshot& WithFromInstanceArn(FromInstanceArnT&& value) { SetFromInstanceArn(std::forward<FromInstanceArnT>(value)); return *this;}
218
220
224 inline bool GetIsFromAutoSnapshot() const { return m_isFromAutoSnapshot; }
225 inline bool IsFromAutoSnapshotHasBeenSet() const { return m_isFromAutoSnapshotHasBeenSet; }
226 inline void SetIsFromAutoSnapshot(bool value) { m_isFromAutoSnapshotHasBeenSet = true; m_isFromAutoSnapshot = value; }
227 inline DiskSnapshot& WithIsFromAutoSnapshot(bool value) { SetIsFromAutoSnapshot(value); return *this;}
229 private:
230
231 Aws::String m_name;
232 bool m_nameHasBeenSet = false;
233
234 Aws::String m_arn;
235 bool m_arnHasBeenSet = false;
236
237 Aws::String m_supportCode;
238 bool m_supportCodeHasBeenSet = false;
239
240 Aws::Utils::DateTime m_createdAt{};
241 bool m_createdAtHasBeenSet = false;
242
243 ResourceLocation m_location;
244 bool m_locationHasBeenSet = false;
245
246 ResourceType m_resourceType{ResourceType::NOT_SET};
247 bool m_resourceTypeHasBeenSet = false;
248
249 Aws::Vector<Tag> m_tags;
250 bool m_tagsHasBeenSet = false;
251
252 int m_sizeInGb{0};
253 bool m_sizeInGbHasBeenSet = false;
254
256 bool m_stateHasBeenSet = false;
257
258 Aws::String m_progress;
259 bool m_progressHasBeenSet = false;
260
261 Aws::String m_fromDiskName;
262 bool m_fromDiskNameHasBeenSet = false;
263
264 Aws::String m_fromDiskArn;
265 bool m_fromDiskArnHasBeenSet = false;
266
267 Aws::String m_fromInstanceName;
268 bool m_fromInstanceNameHasBeenSet = false;
269
270 Aws::String m_fromInstanceArn;
271 bool m_fromInstanceArnHasBeenSet = false;
272
273 bool m_isFromAutoSnapshot{false};
274 bool m_isFromAutoSnapshotHasBeenSet = false;
275 };
276
277} // namespace Model
278} // namespace Lightsail
279} // namespace Aws
DiskSnapshot & WithIsFromAutoSnapshot(bool value)
DiskSnapshot & WithProgress(ProgressT &&value)
const Aws::String & GetProgress() const
DiskSnapshot & WithSupportCode(SupportCodeT &&value)
DiskSnapshot & WithLocation(LocationT &&value)
DiskSnapshot & WithCreatedAt(CreatedAtT &&value)
const Aws::String & GetFromDiskName() const
void SetProgress(ProgressT &&value)
void SetSupportCode(SupportCodeT &&value)
void SetLocation(LocationT &&value)
void SetFromDiskName(FromDiskNameT &&value)
const Aws::String & GetFromInstanceArn() const
void SetResourceType(ResourceType value)
DiskSnapshot & WithResourceType(ResourceType value)
DiskSnapshot & WithFromDiskArn(FromDiskArnT &&value)
AWS_LIGHTSAIL_API DiskSnapshot & operator=(Aws::Utils::Json::JsonView jsonValue)
DiskSnapshot & WithState(DiskSnapshotState value)
DiskSnapshot & WithFromInstanceName(FromInstanceNameT &&value)
const Aws::String & GetSupportCode() const
const Aws::String & GetFromInstanceName() const
const Aws::String & GetFromDiskArn() const
void SetState(DiskSnapshotState value)
void SetCreatedAt(CreatedAtT &&value)
DiskSnapshot & WithFromInstanceArn(FromInstanceArnT &&value)
void SetFromInstanceName(FromInstanceNameT &&value)
DiskSnapshot & WithFromDiskName(FromDiskNameT &&value)
DiskSnapshot & WithName(NameT &&value)
const Aws::Vector< Tag > & GetTags() const
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
DiskSnapshot & WithSizeInGb(int value)
const Aws::String & GetArn() const
void SetFromDiskArn(FromDiskArnT &&value)
ResourceType GetResourceType() const
AWS_LIGHTSAIL_API DiskSnapshot()=default
void SetFromInstanceArn(FromInstanceArnT &&value)
DiskSnapshot & AddTags(TagsT &&value)
const ResourceLocation & GetLocation() const
AWS_LIGHTSAIL_API DiskSnapshot(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetName() const
DiskSnapshot & WithTags(TagsT &&value)
DiskSnapshotState GetState() const
DiskSnapshot & WithArn(ArnT &&value)
const Aws::Utils::DateTime & GetCreatedAt() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue