AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
DecryptRequest.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#include <aws/kms/model/RecipientInfo.h>
15
16#include <utility>
17
18namespace Aws {
19namespace KMS {
20namespace Model {
21
24class DecryptRequest : public KMSRequest {
25 public:
26 AWS_KMS_API DecryptRequest() = 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 "Decrypt"; }
33
34 AWS_KMS_API Aws::String SerializePayload() const override;
35
37
39
42 inline const Aws::Utils::ByteBuffer& GetCiphertextBlob() const { return m_ciphertextBlob; }
43 inline bool CiphertextBlobHasBeenSet() const { return m_ciphertextBlobHasBeenSet; }
44 template <typename CiphertextBlobT = Aws::Utils::ByteBuffer>
45 void SetCiphertextBlob(CiphertextBlobT&& value) {
46 m_ciphertextBlobHasBeenSet = true;
47 m_ciphertextBlob = std::forward<CiphertextBlobT>(value);
48 }
49 template <typename CiphertextBlobT = Aws::Utils::ByteBuffer>
50 DecryptRequest& WithCiphertextBlob(CiphertextBlobT&& value) {
51 SetCiphertextBlob(std::forward<CiphertextBlobT>(value));
52 return *this;
53 }
55
57
73 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const { return m_encryptionContext; }
74 inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
75 template <typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
76 void SetEncryptionContext(EncryptionContextT&& value) {
77 m_encryptionContextHasBeenSet = true;
78 m_encryptionContext = std::forward<EncryptionContextT>(value);
79 }
80 template <typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
81 DecryptRequest& WithEncryptionContext(EncryptionContextT&& value) {
82 SetEncryptionContext(std::forward<EncryptionContextT>(value));
83 return *this;
84 }
85 template <typename EncryptionContextKeyT = Aws::String, typename EncryptionContextValueT = Aws::String>
86 DecryptRequest& AddEncryptionContext(EncryptionContextKeyT&& key, EncryptionContextValueT&& value) {
87 m_encryptionContextHasBeenSet = true;
88 m_encryptionContext.emplace(std::forward<EncryptionContextKeyT>(key), std::forward<EncryptionContextValueT>(value));
89 return *this;
90 }
92
94
103 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
104 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
105 template <typename GrantTokensT = Aws::Vector<Aws::String>>
106 void SetGrantTokens(GrantTokensT&& value) {
107 m_grantTokensHasBeenSet = true;
108 m_grantTokens = std::forward<GrantTokensT>(value);
109 }
110 template <typename GrantTokensT = Aws::Vector<Aws::String>>
111 DecryptRequest& WithGrantTokens(GrantTokensT&& value) {
112 SetGrantTokens(std::forward<GrantTokensT>(value));
113 return *this;
114 }
115 template <typename GrantTokensT = Aws::String>
116 DecryptRequest& AddGrantTokens(GrantTokensT&& value) {
117 m_grantTokensHasBeenSet = true;
118 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
119 return *this;
120 }
122
124
145 inline const Aws::String& GetKeyId() const { return m_keyId; }
146 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
147 template <typename KeyIdT = Aws::String>
148 void SetKeyId(KeyIdT&& value) {
149 m_keyIdHasBeenSet = true;
150 m_keyId = std::forward<KeyIdT>(value);
151 }
152 template <typename KeyIdT = Aws::String>
153 DecryptRequest& WithKeyId(KeyIdT&& value) {
154 SetKeyId(std::forward<KeyIdT>(value));
155 return *this;
156 }
158
160
169 inline EncryptionAlgorithmSpec GetEncryptionAlgorithm() const { return m_encryptionAlgorithm; }
170 inline bool EncryptionAlgorithmHasBeenSet() const { return m_encryptionAlgorithmHasBeenSet; }
172 m_encryptionAlgorithmHasBeenSet = true;
173 m_encryptionAlgorithm = value;
174 }
177 return *this;
178 }
180
182
204 inline const RecipientInfo& GetRecipient() const { return m_recipient; }
205 inline bool RecipientHasBeenSet() const { return m_recipientHasBeenSet; }
206 template <typename RecipientT = RecipientInfo>
207 void SetRecipient(RecipientT&& value) {
208 m_recipientHasBeenSet = true;
209 m_recipient = std::forward<RecipientT>(value);
210 }
211 template <typename RecipientT = RecipientInfo>
212 DecryptRequest& WithRecipient(RecipientT&& value) {
213 SetRecipient(std::forward<RecipientT>(value));
214 return *this;
215 }
217
219
225 inline bool GetDryRun() const { return m_dryRun; }
226 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
227 inline void SetDryRun(bool value) {
228 m_dryRunHasBeenSet = true;
229 m_dryRun = value;
230 }
231 inline DecryptRequest& WithDryRun(bool value) {
232 SetDryRun(value);
233 return *this;
234 }
236 private:
237 Aws::Utils::ByteBuffer m_ciphertextBlob{};
238
239 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
240
241 Aws::Vector<Aws::String> m_grantTokens;
242
243 Aws::String m_keyId;
244
246
247 RecipientInfo m_recipient;
248
249 bool m_dryRun{false};
250 bool m_ciphertextBlobHasBeenSet = false;
251 bool m_encryptionContextHasBeenSet = false;
252 bool m_grantTokensHasBeenSet = false;
253 bool m_keyIdHasBeenSet = false;
254 bool m_encryptionAlgorithmHasBeenSet = false;
255 bool m_recipientHasBeenSet = false;
256 bool m_dryRunHasBeenSet = false;
257};
258
259} // namespace Model
260} // namespace KMS
261} // namespace Aws
DecryptRequest & WithDryRun(bool value)
const Aws::Utils::ByteBuffer & GetCiphertextBlob() const
EncryptionAlgorithmSpec GetEncryptionAlgorithm() const
DecryptRequest & WithKeyId(KeyIdT &&value)
DecryptRequest & WithEncryptionAlgorithm(EncryptionAlgorithmSpec value)
DecryptRequest & WithCiphertextBlob(CiphertextBlobT &&value)
void SetEncryptionContext(EncryptionContextT &&value)
DecryptRequest & AddEncryptionContext(EncryptionContextKeyT &&key, EncryptionContextValueT &&value)
AWS_KMS_API DecryptRequest()=default
DecryptRequest & AddGrantTokens(GrantTokensT &&value)
void SetEncryptionAlgorithm(EncryptionAlgorithmSpec value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetGrantTokens(GrantTokensT &&value)
const Aws::String & GetKeyId() const
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
DecryptRequest & WithEncryptionContext(EncryptionContextT &&value)
AWS_KMS_API Aws::String SerializePayload() const override
void SetRecipient(RecipientT &&value)
void SetCiphertextBlob(CiphertextBlobT &&value)
const RecipientInfo & GetRecipient() const
DecryptRequest & WithGrantTokens(GrantTokensT &&value)
DecryptRequest & WithRecipient(RecipientT &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
virtual const char * GetServiceRequestName() const override
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