AWS SDK for C++  0.14.3
AWS SDK for C++
ReEncryptRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/kms/KMS_EXPORTS.h>
17 #include <aws/kms/KMSRequest.h>
18 #include <aws/core/utils/Array.h>
22 
23 namespace Aws
24 {
25 namespace KMS
26 {
27 namespace Model
28 {
29 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
38  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39 
43  inline const Aws::Utils::ByteBuffer& GetCiphertextBlob() const{ return m_ciphertextBlob; }
44 
48  inline void SetCiphertextBlob(const Aws::Utils::ByteBuffer& value) { m_ciphertextBlobHasBeenSet = true; m_ciphertextBlob = value; }
49 
53  inline void SetCiphertextBlob(Aws::Utils::ByteBuffer&& value) { m_ciphertextBlobHasBeenSet = true; m_ciphertextBlob = value; }
54 
58  inline ReEncryptRequest& WithCiphertextBlob(const Aws::Utils::ByteBuffer& value) { SetCiphertextBlob(value); return *this;}
59 
63  inline ReEncryptRequest& WithCiphertextBlob(Aws::Utils::ByteBuffer&& value) { SetCiphertextBlob(value); return *this;}
64 
69  inline const Aws::Map<Aws::String, Aws::String>& GetSourceEncryptionContext() const{ return m_sourceEncryptionContext; }
70 
75  inline void SetSourceEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext = value; }
76 
81  inline void SetSourceEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext = value; }
82 
87  inline ReEncryptRequest& WithSourceEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { SetSourceEncryptionContext(value); return *this;}
88 
93  inline ReEncryptRequest& WithSourceEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { SetSourceEncryptionContext(value); return *this;}
94 
99  inline ReEncryptRequest& AddSourceEncryptionContext(const Aws::String& key, const Aws::String& value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext[key] = value; return *this; }
100 
105  inline ReEncryptRequest& AddSourceEncryptionContext(Aws::String&& key, const Aws::String& value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext[key] = value; return *this; }
106 
111  inline ReEncryptRequest& AddSourceEncryptionContext(const Aws::String& key, Aws::String&& value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext[key] = value; return *this; }
112 
117  inline ReEncryptRequest& AddSourceEncryptionContext(Aws::String&& key, Aws::String&& value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext[key] = value; return *this; }
118 
123  inline ReEncryptRequest& AddSourceEncryptionContext(const char* key, Aws::String&& value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext[key] = value; return *this; }
124 
129  inline ReEncryptRequest& AddSourceEncryptionContext(Aws::String&& key, const char* value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext[key] = value; return *this; }
130 
135  inline ReEncryptRequest& AddSourceEncryptionContext(const char* key, const char* value) { m_sourceEncryptionContextHasBeenSet = true; m_sourceEncryptionContext[key] = value; return *this; }
136 
148  inline const Aws::String& GetDestinationKeyId() const{ return m_destinationKeyId; }
149 
161  inline void SetDestinationKeyId(const Aws::String& value) { m_destinationKeyIdHasBeenSet = true; m_destinationKeyId = value; }
162 
174  inline void SetDestinationKeyId(Aws::String&& value) { m_destinationKeyIdHasBeenSet = true; m_destinationKeyId = value; }
175 
187  inline void SetDestinationKeyId(const char* value) { m_destinationKeyIdHasBeenSet = true; m_destinationKeyId.assign(value); }
188 
200  inline ReEncryptRequest& WithDestinationKeyId(const Aws::String& value) { SetDestinationKeyId(value); return *this;}
201 
213  inline ReEncryptRequest& WithDestinationKeyId(Aws::String&& value) { SetDestinationKeyId(value); return *this;}
214 
226  inline ReEncryptRequest& WithDestinationKeyId(const char* value) { SetDestinationKeyId(value); return *this;}
227 
231  inline const Aws::Map<Aws::String, Aws::String>& GetDestinationEncryptionContext() const{ return m_destinationEncryptionContext; }
232 
236  inline void SetDestinationEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext = value; }
237 
241  inline void SetDestinationEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext = value; }
242 
246  inline ReEncryptRequest& WithDestinationEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { SetDestinationEncryptionContext(value); return *this;}
247 
251  inline ReEncryptRequest& WithDestinationEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { SetDestinationEncryptionContext(value); return *this;}
252 
256  inline ReEncryptRequest& AddDestinationEncryptionContext(const Aws::String& key, const Aws::String& value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext[key] = value; return *this; }
257 
261  inline ReEncryptRequest& AddDestinationEncryptionContext(Aws::String&& key, const Aws::String& value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext[key] = value; return *this; }
262 
266  inline ReEncryptRequest& AddDestinationEncryptionContext(const Aws::String& key, Aws::String&& value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext[key] = value; return *this; }
267 
271  inline ReEncryptRequest& AddDestinationEncryptionContext(Aws::String&& key, Aws::String&& value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext[key] = value; return *this; }
272 
276  inline ReEncryptRequest& AddDestinationEncryptionContext(const char* key, Aws::String&& value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext[key] = value; return *this; }
277 
281  inline ReEncryptRequest& AddDestinationEncryptionContext(Aws::String&& key, const char* value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext[key] = value; return *this; }
282 
286  inline ReEncryptRequest& AddDestinationEncryptionContext(const char* key, const char* value) { m_destinationEncryptionContextHasBeenSet = true; m_destinationEncryptionContext[key] = value; return *this; }
287 
293  inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
294 
300  inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
301 
307  inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
308 
314  inline ReEncryptRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
315 
321  inline ReEncryptRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(value); return *this;}
322 
328  inline ReEncryptRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
329 
335  inline ReEncryptRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
336 
342  inline ReEncryptRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
343 
344  private:
345  Aws::Utils::ByteBuffer m_ciphertextBlob;
346  bool m_ciphertextBlobHasBeenSet;
347  Aws::Map<Aws::String, Aws::String> m_sourceEncryptionContext;
348  bool m_sourceEncryptionContextHasBeenSet;
349  Aws::String m_destinationKeyId;
350  bool m_destinationKeyIdHasBeenSet;
351  Aws::Map<Aws::String, Aws::String> m_destinationEncryptionContext;
352  bool m_destinationEncryptionContextHasBeenSet;
353  Aws::Vector<Aws::String> m_grantTokens;
354  bool m_grantTokensHasBeenSet;
355  };
356 
357 } // namespace Model
358 } // namespace KMS
359 } // namespace Aws
ReEncryptRequest & AddSourceEncryptionContext(const Aws::String &key, Aws::String &&value)
ReEncryptRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
ReEncryptRequest & AddSourceEncryptionContext(const Aws::String &key, const Aws::String &value)
ReEncryptRequest & AddSourceEncryptionContext(const char *key, Aws::String &&value)
ReEncryptRequest & AddDestinationEncryptionContext(Aws::String &&key, const char *value)
ReEncryptRequest & WithSourceEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
void SetSourceEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
ReEncryptRequest & AddGrantTokens(const Aws::String &value)
const Aws::Map< Aws::String, Aws::String > & GetSourceEncryptionContext() const
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
ReEncryptRequest & AddSourceEncryptionContext(Aws::String &&key, const char *value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
ReEncryptRequest & WithSourceEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
ReEncryptRequest & AddDestinationEncryptionContext(const char *key, const char *value)
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
ReEncryptRequest & WithDestinationEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
void SetDestinationEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
ReEncryptRequest & WithDestinationKeyId(const char *value)
ReEncryptRequest & WithDestinationEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
ReEncryptRequest & WithDestinationKeyId(Aws::String &&value)
ReEncryptRequest & AddSourceEncryptionContext(Aws::String &&key, Aws::String &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
ReEncryptRequest & AddGrantTokens(Aws::String &&value)
ReEncryptRequest & AddDestinationEncryptionContext(Aws::String &&key, Aws::String &&value)
const Aws::String & GetDestinationKeyId() const
void SetCiphertextBlob(const Aws::Utils::ByteBuffer &value)
ReEncryptRequest & AddDestinationEncryptionContext(const Aws::String &key, const Aws::String &value)
ReEncryptRequest & AddGrantTokens(const char *value)
ReEncryptRequest & AddSourceEncryptionContext(Aws::String &&key, const Aws::String &value)
void SetCiphertextBlob(Aws::Utils::ByteBuffer &&value)
const Aws::Map< Aws::String, Aws::String > & GetDestinationEncryptionContext() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetSourceEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
const Aws::Utils::ByteBuffer & GetCiphertextBlob() const
void SetDestinationEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
void SetDestinationKeyId(const char *value)
ReEncryptRequest & WithDestinationKeyId(const Aws::String &value)
ReEncryptRequest & WithCiphertextBlob(Aws::Utils::ByteBuffer &&value)
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:37
void SetDestinationKeyId(const Aws::String &value)
void SetDestinationKeyId(Aws::String &&value)
ReEncryptRequest & AddSourceEncryptionContext(const char *key, const char *value)
ReEncryptRequest & AddDestinationEncryptionContext(Aws::String &&key, const Aws::String &value)
ReEncryptRequest & WithCiphertextBlob(const Aws::Utils::ByteBuffer &value)
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
ReEncryptRequest & AddDestinationEncryptionContext(const char *key, Aws::String &&value)
ReEncryptRequest & AddDestinationEncryptionContext(const Aws::String &key, Aws::String &&value)
JSON (JavaScript Object Notation).
ReEncryptRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)