AWS SDK for C++  1.8.71
AWS SDK for C++
GenerateDataKeyWithoutPlaintextRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/kms/KMS_EXPORTS.h>
8 #include <aws/kms/KMSRequest.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace KMS
18 {
19 namespace Model
20 {
21 
25  {
26  public:
28 
29  // Service request name is the Operation name which will send this request out,
30  // each operation should has unique request name, so that we can get operation's name from this request.
31  // Note: this is not true for response, multiple operations may have the same response name,
32  // so we can not get operation's name from response.
33  inline virtual const char* GetServiceRequestName() const override { return "GenerateDataKeyWithoutPlaintext"; }
34 
35  Aws::String SerializePayload() const override;
36 
37  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38 
39 
54  inline const Aws::String& GetKeyId() const{ return m_keyId; }
55 
70  inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
71 
86  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
87 
102  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }
103 
118  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
119 
134  inline GenerateDataKeyWithoutPlaintextRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
135 
150  inline GenerateDataKeyWithoutPlaintextRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
151 
166  inline GenerateDataKeyWithoutPlaintextRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
167 
168 
180  inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const{ return m_encryptionContext; }
181 
193  inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
194 
206  inline void SetEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
207 
219  inline void SetEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = std::move(value); }
220 
232  inline GenerateDataKeyWithoutPlaintextRequest& WithEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { SetEncryptionContext(value); return *this;}
233 
245  inline GenerateDataKeyWithoutPlaintextRequest& WithEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { SetEncryptionContext(std::move(value)); return *this;}
246 
258  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(const Aws::String& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
259 
271  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(Aws::String&& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
272 
284  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(const Aws::String& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
285 
297  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(Aws::String&& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), std::move(value)); return *this; }
298 
310  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(const char* key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
311 
323  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(Aws::String&& key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
324 
336  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(const char* key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
337 
338 
343  inline const DataKeySpec& GetKeySpec() const{ return m_keySpec; }
344 
349  inline bool KeySpecHasBeenSet() const { return m_keySpecHasBeenSet; }
350 
355  inline void SetKeySpec(const DataKeySpec& value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
356 
361  inline void SetKeySpec(DataKeySpec&& value) { m_keySpecHasBeenSet = true; m_keySpec = std::move(value); }
362 
367  inline GenerateDataKeyWithoutPlaintextRequest& WithKeySpec(const DataKeySpec& value) { SetKeySpec(value); return *this;}
368 
373  inline GenerateDataKeyWithoutPlaintextRequest& WithKeySpec(DataKeySpec&& value) { SetKeySpec(std::move(value)); return *this;}
374 
375 
382  inline int GetNumberOfBytes() const{ return m_numberOfBytes; }
383 
390  inline bool NumberOfBytesHasBeenSet() const { return m_numberOfBytesHasBeenSet; }
391 
398  inline void SetNumberOfBytes(int value) { m_numberOfBytesHasBeenSet = true; m_numberOfBytes = value; }
399 
406  inline GenerateDataKeyWithoutPlaintextRequest& WithNumberOfBytes(int value) { SetNumberOfBytes(value); return *this;}
407 
408 
414  inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
415 
421  inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
422 
428  inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
429 
435  inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::move(value); }
436 
442  inline GenerateDataKeyWithoutPlaintextRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
443 
449  inline GenerateDataKeyWithoutPlaintextRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(std::move(value)); return *this;}
450 
456  inline GenerateDataKeyWithoutPlaintextRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
457 
463  inline GenerateDataKeyWithoutPlaintextRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(std::move(value)); return *this; }
464 
470  inline GenerateDataKeyWithoutPlaintextRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
471 
472  private:
473 
474  Aws::String m_keyId;
475  bool m_keyIdHasBeenSet;
476 
477  Aws::Map<Aws::String, Aws::String> m_encryptionContext;
478  bool m_encryptionContextHasBeenSet;
479 
480  DataKeySpec m_keySpec;
481  bool m_keySpecHasBeenSet;
482 
483  int m_numberOfBytes;
484  bool m_numberOfBytesHasBeenSet;
485 
486  Aws::Vector<Aws::String> m_grantTokens;
487  bool m_grantTokensHasBeenSet;
488  };
489 
490 } // namespace Model
491 } // namespace KMS
492 } // namespace Aws
GenerateDataKeyWithoutPlaintextRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
void SetEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
GenerateDataKeyWithoutPlaintextRequest & WithEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
GenerateDataKeyWithoutPlaintextRequest & AddGrantTokens(const Aws::String &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(const char *key, Aws::String &&value)
GenerateDataKeyWithoutPlaintextRequest & WithKeyId(const char *value)
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
GenerateDataKeyWithoutPlaintextRequest & WithKeySpec(DataKeySpec &&value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(Aws::String &&key, Aws::String &&value)
GenerateDataKeyWithoutPlaintextRequest & WithKeySpec(const DataKeySpec &value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(Aws::String &&key, const char *value)
GenerateDataKeyWithoutPlaintextRequest & WithKeyId(const Aws::String &value)
GenerateDataKeyWithoutPlaintextRequest & WithEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(const char *key, const char *value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(const Aws::String &key, Aws::String &&value)
void SetEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(const Aws::String &key, const Aws::String &value)
GenerateDataKeyWithoutPlaintextRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
GenerateDataKeyWithoutPlaintextRequest & WithKeyId(Aws::String &&value)
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:28
GenerateDataKeyWithoutPlaintextRequest & WithNumberOfBytes(int value)
GenerateDataKeyWithoutPlaintextRequest & AddGrantTokens(Aws::String &&value)
GenerateDataKeyWithoutPlaintextRequest & AddGrantTokens(const char *value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(Aws::String &&key, const Aws::String &value)