AWS SDK for C++

AWS SDK for C++ Version 1.11.788

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/DryRunModifierType.h>
14#include <aws/kms/model/EncryptionAlgorithmSpec.h>
15
16#include <utility>
17
18namespace Aws {
19namespace KMS {
20namespace Model {
21
25 public:
26 AWS_KMS_API ReEncryptRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "ReEncrypt"; }
33
34 AWS_KMS_API Aws::String SerializePayload() const override;
35
37
39
44 inline const Aws::Utils::ByteBuffer& GetCiphertextBlob() const { return m_ciphertextBlob; }
45 inline bool CiphertextBlobHasBeenSet() const { return m_ciphertextBlobHasBeenSet; }
46 template <typename CiphertextBlobT = Aws::Utils::ByteBuffer>
47 void SetCiphertextBlob(CiphertextBlobT&& value) {
48 m_ciphertextBlobHasBeenSet = true;
49 m_ciphertextBlob = std::forward<CiphertextBlobT>(value);
50 }
51 template <typename CiphertextBlobT = Aws::Utils::ByteBuffer>
52 ReEncryptRequest& WithCiphertextBlob(CiphertextBlobT&& value) {
53 SetCiphertextBlob(std::forward<CiphertextBlobT>(value));
54 return *this;
55 }
57
59
72 inline const Aws::Map<Aws::String, Aws::String>& GetSourceEncryptionContext() const { return m_sourceEncryptionContext; }
73 inline bool SourceEncryptionContextHasBeenSet() const { return m_sourceEncryptionContextHasBeenSet; }
74 template <typename SourceEncryptionContextT = Aws::Map<Aws::String, Aws::String>>
75 void SetSourceEncryptionContext(SourceEncryptionContextT&& value) {
76 m_sourceEncryptionContextHasBeenSet = true;
77 m_sourceEncryptionContext = std::forward<SourceEncryptionContextT>(value);
78 }
79 template <typename SourceEncryptionContextT = Aws::Map<Aws::String, Aws::String>>
80 ReEncryptRequest& WithSourceEncryptionContext(SourceEncryptionContextT&& value) {
81 SetSourceEncryptionContext(std::forward<SourceEncryptionContextT>(value));
82 return *this;
83 }
84 template <typename SourceEncryptionContextKeyT = Aws::String, typename SourceEncryptionContextValueT = Aws::String>
85 ReEncryptRequest& AddSourceEncryptionContext(SourceEncryptionContextKeyT&& key, SourceEncryptionContextValueT&& value) {
86 m_sourceEncryptionContextHasBeenSet = true;
87 m_sourceEncryptionContext.emplace(std::forward<SourceEncryptionContextKeyT>(key), std::forward<SourceEncryptionContextValueT>(value));
88 return *this;
89 }
91
93
116 inline const Aws::String& GetSourceKeyId() const { return m_sourceKeyId; }
117 inline bool SourceKeyIdHasBeenSet() const { return m_sourceKeyIdHasBeenSet; }
118 template <typename SourceKeyIdT = Aws::String>
119 void SetSourceKeyId(SourceKeyIdT&& value) {
120 m_sourceKeyIdHasBeenSet = true;
121 m_sourceKeyId = std::forward<SourceKeyIdT>(value);
122 }
123 template <typename SourceKeyIdT = Aws::String>
124 ReEncryptRequest& WithSourceKeyId(SourceKeyIdT&& value) {
125 SetSourceKeyId(std::forward<SourceKeyIdT>(value));
126 return *this;
127 }
129
131
148 inline const Aws::String& GetDestinationKeyId() const { return m_destinationKeyId; }
149 inline bool DestinationKeyIdHasBeenSet() const { return m_destinationKeyIdHasBeenSet; }
150 template <typename DestinationKeyIdT = Aws::String>
151 void SetDestinationKeyId(DestinationKeyIdT&& value) {
152 m_destinationKeyIdHasBeenSet = true;
153 m_destinationKeyId = std::forward<DestinationKeyIdT>(value);
154 }
155 template <typename DestinationKeyIdT = Aws::String>
156 ReEncryptRequest& WithDestinationKeyId(DestinationKeyIdT&& value) {
157 SetDestinationKeyId(std::forward<DestinationKeyIdT>(value));
158 return *this;
159 }
161
163
180 inline const Aws::Map<Aws::String, Aws::String>& GetDestinationEncryptionContext() const { return m_destinationEncryptionContext; }
181 inline bool DestinationEncryptionContextHasBeenSet() const { return m_destinationEncryptionContextHasBeenSet; }
182 template <typename DestinationEncryptionContextT = Aws::Map<Aws::String, Aws::String>>
183 void SetDestinationEncryptionContext(DestinationEncryptionContextT&& value) {
184 m_destinationEncryptionContextHasBeenSet = true;
185 m_destinationEncryptionContext = std::forward<DestinationEncryptionContextT>(value);
186 }
187 template <typename DestinationEncryptionContextT = Aws::Map<Aws::String, Aws::String>>
188 ReEncryptRequest& WithDestinationEncryptionContext(DestinationEncryptionContextT&& value) {
189 SetDestinationEncryptionContext(std::forward<DestinationEncryptionContextT>(value));
190 return *this;
191 }
192 template <typename DestinationEncryptionContextKeyT = Aws::String, typename DestinationEncryptionContextValueT = Aws::String>
193 ReEncryptRequest& AddDestinationEncryptionContext(DestinationEncryptionContextKeyT&& key, DestinationEncryptionContextValueT&& value) {
194 m_destinationEncryptionContextHasBeenSet = true;
195 m_destinationEncryptionContext.emplace(std::forward<DestinationEncryptionContextKeyT>(key),
196 std::forward<DestinationEncryptionContextValueT>(value));
197 return *this;
198 }
200
202
211 inline EncryptionAlgorithmSpec GetSourceEncryptionAlgorithm() const { return m_sourceEncryptionAlgorithm; }
212 inline bool SourceEncryptionAlgorithmHasBeenSet() const { return m_sourceEncryptionAlgorithmHasBeenSet; }
214 m_sourceEncryptionAlgorithmHasBeenSet = true;
215 m_sourceEncryptionAlgorithm = value;
216 }
219 return *this;
220 }
222
224
231 inline EncryptionAlgorithmSpec GetDestinationEncryptionAlgorithm() const { return m_destinationEncryptionAlgorithm; }
232 inline bool DestinationEncryptionAlgorithmHasBeenSet() const { return m_destinationEncryptionAlgorithmHasBeenSet; }
234 m_destinationEncryptionAlgorithmHasBeenSet = true;
235 m_destinationEncryptionAlgorithm = value;
236 }
239 return *this;
240 }
242
244
253 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
254 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
255 template <typename GrantTokensT = Aws::Vector<Aws::String>>
256 void SetGrantTokens(GrantTokensT&& value) {
257 m_grantTokensHasBeenSet = true;
258 m_grantTokens = std::forward<GrantTokensT>(value);
259 }
260 template <typename GrantTokensT = Aws::Vector<Aws::String>>
261 ReEncryptRequest& WithGrantTokens(GrantTokensT&& value) {
262 SetGrantTokens(std::forward<GrantTokensT>(value));
263 return *this;
264 }
265 template <typename GrantTokensT = Aws::String>
266 ReEncryptRequest& AddGrantTokens(GrantTokensT&& value) {
267 m_grantTokensHasBeenSet = true;
268 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
269 return *this;
270 }
272
274
280 inline bool GetDryRun() const { return m_dryRun; }
281 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
282 inline void SetDryRun(bool value) {
283 m_dryRunHasBeenSet = true;
284 m_dryRun = value;
285 }
286 inline ReEncryptRequest& WithDryRun(bool value) {
287 SetDryRun(value);
288 return *this;
289 }
291
293
304 inline const Aws::Vector<DryRunModifierType>& GetDryRunModifiers() const { return m_dryRunModifiers; }
305 inline bool DryRunModifiersHasBeenSet() const { return m_dryRunModifiersHasBeenSet; }
306 template <typename DryRunModifiersT = Aws::Vector<DryRunModifierType>>
307 void SetDryRunModifiers(DryRunModifiersT&& value) {
308 m_dryRunModifiersHasBeenSet = true;
309 m_dryRunModifiers = std::forward<DryRunModifiersT>(value);
310 }
311 template <typename DryRunModifiersT = Aws::Vector<DryRunModifierType>>
312 ReEncryptRequest& WithDryRunModifiers(DryRunModifiersT&& value) {
313 SetDryRunModifiers(std::forward<DryRunModifiersT>(value));
314 return *this;
315 }
317 m_dryRunModifiersHasBeenSet = true;
318 m_dryRunModifiers.push_back(value);
319 return *this;
320 }
322 private:
323 Aws::Utils::ByteBuffer m_ciphertextBlob{};
324
325 Aws::Map<Aws::String, Aws::String> m_sourceEncryptionContext;
326
327 Aws::String m_sourceKeyId;
328
329 Aws::String m_destinationKeyId;
330
331 Aws::Map<Aws::String, Aws::String> m_destinationEncryptionContext;
332
334
335 EncryptionAlgorithmSpec m_destinationEncryptionAlgorithm{EncryptionAlgorithmSpec::NOT_SET};
336
337 Aws::Vector<Aws::String> m_grantTokens;
338
339 bool m_dryRun{false};
340
341 Aws::Vector<DryRunModifierType> m_dryRunModifiers;
342 bool m_ciphertextBlobHasBeenSet = false;
343 bool m_sourceEncryptionContextHasBeenSet = false;
344 bool m_sourceKeyIdHasBeenSet = false;
345 bool m_destinationKeyIdHasBeenSet = false;
346 bool m_destinationEncryptionContextHasBeenSet = false;
347 bool m_sourceEncryptionAlgorithmHasBeenSet = false;
348 bool m_destinationEncryptionAlgorithmHasBeenSet = false;
349 bool m_grantTokensHasBeenSet = false;
350 bool m_dryRunHasBeenSet = false;
351 bool m_dryRunModifiersHasBeenSet = false;
352};
353
354} // namespace Model
355} // namespace KMS
356} // 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 & WithDryRunModifiers(DryRunModifiersT &&value)
ReEncryptRequest & AddSourceEncryptionContext(SourceEncryptionContextKeyT &&key, SourceEncryptionContextValueT &&value)
ReEncryptRequest & WithSourceEncryptionAlgorithm(EncryptionAlgorithmSpec value)
const Aws::String & GetDestinationKeyId() const
ReEncryptRequest & AddDryRunModifiers(DryRunModifierType value)
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 SetDryRunModifiers(DryRunModifiersT &&value)
void SetDestinationKeyId(DestinationKeyIdT &&value)
void SetGrantTokens(GrantTokensT &&value)
ReEncryptRequest & WithDestinationKeyId(DestinationKeyIdT &&value)
const Aws::Vector< DryRunModifierType > & GetDryRunModifiers() const
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