AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ReEncryptRequest.h
1
6#pragma once
7#include <aws/core/utils/Array.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/kms/KMSRequest.h>
12#include <aws/kms/KMS_EXPORTS.h>
13#include <aws/kms/model/EncryptionAlgorithmSpec.h>
14
15#include <utility>
16
17namespace Aws {
18namespace KMS {
19namespace Model {
20
24 public:
25 AWS_KMS_API ReEncryptRequest() = 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 "ReEncrypt"; }
32
33 AWS_KMS_API Aws::String SerializePayload() const override;
34
36
38
41 inline const Aws::Utils::ByteBuffer& GetCiphertextBlob() const { return m_ciphertextBlob; }
42 inline bool CiphertextBlobHasBeenSet() const { return m_ciphertextBlobHasBeenSet; }
43 template <typename CiphertextBlobT = Aws::Utils::ByteBuffer>
44 void SetCiphertextBlob(CiphertextBlobT&& value) {
45 m_ciphertextBlobHasBeenSet = true;
46 m_ciphertextBlob = std::forward<CiphertextBlobT>(value);
47 }
48 template <typename CiphertextBlobT = Aws::Utils::ByteBuffer>
49 ReEncryptRequest& WithCiphertextBlob(CiphertextBlobT&& value) {
50 SetCiphertextBlob(std::forward<CiphertextBlobT>(value));
51 return *this;
52 }
54
56
69 inline const Aws::Map<Aws::String, Aws::String>& GetSourceEncryptionContext() const { return m_sourceEncryptionContext; }
70 inline bool SourceEncryptionContextHasBeenSet() const { return m_sourceEncryptionContextHasBeenSet; }
71 template <typename SourceEncryptionContextT = Aws::Map<Aws::String, Aws::String>>
72 void SetSourceEncryptionContext(SourceEncryptionContextT&& value) {
73 m_sourceEncryptionContextHasBeenSet = true;
74 m_sourceEncryptionContext = std::forward<SourceEncryptionContextT>(value);
75 }
76 template <typename SourceEncryptionContextT = Aws::Map<Aws::String, Aws::String>>
77 ReEncryptRequest& WithSourceEncryptionContext(SourceEncryptionContextT&& value) {
78 SetSourceEncryptionContext(std::forward<SourceEncryptionContextT>(value));
79 return *this;
80 }
81 template <typename SourceEncryptionContextKeyT = Aws::String, typename SourceEncryptionContextValueT = Aws::String>
82 ReEncryptRequest& AddSourceEncryptionContext(SourceEncryptionContextKeyT&& key, SourceEncryptionContextValueT&& value) {
83 m_sourceEncryptionContextHasBeenSet = true;
84 m_sourceEncryptionContext.emplace(std::forward<SourceEncryptionContextKeyT>(key), std::forward<SourceEncryptionContextValueT>(value));
85 return *this;
86 }
88
90
111 inline const Aws::String& GetSourceKeyId() const { return m_sourceKeyId; }
112 inline bool SourceKeyIdHasBeenSet() const { return m_sourceKeyIdHasBeenSet; }
113 template <typename SourceKeyIdT = Aws::String>
114 void SetSourceKeyId(SourceKeyIdT&& value) {
115 m_sourceKeyIdHasBeenSet = true;
116 m_sourceKeyId = std::forward<SourceKeyIdT>(value);
117 }
118 template <typename SourceKeyIdT = Aws::String>
119 ReEncryptRequest& WithSourceKeyId(SourceKeyIdT&& value) {
120 SetSourceKeyId(std::forward<SourceKeyIdT>(value));
121 return *this;
122 }
124
126
143 inline const Aws::String& GetDestinationKeyId() const { return m_destinationKeyId; }
144 inline bool DestinationKeyIdHasBeenSet() const { return m_destinationKeyIdHasBeenSet; }
145 template <typename DestinationKeyIdT = Aws::String>
146 void SetDestinationKeyId(DestinationKeyIdT&& value) {
147 m_destinationKeyIdHasBeenSet = true;
148 m_destinationKeyId = std::forward<DestinationKeyIdT>(value);
149 }
150 template <typename DestinationKeyIdT = Aws::String>
151 ReEncryptRequest& WithDestinationKeyId(DestinationKeyIdT&& value) {
152 SetDestinationKeyId(std::forward<DestinationKeyIdT>(value));
153 return *this;
154 }
156
158
175 inline const Aws::Map<Aws::String, Aws::String>& GetDestinationEncryptionContext() const { return m_destinationEncryptionContext; }
176 inline bool DestinationEncryptionContextHasBeenSet() const { return m_destinationEncryptionContextHasBeenSet; }
177 template <typename DestinationEncryptionContextT = Aws::Map<Aws::String, Aws::String>>
178 void SetDestinationEncryptionContext(DestinationEncryptionContextT&& value) {
179 m_destinationEncryptionContextHasBeenSet = true;
180 m_destinationEncryptionContext = std::forward<DestinationEncryptionContextT>(value);
181 }
182 template <typename DestinationEncryptionContextT = Aws::Map<Aws::String, Aws::String>>
183 ReEncryptRequest& WithDestinationEncryptionContext(DestinationEncryptionContextT&& value) {
184 SetDestinationEncryptionContext(std::forward<DestinationEncryptionContextT>(value));
185 return *this;
186 }
187 template <typename DestinationEncryptionContextKeyT = Aws::String, typename DestinationEncryptionContextValueT = Aws::String>
188 ReEncryptRequest& AddDestinationEncryptionContext(DestinationEncryptionContextKeyT&& key, DestinationEncryptionContextValueT&& value) {
189 m_destinationEncryptionContextHasBeenSet = true;
190 m_destinationEncryptionContext.emplace(std::forward<DestinationEncryptionContextKeyT>(key),
191 std::forward<DestinationEncryptionContextValueT>(value));
192 return *this;
193 }
195
197
206 inline EncryptionAlgorithmSpec GetSourceEncryptionAlgorithm() const { return m_sourceEncryptionAlgorithm; }
207 inline bool SourceEncryptionAlgorithmHasBeenSet() const { return m_sourceEncryptionAlgorithmHasBeenSet; }
209 m_sourceEncryptionAlgorithmHasBeenSet = true;
210 m_sourceEncryptionAlgorithm = value;
211 }
214 return *this;
215 }
217
219
226 inline EncryptionAlgorithmSpec GetDestinationEncryptionAlgorithm() const { return m_destinationEncryptionAlgorithm; }
227 inline bool DestinationEncryptionAlgorithmHasBeenSet() const { return m_destinationEncryptionAlgorithmHasBeenSet; }
229 m_destinationEncryptionAlgorithmHasBeenSet = true;
230 m_destinationEncryptionAlgorithm = value;
231 }
234 return *this;
235 }
237
239
248 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
249 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
250 template <typename GrantTokensT = Aws::Vector<Aws::String>>
251 void SetGrantTokens(GrantTokensT&& value) {
252 m_grantTokensHasBeenSet = true;
253 m_grantTokens = std::forward<GrantTokensT>(value);
254 }
255 template <typename GrantTokensT = Aws::Vector<Aws::String>>
256 ReEncryptRequest& WithGrantTokens(GrantTokensT&& value) {
257 SetGrantTokens(std::forward<GrantTokensT>(value));
258 return *this;
259 }
260 template <typename GrantTokensT = Aws::String>
261 ReEncryptRequest& AddGrantTokens(GrantTokensT&& value) {
262 m_grantTokensHasBeenSet = true;
263 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
264 return *this;
265 }
267
269
275 inline bool GetDryRun() const { return m_dryRun; }
276 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
277 inline void SetDryRun(bool value) {
278 m_dryRunHasBeenSet = true;
279 m_dryRun = value;
280 }
281 inline ReEncryptRequest& WithDryRun(bool value) {
282 SetDryRun(value);
283 return *this;
284 }
286 private:
287 Aws::Utils::ByteBuffer m_ciphertextBlob{};
288
289 Aws::Map<Aws::String, Aws::String> m_sourceEncryptionContext;
290
291 Aws::String m_sourceKeyId;
292
293 Aws::String m_destinationKeyId;
294
295 Aws::Map<Aws::String, Aws::String> m_destinationEncryptionContext;
296
298
299 EncryptionAlgorithmSpec m_destinationEncryptionAlgorithm{EncryptionAlgorithmSpec::NOT_SET};
300
301 Aws::Vector<Aws::String> m_grantTokens;
302
303 bool m_dryRun{false};
304 bool m_ciphertextBlobHasBeenSet = false;
305 bool m_sourceEncryptionContextHasBeenSet = false;
306 bool m_sourceKeyIdHasBeenSet = false;
307 bool m_destinationKeyIdHasBeenSet = false;
308 bool m_destinationEncryptionContextHasBeenSet = false;
309 bool m_sourceEncryptionAlgorithmHasBeenSet = false;
310 bool m_destinationEncryptionAlgorithmHasBeenSet = false;
311 bool m_grantTokensHasBeenSet = false;
312 bool m_dryRunHasBeenSet = false;
313};
314
315} // namespace Model
316} // namespace KMS
317} // namespace Aws
void SetSourceKeyId(SourceKeyIdT &&value)
ReEncryptRequest & WithGrantTokens(GrantTokensT &&value)
void SetDestinationEncryptionAlgorithm(EncryptionAlgorithmSpec value)
ReEncryptRequest & AddGrantTokens(GrantTokensT &&value)
AWS_KMS_API ReEncryptRequest()=default
void SetSourceEncryptionAlgorithm(EncryptionAlgorithmSpec value)
ReEncryptRequest & WithDestinationEncryptionContext(DestinationEncryptionContextT &&value)
virtual const char * GetServiceRequestName() const override
EncryptionAlgorithmSpec GetSourceEncryptionAlgorithm() const
void SetSourceEncryptionContext(SourceEncryptionContextT &&value)
ReEncryptRequest & WithDryRun(bool value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
const Aws::String & GetSourceKeyId() const
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
ReEncryptRequest & WithDestinationEncryptionAlgorithm(EncryptionAlgorithmSpec value)
ReEncryptRequest & AddSourceEncryptionContext(SourceEncryptionContextKeyT &&key, SourceEncryptionContextValueT &&value)
ReEncryptRequest & WithSourceEncryptionAlgorithm(EncryptionAlgorithmSpec value)
const Aws::String & GetDestinationKeyId() const
ReEncryptRequest & AddDestinationEncryptionContext(DestinationEncryptionContextKeyT &&key, DestinationEncryptionContextValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetDestinationEncryptionContext() const
const Aws::Map< Aws::String, Aws::String > & GetSourceEncryptionContext() const
void SetCiphertextBlob(CiphertextBlobT &&value)
void SetDestinationEncryptionContext(DestinationEncryptionContextT &&value)
EncryptionAlgorithmSpec GetDestinationEncryptionAlgorithm() const
AWS_KMS_API Aws::String SerializePayload() const override
ReEncryptRequest & WithSourceEncryptionContext(SourceEncryptionContextT &&value)
void SetDestinationKeyId(DestinationKeyIdT &&value)
void SetGrantTokens(GrantTokensT &&value)
ReEncryptRequest & WithDestinationKeyId(DestinationKeyIdT &&value)
const Aws::Utils::ByteBuffer & GetCiphertextBlob() const
ReEncryptRequest & WithCiphertextBlob(CiphertextBlobT &&value)
ReEncryptRequest & WithSourceKeyId(SourceKeyIdT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector