AWS SDK for C++

AWS SDK for C++ Version 1.11.683

Loading...
Searching...
No Matches
CopySnapshotRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/lightsail/LightsailRequest.h>
9#include <aws/lightsail/Lightsail_EXPORTS.h>
10#include <aws/lightsail/model/RegionName.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Lightsail {
16namespace Model {
17
21 public:
22 AWS_LIGHTSAIL_API CopySnapshotRequest() = default;
23
24 // Service request name is the Operation name which will send this request out,
25 // each operation should has unique request name, so that we can get operation's name from this request.
26 // Note: this is not true for response, multiple operations may have the same response name,
27 // so we can not get operation's name from response.
28 inline virtual const char* GetServiceRequestName() const override { return "CopySnapshot"; }
29
30 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
31
33
35
40 inline const Aws::String& GetSourceSnapshotName() const { return m_sourceSnapshotName; }
41 inline bool SourceSnapshotNameHasBeenSet() const { return m_sourceSnapshotNameHasBeenSet; }
42 template <typename SourceSnapshotNameT = Aws::String>
43 void SetSourceSnapshotName(SourceSnapshotNameT&& value) {
44 m_sourceSnapshotNameHasBeenSet = true;
45 m_sourceSnapshotName = std::forward<SourceSnapshotNameT>(value);
46 }
47 template <typename SourceSnapshotNameT = Aws::String>
48 CopySnapshotRequest& WithSourceSnapshotName(SourceSnapshotNameT&& value) {
49 SetSourceSnapshotName(std::forward<SourceSnapshotNameT>(value));
50 return *this;
51 }
53
55
63 inline const Aws::String& GetSourceResourceName() const { return m_sourceResourceName; }
64 inline bool SourceResourceNameHasBeenSet() const { return m_sourceResourceNameHasBeenSet; }
65 template <typename SourceResourceNameT = Aws::String>
66 void SetSourceResourceName(SourceResourceNameT&& value) {
67 m_sourceResourceNameHasBeenSet = true;
68 m_sourceResourceName = std::forward<SourceResourceNameT>(value);
69 }
70 template <typename SourceResourceNameT = Aws::String>
71 CopySnapshotRequest& WithSourceResourceName(SourceResourceNameT&& value) {
72 SetSourceResourceName(std::forward<SourceResourceNameT>(value));
73 return *this;
74 }
76
78
91 inline const Aws::String& GetRestoreDate() const { return m_restoreDate; }
92 inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; }
93 template <typename RestoreDateT = Aws::String>
94 void SetRestoreDate(RestoreDateT&& value) {
95 m_restoreDateHasBeenSet = true;
96 m_restoreDate = std::forward<RestoreDateT>(value);
97 }
98 template <typename RestoreDateT = Aws::String>
99 CopySnapshotRequest& WithRestoreDate(RestoreDateT&& value) {
100 SetRestoreDate(std::forward<RestoreDateT>(value));
101 return *this;
102 }
104
106
117 inline bool GetUseLatestRestorableAutoSnapshot() const { return m_useLatestRestorableAutoSnapshot; }
118 inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; }
119 inline void SetUseLatestRestorableAutoSnapshot(bool value) {
120 m_useLatestRestorableAutoSnapshotHasBeenSet = true;
121 m_useLatestRestorableAutoSnapshot = value;
122 }
125 return *this;
126 }
128
130
133 inline const Aws::String& GetTargetSnapshotName() const { return m_targetSnapshotName; }
134 inline bool TargetSnapshotNameHasBeenSet() const { return m_targetSnapshotNameHasBeenSet; }
135 template <typename TargetSnapshotNameT = Aws::String>
136 void SetTargetSnapshotName(TargetSnapshotNameT&& value) {
137 m_targetSnapshotNameHasBeenSet = true;
138 m_targetSnapshotName = std::forward<TargetSnapshotNameT>(value);
139 }
140 template <typename TargetSnapshotNameT = Aws::String>
141 CopySnapshotRequest& WithTargetSnapshotName(TargetSnapshotNameT&& value) {
142 SetTargetSnapshotName(std::forward<TargetSnapshotNameT>(value));
143 return *this;
144 }
146
148
152 inline RegionName GetSourceRegion() const { return m_sourceRegion; }
153 inline bool SourceRegionHasBeenSet() const { return m_sourceRegionHasBeenSet; }
154 inline void SetSourceRegion(RegionName value) {
155 m_sourceRegionHasBeenSet = true;
156 m_sourceRegion = value;
157 }
159 SetSourceRegion(value);
160 return *this;
161 }
163 private:
164 Aws::String m_sourceSnapshotName;
165 bool m_sourceSnapshotNameHasBeenSet = false;
166
167 Aws::String m_sourceResourceName;
168 bool m_sourceResourceNameHasBeenSet = false;
169
170 Aws::String m_restoreDate;
171 bool m_restoreDateHasBeenSet = false;
172
173 bool m_useLatestRestorableAutoSnapshot{false};
174 bool m_useLatestRestorableAutoSnapshotHasBeenSet = false;
175
176 Aws::String m_targetSnapshotName;
177 bool m_targetSnapshotNameHasBeenSet = false;
178
179 RegionName m_sourceRegion{RegionName::NOT_SET};
180 bool m_sourceRegionHasBeenSet = false;
181};
182
183} // namespace Model
184} // namespace Lightsail
185} // namespace Aws
const Aws::String & GetTargetSnapshotName() const
void SetSourceResourceName(SourceResourceNameT &&value)
virtual const char * GetServiceRequestName() const override
CopySnapshotRequest & WithSourceSnapshotName(SourceSnapshotNameT &&value)
CopySnapshotRequest & WithRestoreDate(RestoreDateT &&value)
CopySnapshotRequest & WithTargetSnapshotName(TargetSnapshotNameT &&value)
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
void SetSourceSnapshotName(SourceSnapshotNameT &&value)
CopySnapshotRequest & WithUseLatestRestorableAutoSnapshot(bool value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetTargetSnapshotName(TargetSnapshotNameT &&value)
AWS_LIGHTSAIL_API CopySnapshotRequest()=default
CopySnapshotRequest & WithSourceRegion(RegionName value)
const Aws::String & GetSourceResourceName() const
const Aws::String & GetSourceSnapshotName() const
CopySnapshotRequest & WithSourceResourceName(SourceResourceNameT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String