AWS SDK for C++

AWS SDK for C++ Version 1.11.788

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/DryRunModifierType.h>
14#include <aws/kms/model/EncryptionAlgorithmSpec.h>
15#include <aws/kms/model/RecipientInfo.h>
16
17#include <utility>
18
19namespace Aws {
20namespace KMS {
21namespace Model {
22
25class DecryptRequest : public KMSRequest {
26 public:
27 AWS_KMS_API DecryptRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "Decrypt"; }
34
35 AWS_KMS_API Aws::String SerializePayload() const override;
36
38
40
45 inline const Aws::Utils::ByteBuffer& GetCiphertextBlob() const { return m_ciphertextBlob; }
46 inline bool CiphertextBlobHasBeenSet() const { return m_ciphertextBlobHasBeenSet; }
47 template <typename CiphertextBlobT = Aws::Utils::ByteBuffer>
48 void SetCiphertextBlob(CiphertextBlobT&& value) {
49 m_ciphertextBlobHasBeenSet = true;
50 m_ciphertextBlob = std::forward<CiphertextBlobT>(value);
51 }
52 template <typename CiphertextBlobT = Aws::Utils::ByteBuffer>
53 DecryptRequest& WithCiphertextBlob(CiphertextBlobT&& value) {
54 SetCiphertextBlob(std::forward<CiphertextBlobT>(value));
55 return *this;
56 }
58
60
76 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const { return m_encryptionContext; }
77 inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
78 template <typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
79 void SetEncryptionContext(EncryptionContextT&& value) {
80 m_encryptionContextHasBeenSet = true;
81 m_encryptionContext = std::forward<EncryptionContextT>(value);
82 }
83 template <typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
84 DecryptRequest& WithEncryptionContext(EncryptionContextT&& value) {
85 SetEncryptionContext(std::forward<EncryptionContextT>(value));
86 return *this;
87 }
88 template <typename EncryptionContextKeyT = Aws::String, typename EncryptionContextValueT = Aws::String>
89 DecryptRequest& AddEncryptionContext(EncryptionContextKeyT&& key, EncryptionContextValueT&& value) {
90 m_encryptionContextHasBeenSet = true;
91 m_encryptionContext.emplace(std::forward<EncryptionContextKeyT>(key), std::forward<EncryptionContextValueT>(value));
92 return *this;
93 }
95
97
106 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
107 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
108 template <typename GrantTokensT = Aws::Vector<Aws::String>>
109 void SetGrantTokens(GrantTokensT&& value) {
110 m_grantTokensHasBeenSet = true;
111 m_grantTokens = std::forward<GrantTokensT>(value);
112 }
113 template <typename GrantTokensT = Aws::Vector<Aws::String>>
114 DecryptRequest& WithGrantTokens(GrantTokensT&& value) {
115 SetGrantTokens(std::forward<GrantTokensT>(value));
116 return *this;
117 }
118 template <typename GrantTokensT = Aws::String>
119 DecryptRequest& AddGrantTokens(GrantTokensT&& value) {
120 m_grantTokensHasBeenSet = true;
121 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
122 return *this;
123 }
125
127
150 inline const Aws::String& GetKeyId() const { return m_keyId; }
151 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
152 template <typename KeyIdT = Aws::String>
153 void SetKeyId(KeyIdT&& value) {
154 m_keyIdHasBeenSet = true;
155 m_keyId = std::forward<KeyIdT>(value);
156 }
157 template <typename KeyIdT = Aws::String>
158 DecryptRequest& WithKeyId(KeyIdT&& value) {
159 SetKeyId(std::forward<KeyIdT>(value));
160 return *this;
161 }
163
165
174 inline EncryptionAlgorithmSpec GetEncryptionAlgorithm() const { return m_encryptionAlgorithm; }
175 inline bool EncryptionAlgorithmHasBeenSet() const { return m_encryptionAlgorithmHasBeenSet; }
177 m_encryptionAlgorithmHasBeenSet = true;
178 m_encryptionAlgorithm = value;
179 }
182 return *this;
183 }
185
187
209 inline const RecipientInfo& GetRecipient() const { return m_recipient; }
210 inline bool RecipientHasBeenSet() const { return m_recipientHasBeenSet; }
211 template <typename RecipientT = RecipientInfo>
212 void SetRecipient(RecipientT&& value) {
213 m_recipientHasBeenSet = true;
214 m_recipient = std::forward<RecipientT>(value);
215 }
216 template <typename RecipientT = RecipientInfo>
217 DecryptRequest& WithRecipient(RecipientT&& value) {
218 SetRecipient(std::forward<RecipientT>(value));
219 return *this;
220 }
222
224
230 inline bool GetDryRun() const { return m_dryRun; }
231 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
232 inline void SetDryRun(bool value) {
233 m_dryRunHasBeenSet = true;
234 m_dryRun = value;
235 }
236 inline DecryptRequest& WithDryRun(bool value) {
237 SetDryRun(value);
238 return *this;
239 }
241
243
254 inline const Aws::Vector<DryRunModifierType>& GetDryRunModifiers() const { return m_dryRunModifiers; }
255 inline bool DryRunModifiersHasBeenSet() const { return m_dryRunModifiersHasBeenSet; }
256 template <typename DryRunModifiersT = Aws::Vector<DryRunModifierType>>
257 void SetDryRunModifiers(DryRunModifiersT&& value) {
258 m_dryRunModifiersHasBeenSet = true;
259 m_dryRunModifiers = std::forward<DryRunModifiersT>(value);
260 }
261 template <typename DryRunModifiersT = Aws::Vector<DryRunModifierType>>
262 DecryptRequest& WithDryRunModifiers(DryRunModifiersT&& value) {
263 SetDryRunModifiers(std::forward<DryRunModifiersT>(value));
264 return *this;
265 }
267 m_dryRunModifiersHasBeenSet = true;
268 m_dryRunModifiers.push_back(value);
269 return *this;
270 }
272 private:
273 Aws::Utils::ByteBuffer m_ciphertextBlob{};
274
275 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
276
277 Aws::Vector<Aws::String> m_grantTokens;
278
279 Aws::String m_keyId;
280
282
283 RecipientInfo m_recipient;
284
285 bool m_dryRun{false};
286
287 Aws::Vector<DryRunModifierType> m_dryRunModifiers;
288 bool m_ciphertextBlobHasBeenSet = false;
289 bool m_encryptionContextHasBeenSet = false;
290 bool m_grantTokensHasBeenSet = false;
291 bool m_keyIdHasBeenSet = false;
292 bool m_encryptionAlgorithmHasBeenSet = false;
293 bool m_recipientHasBeenSet = false;
294 bool m_dryRunHasBeenSet = false;
295 bool m_dryRunModifiersHasBeenSet = false;
296};
297
298} // namespace Model
299} // namespace KMS
300} // namespace Aws
void SetDryRunModifiers(DryRunModifiersT &&value)
DecryptRequest & WithDryRunModifiers(DryRunModifiersT &&value)
DecryptRequest & WithDryRun(bool value)
const Aws::Utils::ByteBuffer & GetCiphertextBlob() const
EncryptionAlgorithmSpec GetEncryptionAlgorithm() const
const Aws::Vector< DryRunModifierType > & GetDryRunModifiers() const
DecryptRequest & WithKeyId(KeyIdT &&value)
DecryptRequest & AddDryRunModifiers(DryRunModifierType 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