AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CreateDiskFromSnapshotRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/lightsail/LightsailRequest.h>
10#include <aws/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/AddOnRequest.h>
12#include <aws/lightsail/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Lightsail {
18namespace Model {
19
23 public:
24 AWS_LIGHTSAIL_API CreateDiskFromSnapshotRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "CreateDiskFromSnapshot"; }
31
32 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
33
35
37
40 inline const Aws::String& GetDiskName() const { return m_diskName; }
41 inline bool DiskNameHasBeenSet() const { return m_diskNameHasBeenSet; }
42 template <typename DiskNameT = Aws::String>
43 void SetDiskName(DiskNameT&& value) {
44 m_diskNameHasBeenSet = true;
45 m_diskName = std::forward<DiskNameT>(value);
46 }
47 template <typename DiskNameT = Aws::String>
49 SetDiskName(std::forward<DiskNameT>(value));
50 return *this;
51 }
53
55
62 inline const Aws::String& GetDiskSnapshotName() const { return m_diskSnapshotName; }
63 inline bool DiskSnapshotNameHasBeenSet() const { return m_diskSnapshotNameHasBeenSet; }
64 template <typename DiskSnapshotNameT = Aws::String>
65 void SetDiskSnapshotName(DiskSnapshotNameT&& value) {
66 m_diskSnapshotNameHasBeenSet = true;
67 m_diskSnapshotName = std::forward<DiskSnapshotNameT>(value);
68 }
69 template <typename DiskSnapshotNameT = Aws::String>
71 SetDiskSnapshotName(std::forward<DiskSnapshotNameT>(value));
72 return *this;
73 }
75
77
83 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
84 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
85 template <typename AvailabilityZoneT = Aws::String>
86 void SetAvailabilityZone(AvailabilityZoneT&& value) {
87 m_availabilityZoneHasBeenSet = true;
88 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
89 }
90 template <typename AvailabilityZoneT = Aws::String>
92 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
93 return *this;
94 }
96
98
101 inline int GetSizeInGb() const { return m_sizeInGb; }
102 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
103 inline void SetSizeInGb(int value) {
104 m_sizeInGbHasBeenSet = true;
105 m_sizeInGb = value;
106 }
108 SetSizeInGb(value);
109 return *this;
110 }
112
114
119 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
120 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
121 template <typename TagsT = Aws::Vector<Tag>>
122 void SetTags(TagsT&& value) {
123 m_tagsHasBeenSet = true;
124 m_tags = std::forward<TagsT>(value);
125 }
126 template <typename TagsT = Aws::Vector<Tag>>
128 SetTags(std::forward<TagsT>(value));
129 return *this;
130 }
131 template <typename TagsT = Tag>
133 m_tagsHasBeenSet = true;
134 m_tags.emplace_back(std::forward<TagsT>(value));
135 return *this;
136 }
138
140
144 inline const Aws::Vector<AddOnRequest>& GetAddOns() const { return m_addOns; }
145 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
146 template <typename AddOnsT = Aws::Vector<AddOnRequest>>
147 void SetAddOns(AddOnsT&& value) {
148 m_addOnsHasBeenSet = true;
149 m_addOns = std::forward<AddOnsT>(value);
150 }
151 template <typename AddOnsT = Aws::Vector<AddOnRequest>>
153 SetAddOns(std::forward<AddOnsT>(value));
154 return *this;
155 }
156 template <typename AddOnsT = AddOnRequest>
158 m_addOnsHasBeenSet = true;
159 m_addOns.emplace_back(std::forward<AddOnsT>(value));
160 return *this;
161 }
163
165
175 inline const Aws::String& GetSourceDiskName() const { return m_sourceDiskName; }
176 inline bool SourceDiskNameHasBeenSet() const { return m_sourceDiskNameHasBeenSet; }
177 template <typename SourceDiskNameT = Aws::String>
178 void SetSourceDiskName(SourceDiskNameT&& value) {
179 m_sourceDiskNameHasBeenSet = true;
180 m_sourceDiskName = std::forward<SourceDiskNameT>(value);
181 }
182 template <typename SourceDiskNameT = Aws::String>
184 SetSourceDiskName(std::forward<SourceDiskNameT>(value));
185 return *this;
186 }
188
190
203 inline const Aws::String& GetRestoreDate() const { return m_restoreDate; }
204 inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; }
205 template <typename RestoreDateT = Aws::String>
206 void SetRestoreDate(RestoreDateT&& value) {
207 m_restoreDateHasBeenSet = true;
208 m_restoreDate = std::forward<RestoreDateT>(value);
209 }
210 template <typename RestoreDateT = Aws::String>
212 SetRestoreDate(std::forward<RestoreDateT>(value));
213 return *this;
214 }
216
218
228 inline bool GetUseLatestRestorableAutoSnapshot() const { return m_useLatestRestorableAutoSnapshot; }
229 inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; }
230 inline void SetUseLatestRestorableAutoSnapshot(bool value) {
231 m_useLatestRestorableAutoSnapshotHasBeenSet = true;
232 m_useLatestRestorableAutoSnapshot = value;
233 }
236 return *this;
237 }
239 private:
240 Aws::String m_diskName;
241
242 Aws::String m_diskSnapshotName;
243
244 Aws::String m_availabilityZone;
245
246 int m_sizeInGb{0};
247
248 Aws::Vector<Tag> m_tags;
249
251
252 Aws::String m_sourceDiskName;
253
254 Aws::String m_restoreDate;
255
256 bool m_useLatestRestorableAutoSnapshot{false};
257 bool m_diskNameHasBeenSet = false;
258 bool m_diskSnapshotNameHasBeenSet = false;
259 bool m_availabilityZoneHasBeenSet = false;
260 bool m_sizeInGbHasBeenSet = false;
261 bool m_tagsHasBeenSet = false;
262 bool m_addOnsHasBeenSet = false;
263 bool m_sourceDiskNameHasBeenSet = false;
264 bool m_restoreDateHasBeenSet = false;
265 bool m_useLatestRestorableAutoSnapshotHasBeenSet = false;
266};
267
268} // namespace Model
269} // namespace Lightsail
270} // namespace Aws
CreateDiskFromSnapshotRequest & WithSourceDiskName(SourceDiskNameT &&value)
CreateDiskFromSnapshotRequest & AddAddOns(AddOnsT &&value)
CreateDiskFromSnapshotRequest & WithRestoreDate(RestoreDateT &&value)
CreateDiskFromSnapshotRequest & WithDiskName(DiskNameT &&value)
CreateDiskFromSnapshotRequest & WithTags(TagsT &&value)
CreateDiskFromSnapshotRequest & WithAddOns(AddOnsT &&value)
AWS_LIGHTSAIL_API CreateDiskFromSnapshotRequest()=default
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
CreateDiskFromSnapshotRequest & AddTags(TagsT &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateDiskFromSnapshotRequest & WithDiskSnapshotName(DiskSnapshotNameT &&value)
CreateDiskFromSnapshotRequest & WithAvailabilityZone(AvailabilityZoneT &&value)
CreateDiskFromSnapshotRequest & WithUseLatestRestorableAutoSnapshot(bool value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector