AWS SDK for C++  1.9.131
AWS SDK for C++
EncryptRequest.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>
10 #include <aws/core/utils/Array.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace KMS
19 {
20 namespace 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 "Encrypt"; }
35 
36  Aws::String SerializePayload() const override;
37 
39 
40 
55  inline const Aws::String& GetKeyId() const{ return m_keyId; }
56 
71  inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
72 
87  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
88 
103  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }
104 
119  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
120 
135  inline EncryptRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
136 
151  inline EncryptRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
152 
167  inline EncryptRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
168 
169 
173  inline const Aws::Utils::CryptoBuffer& GetPlaintext() const{ return m_plaintext; }
174 
178  inline bool PlaintextHasBeenSet() const { return m_plaintextHasBeenSet; }
179 
183  inline void SetPlaintext(const Aws::Utils::CryptoBuffer& value) { m_plaintextHasBeenSet = true; m_plaintext = value; }
184 
188  inline void SetPlaintext(Aws::Utils::CryptoBuffer&& value) { m_plaintextHasBeenSet = true; m_plaintext = std::move(value); }
189 
193  inline EncryptRequest& WithPlaintext(const Aws::Utils::CryptoBuffer& value) { SetPlaintext(value); return *this;}
194 
198  inline EncryptRequest& WithPlaintext(Aws::Utils::CryptoBuffer&& value) { SetPlaintext(std::move(value)); return *this;}
199 
200 
216  inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const{ return m_encryptionContext; }
217 
233  inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
234 
250  inline void SetEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
251 
267  inline void SetEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = std::move(value); }
268 
284  inline EncryptRequest& WithEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { SetEncryptionContext(value); return *this;}
285 
301  inline EncryptRequest& WithEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { SetEncryptionContext(std::move(value)); return *this;}
302 
318  inline EncryptRequest& AddEncryptionContext(const Aws::String& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
319 
335  inline EncryptRequest& AddEncryptionContext(Aws::String&& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
336 
352  inline EncryptRequest& AddEncryptionContext(const Aws::String& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
353 
369  inline EncryptRequest& AddEncryptionContext(Aws::String&& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), std::move(value)); return *this; }
370 
386  inline EncryptRequest& AddEncryptionContext(const char* key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
387 
403  inline EncryptRequest& AddEncryptionContext(Aws::String&& key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
404 
420  inline EncryptRequest& AddEncryptionContext(const char* key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
421 
422 
432  inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
433 
443  inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
444 
454  inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
455 
465  inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::move(value); }
466 
476  inline EncryptRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
477 
487  inline EncryptRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(std::move(value)); return *this;}
488 
498  inline EncryptRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
499 
509  inline EncryptRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(std::move(value)); return *this; }
510 
520  inline EncryptRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
521 
522 
530  inline const EncryptionAlgorithmSpec& GetEncryptionAlgorithm() const{ return m_encryptionAlgorithm; }
531 
539  inline bool EncryptionAlgorithmHasBeenSet() const { return m_encryptionAlgorithmHasBeenSet; }
540 
548  inline void SetEncryptionAlgorithm(const EncryptionAlgorithmSpec& value) { m_encryptionAlgorithmHasBeenSet = true; m_encryptionAlgorithm = value; }
549 
557  inline void SetEncryptionAlgorithm(EncryptionAlgorithmSpec&& value) { m_encryptionAlgorithmHasBeenSet = true; m_encryptionAlgorithm = std::move(value); }
558 
566  inline EncryptRequest& WithEncryptionAlgorithm(const EncryptionAlgorithmSpec& value) { SetEncryptionAlgorithm(value); return *this;}
567 
575  inline EncryptRequest& WithEncryptionAlgorithm(EncryptionAlgorithmSpec&& value) { SetEncryptionAlgorithm(std::move(value)); return *this;}
576 
577  private:
578 
579  Aws::String m_keyId;
580  bool m_keyIdHasBeenSet;
581 
582  Aws::Utils::CryptoBuffer m_plaintext;
583  bool m_plaintextHasBeenSet;
584 
585  Aws::Map<Aws::String, Aws::String> m_encryptionContext;
586  bool m_encryptionContextHasBeenSet;
587 
588  Aws::Vector<Aws::String> m_grantTokens;
589  bool m_grantTokensHasBeenSet;
590 
591  EncryptionAlgorithmSpec m_encryptionAlgorithm;
592  bool m_encryptionAlgorithmHasBeenSet;
593  };
594 
595 } // namespace Model
596 } // namespace KMS
597 } // namespace Aws
Aws::KMS::Model::EncryptRequest::AddGrantTokens
EncryptRequest & AddGrantTokens(const Aws::String &value)
Definition: EncryptRequest.h:498
Aws::KMS::Model::EncryptRequest::WithEncryptionAlgorithm
EncryptRequest & WithEncryptionAlgorithm(EncryptionAlgorithmSpec &&value)
Definition: EncryptRequest.h:575
Aws::KMS::Model::EncryptRequest::EncryptionAlgorithmHasBeenSet
bool EncryptionAlgorithmHasBeenSet() const
Definition: EncryptRequest.h:539
Aws::KMS::Model::EncryptRequest::WithPlaintext
EncryptRequest & WithPlaintext(Aws::Utils::CryptoBuffer &&value)
Definition: EncryptRequest.h:198
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::KMS::Model::EncryptRequest::SetGrantTokens
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
Definition: EncryptRequest.h:454
Aws::KMS::Model::EncryptRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::KMS::Model::EncryptRequest::AddGrantTokens
EncryptRequest & AddGrantTokens(const char *value)
Definition: EncryptRequest.h:520
Aws::KMS::Model::EncryptRequest::WithEncryptionContext
EncryptRequest & WithEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
Definition: EncryptRequest.h:301
Aws::KMS::Model::EncryptRequest
Definition: EncryptRequest.h:26
Aws::KMS::Model::EncryptRequest::AddEncryptionContext
EncryptRequest & AddEncryptionContext(Aws::String &&key, const char *value)
Definition: EncryptRequest.h:403
Aws::KMS::Model::EncryptRequest::WithKeyId
EncryptRequest & WithKeyId(const char *value)
Definition: EncryptRequest.h:167
Aws::KMS::Model::EncryptRequest::SetKeyId
void SetKeyId(const Aws::String &value)
Definition: EncryptRequest.h:87
Aws::KMS::Model::EncryptRequest::WithEncryptionContext
EncryptRequest & WithEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
Definition: EncryptRequest.h:284
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::KMS::Model::EncryptRequest::SetEncryptionContext
void SetEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
Definition: EncryptRequest.h:250
Aws::KMS::Model::EncryptionAlgorithmSpec
EncryptionAlgorithmSpec
Definition: EncryptionAlgorithmSpec.h:17
Aws::KMS::Model::EncryptRequest::SetEncryptionContext
void SetEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
Definition: EncryptRequest.h:267
AWSVector.h
Aws::KMS::Model::EncryptRequest::GetEncryptionContext
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
Definition: EncryptRequest.h:216
KMSRequest.h
Aws::KMS::Model::EncryptRequest::AddGrantTokens
EncryptRequest & AddGrantTokens(Aws::String &&value)
Definition: EncryptRequest.h:509
EncryptionAlgorithmSpec.h
Aws::KMS::Model::EncryptRequest::GetEncryptionAlgorithm
const EncryptionAlgorithmSpec & GetEncryptionAlgorithm() const
Definition: EncryptRequest.h:530
Aws::KMS::KMSRequest
Definition: KMSRequest.h:17
Aws::KMS::Model::EncryptRequest::WithKeyId
EncryptRequest & WithKeyId(const Aws::String &value)
Definition: EncryptRequest.h:135
Aws::KMS::Model::EncryptRequest::GetGrantTokens
const Aws::Vector< Aws::String > & GetGrantTokens() const
Definition: EncryptRequest.h:432
Aws::KMS::Model::EncryptRequest::SetGrantTokens
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
Definition: EncryptRequest.h:465
Aws::KMS::Model::EncryptRequest::EncryptRequest
EncryptRequest()
Aws::KMS::Model::EncryptRequest::WithEncryptionAlgorithm
EncryptRequest & WithEncryptionAlgorithm(const EncryptionAlgorithmSpec &value)
Definition: EncryptRequest.h:566
AWS_KMS_API
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:28
Aws::KMS::Model::EncryptRequest::AddEncryptionContext
EncryptRequest & AddEncryptionContext(const Aws::String &key, Aws::String &&value)
Definition: EncryptRequest.h:352
Aws::KMS::Model::EncryptRequest::SetEncryptionAlgorithm
void SetEncryptionAlgorithm(const EncryptionAlgorithmSpec &value)
Definition: EncryptRequest.h:548
Aws::KMS::Model::EncryptRequest::GrantTokensHasBeenSet
bool GrantTokensHasBeenSet() const
Definition: EncryptRequest.h:443
Aws::KMS::Model::EncryptRequest::KeyIdHasBeenSet
bool KeyIdHasBeenSet() const
Definition: EncryptRequest.h:71
AWSString.h
Aws::KMS::Model::EncryptRequest::EncryptionContextHasBeenSet
bool EncryptionContextHasBeenSet() const
Definition: EncryptRequest.h:233
Aws::KMS::Model::EncryptRequest::GetPlaintext
const Aws::Utils::CryptoBuffer & GetPlaintext() const
Definition: EncryptRequest.h:173
Aws::KMS::Model::EncryptRequest::AddEncryptionContext
EncryptRequest & AddEncryptionContext(const char *key, Aws::String &&value)
Definition: EncryptRequest.h:386
Aws::KMS::Model::EncryptRequest::SetKeyId
void SetKeyId(Aws::String &&value)
Definition: EncryptRequest.h:103
Aws::KMS::Model::EncryptRequest::PlaintextHasBeenSet
bool PlaintextHasBeenSet() const
Definition: EncryptRequest.h:178
Aws::CodePipeline::Model::EncryptionKeyType::NOT_SET
@ NOT_SET
Aws::Utils::CryptoBuffer
Definition: Array.h:229
Aws::KMS::Model::EncryptRequest::WithKeyId
EncryptRequest & WithKeyId(Aws::String &&value)
Definition: EncryptRequest.h:151
Aws
Definition: AccessManagementClient.h:15
Array.h
Aws::KMS::Model::EncryptRequest::SetPlaintext
void SetPlaintext(const Aws::Utils::CryptoBuffer &value)
Definition: EncryptRequest.h:183
KMS_EXPORTS.h
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::KMS::Model::EncryptRequest::AddEncryptionContext
EncryptRequest & AddEncryptionContext(const char *key, const char *value)
Definition: EncryptRequest.h:420
Aws::KMS::Model::EncryptRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::KMS::Model::EncryptRequest::WithGrantTokens
EncryptRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
Definition: EncryptRequest.h:476
Aws::KMS::Model::EncryptRequest::WithGrantTokens
EncryptRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
Definition: EncryptRequest.h:487
Aws::KMS::Model::EncryptRequest::AddEncryptionContext
EncryptRequest & AddEncryptionContext(const Aws::String &key, const Aws::String &value)
Definition: EncryptRequest.h:318
Aws::KMS::Model::EncryptRequest::SetKeyId
void SetKeyId(const char *value)
Definition: EncryptRequest.h:119
Aws::KMS::Model::EncryptRequest::SetPlaintext
void SetPlaintext(Aws::Utils::CryptoBuffer &&value)
Definition: EncryptRequest.h:188
Aws::KMS::Model::EncryptRequest::SetEncryptionAlgorithm
void SetEncryptionAlgorithm(EncryptionAlgorithmSpec &&value)
Definition: EncryptRequest.h:557
Aws::KMS::Model::EncryptRequest::AddEncryptionContext
EncryptRequest & AddEncryptionContext(Aws::String &&key, const Aws::String &value)
Definition: EncryptRequest.h:335
Aws::KMS::Model::EncryptRequest::AddEncryptionContext
EncryptRequest & AddEncryptionContext(Aws::String &&key, Aws::String &&value)
Definition: EncryptRequest.h:369
AWSMap.h
Aws::KMS::Model::EncryptRequest::WithPlaintext
EncryptRequest & WithPlaintext(const Aws::Utils::CryptoBuffer &value)
Definition: EncryptRequest.h:193
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
Aws::KMS::Model::EncryptRequest::GetKeyId
const Aws::String & GetKeyId() const
Definition: EncryptRequest.h:55
Aws::KMS::Model::EncryptRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: EncryptRequest.h:34