AWS SDK for C++

AWS SDK for C++ Version 1.11.718

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
114 inline DataKeyPairSpec GetKeyPairSpec() const { return m_keyPairSpec; }
115 inline bool KeyPairSpecHasBeenSet() const { return m_keyPairSpecHasBeenSet; }
116 inline void SetKeyPairSpec(DataKeyPairSpec value) {
117 m_keyPairSpecHasBeenSet = true;
118 m_keyPairSpec = value;
119 }
121 SetKeyPairSpec(value);
122 return *this;
123 }
125
127
136 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
137 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
138 template <typename GrantTokensT = Aws::Vector<Aws::String>>
139 void SetGrantTokens(GrantTokensT&& value) {
140 m_grantTokensHasBeenSet = true;
141 m_grantTokens = std::forward<GrantTokensT>(value);
142 }
143 template <typename GrantTokensT = Aws::Vector<Aws::String>>
145 SetGrantTokens(std::forward<GrantTokensT>(value));
146 return *this;
147 }
148 template <typename GrantTokensT = Aws::String>
150 m_grantTokensHasBeenSet = true;
151 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
152 return *this;
153 }
155
157
187 inline const RecipientInfo& GetRecipient() const { return m_recipient; }
188 inline bool RecipientHasBeenSet() const { return m_recipientHasBeenSet; }
189 template <typename RecipientT = RecipientInfo>
190 void SetRecipient(RecipientT&& value) {
191 m_recipientHasBeenSet = true;
192 m_recipient = std::forward<RecipientT>(value);
193 }
194 template <typename RecipientT = RecipientInfo>
196 SetRecipient(std::forward<RecipientT>(value));
197 return *this;
198 }
200
202
208 inline bool GetDryRun() const { return m_dryRun; }
209 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
210 inline void SetDryRun(bool value) {
211 m_dryRunHasBeenSet = true;
212 m_dryRun = value;
213 }
215 SetDryRun(value);
216 return *this;
217 }
219 private:
220 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
221
222 Aws::String m_keyId;
223
225
226 Aws::Vector<Aws::String> m_grantTokens;
227
228 RecipientInfo m_recipient;
229
230 bool m_dryRun{false};
231 bool m_encryptionContextHasBeenSet = false;
232 bool m_keyIdHasBeenSet = false;
233 bool m_keyPairSpecHasBeenSet = false;
234 bool m_grantTokensHasBeenSet = false;
235 bool m_recipientHasBeenSet = false;
236 bool m_dryRunHasBeenSet = false;
237};
238
239} // namespace Model
240} // namespace KMS
241} // 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