AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
EncryptRequest.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/Array.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/kms/model/EncryptionAlgorithmSpec.h>
14#include <utility>
15
16namespace Aws
17{
18namespace KMS
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_KMS_API EncryptRequest();
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_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 EncryptRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
64 inline EncryptRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
65 inline EncryptRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
67
69
72 inline const Aws::Utils::CryptoBuffer& GetPlaintext() const{ return m_plaintext; }
73 inline bool PlaintextHasBeenSet() const { return m_plaintextHasBeenSet; }
74 inline void SetPlaintext(const Aws::Utils::CryptoBuffer& value) { m_plaintextHasBeenSet = true; m_plaintext = value; }
75 inline void SetPlaintext(Aws::Utils::CryptoBuffer&& value) { m_plaintextHasBeenSet = true; m_plaintext = std::move(value); }
76 inline EncryptRequest& WithPlaintext(const Aws::Utils::CryptoBuffer& value) { SetPlaintext(value); return *this;}
77 inline EncryptRequest& WithPlaintext(Aws::Utils::CryptoBuffer&& value) { SetPlaintext(std::move(value)); return *this;}
79
81
100 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const{ return m_encryptionContext; }
101 inline bool EncryptionContextHasBeenSet() const { return m_encryptionContextHasBeenSet; }
102 inline void SetEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
103 inline void SetEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = std::move(value); }
106 inline EncryptRequest& AddEncryptionContext(const Aws::String& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
107 inline EncryptRequest& AddEncryptionContext(Aws::String&& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
108 inline EncryptRequest& AddEncryptionContext(const Aws::String& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
109 inline EncryptRequest& AddEncryptionContext(Aws::String&& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), std::move(value)); return *this; }
110 inline EncryptRequest& AddEncryptionContext(const char* key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, std::move(value)); return *this; }
111 inline EncryptRequest& AddEncryptionContext(Aws::String&& key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(std::move(key), value); return *this; }
112 inline EncryptRequest& AddEncryptionContext(const char* key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext.emplace(key, value); return *this; }
114
116
125 inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
126 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
127 inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
128 inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::move(value); }
129 inline EncryptRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
130 inline EncryptRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(std::move(value)); return *this;}
131 inline EncryptRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
132 inline EncryptRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(std::move(value)); return *this; }
133 inline EncryptRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
135
137
146 inline const EncryptionAlgorithmSpec& GetEncryptionAlgorithm() const{ return m_encryptionAlgorithm; }
147 inline bool EncryptionAlgorithmHasBeenSet() const { return m_encryptionAlgorithmHasBeenSet; }
148 inline void SetEncryptionAlgorithm(const EncryptionAlgorithmSpec& value) { m_encryptionAlgorithmHasBeenSet = true; m_encryptionAlgorithm = value; }
149 inline void SetEncryptionAlgorithm(EncryptionAlgorithmSpec&& value) { m_encryptionAlgorithmHasBeenSet = true; m_encryptionAlgorithm = std::move(value); }
153
155
161 inline bool GetDryRun() const{ return m_dryRun; }
162 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
163 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
164 inline EncryptRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
166 private:
167
168 Aws::String m_keyId;
169 bool m_keyIdHasBeenSet = false;
170
171 Aws::Utils::CryptoBuffer m_plaintext;
172 bool m_plaintextHasBeenSet = false;
173
174 Aws::Map<Aws::String, Aws::String> m_encryptionContext;
175 bool m_encryptionContextHasBeenSet = false;
176
177 Aws::Vector<Aws::String> m_grantTokens;
178 bool m_grantTokensHasBeenSet = false;
179
180 EncryptionAlgorithmSpec m_encryptionAlgorithm;
181 bool m_encryptionAlgorithmHasBeenSet = false;
182
183 bool m_dryRun;
184 bool m_dryRunHasBeenSet = false;
185 };
186
187} // namespace Model
188} // namespace KMS
189} // namespace Aws
EncryptRequest & WithPlaintext(const Aws::Utils::CryptoBuffer &value)
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
EncryptRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
void SetKeyId(const char *value)
EncryptRequest & WithKeyId(const char *value)
void SetEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
void SetKeyId(Aws::String &&value)
AWS_KMS_API Aws::String SerializePayload() const override
void SetPlaintext(Aws::Utils::CryptoBuffer &&value)
EncryptRequest & AddGrantTokens(const Aws::String &value)
EncryptRequest & AddEncryptionContext(const char *key, const char *value)
EncryptRequest & WithKeyId(const Aws::String &value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
EncryptRequest & AddEncryptionContext(const Aws::String &key, Aws::String &&value)
void SetPlaintext(const Aws::Utils::CryptoBuffer &value)
EncryptRequest & AddEncryptionContext(Aws::String &&key, Aws::String &&value)
EncryptRequest & WithPlaintext(Aws::Utils::CryptoBuffer &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
const Aws::Utils::CryptoBuffer & GetPlaintext() const
const Aws::String & GetKeyId() const
EncryptRequest & AddEncryptionContext(const char *key, Aws::String &&value)
virtual const char * GetServiceRequestName() const override
void SetEncryptionAlgorithm(EncryptionAlgorithmSpec &&value)
EncryptRequest & WithDryRun(bool value)
EncryptRequest & WithEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
EncryptRequest & WithEncryptionAlgorithm(EncryptionAlgorithmSpec &&value)
void SetEncryptionAlgorithm(const EncryptionAlgorithmSpec &value)
void SetKeyId(const Aws::String &value)
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
EncryptRequest & AddGrantTokens(Aws::String &&value)
EncryptRequest & WithEncryptionAlgorithm(const EncryptionAlgorithmSpec &value)
EncryptRequest & AddEncryptionContext(Aws::String &&key, const char *value)
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
EncryptRequest & WithEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
EncryptRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
EncryptRequest & WithKeyId(Aws::String &&value)
EncryptRequest & AddEncryptionContext(const Aws::String &key, const Aws::String &value)
EncryptRequest & AddEncryptionContext(Aws::String &&key, const Aws::String &value)
const EncryptionAlgorithmSpec & GetEncryptionAlgorithm() const
void SetEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
EncryptRequest & AddGrantTokens(const char *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