AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
CreateGrantRequest.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/memory/stl/AWSVector.h>
11#include <aws/kms/model/GrantConstraints.h>
12#include <aws/kms/model/GrantOperation.h>
13#include <utility>
14
15namespace Aws
16{
17namespace KMS
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_KMS_API CreateGrantRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateGrant"; }
34
35 AWS_KMS_API Aws::String SerializePayload() const override;
36
38
39
41
51 inline const Aws::String& GetKeyId() const { return m_keyId; }
52 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
53 template<typename KeyIdT = Aws::String>
54 void SetKeyId(KeyIdT&& value) { m_keyIdHasBeenSet = true; m_keyId = std::forward<KeyIdT>(value); }
55 template<typename KeyIdT = Aws::String>
56 CreateGrantRequest& WithKeyId(KeyIdT&& value) { SetKeyId(std::forward<KeyIdT>(value)); return *this;}
58
60
69 inline const Aws::String& GetGranteePrincipal() const { return m_granteePrincipal; }
70 inline bool GranteePrincipalHasBeenSet() const { return m_granteePrincipalHasBeenSet; }
71 template<typename GranteePrincipalT = Aws::String>
72 void SetGranteePrincipal(GranteePrincipalT&& value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal = std::forward<GranteePrincipalT>(value); }
73 template<typename GranteePrincipalT = Aws::String>
74 CreateGrantRequest& WithGranteePrincipal(GranteePrincipalT&& value) { SetGranteePrincipal(std::forward<GranteePrincipalT>(value)); return *this;}
76
78
94 inline const Aws::String& GetRetiringPrincipal() const { return m_retiringPrincipal; }
95 inline bool RetiringPrincipalHasBeenSet() const { return m_retiringPrincipalHasBeenSet; }
96 template<typename RetiringPrincipalT = Aws::String>
97 void SetRetiringPrincipal(RetiringPrincipalT&& value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal = std::forward<RetiringPrincipalT>(value); }
98 template<typename RetiringPrincipalT = Aws::String>
99 CreateGrantRequest& WithRetiringPrincipal(RetiringPrincipalT&& value) { SetRetiringPrincipal(std::forward<RetiringPrincipalT>(value)); return *this;}
101
103
113 inline const Aws::Vector<GrantOperation>& GetOperations() const { return m_operations; }
114 inline bool OperationsHasBeenSet() const { return m_operationsHasBeenSet; }
115 template<typename OperationsT = Aws::Vector<GrantOperation>>
116 void SetOperations(OperationsT&& value) { m_operationsHasBeenSet = true; m_operations = std::forward<OperationsT>(value); }
117 template<typename OperationsT = Aws::Vector<GrantOperation>>
118 CreateGrantRequest& WithOperations(OperationsT&& value) { SetOperations(std::forward<OperationsT>(value)); return *this;}
119 inline CreateGrantRequest& AddOperations(GrantOperation value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; }
121
123
152 inline const GrantConstraints& GetConstraints() const { return m_constraints; }
153 inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; }
154 template<typename ConstraintsT = GrantConstraints>
155 void SetConstraints(ConstraintsT&& value) { m_constraintsHasBeenSet = true; m_constraints = std::forward<ConstraintsT>(value); }
156 template<typename ConstraintsT = GrantConstraints>
157 CreateGrantRequest& WithConstraints(ConstraintsT&& value) { SetConstraints(std::forward<ConstraintsT>(value)); return *this;}
159
161
170 inline const Aws::Vector<Aws::String>& GetGrantTokens() const { return m_grantTokens; }
171 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
172 template<typename GrantTokensT = Aws::Vector<Aws::String>>
173 void SetGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::forward<GrantTokensT>(value); }
174 template<typename GrantTokensT = Aws::Vector<Aws::String>>
175 CreateGrantRequest& WithGrantTokens(GrantTokensT&& value) { SetGrantTokens(std::forward<GrantTokensT>(value)); return *this;}
176 template<typename GrantTokensT = Aws::String>
177 CreateGrantRequest& AddGrantTokens(GrantTokensT&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.emplace_back(std::forward<GrantTokensT>(value)); return *this; }
179
181
197 inline const Aws::String& GetName() const { return m_name; }
198 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
199 template<typename NameT = Aws::String>
200 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
201 template<typename NameT = Aws::String>
202 CreateGrantRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
204
206
212 inline bool GetDryRun() const { return m_dryRun; }
213 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
214 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
215 inline CreateGrantRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
217 private:
218
219 Aws::String m_keyId;
220 bool m_keyIdHasBeenSet = false;
221
222 Aws::String m_granteePrincipal;
223 bool m_granteePrincipalHasBeenSet = false;
224
225 Aws::String m_retiringPrincipal;
226 bool m_retiringPrincipalHasBeenSet = false;
227
228 Aws::Vector<GrantOperation> m_operations;
229 bool m_operationsHasBeenSet = false;
230
231 GrantConstraints m_constraints;
232 bool m_constraintsHasBeenSet = false;
233
234 Aws::Vector<Aws::String> m_grantTokens;
235 bool m_grantTokensHasBeenSet = false;
236
237 Aws::String m_name;
238 bool m_nameHasBeenSet = false;
239
240 bool m_dryRun{false};
241 bool m_dryRunHasBeenSet = false;
242 };
243
244} // namespace Model
245} // namespace KMS
246} // namespace Aws
const GrantConstraints & GetConstraints() const
AWS_KMS_API Aws::String SerializePayload() const override
CreateGrantRequest & AddOperations(GrantOperation value)
const Aws::String & GetKeyId() const
CreateGrantRequest & AddGrantTokens(GrantTokensT &&value)
CreateGrantRequest & WithKeyId(KeyIdT &&value)
CreateGrantRequest & WithOperations(OperationsT &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
AWS_KMS_API CreateGrantRequest()=default
CreateGrantRequest & WithDryRun(bool value)
CreateGrantRequest & WithRetiringPrincipal(RetiringPrincipalT &&value)
CreateGrantRequest & WithConstraints(ConstraintsT &&value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetRetiringPrincipal(RetiringPrincipalT &&value)
void SetConstraints(ConstraintsT &&value)
const Aws::String & GetRetiringPrincipal() const
CreateGrantRequest & WithGrantTokens(GrantTokensT &&value)
const Aws::String & GetName() const
void SetGrantTokens(GrantTokensT &&value)
CreateGrantRequest & WithGranteePrincipal(GranteePrincipalT &&value)
CreateGrantRequest & WithName(NameT &&value)
const Aws::Vector< GrantOperation > & GetOperations() const
void SetOperations(OperationsT &&value)
void SetGranteePrincipal(GranteePrincipalT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetGranteePrincipal() const
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