AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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:
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 inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
61 inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }
62 inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
63 inline GenerateDataKeyRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
64 inline GenerateDataKeyRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
65 inline GenerateDataKeyRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
67
69
83 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const{ return m_encryptionContext; }
84 inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
85 inline void SetEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
86 inline void SetEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = std::move(value); }
89 inline GenerateDataKeyRequest& AddEncryptionContext(const Aws::String& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
90 inline GenerateDataKeyRequest& AddEncryptionContext(Aws::String&& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
91 inline GenerateDataKeyRequest& AddEncryptionContext(const Aws::String& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
92 inline GenerateDataKeyRequest& AddEncryptionContext(Aws::String&& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), std::move(value)); return *this; }
93 inline GenerateDataKeyRequest& AddEncryptionContext(const char* key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
94 inline GenerateDataKeyRequest& AddEncryptionContext(Aws::String&& key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
95 inline GenerateDataKeyRequest& AddEncryptionContext(const char* key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
97
99
106 inline int GetNumberOfBytes() const{ return m_numberOfBytes; }
107 inline bool NumberOfBytesHasBeenSet() const { return m_numberOfBytesHasBeenSet; }
108 inline void SetNumberOfBytes(int value) { m_numberOfBytesHasBeenSet = true; m_numberOfBytes = value; }
109 inline GenerateDataKeyRequest& WithNumberOfBytes(int value) { SetNumberOfBytes(value); return *this;}
111
113
120 inline const DataKeySpec& GetKeySpec() const{ return m_keySpec; }
121 inline bool KeySpecHasBeenSet() const { return m_keySpecHasBeenSet; }
122 inline void SetKeySpec(const DataKeySpec& value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
123 inline void SetKeySpec(DataKeySpec&& value) { m_keySpecHasBeenSet = true; m_keySpec = std::move(value); }
124 inline GenerateDataKeyRequest& WithKeySpec(const DataKeySpec& value) { SetKeySpec(value); return *this;}
125 inline GenerateDataKeyRequest& WithKeySpec(DataKeySpec&& value) { SetKeySpec(std::move(value)); return *this;}
127
129
138 inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
139 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
140 inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
141 inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::move(value); }
143 inline GenerateDataKeyRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(std::move(value)); return *this;}
144 inline GenerateDataKeyRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
145 inline GenerateDataKeyRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(std::move(value)); return *this; }
146 inline GenerateDataKeyRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
148
150
174 inline const RecipientInfo& GetRecipient() const{ return m_recipient; }
175 inline bool RecipientHasBeenSet() const { return m_recipientHasBeenSet; }
176 inline void SetRecipient(const RecipientInfo& value) { m_recipientHasBeenSet = true; m_recipient = value; }
177 inline void SetRecipient(RecipientInfo&& value) { m_recipientHasBeenSet = true; m_recipient = std::move(value); }
178 inline GenerateDataKeyRequest& WithRecipient(const RecipientInfo& value) { SetRecipient(value); return *this;}
179 inline GenerateDataKeyRequest& WithRecipient(RecipientInfo&& value) { SetRecipient(std::move(value)); return *this;}
181
183
189 inline bool GetDryRun() const{ return m_dryRun; }
190 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
191 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
192 inline GenerateDataKeyRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
194 private:
195
196 Aws::String m_keyId;
197 bool m_keyIdHasBeenSet = false;
198
199 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
200 bool m_encryptionContextHasBeenSet = false;
201
202 int m_numberOfBytes;
203 bool m_numberOfBytesHasBeenSet = false;
204
205 DataKeySpec m_keySpec;
206 bool m_keySpecHasBeenSet = false;
207
208 Aws::Vector<Aws::String> m_grantTokens;
209 bool m_grantTokensHasBeenSet = false;
210
211 RecipientInfo m_recipient;
212 bool m_recipientHasBeenSet = false;
213
214 bool m_dryRun;
215 bool m_dryRunHasBeenSet = false;
216 };
217
218} // namespace Model
219} // namespace KMS
220} // namespace Aws
GenerateDataKeyRequest & AddGrantTokens(const char *value)
GenerateDataKeyRequest & AddEncryptionContext(const Aws::String &key, Aws::String &&value)
GenerateDataKeyRequest & WithEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
GenerateDataKeyRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
GenerateDataKeyRequest & AddGrantTokens(const Aws::String &value)
GenerateDataKeyRequest & AddEncryptionContext(const char *key, const char *value)
GenerateDataKeyRequest & AddEncryptionContext(Aws::String &&key, const char *value)
virtual const char * GetServiceRequestName() const override
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
void SetRecipient(const RecipientInfo &value)
GenerateDataKeyRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
GenerateDataKeyRequest & WithKeySpec(const DataKeySpec &value)
GenerateDataKeyRequest & WithDryRun(bool value)
GenerateDataKeyRequest & AddEncryptionContext(Aws::String &&key, Aws::String &&value)
GenerateDataKeyRequest & WithKeyId(const char *value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
GenerateDataKeyRequest & AddEncryptionContext(const Aws::String &key, const Aws::String &value)
GenerateDataKeyRequest & WithEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
GenerateDataKeyRequest & AddEncryptionContext(Aws::String &&key, const Aws::String &value)
GenerateDataKeyRequest & WithKeySpec(DataKeySpec &&value)
GenerateDataKeyRequest & WithKeyId(Aws::String &&value)
GenerateDataKeyRequest & AddGrantTokens(Aws::String &&value)
GenerateDataKeyRequest & WithRecipient(const RecipientInfo &value)
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
GenerateDataKeyRequest & WithKeyId(const Aws::String &value)
GenerateDataKeyRequest & WithNumberOfBytes(int value)
void SetEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
void SetEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
GenerateDataKeyRequest & WithRecipient(RecipientInfo &&value)
GenerateDataKeyRequest & AddEncryptionContext(const char *key, Aws::String &&value)
AWS_KMS_API Aws::String SerializePayload() 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