AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
SignRequest.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/kms/model/MessageType.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/kms/model/SigningAlgorithmSpec.h>
14#include <utility>
15
16namespace Aws
17{
18namespace KMS
19{
20namespace Model
21{
22
25 class SignRequest : public KMSRequest
26 {
27 public:
28 AWS_KMS_API SignRequest() = default;
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 "Sign"; }
35
36 AWS_KMS_API Aws::String SerializePayload() const override;
37
39
40
42
59 inline const Aws::String& GetKeyId() const { return m_keyId; }
60 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
61 template<typename KeyIdT = Aws::String>
62 void SetKeyId(KeyIdT&& value) { m_keyIdHasBeenSet = true; m_keyId = std::forward<KeyIdT>(value); }
63 template<typename KeyIdT = Aws::String>
64 SignRequest& WithKeyId(KeyIdT&& value) { SetKeyId(std::forward<KeyIdT>(value)); return *this;}
66
68
74 inline const Aws::Utils::CryptoBuffer& GetMessage() const { return m_message; }
75 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
76 template<typename MessageT = Aws::Utils::CryptoBuffer>
77 void SetMessage(MessageT&& value) { m_messageHasBeenSet = true; m_message = std::forward<MessageT>(value); }
78 template<typename MessageT = Aws::Utils::CryptoBuffer>
79 SignRequest& WithMessage(MessageT&& value) { SetMessage(std::forward<MessageT>(value)); return *this;}
81
83
116 inline MessageType GetMessageType() const { return m_messageType; }
117 inline bool MessageTypeHasBeenSet() const { return m_messageTypeHasBeenSet; }
118 inline void SetMessageType(MessageType value) { m_messageTypeHasBeenSet = true; m_messageType = value; }
119 inline SignRequest& WithMessageType(MessageType value) { SetMessageType(value); return *this;}
121
123
132 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
133 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
134 template<typename GrantTokensT = Aws::Vector<Aws::String>>
135 void SetGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::forward<GrantTokensT>(value); }
136 template<typename GrantTokensT = Aws::Vector<Aws::String>>
137 SignRequest& WithGrantTokens(GrantTokensT&& value) { SetGrantTokens(std::forward<GrantTokensT>(value)); return *this;}
138 template<typename GrantTokensT = Aws::String>
139 SignRequest& AddGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.emplace_back(std::forward<GrantTokensT>(value)); return *this; }
141
143
150 inline SigningAlgorithmSpec GetSigningAlgorithm() const { return m_signingAlgorithm; }
151 inline bool SigningAlgorithmHasBeenSet() const { return m_signingAlgorithmHasBeenSet; }
152 inline void SetSigningAlgorithm(SigningAlgorithmSpec value) { m_signingAlgorithmHasBeenSet = true; m_signingAlgorithm = value; }
155
157
163 inline bool GetDryRun() const { return m_dryRun; }
164 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
165 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
166 inline SignRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
168 private:
169
170 Aws::String m_keyId;
171 bool m_keyIdHasBeenSet = false;
172
173 Aws::Utils::CryptoBuffer m_message{};
174 bool m_messageHasBeenSet = false;
175
176 MessageType m_messageType{MessageType::NOT_SET};
177 bool m_messageTypeHasBeenSet = false;
178
179 Aws::Vector<Aws::String> m_grantTokens;
180 bool m_grantTokensHasBeenSet = false;
181
183 bool m_signingAlgorithmHasBeenSet = false;
184
185 bool m_dryRun{false};
186 bool m_dryRunHasBeenSet = false;
187 };
188
189} // namespace Model
190} // namespace KMS
191} // 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:77
const Aws::String & GetKeyId() const
Definition SignRequest.h:59
MessageType GetMessageType() const
SignRequest & WithKeyId(KeyIdT &&value)
Definition SignRequest.h:64
void SetSigningAlgorithm(SigningAlgorithmSpec value)
void SetKeyId(KeyIdT &&value)
Definition SignRequest.h:62
const Aws::Utils::CryptoBuffer & GetMessage() const
Definition SignRequest.h:74
void SetMessageType(MessageType value)
SigningAlgorithmSpec GetSigningAlgorithm() const
AWS_KMS_API Aws::String SerializePayload() const override
SignRequest & WithMessage(MessageT &&value)
Definition SignRequest.h:79
SignRequest & WithDryRun(bool value)
void SetGrantTokens(GrantTokensT &&value)
AWS_KMS_API SignRequest()=default
virtual const char * GetServiceRequestName() const override
Definition SignRequest.h:34
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