AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateDiskFromSnapshotRequest.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/lightsail/LightsailRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/lightsail/model/Tag.h>
12#include <aws/lightsail/model/AddOnRequest.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Lightsail
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_LIGHTSAIL_API CreateDiskFromSnapshotRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateDiskFromSnapshot"; }
34
35 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
36
38
39
41
44 inline const Aws::String& GetDiskName() const { return m_diskName; }
45 inline bool DiskNameHasBeenSet() const { return m_diskNameHasBeenSet; }
46 template<typename DiskNameT = Aws::String>
47 void SetDiskName(DiskNameT&& value) { m_diskNameHasBeenSet = true; m_diskName = std::forward<DiskNameT>(value); }
48 template<typename DiskNameT = Aws::String>
49 CreateDiskFromSnapshotRequest& WithDiskName(DiskNameT&& value) { SetDiskName(std::forward<DiskNameT>(value)); return *this;}
51
53
60 inline const Aws::String& GetDiskSnapshotName() const { return m_diskSnapshotName; }
61 inline bool DiskSnapshotNameHasBeenSet() const { return m_diskSnapshotNameHasBeenSet; }
62 template<typename DiskSnapshotNameT = Aws::String>
63 void SetDiskSnapshotName(DiskSnapshotNameT&& value) { m_diskSnapshotNameHasBeenSet = true; m_diskSnapshotName = std::forward<DiskSnapshotNameT>(value); }
64 template<typename DiskSnapshotNameT = Aws::String>
65 CreateDiskFromSnapshotRequest& WithDiskSnapshotName(DiskSnapshotNameT&& value) { SetDiskSnapshotName(std::forward<DiskSnapshotNameT>(value)); return *this;}
67
69
75 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
76 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
77 template<typename AvailabilityZoneT = Aws::String>
78 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
79 template<typename AvailabilityZoneT = Aws::String>
80 CreateDiskFromSnapshotRequest& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
82
84
87 inline int GetSizeInGb() const { return m_sizeInGb; }
88 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
89 inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; }
90 inline CreateDiskFromSnapshotRequest& WithSizeInGb(int value) { SetSizeInGb(value); return *this;}
92
94
99 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
100 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
101 template<typename TagsT = Aws::Vector<Tag>>
102 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
103 template<typename TagsT = Aws::Vector<Tag>>
104 CreateDiskFromSnapshotRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
105 template<typename TagsT = Tag>
106 CreateDiskFromSnapshotRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
108
110
114 inline const Aws::Vector<AddOnRequest>& GetAddOns() const { return m_addOns; }
115 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
116 template<typename AddOnsT = Aws::Vector<AddOnRequest>>
117 void SetAddOns(AddOnsT&& value) { m_addOnsHasBeenSet = true; m_addOns = std::forward<AddOnsT>(value); }
118 template<typename AddOnsT = Aws::Vector<AddOnRequest>>
119 CreateDiskFromSnapshotRequest& WithAddOns(AddOnsT&& value) { SetAddOns(std::forward<AddOnsT>(value)); return *this;}
120 template<typename AddOnsT = AddOnRequest>
121 CreateDiskFromSnapshotRequest& AddAddOns(AddOnsT&& value) { m_addOnsHasBeenSet = true; m_addOns.emplace_back(std::forward<AddOnsT>(value)); return *this; }
123
125
135 inline const Aws::String& GetSourceDiskName() const { return m_sourceDiskName; }
136 inline bool SourceDiskNameHasBeenSet() const { return m_sourceDiskNameHasBeenSet; }
137 template<typename SourceDiskNameT = Aws::String>
138 void SetSourceDiskName(SourceDiskNameT&& value) { m_sourceDiskNameHasBeenSet = true; m_sourceDiskName = std::forward<SourceDiskNameT>(value); }
139 template<typename SourceDiskNameT = Aws::String>
140 CreateDiskFromSnapshotRequest& WithSourceDiskName(SourceDiskNameT&& value) { SetSourceDiskName(std::forward<SourceDiskNameT>(value)); return *this;}
142
144
157 inline const Aws::String& GetRestoreDate() const { return m_restoreDate; }
158 inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; }
159 template<typename RestoreDateT = Aws::String>
160 void SetRestoreDate(RestoreDateT&& value) { m_restoreDateHasBeenSet = true; m_restoreDate = std::forward<RestoreDateT>(value); }
161 template<typename RestoreDateT = Aws::String>
162 CreateDiskFromSnapshotRequest& WithRestoreDate(RestoreDateT&& value) { SetRestoreDate(std::forward<RestoreDateT>(value)); return *this;}
164
166
176 inline bool GetUseLatestRestorableAutoSnapshot() const { return m_useLatestRestorableAutoSnapshot; }
177 inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; }
178 inline void SetUseLatestRestorableAutoSnapshot(bool value) { m_useLatestRestorableAutoSnapshotHasBeenSet = true; m_useLatestRestorableAutoSnapshot = value; }
181 private:
182
183 Aws::String m_diskName;
184 bool m_diskNameHasBeenSet = false;
185
186 Aws::String m_diskSnapshotName;
187 bool m_diskSnapshotNameHasBeenSet = false;
188
189 Aws::String m_availabilityZone;
190 bool m_availabilityZoneHasBeenSet = false;
191
192 int m_sizeInGb{0};
193 bool m_sizeInGbHasBeenSet = false;
194
195 Aws::Vector<Tag> m_tags;
196 bool m_tagsHasBeenSet = false;
197
199 bool m_addOnsHasBeenSet = false;
200
201 Aws::String m_sourceDiskName;
202 bool m_sourceDiskNameHasBeenSet = false;
203
204 Aws::String m_restoreDate;
205 bool m_restoreDateHasBeenSet = false;
206
207 bool m_useLatestRestorableAutoSnapshot{false};
208 bool m_useLatestRestorableAutoSnapshotHasBeenSet = false;
209 };
210
211} // namespace Model
212} // namespace Lightsail
213} // 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