AWS SDK for C++

AWS SDK for C++ Version 1.11.718

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
128 inline MessageType GetMessageType() const { return m_messageType; }
129 inline bool MessageTypeHasBeenSet() const { return m_messageTypeHasBeenSet; }
130 inline void SetMessageType(MessageType value) {
131 m_messageTypeHasBeenSet = true;
132 m_messageType = value;
133 }
135 SetMessageType(value);
136 return *this;
137 }
139
141
150 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
151 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
152 template <typename GrantTokensT = Aws::Vector<Aws::String>>
153 void SetGrantTokens(GrantTokensT&& value) {
154 m_grantTokensHasBeenSet = true;
155 m_grantTokens = std::forward<GrantTokensT>(value);
156 }
157 template <typename GrantTokensT = Aws::Vector<Aws::String>>
158 SignRequest& WithGrantTokens(GrantTokensT&& value) {
159 SetGrantTokens(std::forward<GrantTokensT>(value));
160 return *this;
161 }
162 template <typename GrantTokensT = Aws::String>
163 SignRequest& AddGrantTokens(GrantTokensT&& value) {
164 m_grantTokensHasBeenSet = true;
165 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
166 return *this;
167 }
169
171
178 inline SigningAlgorithmSpec GetSigningAlgorithm() const { return m_signingAlgorithm; }
179 inline bool SigningAlgorithmHasBeenSet() const { return m_signingAlgorithmHasBeenSet; }
181 m_signingAlgorithmHasBeenSet = true;
182 m_signingAlgorithm = value;
183 }
185 SetSigningAlgorithm(value);
186 return *this;
187 }
189
191
197 inline bool GetDryRun() const { return m_dryRun; }
198 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
199 inline void SetDryRun(bool value) {
200 m_dryRunHasBeenSet = true;
201 m_dryRun = value;
202 }
203 inline SignRequest& WithDryRun(bool value) {
204 SetDryRun(value);
205 return *this;
206 }
208 private:
209 Aws::String m_keyId;
210
211 Aws::Utils::CryptoBuffer m_message{};
212
213 MessageType m_messageType{MessageType::NOT_SET};
214
215 Aws::Vector<Aws::String> m_grantTokens;
216
218
219 bool m_dryRun{false};
220 bool m_keyIdHasBeenSet = false;
221 bool m_messageHasBeenSet = false;
222 bool m_messageTypeHasBeenSet = false;
223 bool m_grantTokensHasBeenSet = false;
224 bool m_signingAlgorithmHasBeenSet = false;
225 bool m_dryRunHasBeenSet = false;
226};
227
228} // namespace Model
229} // namespace KMS
230} // 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