AWS SDK for C++

AWS SDK for C++ Version 1.11.811

Loading...
Searching...
No Matches
SignRequest.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/KMSRequest.h>
11#include <aws/kms/KMS_EXPORTS.h>
12#include <aws/kms/model/MessageType.h>
13#include <aws/kms/model/SigningAlgorithmSpec.h>
14
15#include <utility>
16
17namespace Aws {
18namespace KMS {
19namespace Model {
20
23class SignRequest : public KMSRequest {
24 public:
25 AWS_KMS_API SignRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "Sign"; }
32
33 AWS_KMS_API Aws::String SerializePayload() const override;
34
36
38
55 inline const Aws::String& GetKeyId() const { return m_keyId; }
56 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
57 template <typename KeyIdT = Aws::String>
58 void SetKeyId(KeyIdT&& value) {
59 m_keyIdHasBeenSet = true;
60 m_keyId = std::forward<KeyIdT>(value);
61 }
62 template <typename KeyIdT = Aws::String>
63 SignRequest& WithKeyId(KeyIdT&& value) {
64 SetKeyId(std::forward<KeyIdT>(value));
65 return *this;
66 }
68
70
76 inline const Aws::Utils::CryptoBuffer& GetMessage() const { return m_message; }
77 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
78 template <typename MessageT = Aws::Utils::CryptoBuffer>
79 void SetMessage(MessageT&& value) {
80 m_messageHasBeenSet = true;
81 m_message = std::forward<MessageT>(value);
82 }
83 template <typename MessageT = Aws::Utils::CryptoBuffer>
84 SignRequest& WithMessage(MessageT&& value) {
85 SetMessage(std::forward<MessageT>(value));
86 return *this;
87 }
89
91
133 inline MessageType GetMessageType() const { return m_messageType; }
134 inline bool MessageTypeHasBeenSet() const { return m_messageTypeHasBeenSet; }
135 inline void SetMessageType(MessageType value) {
136 m_messageTypeHasBeenSet = true;
137 m_messageType = value;
138 }
140 SetMessageType(value);
141 return *this;
142 }
144
146
155 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
156 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
157 template <typename GrantTokensT = Aws::Vector<Aws::String>>
158 void SetGrantTokens(GrantTokensT&& value) {
159 m_grantTokensHasBeenSet = true;
160 m_grantTokens = std::forward<GrantTokensT>(value);
161 }
162 template <typename GrantTokensT = Aws::Vector<Aws::String>>
163 SignRequest& WithGrantTokens(GrantTokensT&& value) {
164 SetGrantTokens(std::forward<GrantTokensT>(value));
165 return *this;
166 }
167 template <typename GrantTokensT = Aws::String>
168 SignRequest& AddGrantTokens(GrantTokensT&& value) {
169 m_grantTokensHasBeenSet = true;
170 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
171 return *this;
172 }
174
176
183 inline SigningAlgorithmSpec GetSigningAlgorithm() const { return m_signingAlgorithm; }
184 inline bool SigningAlgorithmHasBeenSet() const { return m_signingAlgorithmHasBeenSet; }
186 m_signingAlgorithmHasBeenSet = true;
187 m_signingAlgorithm = value;
188 }
190 SetSigningAlgorithm(value);
191 return *this;
192 }
194
196
202 inline bool GetDryRun() const { return m_dryRun; }
203 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
204 inline void SetDryRun(bool value) {
205 m_dryRunHasBeenSet = true;
206 m_dryRun = value;
207 }
208 inline SignRequest& WithDryRun(bool value) {
209 SetDryRun(value);
210 return *this;
211 }
213 private:
214 Aws::String m_keyId;
215
216 Aws::Utils::CryptoBuffer m_message{};
217
218 MessageType m_messageType{MessageType::NOT_SET};
219
220 Aws::Vector<Aws::String> m_grantTokens;
221
223
224 bool m_dryRun{false};
225 bool m_keyIdHasBeenSet = false;
226 bool m_messageHasBeenSet = false;
227 bool m_messageTypeHasBeenSet = false;
228 bool m_grantTokensHasBeenSet = false;
229 bool m_signingAlgorithmHasBeenSet = false;
230 bool m_dryRunHasBeenSet = false;
231};
232
233} // namespace Model
234} // namespace KMS
235} // namespace Aws
bool SigningAlgorithmHasBeenSet() const
SignRequest & WithGrantTokens(GrantTokensT &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
SignRequest & WithMessageType(MessageType value)
SignRequest & AddGrantTokens(GrantTokensT &&value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
SignRequest & WithSigningAlgorithm(SigningAlgorithmSpec value)
void SetMessage(MessageT &&value)
Definition SignRequest.h:79
const Aws::String & GetKeyId() const
Definition SignRequest.h:55
MessageType GetMessageType() const
SignRequest & WithKeyId(KeyIdT &&value)
Definition SignRequest.h:63
void SetSigningAlgorithm(SigningAlgorithmSpec value)
void SetKeyId(KeyIdT &&value)
Definition SignRequest.h:58
const Aws::Utils::CryptoBuffer & GetMessage() const
Definition SignRequest.h:76
void SetMessageType(MessageType value)
SigningAlgorithmSpec GetSigningAlgorithm() const
AWS_KMS_API Aws::String SerializePayload() const override
SignRequest & WithMessage(MessageT &&value)
Definition SignRequest.h:84
SignRequest & WithDryRun(bool value)
void SetGrantTokens(GrantTokensT &&value)
AWS_KMS_API SignRequest()=default
virtual const char * GetServiceRequestName() const override
Definition SignRequest.h:31
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector