AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
GenerateDataKeyPairRequest.h
1
6#pragma once
7#include <aws/kms/KMS_EXPORTS.h>
8#include <aws/kms/KMSRequest.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/kms/model/DataKeyPairSpec.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/kms/model/RecipientInfo.h>
14#include <utility>
15
16namespace Aws
17{
18namespace KMS
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_KMS_API GenerateDataKeyPairRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "GenerateDataKeyPair"; }
35
36 AWS_KMS_API Aws::String SerializePayload() const override;
37
39
40
42
57 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const { return m_encryptionContext; }
58 inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
59 template<typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
60 void SetEncryptionContext(EncryptionContextT&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = std::forward<EncryptionContextT>(value); }
61 template<typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
62 GenerateDataKeyPairRequest& WithEncryptionContext(EncryptionContextT&& value) { SetEncryptionContext(std::forward<EncryptionContextT>(value)); return *this;}
63 template<typename EncryptionContextKeyT = Aws::String, typename EncryptionContextValueT = Aws::String>
64 GenerateDataKeyPairRequest& AddEncryptionContext(EncryptionContextKeyT&& key, EncryptionContextValueT&& value) {
65 m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::forward<EncryptionContextKeyT>(key), std::forward<EncryptionContextValueT>(value)); return *this;
66 }
68
70
87 inline const Aws::String& GetKeyId() const { return m_keyId; }
88 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
89 template<typename KeyIdT = Aws::String>
90 void SetKeyId(KeyIdT&& value) { m_keyIdHasBeenSet = true; m_keyId = std::forward<KeyIdT>(value); }
91 template<typename KeyIdT = Aws::String>
92 GenerateDataKeyPairRequest& WithKeyId(KeyIdT&& value) { SetKeyId(std::forward<KeyIdT>(value)); return *this;}
94
96
104 inline DataKeyPairSpec GetKeyPairSpec() const { return m_keyPairSpec; }
105 inline bool KeyPairSpecHasBeenSet() const { return m_keyPairSpecHasBeenSet; }
106 inline void SetKeyPairSpec(DataKeyPairSpec value) { m_keyPairSpecHasBeenSet = true; m_keyPairSpec = value; }
109
111
120 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
121 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
122 template<typename GrantTokensT = Aws::Vector<Aws::String>>
123 void SetGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::forward<GrantTokensT>(value); }
124 template<typename GrantTokensT = Aws::Vector<Aws::String>>
125 GenerateDataKeyPairRequest& WithGrantTokens(GrantTokensT&& value) { SetGrantTokens(std::forward<GrantTokensT>(value)); return *this;}
126 template<typename GrantTokensT = Aws::String>
127 GenerateDataKeyPairRequest& AddGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.emplace_back(std::forward<GrantTokensT>(value)); return *this; }
129
131
156 inline const RecipientInfo& GetRecipient() const { return m_recipient; }
157 inline bool RecipientHasBeenSet() const { return m_recipientHasBeenSet; }
158 template<typename RecipientT = RecipientInfo>
159 void SetRecipient(RecipientT&& value) { m_recipientHasBeenSet = true; m_recipient = std::forward<RecipientT>(value); }
160 template<typename RecipientT = RecipientInfo>
161 GenerateDataKeyPairRequest& WithRecipient(RecipientT&& value) { SetRecipient(std::forward<RecipientT>(value)); return *this;}
163
165
171 inline bool GetDryRun() const { return m_dryRun; }
172 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
173 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
174 inline GenerateDataKeyPairRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
176 private:
177
178 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
179 bool m_encryptionContextHasBeenSet = false;
180
181 Aws::String m_keyId;
182 bool m_keyIdHasBeenSet = false;
183
185 bool m_keyPairSpecHasBeenSet = false;
186
187 Aws::Vector<Aws::String> m_grantTokens;
188 bool m_grantTokensHasBeenSet = false;
189
190 RecipientInfo m_recipient;
191 bool m_recipientHasBeenSet = false;
192
193 bool m_dryRun{false};
194 bool m_dryRunHasBeenSet = false;
195 };
196
197} // namespace Model
198} // namespace KMS
199} // 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