AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
GetPublicKeyResult.h
1
6#pragma once
7#include <aws/core/utils/Array.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/kms/KMS_EXPORTS.h>
11#include <aws/kms/model/EncryptionAlgorithmSpec.h>
12#include <aws/kms/model/KeyAgreementAlgorithmSpec.h>
13#include <aws/kms/model/KeySpec.h>
14#include <aws/kms/model/KeyUsageType.h>
15#include <aws/kms/model/SigningAlgorithmSpec.h>
16
17#include <utility>
18
19namespace Aws {
20template <typename RESULT_TYPE>
21class AmazonWebServiceResult;
22
23namespace Utils {
24namespace Json {
25class JsonValue;
26} // namespace Json
27} // namespace Utils
28namespace KMS {
29namespace Model {
31 public:
32 AWS_KMS_API GetPublicKeyResult() = default;
35
37
42 inline const Aws::String& GetKeyId() const { return m_keyId; }
43 template <typename KeyIdT = Aws::String>
44 void SetKeyId(KeyIdT&& value) {
45 m_keyIdHasBeenSet = true;
46 m_keyId = std::forward<KeyIdT>(value);
47 }
48 template <typename KeyIdT = Aws::String>
49 GetPublicKeyResult& WithKeyId(KeyIdT&& value) {
50 SetKeyId(std::forward<KeyIdT>(value));
51 return *this;
52 }
54
56
63 inline const Aws::Utils::ByteBuffer& GetPublicKey() const { return m_publicKey; }
64 template <typename PublicKeyT = Aws::Utils::ByteBuffer>
65 void SetPublicKey(PublicKeyT&& value) {
66 m_publicKeyHasBeenSet = true;
67 m_publicKey = std::forward<PublicKeyT>(value);
68 }
69 template <typename PublicKeyT = Aws::Utils::ByteBuffer>
70 GetPublicKeyResult& WithPublicKey(PublicKeyT&& value) {
71 SetPublicKey(std::forward<PublicKeyT>(value));
72 return *this;
73 }
75
77
80 inline KeySpec GetKeySpec() const { return m_keySpec; }
81 inline void SetKeySpec(KeySpec value) {
82 m_keySpecHasBeenSet = true;
83 m_keySpec = value;
84 }
86 SetKeySpec(value);
87 return *this;
88 }
90
92
99 inline KeyUsageType GetKeyUsage() const { return m_keyUsage; }
100 inline void SetKeyUsage(KeyUsageType value) {
101 m_keyUsageHasBeenSet = true;
102 m_keyUsage = value;
103 }
105 SetKeyUsage(value);
106 return *this;
107 }
109
111
118 inline const Aws::Vector<EncryptionAlgorithmSpec>& GetEncryptionAlgorithms() const { return m_encryptionAlgorithms; }
119 template <typename EncryptionAlgorithmsT = Aws::Vector<EncryptionAlgorithmSpec>>
120 void SetEncryptionAlgorithms(EncryptionAlgorithmsT&& value) {
121 m_encryptionAlgorithmsHasBeenSet = true;
122 m_encryptionAlgorithms = std::forward<EncryptionAlgorithmsT>(value);
123 }
124 template <typename EncryptionAlgorithmsT = Aws::Vector<EncryptionAlgorithmSpec>>
125 GetPublicKeyResult& WithEncryptionAlgorithms(EncryptionAlgorithmsT&& value) {
126 SetEncryptionAlgorithms(std::forward<EncryptionAlgorithmsT>(value));
127 return *this;
128 }
130 m_encryptionAlgorithmsHasBeenSet = true;
131 m_encryptionAlgorithms.push_back(value);
132 return *this;
133 }
135
137
142 inline const Aws::Vector<SigningAlgorithmSpec>& GetSigningAlgorithms() const { return m_signingAlgorithms; }
143 template <typename SigningAlgorithmsT = Aws::Vector<SigningAlgorithmSpec>>
144 void SetSigningAlgorithms(SigningAlgorithmsT&& value) {
145 m_signingAlgorithmsHasBeenSet = true;
146 m_signingAlgorithms = std::forward<SigningAlgorithmsT>(value);
147 }
148 template <typename SigningAlgorithmsT = Aws::Vector<SigningAlgorithmSpec>>
149 GetPublicKeyResult& WithSigningAlgorithms(SigningAlgorithmsT&& value) {
150 SetSigningAlgorithms(std::forward<SigningAlgorithmsT>(value));
151 return *this;
152 }
154 m_signingAlgorithmsHasBeenSet = true;
155 m_signingAlgorithms.push_back(value);
156 return *this;
157 }
159
161
166 inline const Aws::Vector<KeyAgreementAlgorithmSpec>& GetKeyAgreementAlgorithms() const { return m_keyAgreementAlgorithms; }
167 template <typename KeyAgreementAlgorithmsT = Aws::Vector<KeyAgreementAlgorithmSpec>>
168 void SetKeyAgreementAlgorithms(KeyAgreementAlgorithmsT&& value) {
169 m_keyAgreementAlgorithmsHasBeenSet = true;
170 m_keyAgreementAlgorithms = std::forward<KeyAgreementAlgorithmsT>(value);
171 }
172 template <typename KeyAgreementAlgorithmsT = Aws::Vector<KeyAgreementAlgorithmSpec>>
173 GetPublicKeyResult& WithKeyAgreementAlgorithms(KeyAgreementAlgorithmsT&& value) {
174 SetKeyAgreementAlgorithms(std::forward<KeyAgreementAlgorithmsT>(value));
175 return *this;
176 }
178 m_keyAgreementAlgorithmsHasBeenSet = true;
179 m_keyAgreementAlgorithms.push_back(value);
180 return *this;
181 }
183
185
186 inline const Aws::String& GetRequestId() const { return m_requestId; }
187 template <typename RequestIdT = Aws::String>
188 void SetRequestId(RequestIdT&& value) {
189 m_requestIdHasBeenSet = true;
190 m_requestId = std::forward<RequestIdT>(value);
191 }
192 template <typename RequestIdT = Aws::String>
193 GetPublicKeyResult& WithRequestId(RequestIdT&& value) {
194 SetRequestId(std::forward<RequestIdT>(value));
195 return *this;
196 }
198 private:
199 Aws::String m_keyId;
200
201 Aws::Utils::ByteBuffer m_publicKey{};
202
203 KeySpec m_keySpec{KeySpec::NOT_SET};
204
206
207 Aws::Vector<EncryptionAlgorithmSpec> m_encryptionAlgorithms;
208
209 Aws::Vector<SigningAlgorithmSpec> m_signingAlgorithms;
210
211 Aws::Vector<KeyAgreementAlgorithmSpec> m_keyAgreementAlgorithms;
212
213 Aws::String m_requestId;
214 bool m_keyIdHasBeenSet = false;
215 bool m_publicKeyHasBeenSet = false;
216 bool m_keySpecHasBeenSet = false;
217 bool m_keyUsageHasBeenSet = false;
218 bool m_encryptionAlgorithmsHasBeenSet = false;
219 bool m_signingAlgorithmsHasBeenSet = false;
220 bool m_keyAgreementAlgorithmsHasBeenSet = false;
221 bool m_requestIdHasBeenSet = false;
222};
223
224} // namespace Model
225} // namespace KMS
226} // namespace Aws
GetPublicKeyResult & WithPublicKey(PublicKeyT &&value)
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