AWS SDK for C++  1.8.71
AWS SDK for C++
GenerateDataKeyPairRequest.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 "GenerateDataKeyPair"; }
34 
35  Aws::String SerializePayload() const override;
36 
37  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38 
39 
51  inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const{ return m_encryptionContext; }
52 
64  inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
65 
77  inline void SetEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
78 
90  inline void SetEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = std::move(value); }
91 
103  inline GenerateDataKeyPairRequest& WithEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { SetEncryptionContext(value); return *this;}
104 
116  inline GenerateDataKeyPairRequest& WithEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { SetEncryptionContext(std::move(value)); return *this;}
117 
129  inline GenerateDataKeyPairRequest& AddEncryptionContext(const Aws::String& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
130 
142  inline GenerateDataKeyPairRequest& AddEncryptionContext(Aws::String&& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
143 
155  inline GenerateDataKeyPairRequest& AddEncryptionContext(const Aws::String& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
156 
168  inline GenerateDataKeyPairRequest& AddEncryptionContext(Aws::String&& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), std::move(value)); return *this; }
169 
181  inline GenerateDataKeyPairRequest& AddEncryptionContext(const char* key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
182 
194  inline GenerateDataKeyPairRequest& AddEncryptionContext(Aws::String&& key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
195 
207  inline GenerateDataKeyPairRequest& AddEncryptionContext(const char* key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
208 
209 
226  inline const Aws::String& GetKeyId() const{ return m_keyId; }
227 
244  inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
245 
262  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
263 
280  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }
281 
298  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
299 
316  inline GenerateDataKeyPairRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
317 
334  inline GenerateDataKeyPairRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
335 
352  inline GenerateDataKeyPairRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
353 
354 
361  inline const DataKeyPairSpec& GetKeyPairSpec() const{ return m_keyPairSpec; }
362 
369  inline bool KeyPairSpecHasBeenSet() const { return m_keyPairSpecHasBeenSet; }
370 
377  inline void SetKeyPairSpec(const DataKeyPairSpec& value) { m_keyPairSpecHasBeenSet = true; m_keyPairSpec = value; }
378 
385  inline void SetKeyPairSpec(DataKeyPairSpec&& value) { m_keyPairSpecHasBeenSet = true; m_keyPairSpec = std::move(value); }
386 
393  inline GenerateDataKeyPairRequest& WithKeyPairSpec(const DataKeyPairSpec& value) { SetKeyPairSpec(value); return *this;}
394 
401  inline GenerateDataKeyPairRequest& WithKeyPairSpec(DataKeyPairSpec&& value) { SetKeyPairSpec(std::move(value)); return *this;}
402 
403 
409  inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
410 
416  inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
417 
423  inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
424 
430  inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::move(value); }
431 
437  inline GenerateDataKeyPairRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
438 
444  inline GenerateDataKeyPairRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(std::move(value)); return *this;}
445 
451  inline GenerateDataKeyPairRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
452 
458  inline GenerateDataKeyPairRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(std::move(value)); return *this; }
459 
465  inline GenerateDataKeyPairRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
466 
467  private:
468 
469  Aws::Map<Aws::String, Aws::String> m_encryptionContext;
470  bool m_encryptionContextHasBeenSet;
471 
472  Aws::String m_keyId;
473  bool m_keyIdHasBeenSet;
474 
475  DataKeyPairSpec m_keyPairSpec;
476  bool m_keyPairSpecHasBeenSet;
477 
478  Aws::Vector<Aws::String> m_grantTokens;
479  bool m_grantTokensHasBeenSet;
480  };
481 
482 } // namespace Model
483 } // namespace KMS
484 } // namespace Aws
void SetEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
GenerateDataKeyPairRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
void SetEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
GenerateDataKeyPairRequest & AddEncryptionContext(const Aws::String &key, Aws::String &&value)
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
GenerateDataKeyPairRequest & AddEncryptionContext(Aws::String &&key, const char *value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
GenerateDataKeyPairRequest & AddEncryptionContext(const char *key, const char *value)
GenerateDataKeyPairRequest & AddGrantTokens(const char *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
GenerateDataKeyPairRequest & AddEncryptionContext(const char *key, Aws::String &&value)
GenerateDataKeyPairRequest & WithKeyId(Aws::String &&value)
GenerateDataKeyPairRequest & AddEncryptionContext(const Aws::String &key, const Aws::String &value)
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
GenerateDataKeyPairRequest & WithKeyId(const Aws::String &value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
GenerateDataKeyPairRequest & AddGrantTokens(Aws::String &&value)
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
GenerateDataKeyPairRequest & AddEncryptionContext(Aws::String &&key, const Aws::String &value)
GenerateDataKeyPairRequest & WithEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
void SetKeyPairSpec(const DataKeyPairSpec &value)
GenerateDataKeyPairRequest & WithKeyPairSpec(const DataKeyPairSpec &value)
virtual const char * GetServiceRequestName() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:28
GenerateDataKeyPairRequest & WithKeyId(const char *value)
GenerateDataKeyPairRequest & WithKeyPairSpec(DataKeyPairSpec &&value)
GenerateDataKeyPairRequest & AddGrantTokens(const Aws::String &value)
GenerateDataKeyPairRequest & AddEncryptionContext(Aws::String &&key, Aws::String &&value)
GenerateDataKeyPairRequest & WithEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
GenerateDataKeyPairRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)