AWS SDK for C++

AWS SDK for C++ Version 1.11.786

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
66 inline const Aws::String& GetTargetSnapshotName() const { return m_targetSnapshotName; }
67 inline bool TargetSnapshotNameHasBeenSet() const { return m_targetSnapshotNameHasBeenSet; }
68 template <typename TargetSnapshotNameT = Aws::String>
69 void SetTargetSnapshotName(TargetSnapshotNameT&& value) {
70 m_targetSnapshotNameHasBeenSet = true;
71 m_targetSnapshotName = std::forward<TargetSnapshotNameT>(value);
72 }
73 template <typename TargetSnapshotNameT = Aws::String>
74 CopySnapshotRequest& WithTargetSnapshotName(TargetSnapshotNameT&& value) {
75 SetTargetSnapshotName(std::forward<TargetSnapshotNameT>(value));
76 return *this;
77 }
79
81
92 inline const Aws::String& GetTargetBucket() const { return m_targetBucket; }
93 inline bool TargetBucketHasBeenSet() const { return m_targetBucketHasBeenSet; }
94 template <typename TargetBucketT = Aws::String>
95 void SetTargetBucket(TargetBucketT&& value) {
96 m_targetBucketHasBeenSet = true;
97 m_targetBucket = std::forward<TargetBucketT>(value);
98 }
99 template <typename TargetBucketT = Aws::String>
100 CopySnapshotRequest& WithTargetBucket(TargetBucketT&& value) {
101 SetTargetBucket(std::forward<TargetBucketT>(value));
102 return *this;
103 }
105
107
110 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
111 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
112 template <typename KmsKeyIdT = Aws::String>
113 void SetKmsKeyId(KmsKeyIdT&& value) {
114 m_kmsKeyIdHasBeenSet = true;
115 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
116 }
117 template <typename KmsKeyIdT = Aws::String>
118 CopySnapshotRequest& WithKmsKeyId(KmsKeyIdT&& value) {
119 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
120 return *this;
121 }
123
125
129 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
130 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
131 template <typename TagsT = Aws::Vector<Tag>>
132 void SetTags(TagsT&& value) {
133 m_tagsHasBeenSet = true;
134 m_tags = std::forward<TagsT>(value);
135 }
136 template <typename TagsT = Aws::Vector<Tag>>
138 SetTags(std::forward<TagsT>(value));
139 return *this;
140 }
141 template <typename TagsT = Tag>
142 CopySnapshotRequest& AddTags(TagsT&& value) {
143 m_tagsHasBeenSet = true;
144 m_tags.emplace_back(std::forward<TagsT>(value));
145 return *this;
146 }
148 private:
149 Aws::String m_sourceSnapshotName;
150
151 Aws::String m_targetSnapshotName;
152
153 Aws::String m_targetBucket;
154
155 Aws::String m_kmsKeyId;
156
157 Aws::Vector<Tag> m_tags;
158 bool m_sourceSnapshotNameHasBeenSet = false;
159 bool m_targetSnapshotNameHasBeenSet = false;
160 bool m_targetBucketHasBeenSet = false;
161 bool m_kmsKeyIdHasBeenSet = false;
162 bool m_tagsHasBeenSet = false;
163};
164
165} // namespace Model
166} // namespace ElastiCache
167} // 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