AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
DecryptRequest.h
1
6#pragma once
7#include <aws/kms/KMS_EXPORTS.h>
8#include <aws/kms/KMSRequest.h>
9#include <aws/core/utils/Array.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/kms/model/EncryptionAlgorithmSpec.h>
14#include <aws/kms/model/RecipientInfo.h>
15#include <utility>
16
17namespace Aws
18{
19namespace KMS
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_KMS_API DecryptRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "Decrypt"; }
36
37 AWS_KMS_API Aws::String SerializePayload() const override;
38
40
41
43
46 inline const Aws::Utils::ByteBuffer& GetCiphertextBlob() const { return m_ciphertextBlob; }
47 inline bool CiphertextBlobHasBeenSet() const { return m_ciphertextBlobHasBeenSet; }
48 template<typename CiphertextBlobT = Aws::Utils::ByteBuffer>
49 void SetCiphertextBlob(CiphertextBlobT&& value) { m_ciphertextBlobHasBeenSet = true; m_ciphertextBlob = std::forward<CiphertextBlobT>(value); }
50 template<typename CiphertextBlobT = Aws::Utils::ByteBuffer>
51 DecryptRequest& WithCiphertextBlob(CiphertextBlobT&& value) { SetCiphertextBlob(std::forward<CiphertextBlobT>(value)); return *this;}
53
55
71 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const { return m_encryptionContext; }
72 inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
73 template<typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
74 void SetEncryptionContext(EncryptionContextT&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = std::forward<EncryptionContextT>(value); }
75 template<typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
76 DecryptRequest& WithEncryptionContext(EncryptionContextT&& value) { SetEncryptionContext(std::forward<EncryptionContextT>(value)); return *this;}
77 template<typename EncryptionContextKeyT = Aws::String, typename EncryptionContextValueT = Aws::String>
78 DecryptRequest& AddEncryptionContext(EncryptionContextKeyT&& key, EncryptionContextValueT&& value) {
79 m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::forward<EncryptionContextKeyT>(key), std::forward<EncryptionContextValueT>(value)); return *this;
80 }
82
84
93 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
94 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
95 template<typename GrantTokensT = Aws::Vector<Aws::String>>
96 void SetGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::forward<GrantTokensT>(value); }
97 template<typename GrantTokensT = Aws::Vector<Aws::String>>
98 DecryptRequest& WithGrantTokens(GrantTokensT&& value) { SetGrantTokens(std::forward<GrantTokensT>(value)); return *this;}
99 template<typename GrantTokensT = Aws::String>
100 DecryptRequest& AddGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.emplace_back(std::forward<GrantTokensT>(value)); return *this; }
102
104
125 inline const Aws::String& GetKeyId() const { return m_keyId; }
126 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
127 template<typename KeyIdT = Aws::String>
128 void SetKeyId(KeyIdT&& value) { m_keyIdHasBeenSet = true; m_keyId = std::forward<KeyIdT>(value); }
129 template<typename KeyIdT = Aws::String>
130 DecryptRequest& WithKeyId(KeyIdT&& value) { SetKeyId(std::forward<KeyIdT>(value)); return *this;}
132
134
143 inline EncryptionAlgorithmSpec GetEncryptionAlgorithm() const { return m_encryptionAlgorithm; }
144 inline bool EncryptionAlgorithmHasBeenSet() const { return m_encryptionAlgorithmHasBeenSet; }
145 inline void SetEncryptionAlgorithm(EncryptionAlgorithmSpec value) { m_encryptionAlgorithmHasBeenSet = true; m_encryptionAlgorithm = value; }
148
150
171 inline const RecipientInfo& GetRecipient() const { return m_recipient; }
172 inline bool RecipientHasBeenSet() const { return m_recipientHasBeenSet; }
173 template<typename RecipientT = RecipientInfo>
174 void SetRecipient(RecipientT&& value) { m_recipientHasBeenSet = true; m_recipient = std::forward<RecipientT>(value); }
175 template<typename RecipientT = RecipientInfo>
176 DecryptRequest& WithRecipient(RecipientT&& value) { SetRecipient(std::forward<RecipientT>(value)); return *this;}
178
180
186 inline bool GetDryRun() const { return m_dryRun; }
187 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
188 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
189 inline DecryptRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
191 private:
192
193 Aws::Utils::ByteBuffer m_ciphertextBlob{};
194 bool m_ciphertextBlobHasBeenSet = false;
195
196 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
197 bool m_encryptionContextHasBeenSet = false;
198
199 Aws::Vector<Aws::String> m_grantTokens;
200 bool m_grantTokensHasBeenSet = false;
201
202 Aws::String m_keyId;
203 bool m_keyIdHasBeenSet = false;
204
206 bool m_encryptionAlgorithmHasBeenSet = false;
207
208 RecipientInfo m_recipient;
209 bool m_recipientHasBeenSet = false;
210
211 bool m_dryRun{false};
212 bool m_dryRunHasBeenSet = false;
213 };
214
215} // namespace Model
216} // namespace KMS
217} // 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