AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
GenerateMacRequest.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/MacAlgorithmSpec.h>
13
14#include <utility>
15
16namespace Aws {
17namespace KMS {
18namespace Model {
19
23 public:
24 AWS_KMS_API GenerateMacRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "GenerateMac"; }
31
32 AWS_KMS_API Aws::String SerializePayload() const override;
33
35
37
43 inline const Aws::Utils::CryptoBuffer& GetMessage() const { return m_message; }
44 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
45 template <typename MessageT = Aws::Utils::CryptoBuffer>
46 void SetMessage(MessageT&& value) {
47 m_messageHasBeenSet = true;
48 m_message = std::forward<MessageT>(value);
49 }
50 template <typename MessageT = Aws::Utils::CryptoBuffer>
51 GenerateMacRequest& WithMessage(MessageT&& value) {
52 SetMessage(std::forward<MessageT>(value));
53 return *this;
54 }
56
58
65 inline const Aws::String& GetKeyId() const { return m_keyId; }
66 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
67 template <typename KeyIdT = Aws::String>
68 void SetKeyId(KeyIdT&& value) {
69 m_keyIdHasBeenSet = true;
70 m_keyId = std::forward<KeyIdT>(value);
71 }
72 template <typename KeyIdT = Aws::String>
73 GenerateMacRequest& WithKeyId(KeyIdT&& value) {
74 SetKeyId(std::forward<KeyIdT>(value));
75 return *this;
76 }
78
80
87 inline MacAlgorithmSpec GetMacAlgorithm() const { return m_macAlgorithm; }
88 inline bool MacAlgorithmHasBeenSet() const { return m_macAlgorithmHasBeenSet; }
89 inline void SetMacAlgorithm(MacAlgorithmSpec value) {
90 m_macAlgorithmHasBeenSet = true;
91 m_macAlgorithm = value;
92 }
94 SetMacAlgorithm(value);
95 return *this;
96 }
98
100
109 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
110 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
111 template <typename GrantTokensT = Aws::Vector<Aws::String>>
112 void SetGrantTokens(GrantTokensT&& value) {
113 m_grantTokensHasBeenSet = true;
114 m_grantTokens = std::forward<GrantTokensT>(value);
115 }
116 template <typename GrantTokensT = Aws::Vector<Aws::String>>
117 GenerateMacRequest& WithGrantTokens(GrantTokensT&& value) {
118 SetGrantTokens(std::forward<GrantTokensT>(value));
119 return *this;
120 }
121 template <typename GrantTokensT = Aws::String>
122 GenerateMacRequest& AddGrantTokens(GrantTokensT&& value) {
123 m_grantTokensHasBeenSet = true;
124 m_grantTokens.emplace_back(std::forward<GrantTokensT>(value));
125 return *this;
126 }
128
130
136 inline bool GetDryRun() const { return m_dryRun; }
137 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
138 inline void SetDryRun(bool value) {
139 m_dryRunHasBeenSet = true;
140 m_dryRun = value;
141 }
142 inline GenerateMacRequest& WithDryRun(bool value) {
143 SetDryRun(value);
144 return *this;
145 }
147 private:
148 Aws::Utils::CryptoBuffer m_message{};
149
150 Aws::String m_keyId;
151
153
154 Aws::Vector<Aws::String> m_grantTokens;
155
156 bool m_dryRun{false};
157 bool m_messageHasBeenSet = false;
158 bool m_keyIdHasBeenSet = false;
159 bool m_macAlgorithmHasBeenSet = false;
160 bool m_grantTokensHasBeenSet = false;
161 bool m_dryRunHasBeenSet = false;
162};
163
164} // namespace Model
165} // namespace KMS
166} // namespace Aws
GenerateMacRequest & AddGrantTokens(GrantTokensT &&value)
GenerateMacRequest & WithDryRun(bool value)
const Aws::String & GetKeyId() const
const Aws::Utils::CryptoBuffer & GetMessage() const
void SetMacAlgorithm(MacAlgorithmSpec value)
MacAlgorithmSpec GetMacAlgorithm() const
GenerateMacRequest & WithKeyId(KeyIdT &&value)
GenerateMacRequest & WithMacAlgorithm(MacAlgorithmSpec value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_KMS_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
GenerateMacRequest & WithMessage(MessageT &&value)
void SetGrantTokens(GrantTokensT &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
AWS_KMS_API GenerateMacRequest()=default
GenerateMacRequest & WithGrantTokens(GrantTokensT &&value)
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