AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CopySnapshotRequest.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/elasticache/ElastiCacheRequest.h>
10#include <aws/elasticache/ElastiCache_EXPORTS.h>
11#include <aws/elasticache/model/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace ElastiCache {
17namespace Model {
18
26 public:
27 AWS_ELASTICACHE_API CopySnapshotRequest() = 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 "CopySnapshot"; }
34
35 AWS_ELASTICACHE_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_ELASTICACHE_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
39
40 public:
42
45 inline const Aws::String& GetSourceSnapshotName() const { return m_sourceSnapshotName; }
46 inline bool SourceSnapshotNameHasBeenSet() const { return m_sourceSnapshotNameHasBeenSet; }
47 template <typename SourceSnapshotNameT = Aws::String>
48 void SetSourceSnapshotName(SourceSnapshotNameT&& value) {
49 m_sourceSnapshotNameHasBeenSet = true;
50 m_sourceSnapshotName = std::forward<SourceSnapshotNameT>(value);
51 }
52 template <typename SourceSnapshotNameT = Aws::String>
53 CopySnapshotRequest& WithSourceSnapshotName(SourceSnapshotNameT&& value) {
54 SetSourceSnapshotName(std::forward<SourceSnapshotNameT>(value));
55 return *this;
56 }
58
60
65 inline const Aws::String& GetTargetSnapshotName() const { return m_targetSnapshotName; }
66 inline bool TargetSnapshotNameHasBeenSet() const { return m_targetSnapshotNameHasBeenSet; }
67 template <typename TargetSnapshotNameT = Aws::String>
68 void SetTargetSnapshotName(TargetSnapshotNameT&& value) {
69 m_targetSnapshotNameHasBeenSet = true;
70 m_targetSnapshotName = std::forward<TargetSnapshotNameT>(value);
71 }
72 template <typename TargetSnapshotNameT = Aws::String>
73 CopySnapshotRequest& WithTargetSnapshotName(TargetSnapshotNameT&& value) {
74 SetTargetSnapshotName(std::forward<TargetSnapshotNameT>(value));
75 return *this;
76 }
78
80
91 inline const Aws::String& GetTargetBucket() const { return m_targetBucket; }
92 inline bool TargetBucketHasBeenSet() const { return m_targetBucketHasBeenSet; }
93 template <typename TargetBucketT = Aws::String>
94 void SetTargetBucket(TargetBucketT&& value) {
95 m_targetBucketHasBeenSet = true;
96 m_targetBucket = std::forward<TargetBucketT>(value);
97 }
98 template <typename TargetBucketT = Aws::String>
99 CopySnapshotRequest& WithTargetBucket(TargetBucketT&& value) {
100 SetTargetBucket(std::forward<TargetBucketT>(value));
101 return *this;
102 }
104
106
109 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
110 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
111 template <typename KmsKeyIdT = Aws::String>
112 void SetKmsKeyId(KmsKeyIdT&& value) {
113 m_kmsKeyIdHasBeenSet = true;
114 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
115 }
116 template <typename KmsKeyIdT = Aws::String>
117 CopySnapshotRequest& WithKmsKeyId(KmsKeyIdT&& value) {
118 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
119 return *this;
120 }
122
124
128 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
129 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
130 template <typename TagsT = Aws::Vector<Tag>>
131 void SetTags(TagsT&& value) {
132 m_tagsHasBeenSet = true;
133 m_tags = std::forward<TagsT>(value);
134 }
135 template <typename TagsT = Aws::Vector<Tag>>
137 SetTags(std::forward<TagsT>(value));
138 return *this;
139 }
140 template <typename TagsT = Tag>
141 CopySnapshotRequest& AddTags(TagsT&& value) {
142 m_tagsHasBeenSet = true;
143 m_tags.emplace_back(std::forward<TagsT>(value));
144 return *this;
145 }
147 private:
148 Aws::String m_sourceSnapshotName;
149
150 Aws::String m_targetSnapshotName;
151
152 Aws::String m_targetBucket;
153
154 Aws::String m_kmsKeyId;
155
156 Aws::Vector<Tag> m_tags;
157 bool m_sourceSnapshotNameHasBeenSet = false;
158 bool m_targetSnapshotNameHasBeenSet = false;
159 bool m_targetBucketHasBeenSet = false;
160 bool m_kmsKeyIdHasBeenSet = false;
161 bool m_tagsHasBeenSet = false;
162};
163
164} // namespace Model
165} // namespace ElastiCache
166} // namespace Aws
CopySnapshotRequest & WithTargetBucket(TargetBucketT &&value)
CopySnapshotRequest & WithTargetSnapshotName(TargetSnapshotNameT &&value)
const Aws::Vector< Tag > & GetTags() const
CopySnapshotRequest & WithKmsKeyId(KmsKeyIdT &&value)
CopySnapshotRequest & WithTags(TagsT &&value)
AWS_ELASTICACHE_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
virtual const char * GetServiceRequestName() const override
AWS_ELASTICACHE_API Aws::String SerializePayload() const override
CopySnapshotRequest & WithSourceSnapshotName(SourceSnapshotNameT &&value)
void SetTargetSnapshotName(TargetSnapshotNameT &&value)
AWS_ELASTICACHE_API CopySnapshotRequest()=default
CopySnapshotRequest & AddTags(TagsT &&value)
void SetSourceSnapshotName(SourceSnapshotNameT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector