AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
GenerateDataKeyRequest.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/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/kms/model/DataKeySpec.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 GenerateDataKeyRequest() = 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 "GenerateDataKey"; }
35
36 AWS_KMS_API Aws::String SerializePayload() const override;
37
39
40
42
58 inline const Aws::String& GetKeyId() const { return m_keyId; }
59 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
60 template<typename KeyIdT = Aws::String>
61 void SetKeyId(KeyIdT&& value) { m_keyIdHasBeenSet = true; m_keyId = std::forward<KeyIdT>(value); }
62 template<typename KeyIdT = Aws::String>
63 GenerateDataKeyRequest& WithKeyId(KeyIdT&& value) { SetKeyId(std::forward<KeyIdT>(value)); return *this;}
65
67
81 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const { return m_encryptionContext; }
82 inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
83 template<typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
84 void SetEncryptionContext(EncryptionContextT&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = std::forward<EncryptionContextT>(value); }
85 template<typename EncryptionContextT = Aws::Map<Aws::String, Aws::String>>
86 GenerateDataKeyRequest& WithEncryptionContext(EncryptionContextT&& value) { SetEncryptionContext(std::forward<EncryptionContextT>(value)); return *this;}
87 template<typename EncryptionContextKeyT = Aws::String, typename EncryptionContextValueT = Aws::String>
88 GenerateDataKeyRequest& AddEncryptionContext(EncryptionContextKeyT&& key, EncryptionContextValueT&& value) {
89 m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::forward<EncryptionContextKeyT>(key), std::forward<EncryptionContextValueT>(value)); return *this;
90 }
92
94
101 inline int GetNumberOfBytes() const { return m_numberOfBytes; }
102 inline bool NumberOfBytesHasBeenSet() const { return m_numberOfBytesHasBeenSet; }
103 inline void SetNumberOfBytes(int value) { m_numberOfBytesHasBeenSet = true; m_numberOfBytes = value; }
104 inline GenerateDataKeyRequest& WithNumberOfBytes(int value) { SetNumberOfBytes(value); return *this;}
106
108
115 inline DataKeySpec GetKeySpec() const { return m_keySpec; }
116 inline bool KeySpecHasBeenSet() const { return m_keySpecHasBeenSet; }
117 inline void SetKeySpec(DataKeySpec value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
118 inline GenerateDataKeyRequest& WithKeySpec(DataKeySpec value) { SetKeySpec(value); return *this;}
120
122
131 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
132 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
133 template<typename GrantTokensT = Aws::Vector<Aws::String>>
134 void SetGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::forward<GrantTokensT>(value); }
135 template<typename GrantTokensT = Aws::Vector<Aws::String>>
136 GenerateDataKeyRequest& WithGrantTokens(GrantTokensT&& value) { SetGrantTokens(std::forward<GrantTokensT>(value)); return *this;}
137 template<typename GrantTokensT = Aws::String>
138 GenerateDataKeyRequest& AddGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.emplace_back(std::forward<GrantTokensT>(value)); return *this; }
140
142
166 inline const RecipientInfo& GetRecipient() const { return m_recipient; }
167 inline bool RecipientHasBeenSet() const { return m_recipientHasBeenSet; }
168 template<typename RecipientT = RecipientInfo>
169 void SetRecipient(RecipientT&& value) { m_recipientHasBeenSet = true; m_recipient = std::forward<RecipientT>(value); }
170 template<typename RecipientT = RecipientInfo>
171 GenerateDataKeyRequest& WithRecipient(RecipientT&& value) { SetRecipient(std::forward<RecipientT>(value)); return *this;}
173
175
181 inline bool GetDryRun() const { return m_dryRun; }
182 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
183 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
184 inline GenerateDataKeyRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
186 private:
187
188 Aws::String m_keyId;
189 bool m_keyIdHasBeenSet = false;
190
191 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
192 bool m_encryptionContextHasBeenSet = false;
193
194 int m_numberOfBytes{0};
195 bool m_numberOfBytesHasBeenSet = false;
196
198 bool m_keySpecHasBeenSet = false;
199
200 Aws::Vector<Aws::String> m_grantTokens;
201 bool m_grantTokensHasBeenSet = false;
202
203 RecipientInfo m_recipient;
204 bool m_recipientHasBeenSet = false;
205
206 bool m_dryRun{false};
207 bool m_dryRunHasBeenSet = false;
208 };
209
210} // namespace Model
211} // namespace KMS
212} // namespace Aws
AWS_KMS_API GenerateDataKeyRequest()=default
virtual const char * GetServiceRequestName() const override
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
GenerateDataKeyRequest & WithKeySpec(DataKeySpec value)
GenerateDataKeyRequest & WithDryRun(bool value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetEncryptionContext(EncryptionContextT &&value)
GenerateDataKeyRequest & AddEncryptionContext(EncryptionContextKeyT &&key, EncryptionContextValueT &&value)
GenerateDataKeyRequest & AddGrantTokens(GrantTokensT &&value)
GenerateDataKeyRequest & WithGrantTokens(GrantTokensT &&value)
GenerateDataKeyRequest & WithEncryptionContext(EncryptionContextT &&value)
GenerateDataKeyRequest & WithNumberOfBytes(int value)
GenerateDataKeyRequest & WithRecipient(RecipientT &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
AWS_KMS_API Aws::String SerializePayload() const override
GenerateDataKeyRequest & WithKeyId(KeyIdT &&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