AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
GrantListEntry.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/kms/KMS_EXPORTS.h>
11#include <aws/kms/model/GrantConstraints.h>
12#include <aws/kms/model/GrantOperation.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace KMS {
24namespace Model {
25
32 public:
33 AWS_KMS_API GrantListEntry() = default;
37
39
42 inline const Aws::String& GetKeyId() const { return m_keyId; }
43 inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
44 template <typename KeyIdT = Aws::String>
45 void SetKeyId(KeyIdT&& value) {
46 m_keyIdHasBeenSet = true;
47 m_keyId = std::forward<KeyIdT>(value);
48 }
49 template <typename KeyIdT = Aws::String>
50 GrantListEntry& WithKeyId(KeyIdT&& value) {
51 SetKeyId(std::forward<KeyIdT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetGrantId() const { return m_grantId; }
61 inline bool GrantIdHasBeenSet() const { return m_grantIdHasBeenSet; }
62 template <typename GrantIdT = Aws::String>
63 void SetGrantId(GrantIdT&& value) {
64 m_grantIdHasBeenSet = true;
65 m_grantId = std::forward<GrantIdT>(value);
66 }
67 template <typename GrantIdT = Aws::String>
68 GrantListEntry& WithGrantId(GrantIdT&& value) {
69 SetGrantId(std::forward<GrantIdT>(value));
70 return *this;
71 }
73
75
80 inline const Aws::String& GetName() const { return m_name; }
81 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
82 template <typename NameT = Aws::String>
83 void SetName(NameT&& value) {
84 m_nameHasBeenSet = true;
85 m_name = std::forward<NameT>(value);
86 }
87 template <typename NameT = Aws::String>
88 GrantListEntry& WithName(NameT&& value) {
89 SetName(std::forward<NameT>(value));
90 return *this;
91 }
93
95
98 inline const Aws::Utils::DateTime& GetCreationDate() const { return m_creationDate; }
99 inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; }
100 template <typename CreationDateT = Aws::Utils::DateTime>
101 void SetCreationDate(CreationDateT&& value) {
102 m_creationDateHasBeenSet = true;
103 m_creationDate = std::forward<CreationDateT>(value);
104 }
105 template <typename CreationDateT = Aws::Utils::DateTime>
106 GrantListEntry& WithCreationDate(CreationDateT&& value) {
107 SetCreationDate(std::forward<CreationDateT>(value));
108 return *this;
109 }
111
113
122 inline const Aws::String& GetGranteePrincipal() const { return m_granteePrincipal; }
123 inline bool GranteePrincipalHasBeenSet() const { return m_granteePrincipalHasBeenSet; }
124 template <typename GranteePrincipalT = Aws::String>
125 void SetGranteePrincipal(GranteePrincipalT&& value) {
126 m_granteePrincipalHasBeenSet = true;
127 m_granteePrincipal = std::forward<GranteePrincipalT>(value);
128 }
129 template <typename GranteePrincipalT = Aws::String>
130 GrantListEntry& WithGranteePrincipal(GranteePrincipalT&& value) {
131 SetGranteePrincipal(std::forward<GranteePrincipalT>(value));
132 return *this;
133 }
135
137
140 inline const Aws::String& GetRetiringPrincipal() const { return m_retiringPrincipal; }
141 inline bool RetiringPrincipalHasBeenSet() const { return m_retiringPrincipalHasBeenSet; }
142 template <typename RetiringPrincipalT = Aws::String>
143 void SetRetiringPrincipal(RetiringPrincipalT&& value) {
144 m_retiringPrincipalHasBeenSet = true;
145 m_retiringPrincipal = std::forward<RetiringPrincipalT>(value);
146 }
147 template <typename RetiringPrincipalT = Aws::String>
148 GrantListEntry& WithRetiringPrincipal(RetiringPrincipalT&& value) {
149 SetRetiringPrincipal(std::forward<RetiringPrincipalT>(value));
150 return *this;
151 }
153
155
158 inline const Aws::String& GetIssuingAccount() const { return m_issuingAccount; }
159 inline bool IssuingAccountHasBeenSet() const { return m_issuingAccountHasBeenSet; }
160 template <typename IssuingAccountT = Aws::String>
161 void SetIssuingAccount(IssuingAccountT&& value) {
162 m_issuingAccountHasBeenSet = true;
163 m_issuingAccount = std::forward<IssuingAccountT>(value);
164 }
165 template <typename IssuingAccountT = Aws::String>
166 GrantListEntry& WithIssuingAccount(IssuingAccountT&& value) {
167 SetIssuingAccount(std::forward<IssuingAccountT>(value));
168 return *this;
169 }
171
173
176 inline const Aws::Vector<GrantOperation>& GetOperations() const { return m_operations; }
177 inline bool OperationsHasBeenSet() const { return m_operationsHasBeenSet; }
178 template <typename OperationsT = Aws::Vector<GrantOperation>>
179 void SetOperations(OperationsT&& value) {
180 m_operationsHasBeenSet = true;
181 m_operations = std::forward<OperationsT>(value);
182 }
183 template <typename OperationsT = Aws::Vector<GrantOperation>>
184 GrantListEntry& WithOperations(OperationsT&& value) {
185 SetOperations(std::forward<OperationsT>(value));
186 return *this;
187 }
189 m_operationsHasBeenSet = true;
190 m_operations.push_back(value);
191 return *this;
192 }
194
196
200 inline const GrantConstraints& GetConstraints() const { return m_constraints; }
201 inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; }
202 template <typename ConstraintsT = GrantConstraints>
203 void SetConstraints(ConstraintsT&& value) {
204 m_constraintsHasBeenSet = true;
205 m_constraints = std::forward<ConstraintsT>(value);
206 }
207 template <typename ConstraintsT = GrantConstraints>
208 GrantListEntry& WithConstraints(ConstraintsT&& value) {
209 SetConstraints(std::forward<ConstraintsT>(value));
210 return *this;
211 }
213 private:
214 Aws::String m_keyId;
215
216 Aws::String m_grantId;
217
218 Aws::String m_name;
219
220 Aws::Utils::DateTime m_creationDate{};
221
222 Aws::String m_granteePrincipal;
223
224 Aws::String m_retiringPrincipal;
225
226 Aws::String m_issuingAccount;
227
228 Aws::Vector<GrantOperation> m_operations;
229
230 GrantConstraints m_constraints;
231 bool m_keyIdHasBeenSet = false;
232 bool m_grantIdHasBeenSet = false;
233 bool m_nameHasBeenSet = false;
234 bool m_creationDateHasBeenSet = false;
235 bool m_granteePrincipalHasBeenSet = false;
236 bool m_retiringPrincipalHasBeenSet = false;
237 bool m_issuingAccountHasBeenSet = false;
238 bool m_operationsHasBeenSet = false;
239 bool m_constraintsHasBeenSet = false;
240};
241
242} // namespace Model
243} // namespace KMS
244} // namespace Aws
GrantListEntry & WithGrantId(GrantIdT &&value)
bool OperationsHasBeenSet() const
const Aws::Utils::DateTime & GetCreationDate() const
bool ConstraintsHasBeenSet() const
void SetIssuingAccount(IssuingAccountT &&value)
bool IssuingAccountHasBeenSet() const
GrantListEntry & WithGranteePrincipal(GranteePrincipalT &&value)
bool RetiringPrincipalHasBeenSet() const
AWS_KMS_API GrantListEntry(Aws::Utils::Json::JsonView jsonValue)
bool NameHasBeenSet() const
AWS_KMS_API GrantListEntry & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetIssuingAccount() const
GrantListEntry & WithIssuingAccount(IssuingAccountT &&value)
bool KeyIdHasBeenSet() const
void SetRetiringPrincipal(RetiringPrincipalT &&value)
void SetKeyId(KeyIdT &&value)
void SetGranteePrincipal(GranteePrincipalT &&value)
bool CreationDateHasBeenSet() const
void SetGrantId(GrantIdT &&value)
bool GranteePrincipalHasBeenSet() const
GrantListEntry & WithName(NameT &&value)
GrantListEntry & WithRetiringPrincipal(RetiringPrincipalT &&value)
GrantListEntry & WithKeyId(KeyIdT &&value)
GrantListEntry & WithOperations(OperationsT &&value)
void SetConstraints(ConstraintsT &&value)
GrantListEntry & WithConstraints(ConstraintsT &&value)
void SetOperations(OperationsT &&value)
void SetName(NameT &&value)
AWS_KMS_API Aws::Utils::Json::JsonValue Jsonize() const
const GrantConstraints & GetConstraints() const
const Aws::String & GetGranteePrincipal() const
const Aws::String & GetName() const
const Aws::String & GetGrantId() const
AWS_KMS_API GrantListEntry()=default
const Aws::Vector< GrantOperation > & GetOperations() const
GrantListEntry & WithCreationDate(CreationDateT &&value)
bool GrantIdHasBeenSet() const
const Aws::String & GetRetiringPrincipal() const
const Aws::String & GetKeyId() const
void SetCreationDate(CreationDateT &&value)
GrantListEntry & AddOperations(GrantOperation value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue