AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
54 inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }
55 inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
56 inline CreateGrantRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
57 inline CreateGrantRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
58 inline CreateGrantRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
60
62
71 inline const Aws::String& GetGranteePrincipal() const{ return m_granteePrincipal; }
72 inline bool GranteePrincipalHasBeenSet() const { return m_granteePrincipalHasBeenSet; }
73 inline void SetGranteePrincipal(const Aws::String& value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal = value; }
74 inline void SetGranteePrincipal(Aws::String&& value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal = std::move(value); }
75 inline void SetGranteePrincipal(const char* value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal.assign(value); }
76 inline CreateGrantRequest& WithGranteePrincipal(const Aws::String& value) { SetGranteePrincipal(value); return *this;}
77 inline CreateGrantRequest& WithGranteePrincipal(Aws::String&& value) { SetGranteePrincipal(std::move(value)); return *this;}
78 inline CreateGrantRequest& WithGranteePrincipal(const char* value) { SetGranteePrincipal(value); return *this;}
80
82
98 inline const Aws::String& GetRetiringPrincipal() const{ return m_retiringPrincipal; }
99 inline bool RetiringPrincipalHasBeenSet() const { return m_retiringPrincipalHasBeenSet; }
100 inline void SetRetiringPrincipal(const Aws::String& value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal = value; }
101 inline void SetRetiringPrincipal(Aws::String&& value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal = std::move(value); }
102 inline void SetRetiringPrincipal(const char* value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal.assign(value); }
103 inline CreateGrantRequest& WithRetiringPrincipal(const Aws::String& value) { SetRetiringPrincipal(value); return *this;}
104 inline CreateGrantRequest& WithRetiringPrincipal(Aws::String&& value) { SetRetiringPrincipal(std::move(value)); return *this;}
105 inline CreateGrantRequest& WithRetiringPrincipal(const char* value) { SetRetiringPrincipal(value); return *this;}
107
109
119 inline const Aws::Vector<GrantOperation>& GetOperations() const{ return m_operations; }
120 inline bool OperationsHasBeenSet() const { return m_operationsHasBeenSet; }
121 inline void SetOperations(const Aws::Vector<GrantOperation>& value) { m_operationsHasBeenSet = true; m_operations = value; }
122 inline void SetOperations(Aws::Vector<GrantOperation>&& value) { m_operationsHasBeenSet = true; m_operations = std::move(value); }
123 inline CreateGrantRequest& WithOperations(const Aws::Vector<GrantOperation>& value) { SetOperations(value); return *this;}
124 inline CreateGrantRequest& WithOperations(Aws::Vector<GrantOperation>&& value) { SetOperations(std::move(value)); return *this;}
125 inline CreateGrantRequest& AddOperations(const GrantOperation& value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; }
126 inline CreateGrantRequest& AddOperations(GrantOperation&& value) { m_operationsHasBeenSet = true; m_operations.push_back(std::move(value)); return *this; }
128
130
159 inline const GrantConstraints& GetConstraints() const{ return m_constraints; }
160 inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; }
161 inline void SetConstraints(const GrantConstraints& value) { m_constraintsHasBeenSet = true; m_constraints = value; }
162 inline void SetConstraints(GrantConstraints&& value) { m_constraintsHasBeenSet = true; m_constraints = std::move(value); }
163 inline CreateGrantRequest& WithConstraints(const GrantConstraints& value) { SetConstraints(value); return *this;}
164 inline CreateGrantRequest& WithConstraints(GrantConstraints&& value) { SetConstraints(std::move(value)); return *this;}
166
168
177 inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
178 inline bool GrantTokensHasBeenSet() const { return m_grantTokensHasBeenSet; }
179 inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
180 inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = std::move(value); }
181 inline CreateGrantRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
182 inline CreateGrantRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(std::move(value)); return *this;}
183 inline CreateGrantRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
184 inline CreateGrantRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(std::move(value)); return *this; }
185 inline CreateGrantRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
187
189
205 inline const Aws::String& GetName() const{ return m_name; }
206 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
207 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
208 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
209 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
210 inline CreateGrantRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
211 inline CreateGrantRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
212 inline CreateGrantRequest& WithName(const char* value) { SetName(value); return *this;}
214
216
222 inline bool GetDryRun() const{ return m_dryRun; }
223 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
224 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
225 inline CreateGrantRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
227 private:
228
229 Aws::String m_keyId;
230 bool m_keyIdHasBeenSet = false;
231
232 Aws::String m_granteePrincipal;
233 bool m_granteePrincipalHasBeenSet = false;
234
235 Aws::String m_retiringPrincipal;
236 bool m_retiringPrincipalHasBeenSet = false;
237
238 Aws::Vector<GrantOperation> m_operations;
239 bool m_operationsHasBeenSet = false;
240
241 GrantConstraints m_constraints;
242 bool m_constraintsHasBeenSet = false;
243
244 Aws::Vector<Aws::String> m_grantTokens;
245 bool m_grantTokensHasBeenSet = false;
246
247 Aws::String m_name;
248 bool m_nameHasBeenSet = false;
249
250 bool m_dryRun;
251 bool m_dryRunHasBeenSet = false;
252 };
253
254} // namespace Model
255} // namespace KMS
256} // namespace Aws
CreateGrantRequest & WithRetiringPrincipal(const Aws::String &value)
const GrantConstraints & GetConstraints() const
AWS_KMS_API Aws::String SerializePayload() const override
CreateGrantRequest & WithName(const char *value)
const Aws::String & GetKeyId() const
CreateGrantRequest & WithGranteePrincipal(const Aws::String &value)
CreateGrantRequest & AddGrantTokens(Aws::String &&value)
void SetKeyId(const Aws::String &value)
CreateGrantRequest & WithOperations(Aws::Vector< GrantOperation > &&value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
void SetGranteePrincipal(const char *value)
CreateGrantRequest & WithDryRun(bool value)
void SetOperations(Aws::Vector< GrantOperation > &&value)
CreateGrantRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
void SetGranteePrincipal(Aws::String &&value)
void SetOperations(const Aws::Vector< GrantOperation > &value)
AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetConstraints(const GrantConstraints &value)
CreateGrantRequest & AddOperations(const GrantOperation &value)
CreateGrantRequest & WithKeyId(const char *value)
CreateGrantRequest & WithGranteePrincipal(const char *value)
void SetRetiringPrincipal(const char *value)
const Aws::String & GetRetiringPrincipal() const
CreateGrantRequest & AddGrantTokens(const Aws::String &value)
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
void SetRetiringPrincipal(const Aws::String &value)
const Aws::String & GetName() const
CreateGrantRequest & WithRetiringPrincipal(Aws::String &&value)
CreateGrantRequest & WithKeyId(Aws::String &&value)
void SetGranteePrincipal(const Aws::String &value)
CreateGrantRequest & WithConstraints(const GrantConstraints &value)
CreateGrantRequest & AddGrantTokens(const char *value)
CreateGrantRequest & WithName(const Aws::String &value)
const Aws::Vector< GrantOperation > & GetOperations() const
CreateGrantRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
void SetConstraints(GrantConstraints &&value)
virtual const char * GetServiceRequestName() const override
CreateGrantRequest & WithName(Aws::String &&value)
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
CreateGrantRequest & WithKeyId(const Aws::String &value)
CreateGrantRequest & WithOperations(const Aws::Vector< GrantOperation > &value)
CreateGrantRequest & WithGranteePrincipal(Aws::String &&value)
void SetName(const Aws::String &value)
CreateGrantRequest & WithRetiringPrincipal(const char *value)
CreateGrantRequest & AddOperations(GrantOperation &&value)
CreateGrantRequest & WithConstraints(GrantConstraints &&value)
void SetRetiringPrincipal(Aws::String &&value)
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