AWS SDK for C++

AWS SDK for C++ Version 1.11.937

Loading...
Searching...
No Matches
GenerateDataKeyPairRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/kms/KMSRequest.h>
11#include <aws/kms/KMS_EXPORTS.h>
12#include <aws/kms/model/DataKeyPairSpec.h>
13#include <aws/kms/model/RecipientInfo.h>
14
15#include <utility>
16
17namespace Aws {
18namespace KMS {
19namespace Model {
20
24 public:
25 AWS_KMS_API GenerateDataKeyPairRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "GenerateDataKeyPair"; }
32
33 AWS_KMS_API Aws::String SerializePayload() const override;
34
36
38
53 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const { return m_encryptionContext; }
54 inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
55 template <typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
56 void SetEncryptionContext(EncryptionContextT&& value) {
57 m_encryptionContextHasBeenSet = true;
58 m_encryptionContext = std::forward<EncryptionContextT>(value);
59 }
60 template <typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
62 SetEncryptionContext(std::forward<EncryptionContextT>(value));
63 return *this;
64 }
65 template <typename EncryptionContextKeyT = Aws::String, typename EncryptionContextValueT = Aws::String>
66 GenerateDataKeyPairRequest& AddEncryptionContext(EncryptionContextKeyT&& key, EncryptionContextValueT&& value) {
67 m_encryptionContextHasBeenSet = true;
68 m_encryptionContext.emplace(std::forward<EncryptionContextKeyT>(key), std::forward<EncryptionContextValueT>(value));
69 return *this;
70 }
72
74
91 inline const Aws::String& GetKeyId() const { return m_keyId; }
92 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
93 template <typename KeyIdT = Aws::String>
94 void SetKeyId(KeyIdT&& value) {
95 m_keyIdHasBeenSet = true;
96 m_keyId = std::forward<KeyIdT>(value);
97 }
98 template <typename KeyIdT = Aws::String>
100 SetKeyId(std::forward<KeyIdT>(value));
101 return *this;
102 }
104
106
115 inline DataKeyPairSpec GetKeyPairSpec() const { return m_keyPairSpec; }
116 inline bool KeyPairSpecHasBeenSet() const { return m_keyPairSpecHasBeenSet; }
117 inline void SetKeyPairSpec(DataKeyPairSpec value) {
118 m_keyPairSpecHasBeenSet = true;
119 m_keyPairSpec = value;
120 }
122 SetKeyPairSpec(value);
123 return *this;
124 }
126
128
137 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
138 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
139 template <typename GrantTokensT = Aws::Vector<Aws::String>>
140 void SetGrantTokens(GrantTokensT&& value) {
141 m_grantTokensHasBeenSet = true;
142 m_grantTokens = std::forward<GrantTokensT>(value);
143 }
144 template <typename GrantTokensT = Aws::Vector<Aws::String>>
146 SetGrantTokens(std::forward<GrantTokensT>(value));
147 return *this;
148 }
149 template <typename GrantTokensT = Aws::String>
151 m_grantTokensHasBeenSet = true;
152 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
153 return *this;
154 }
156
158
188 inline const RecipientInfo& GetRecipient() const { return m_recipient; }
189 inline bool RecipientHasBeenSet() const { return m_recipientHasBeenSet; }
190 template <typename RecipientT = RecipientInfo>
191 void SetRecipient(RecipientT&& value) {
192 m_recipientHasBeenSet = true;
193 m_recipient = std::forward<RecipientT>(value);
194 }
195 template <typename RecipientT = RecipientInfo>
197 SetRecipient(std::forward<RecipientT>(value));
198 return *this;
199 }
201
203
209 inline bool GetDryRun() const { return m_dryRun; }
210 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
211 inline void SetDryRun(bool value) {
212 m_dryRunHasBeenSet = true;
213 m_dryRun = value;
214 }
216 SetDryRun(value);
217 return *this;
218 }
220 private:
221 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
222
223 Aws::String m_keyId;
224
226
227 Aws::Vector<Aws::String> m_grantTokens;
228
229 RecipientInfo m_recipient;
230
231 bool m_dryRun{false};
232 bool m_encryptionContextHasBeenSet = false;
233 bool m_keyIdHasBeenSet = false;
234 bool m_keyPairSpecHasBeenSet = false;
235 bool m_grantTokensHasBeenSet = false;
236 bool m_recipientHasBeenSet = false;
237 bool m_dryRunHasBeenSet = false;
238};
239
240} // namespace Model
241} // namespace KMS
242} // namespace Aws
AWS_KMS_API GenerateDataKeyPairRequest()=default
GenerateDataKeyPairRequest & WithDryRun(bool value)
GenerateDataKeyPairRequest & AddEncryptionContext(EncryptionContextKeyT &&key, EncryptionContextValueT &&value)
AWS_KMS_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
GenerateDataKeyPairRequest & AddGrantTokens(GrantTokensT &&value)
GenerateDataKeyPairRequest & WithKeyId(KeyIdT &&value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
GenerateDataKeyPairRequest & WithKeyPairSpec(DataKeyPairSpec value)
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
GenerateDataKeyPairRequest & WithGrantTokens(GrantTokensT &&value)
GenerateDataKeyPairRequest & WithRecipient(RecipientT &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
void SetEncryptionContext(EncryptionContextT &&value)
GenerateDataKeyPairRequest & WithEncryptionContext(EncryptionContextT &&value)
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