AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
GetPublicKeyResult.h
1
6#pragma once
7#include <aws/core/http/HttpResponse.h>
8#include <aws/core/utils/Array.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/kms/KMS_EXPORTS.h>
12#include <aws/kms/model/EncryptionAlgorithmSpec.h>
13#include <aws/kms/model/KeyAgreementAlgorithmSpec.h>
14#include <aws/kms/model/KeySpec.h>
15#include <aws/kms/model/KeyUsageType.h>
16#include <aws/kms/model/SigningAlgorithmSpec.h>
17
18#include <utility>
19
20namespace Aws {
21template <typename RESULT_TYPE>
22class AmazonWebServiceResult;
23
24namespace Utils {
25namespace Json {
26class JsonValue;
27} // namespace Json
28} // namespace Utils
29namespace KMS {
30namespace Model {
32 public:
33 AWS_KMS_API GetPublicKeyResult() = default;
36
38
43 inline const Aws::String& GetKeyId() const { return m_keyId; }
44 template <typename KeyIdT = Aws::String>
45 void SetKeyId(KeyIdT&& value) {
46 m_keyIdHasBeenSet = true;
47 m_keyId = std::forward<KeyIdT>(value);
48 }
49 template <typename KeyIdT = Aws::String>
50 GetPublicKeyResult& WithKeyId(KeyIdT&& value) {
51 SetKeyId(std::forward<KeyIdT>(value));
52 return *this;
53 }
55
57
64 inline const Aws::Utils::ByteBuffer& GetPublicKey() const { return m_publicKey; }
65 template <typename PublicKeyT = Aws::Utils::ByteBuffer>
66 void SetPublicKey(PublicKeyT&& value) {
67 m_publicKeyHasBeenSet = true;
68 m_publicKey = std::forward<PublicKeyT>(value);
69 }
70 template <typename PublicKeyT = Aws::Utils::ByteBuffer>
71 GetPublicKeyResult& WithPublicKey(PublicKeyT&& value) {
72 SetPublicKey(std::forward<PublicKeyT>(value));
73 return *this;
74 }
76
78
81 inline KeySpec GetKeySpec() const { return m_keySpec; }
82 inline void SetKeySpec(KeySpec value) {
83 m_keySpecHasBeenSet = true;
84 m_keySpec = value;
85 }
87 SetKeySpec(value);
88 return *this;
89 }
91
93
100 inline KeyUsageType GetKeyUsage() const { return m_keyUsage; }
101 inline void SetKeyUsage(KeyUsageType value) {
102 m_keyUsageHasBeenSet = true;
103 m_keyUsage = value;
104 }
106 SetKeyUsage(value);
107 return *this;
108 }
110
112
119 inline const Aws::Vector<EncryptionAlgorithmSpec>& GetEncryptionAlgorithms() const { return m_encryptionAlgorithms; }
120 template <typename EncryptionAlgorithmsT = Aws::Vector<EncryptionAlgorithmSpec>>
121 void SetEncryptionAlgorithms(EncryptionAlgorithmsT&& value) {
122 m_encryptionAlgorithmsHasBeenSet = true;
123 m_encryptionAlgorithms = std::forward<EncryptionAlgorithmsT>(value);
124 }
125 template <typename EncryptionAlgorithmsT = Aws::Vector<EncryptionAlgorithmSpec>>
126 GetPublicKeyResult& WithEncryptionAlgorithms(EncryptionAlgorithmsT&& value) {
127 SetEncryptionAlgorithms(std::forward<EncryptionAlgorithmsT>(value));
128 return *this;
129 }
131 m_encryptionAlgorithmsHasBeenSet = true;
132 m_encryptionAlgorithms.push_back(value);
133 return *this;
134 }
136
138
143 inline const Aws::Vector<SigningAlgorithmSpec>& GetSigningAlgorithms() const { return m_signingAlgorithms; }
144 template <typename SigningAlgorithmsT = Aws::Vector<SigningAlgorithmSpec>>
145 void SetSigningAlgorithms(SigningAlgorithmsT&& value) {
146 m_signingAlgorithmsHasBeenSet = true;
147 m_signingAlgorithms = std::forward<SigningAlgorithmsT>(value);
148 }
149 template <typename SigningAlgorithmsT = Aws::Vector<SigningAlgorithmSpec>>
150 GetPublicKeyResult& WithSigningAlgorithms(SigningAlgorithmsT&& value) {
151 SetSigningAlgorithms(std::forward<SigningAlgorithmsT>(value));
152 return *this;
153 }
155 m_signingAlgorithmsHasBeenSet = true;
156 m_signingAlgorithms.push_back(value);
157 return *this;
158 }
160
162
167 inline const Aws::Vector<KeyAgreementAlgorithmSpec>& GetKeyAgreementAlgorithms() const { return m_keyAgreementAlgorithms; }
168 template <typename KeyAgreementAlgorithmsT = Aws::Vector<KeyAgreementAlgorithmSpec>>
169 void SetKeyAgreementAlgorithms(KeyAgreementAlgorithmsT&& value) {
170 m_keyAgreementAlgorithmsHasBeenSet = true;
171 m_keyAgreementAlgorithms = std::forward<KeyAgreementAlgorithmsT>(value);
172 }
173 template <typename KeyAgreementAlgorithmsT = Aws::Vector<KeyAgreementAlgorithmSpec>>
174 GetPublicKeyResult& WithKeyAgreementAlgorithms(KeyAgreementAlgorithmsT&& value) {
175 SetKeyAgreementAlgorithms(std::forward<KeyAgreementAlgorithmsT>(value));
176 return *this;
177 }
179 m_keyAgreementAlgorithmsHasBeenSet = true;
180 m_keyAgreementAlgorithms.push_back(value);
181 return *this;
182 }
184
186
187 inline const Aws::String& GetRequestId() const { return m_requestId; }
188 template <typename RequestIdT = Aws::String>
189 void SetRequestId(RequestIdT&& value) {
190 m_requestIdHasBeenSet = true;
191 m_requestId = std::forward<RequestIdT>(value);
192 }
193 template <typename RequestIdT = Aws::String>
194 GetPublicKeyResult& WithRequestId(RequestIdT&& value) {
195 SetRequestId(std::forward<RequestIdT>(value));
196 return *this;
197 }
199 inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; }
200
201 private:
202 Aws::String m_keyId;
203
204 Aws::Utils::ByteBuffer m_publicKey{};
205
206 KeySpec m_keySpec{KeySpec::NOT_SET};
207
209
210 Aws::Vector<EncryptionAlgorithmSpec> m_encryptionAlgorithms;
211
212 Aws::Vector<SigningAlgorithmSpec> m_signingAlgorithms;
213
214 Aws::Vector<KeyAgreementAlgorithmSpec> m_keyAgreementAlgorithms;
215
216 Aws::String m_requestId;
217 Aws::Http::HttpResponseCode m_HttpResponseCode;
218 bool m_keyIdHasBeenSet = false;
219 bool m_publicKeyHasBeenSet = false;
220 bool m_keySpecHasBeenSet = false;
221 bool m_keyUsageHasBeenSet = false;
222 bool m_encryptionAlgorithmsHasBeenSet = false;
223 bool m_signingAlgorithmsHasBeenSet = false;
224 bool m_keyAgreementAlgorithmsHasBeenSet = false;
225 bool m_requestIdHasBeenSet = false;
226};
227
228} // namespace Model
229} // namespace KMS
230} // namespace Aws
GetPublicKeyResult & WithPublicKey(PublicKeyT &&value)
Aws::Http::HttpResponseCode GetHttpResponseCode() const
GetPublicKeyResult & WithKeyUsage(KeyUsageType value)
AWS_KMS_API GetPublicKeyResult & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
AWS_KMS_API GetPublicKeyResult()=default
void SetPublicKey(PublicKeyT &&value)
GetPublicKeyResult & AddEncryptionAlgorithms(EncryptionAlgorithmSpec value)
GetPublicKeyResult & WithKeyId(KeyIdT &&value)
void SetKeyAgreementAlgorithms(KeyAgreementAlgorithmsT &&value)
GetPublicKeyResult & WithRequestId(RequestIdT &&value)
GetPublicKeyResult & WithKeyAgreementAlgorithms(KeyAgreementAlgorithmsT &&value)
const Aws::Utils::ByteBuffer & GetPublicKey() const
GetPublicKeyResult & WithSigningAlgorithms(SigningAlgorithmsT &&value)
GetPublicKeyResult & WithKeySpec(KeySpec value)
void SetSigningAlgorithms(SigningAlgorithmsT &&value)
GetPublicKeyResult & WithEncryptionAlgorithms(EncryptionAlgorithmsT &&value)
void SetEncryptionAlgorithms(EncryptionAlgorithmsT &&value)
const Aws::Vector< KeyAgreementAlgorithmSpec > & GetKeyAgreementAlgorithms() const
const Aws::String & GetKeyId() const
GetPublicKeyResult & AddSigningAlgorithms(SigningAlgorithmSpec value)
const Aws::Vector< EncryptionAlgorithmSpec > & GetEncryptionAlgorithms() const
GetPublicKeyResult & AddKeyAgreementAlgorithms(KeyAgreementAlgorithmSpec value)
const Aws::String & GetRequestId() const
const Aws::Vector< SigningAlgorithmSpec > & GetSigningAlgorithms() const
AWS_KMS_API GetPublicKeyResult(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue