AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CopySnapshotRequest.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/lightsail/model/RegionName.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Lightsail
16{
17namespace Model
18{
19
23 {
24 public:
25 AWS_LIGHTSAIL_API CopySnapshotRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "CopySnapshot"; }
32
33 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
34
36
37
39
44 inline const Aws::String& GetSourceSnapshotName() const { return m_sourceSnapshotName; }
45 inline bool SourceSnapshotNameHasBeenSet() const { return m_sourceSnapshotNameHasBeenSet; }
46 template<typename SourceSnapshotNameT = Aws::String>
47 void SetSourceSnapshotName(SourceSnapshotNameT&& value) { m_sourceSnapshotNameHasBeenSet = true; m_sourceSnapshotName = std::forward<SourceSnapshotNameT>(value); }
48 template<typename SourceSnapshotNameT = Aws::String>
49 CopySnapshotRequest& WithSourceSnapshotName(SourceSnapshotNameT&& value) { SetSourceSnapshotName(std::forward<SourceSnapshotNameT>(value)); return *this;}
51
53
61 inline const Aws::String& GetSourceResourceName() const { return m_sourceResourceName; }
62 inline bool SourceResourceNameHasBeenSet() const { return m_sourceResourceNameHasBeenSet; }
63 template<typename SourceResourceNameT = Aws::String>
64 void SetSourceResourceName(SourceResourceNameT&& value) { m_sourceResourceNameHasBeenSet = true; m_sourceResourceName = std::forward<SourceResourceNameT>(value); }
65 template<typename SourceResourceNameT = Aws::String>
66 CopySnapshotRequest& WithSourceResourceName(SourceResourceNameT&& value) { SetSourceResourceName(std::forward<SourceResourceNameT>(value)); return *this;}
68
70
83 inline const Aws::String& GetRestoreDate() const { return m_restoreDate; }
84 inline bool RestoreDateHasBeenSet() const { return m_restoreDateHasBeenSet; }
85 template<typename RestoreDateT = Aws::String>
86 void SetRestoreDate(RestoreDateT&& value) { m_restoreDateHasBeenSet = true; m_restoreDate = std::forward<RestoreDateT>(value); }
87 template<typename RestoreDateT = Aws::String>
88 CopySnapshotRequest& WithRestoreDate(RestoreDateT&& value) { SetRestoreDate(std::forward<RestoreDateT>(value)); return *this;}
90
92
103 inline bool GetUseLatestRestorableAutoSnapshot() const { return m_useLatestRestorableAutoSnapshot; }
104 inline bool UseLatestRestorableAutoSnapshotHasBeenSet() const { return m_useLatestRestorableAutoSnapshotHasBeenSet; }
105 inline void SetUseLatestRestorableAutoSnapshot(bool value) { m_useLatestRestorableAutoSnapshotHasBeenSet = true; m_useLatestRestorableAutoSnapshot = value; }
108
110
113 inline const Aws::String& GetTargetSnapshotName() const { return m_targetSnapshotName; }
114 inline bool TargetSnapshotNameHasBeenSet() const { return m_targetSnapshotNameHasBeenSet; }
115 template<typename TargetSnapshotNameT = Aws::String>
116 void SetTargetSnapshotName(TargetSnapshotNameT&& value) { m_targetSnapshotNameHasBeenSet = true; m_targetSnapshotName = std::forward<TargetSnapshotNameT>(value); }
117 template<typename TargetSnapshotNameT = Aws::String>
118 CopySnapshotRequest& WithTargetSnapshotName(TargetSnapshotNameT&& value) { SetTargetSnapshotName(std::forward<TargetSnapshotNameT>(value)); return *this;}
120
122
126 inline RegionName GetSourceRegion() const { return m_sourceRegion; }
127 inline bool SourceRegionHasBeenSet() const { return m_sourceRegionHasBeenSet; }
128 inline void SetSourceRegion(RegionName value) { m_sourceRegionHasBeenSet = true; m_sourceRegion = value; }
129 inline CopySnapshotRequest& WithSourceRegion(RegionName value) { SetSourceRegion(value); return *this;}
131 private:
132
133 Aws::String m_sourceSnapshotName;
134 bool m_sourceSnapshotNameHasBeenSet = false;
135
136 Aws::String m_sourceResourceName;
137 bool m_sourceResourceNameHasBeenSet = false;
138
139 Aws::String m_restoreDate;
140 bool m_restoreDateHasBeenSet = false;
141
142 bool m_useLatestRestorableAutoSnapshot{false};
143 bool m_useLatestRestorableAutoSnapshotHasBeenSet = false;
144
145 Aws::String m_targetSnapshotName;
146 bool m_targetSnapshotNameHasBeenSet = false;
147
148 RegionName m_sourceRegion{RegionName::NOT_SET};
149 bool m_sourceRegionHasBeenSet = false;
150 };
151
152} // namespace Model
153} // namespace Lightsail
154} // 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