AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetDiskName(const Aws::String& value) { m_diskNameHasBeenSet = true; m_diskName = value; }
47 inline void SetDiskName(Aws::String&& value) { m_diskNameHasBeenSet = true; m_diskName = std::move(value); }
48 inline void SetDiskName(const char* value) { m_diskNameHasBeenSet = true; m_diskName.assign(value); }
49 inline CreateDiskFromSnapshotRequest& WithDiskName(const Aws::String& value) { SetDiskName(value); return *this;}
50 inline CreateDiskFromSnapshotRequest& WithDiskName(Aws::String&& value) { SetDiskName(std::move(value)); return *this;}
51 inline CreateDiskFromSnapshotRequest& WithDiskName(const char* value) { SetDiskName(value); return *this;}
53
55
62 inline const Aws::String& GetDiskSnapshotName() const{ return m_diskSnapshotName; }
63 inline bool DiskSnapshotNameHasBeenSet() const { return m_diskSnapshotNameHasBeenSet; }
64 inline void SetDiskSnapshotName(const Aws::String& value) { m_diskSnapshotNameHasBeenSet = true; m_diskSnapshotName = value; }
65 inline void SetDiskSnapshotName(Aws::String&& value) { m_diskSnapshotNameHasBeenSet = true; m_diskSnapshotName = std::move(value); }
66 inline void SetDiskSnapshotName(const char* value) { m_diskSnapshotNameHasBeenSet = true; m_diskSnapshotName.assign(value); }
68 inline CreateDiskFromSnapshotRequest& WithDiskSnapshotName(Aws::String&& value) { SetDiskSnapshotName(std::move(value)); return *this;}
69 inline CreateDiskFromSnapshotRequest& WithDiskSnapshotName(const char* value) { SetDiskSnapshotName(value); return *this;}
71
73
79 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
80 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
81 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
82 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
83 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
85 inline CreateDiskFromSnapshotRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
86 inline CreateDiskFromSnapshotRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
88
90
93 inline int GetSizeInGb() const{ return m_sizeInGb; }
94 inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; }
95 inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; }
96 inline CreateDiskFromSnapshotRequest& WithSizeInGb(int value) { SetSizeInGb(value); return *this;}
98
100
105 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
106 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
107 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
108 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
109 inline CreateDiskFromSnapshotRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
110 inline CreateDiskFromSnapshotRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
111 inline CreateDiskFromSnapshotRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
112 inline CreateDiskFromSnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
114
116
120 inline const Aws::Vector<AddOnRequest>& GetAddOns() const{ return m_addOns; }
121 inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; }
122 inline void SetAddOns(const Aws::Vector<AddOnRequest>& value) { m_addOnsHasBeenSet = true; m_addOns = value; }
123 inline void SetAddOns(Aws::Vector<AddOnRequest>&& value) { m_addOnsHasBeenSet = true; m_addOns = std::move(value); }
125 inline CreateDiskFromSnapshotRequest& WithAddOns(Aws::Vector<AddOnRequest>&& value) { SetAddOns(std::move(value)); return *this;}
126 inline CreateDiskFromSnapshotRequest& AddAddOns(const AddOnRequest& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(value); return *this; }
127 inline CreateDiskFromSnapshotRequest& AddAddOns(AddOnRequest&& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(std::move(value)); return *this; }
129
131
141 inline const Aws::String& GetSourceDiskName() const{ return m_sourceDiskName; }
142 inline bool SourceDiskNameHasBeenSet() const { return m_sourceDiskNameHasBeenSet; }
143 inline void SetSourceDiskName(const Aws::String& value) { m_sourceDiskNameHasBeenSet = true; m_sourceDiskName = value; }
144 inline void SetSourceDiskName(Aws::String&& value) { m_sourceDiskNameHasBeenSet = true; m_sourceDiskName = std::move(value); }
145 inline void SetSourceDiskName(const char* value) { m_sourceDiskNameHasBeenSet = true; m_sourceDiskName.assign(value); }
147 inline CreateDiskFromSnapshotRequest& WithSourceDiskName(Aws::String&& value) { SetSourceDiskName(std::move(value)); return *this;}
148 inline CreateDiskFromSnapshotRequest& WithSourceDiskName(const char* value) { SetSourceDiskName(value); return *this;}
150
152
165 inline const Aws::String& GetRestoreDate() const{ return m_restoreDate; }
166 inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; }
167 inline void SetRestoreDate(const Aws::String& value) { m_restoreDateHasBeenSet = true; m_restoreDate = value; }
168 inline void SetRestoreDate(Aws::String&& value) { m_restoreDateHasBeenSet = true; m_restoreDate = std::move(value); }
169 inline void SetRestoreDate(const char* value) { m_restoreDateHasBeenSet = true; m_restoreDate.assign(value); }
170 inline CreateDiskFromSnapshotRequest& WithRestoreDate(const Aws::String& value) { SetRestoreDate(value); return *this;}
171 inline CreateDiskFromSnapshotRequest& WithRestoreDate(Aws::String&& value) { SetRestoreDate(std::move(value)); return *this;}
172 inline CreateDiskFromSnapshotRequest& WithRestoreDate(const char* value) { SetRestoreDate(value); return *this;}
174
176
186 inline bool GetUseLatestRestorableAutoSnapshot() const{ return m_useLatestRestorableAutoSnapshot; }
187 inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; }
188 inline void SetUseLatestRestorableAutoSnapshot(bool value) { m_useLatestRestorableAutoSnapshotHasBeenSet = true; m_useLatestRestorableAutoSnapshot = value; }
191 private:
192
193 Aws::String m_diskName;
194 bool m_diskNameHasBeenSet = false;
195
196 Aws::String m_diskSnapshotName;
197 bool m_diskSnapshotNameHasBeenSet = false;
198
199 Aws::String m_availabilityZone;
200 bool m_availabilityZoneHasBeenSet = false;
201
202 int m_sizeInGb;
203 bool m_sizeInGbHasBeenSet = false;
204
205 Aws::Vector<Tag> m_tags;
206 bool m_tagsHasBeenSet = false;
207
209 bool m_addOnsHasBeenSet = false;
210
211 Aws::String m_sourceDiskName;
212 bool m_sourceDiskNameHasBeenSet = false;
213
214 Aws::String m_restoreDate;
215 bool m_restoreDateHasBeenSet = false;
216
217 bool m_useLatestRestorableAutoSnapshot;
218 bool m_useLatestRestorableAutoSnapshotHasBeenSet = false;
219 };
220
221} // namespace Model
222} // namespace Lightsail
223} // namespace Aws
CreateDiskFromSnapshotRequest & WithRestoreDate(Aws::String &&value)
CreateDiskFromSnapshotRequest & WithSourceDiskName(Aws::String &&value)
CreateDiskFromSnapshotRequest & AddAddOns(AddOnRequest &&value)
CreateDiskFromSnapshotRequest & AddTags(const Tag &value)
CreateDiskFromSnapshotRequest & WithDiskName(const char *value)
CreateDiskFromSnapshotRequest & WithDiskName(Aws::String &&value)
CreateDiskFromSnapshotRequest & WithAddOns(Aws::Vector< AddOnRequest > &&value)
CreateDiskFromSnapshotRequest & WithSourceDiskName(const Aws::String &value)
CreateDiskFromSnapshotRequest & WithTags(Aws::Vector< Tag > &&value)
CreateDiskFromSnapshotRequest & WithAvailabilityZone(const char *value)
CreateDiskFromSnapshotRequest & WithDiskSnapshotName(Aws::String &&value)
CreateDiskFromSnapshotRequest & WithDiskSnapshotName(const Aws::String &value)
CreateDiskFromSnapshotRequest & AddAddOns(const AddOnRequest &value)
CreateDiskFromSnapshotRequest & WithSourceDiskName(const char *value)
CreateDiskFromSnapshotRequest & WithRestoreDate(const Aws::String &value)
CreateDiskFromSnapshotRequest & WithAvailabilityZone(Aws::String &&value)
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
CreateDiskFromSnapshotRequest & WithAvailabilityZone(const Aws::String &value)
void SetAddOns(const Aws::Vector< AddOnRequest > &value)
CreateDiskFromSnapshotRequest & WithDiskSnapshotName(const char *value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateDiskFromSnapshotRequest & WithRestoreDate(const char *value)
CreateDiskFromSnapshotRequest & WithDiskName(const Aws::String &value)
CreateDiskFromSnapshotRequest & WithAddOns(const Aws::Vector< AddOnRequest > &value)
CreateDiskFromSnapshotRequest & WithTags(const Aws::Vector< Tag > &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