AWS SDK for C++  0.12.9
AWS SDK for C++
DecryptRequest.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 DecryptRequest& WithCiphertextBlob(const Aws::Utils::ByteBuffer& value) { SetCiphertextBlob(value); return *this;}
59 
63  inline DecryptRequest& WithCiphertextBlob(Aws::Utils::ByteBuffer&& value) { SetCiphertextBlob(value); return *this;}
64 
72  inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const{ return m_encryptionContext; }
73 
81  inline void SetEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
82 
90  inline void SetEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
91 
99  inline DecryptRequest& WithEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { SetEncryptionContext(value); return *this;}
100 
108  inline DecryptRequest& WithEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { SetEncryptionContext(value); return *this;}
109 
117  inline DecryptRequest& AddEncryptionContext(const Aws::String& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
118 
126  inline DecryptRequest& AddEncryptionContext(Aws::String&& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
127 
135  inline DecryptRequest& AddEncryptionContext(const Aws::String& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
136 
144  inline DecryptRequest& AddEncryptionContext(Aws::String&& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
145 
153  inline DecryptRequest& AddEncryptionContext(const char* key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
154 
162  inline DecryptRequest& AddEncryptionContext(Aws::String&& key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
163 
171  inline DecryptRequest& AddEncryptionContext(const char* key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
172 
178  inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
179 
185  inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
186 
192  inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
193 
199  inline DecryptRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
200 
206  inline DecryptRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(value); return *this;}
207 
213  inline DecryptRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
214 
220  inline DecryptRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
221 
227  inline DecryptRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
228 
229  private:
230  Aws::Utils::ByteBuffer m_ciphertextBlob;
231  bool m_ciphertextBlobHasBeenSet;
232  Aws::Map<Aws::String, Aws::String> m_encryptionContext;
233  bool m_encryptionContextHasBeenSet;
234  Aws::Vector<Aws::String> m_grantTokens;
235  bool m_grantTokensHasBeenSet;
236  };
237 
238 } // namespace Model
239 } // namespace KMS
240 } // namespace Aws
DecryptRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
const Aws::Utils::ByteBuffer & GetCiphertextBlob() const
void SetCiphertextBlob(Aws::Utils::ByteBuffer &&value)
DecryptRequest & AddEncryptionContext(const char *key, const char *value)
DecryptRequest & AddEncryptionContext(const char *key, Aws::String &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
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
DecryptRequest & AddGrantTokens(const Aws::String &value)
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
void SetCiphertextBlob(const Aws::Utils::ByteBuffer &value)
DecryptRequest & AddGrantTokens(Aws::String &&value)
DecryptRequest & AddEncryptionContext(Aws::String &&key, const Aws::String &value)
DecryptRequest & AddEncryptionContext(const Aws::String &key, const Aws::String &value)
DecryptRequest & AddEncryptionContext(Aws::String &&key, Aws::String &&value)
DecryptRequest & AddEncryptionContext(Aws::String &&key, const char *value)
DecryptRequest & AddGrantTokens(const char *value)
DecryptRequest & AddEncryptionContext(const Aws::String &key, Aws::String &&value)
DecryptRequest & WithEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
DecryptRequest & WithCiphertextBlob(const Aws::Utils::ByteBuffer &value)
DecryptRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
void SetEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:34
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
void SetEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
JSON (JavaScript Object Notation).
DecryptRequest & WithCiphertextBlob(Aws::Utils::ByteBuffer &&value)
DecryptRequest & WithEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)