AWS SDK for C++

AWS SDK for C++ Version 1.11.921

Loading...
Searching...
No Matches
Grant.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/license-manager/LicenseManager_EXPORTS.h>
10#include <aws/license-manager/model/AllowedOperation.h>
11#include <aws/license-manager/model/GrantStatus.h>
12#include <aws/license-manager/model/GrantType.h>
13#include <aws/license-manager/model/Options.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace LicenseManager {
25namespace Model {
26
32class Grant {
33 public:
34 AWS_LICENSEMANAGER_API Grant() = default;
35 AWS_LICENSEMANAGER_API Grant(Aws::Utils::Json::JsonView jsonValue);
36 AWS_LICENSEMANAGER_API Grant& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_LICENSEMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetGrantArn() const { return m_grantArn; }
44 inline bool GrantArnHasBeenSet() const { return m_grantArnHasBeenSet; }
45 template <typename GrantArnT = Aws::String>
46 void SetGrantArn(GrantArnT&& value) {
47 m_grantArnHasBeenSet = true;
48 m_grantArn = std::forward<GrantArnT>(value);
49 }
50 template <typename GrantArnT = Aws::String>
51 Grant& WithGrantArn(GrantArnT&& value) {
52 SetGrantArn(std::forward<GrantArnT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetGrantName() const { return m_grantName; }
62 inline bool GrantNameHasBeenSet() const { return m_grantNameHasBeenSet; }
63 template <typename GrantNameT = Aws::String>
64 void SetGrantName(GrantNameT&& value) {
65 m_grantNameHasBeenSet = true;
66 m_grantName = std::forward<GrantNameT>(value);
67 }
68 template <typename GrantNameT = Aws::String>
69 Grant& WithGrantName(GrantNameT&& value) {
70 SetGrantName(std::forward<GrantNameT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetParentArn() const { return m_parentArn; }
80 inline bool ParentArnHasBeenSet() const { return m_parentArnHasBeenSet; }
81 template <typename ParentArnT = Aws::String>
82 void SetParentArn(ParentArnT&& value) {
83 m_parentArnHasBeenSet = true;
84 m_parentArn = std::forward<ParentArnT>(value);
85 }
86 template <typename ParentArnT = Aws::String>
87 Grant& WithParentArn(ParentArnT&& value) {
88 SetParentArn(std::forward<ParentArnT>(value));
89 return *this;
90 }
92
94
97 inline const Aws::String& GetLicenseArn() const { return m_licenseArn; }
98 inline bool LicenseArnHasBeenSet() const { return m_licenseArnHasBeenSet; }
99 template <typename LicenseArnT = Aws::String>
100 void SetLicenseArn(LicenseArnT&& value) {
101 m_licenseArnHasBeenSet = true;
102 m_licenseArn = std::forward<LicenseArnT>(value);
103 }
104 template <typename LicenseArnT = Aws::String>
105 Grant& WithLicenseArn(LicenseArnT&& value) {
106 SetLicenseArn(std::forward<LicenseArnT>(value));
107 return *this;
108 }
110
112
115 inline const Aws::String& GetGranteePrincipalArn() const { return m_granteePrincipalArn; }
116 inline bool GranteePrincipalArnHasBeenSet() const { return m_granteePrincipalArnHasBeenSet; }
117 template <typename GranteePrincipalArnT = Aws::String>
118 void SetGranteePrincipalArn(GranteePrincipalArnT&& value) {
119 m_granteePrincipalArnHasBeenSet = true;
120 m_granteePrincipalArn = std::forward<GranteePrincipalArnT>(value);
121 }
122 template <typename GranteePrincipalArnT = Aws::String>
123 Grant& WithGranteePrincipalArn(GranteePrincipalArnT&& value) {
124 SetGranteePrincipalArn(std::forward<GranteePrincipalArnT>(value));
125 return *this;
126 }
128
130
133 inline const Aws::String& GetHomeRegion() const { return m_homeRegion; }
134 inline bool HomeRegionHasBeenSet() const { return m_homeRegionHasBeenSet; }
135 template <typename HomeRegionT = Aws::String>
136 void SetHomeRegion(HomeRegionT&& value) {
137 m_homeRegionHasBeenSet = true;
138 m_homeRegion = std::forward<HomeRegionT>(value);
139 }
140 template <typename HomeRegionT = Aws::String>
141 Grant& WithHomeRegion(HomeRegionT&& value) {
142 SetHomeRegion(std::forward<HomeRegionT>(value));
143 return *this;
144 }
146
148
151 inline GrantStatus GetGrantStatus() const { return m_grantStatus; }
152 inline bool GrantStatusHasBeenSet() const { return m_grantStatusHasBeenSet; }
153 inline void SetGrantStatus(GrantStatus value) {
154 m_grantStatusHasBeenSet = true;
155 m_grantStatus = value;
156 }
158 SetGrantStatus(value);
159 return *this;
160 }
162
164
167 inline const Aws::String& GetStatusReason() const { return m_statusReason; }
168 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
169 template <typename StatusReasonT = Aws::String>
170 void SetStatusReason(StatusReasonT&& value) {
171 m_statusReasonHasBeenSet = true;
172 m_statusReason = std::forward<StatusReasonT>(value);
173 }
174 template <typename StatusReasonT = Aws::String>
175 Grant& WithStatusReason(StatusReasonT&& value) {
176 SetStatusReason(std::forward<StatusReasonT>(value));
177 return *this;
178 }
180
182
185 inline const Aws::String& GetVersion() const { return m_version; }
186 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
187 template <typename VersionT = Aws::String>
188 void SetVersion(VersionT&& value) {
189 m_versionHasBeenSet = true;
190 m_version = std::forward<VersionT>(value);
191 }
192 template <typename VersionT = Aws::String>
193 Grant& WithVersion(VersionT&& value) {
194 SetVersion(std::forward<VersionT>(value));
195 return *this;
196 }
198
200
203 inline const Aws::Vector<AllowedOperation>& GetGrantedOperations() const { return m_grantedOperations; }
204 inline bool GrantedOperationsHasBeenSet() const { return m_grantedOperationsHasBeenSet; }
205 template <typename GrantedOperationsT = Aws::Vector<AllowedOperation>>
206 void SetGrantedOperations(GrantedOperationsT&& value) {
207 m_grantedOperationsHasBeenSet = true;
208 m_grantedOperations = std::forward<GrantedOperationsT>(value);
209 }
210 template <typename GrantedOperationsT = Aws::Vector<AllowedOperation>>
211 Grant& WithGrantedOperations(GrantedOperationsT&& value) {
212 SetGrantedOperations(std::forward<GrantedOperationsT>(value));
213 return *this;
214 }
216 m_grantedOperationsHasBeenSet = true;
217 m_grantedOperations.push_back(value);
218 return *this;
219 }
221
223
226 inline const Options& GetOptions() const { return m_options; }
227 inline bool OptionsHasBeenSet() const { return m_optionsHasBeenSet; }
228 template <typename OptionsT = Options>
229 void SetOptions(OptionsT&& value) {
230 m_optionsHasBeenSet = true;
231 m_options = std::forward<OptionsT>(value);
232 }
233 template <typename OptionsT = Options>
234 Grant& WithOptions(OptionsT&& value) {
235 SetOptions(std::forward<OptionsT>(value));
236 return *this;
237 }
239
241
248 inline GrantType GetGrantType() const { return m_grantType; }
249 inline bool GrantTypeHasBeenSet() const { return m_grantTypeHasBeenSet; }
250 inline void SetGrantType(GrantType value) {
251 m_grantTypeHasBeenSet = true;
252 m_grantType = value;
253 }
255 SetGrantType(value);
256 return *this;
257 }
259 private:
260 Aws::String m_grantArn;
261
262 Aws::String m_grantName;
263
264 Aws::String m_parentArn;
265
266 Aws::String m_licenseArn;
267
268 Aws::String m_granteePrincipalArn;
269
270 Aws::String m_homeRegion;
271
272 GrantStatus m_grantStatus{GrantStatus::NOT_SET};
273
274 Aws::String m_statusReason;
275
276 Aws::String m_version;
277
278 Aws::Vector<AllowedOperation> m_grantedOperations;
279
280 Options m_options;
281
282 GrantType m_grantType{GrantType::NOT_SET};
283 bool m_grantArnHasBeenSet = false;
284 bool m_grantNameHasBeenSet = false;
285 bool m_parentArnHasBeenSet = false;
286 bool m_licenseArnHasBeenSet = false;
287 bool m_granteePrincipalArnHasBeenSet = false;
288 bool m_homeRegionHasBeenSet = false;
289 bool m_grantStatusHasBeenSet = false;
290 bool m_statusReasonHasBeenSet = false;
291 bool m_versionHasBeenSet = false;
292 bool m_grantedOperationsHasBeenSet = false;
293 bool m_optionsHasBeenSet = false;
294 bool m_grantTypeHasBeenSet = false;
295};
296
297} // namespace Model
298} // namespace LicenseManager
299} // namespace Aws
Grant & AddGrantedOperations(AllowedOperation value)
Definition Grant.h:215
Grant & WithOptions(OptionsT &&value)
Definition Grant.h:234
void SetLicenseArn(LicenseArnT &&value)
Definition Grant.h:100
Grant & WithGrantArn(GrantArnT &&value)
Definition Grant.h:51
const Aws::String & GetLicenseArn() const
Definition Grant.h:97
Grant & WithHomeRegion(HomeRegionT &&value)
Definition Grant.h:141
const Aws::String & GetParentArn() const
Definition Grant.h:79
bool LicenseArnHasBeenSet() const
Definition Grant.h:98
const Aws::Vector< AllowedOperation > & GetGrantedOperations() const
Definition Grant.h:203
void SetVersion(VersionT &&value)
Definition Grant.h:188
void SetGranteePrincipalArn(GranteePrincipalArnT &&value)
Definition Grant.h:118
const Aws::String & GetGrantName() const
Definition Grant.h:61
void SetGrantType(GrantType value)
Definition Grant.h:250
Grant & WithGrantName(GrantNameT &&value)
Definition Grant.h:69
void SetGrantArn(GrantArnT &&value)
Definition Grant.h:46
void SetParentArn(ParentArnT &&value)
Definition Grant.h:82
AWS_LICENSEMANAGER_API Grant(Aws::Utils::Json::JsonView jsonValue)
Grant & WithStatusReason(StatusReasonT &&value)
Definition Grant.h:175
Grant & WithVersion(VersionT &&value)
Definition Grant.h:193
void SetGrantName(GrantNameT &&value)
Definition Grant.h:64
Grant & WithGrantStatus(GrantStatus value)
Definition Grant.h:157
bool GrantStatusHasBeenSet() const
Definition Grant.h:152
AWS_LICENSEMANAGER_API Grant & operator=(Aws::Utils::Json::JsonView jsonValue)
bool GrantArnHasBeenSet() const
Definition Grant.h:44
bool HomeRegionHasBeenSet() const
Definition Grant.h:134
Grant & WithLicenseArn(LicenseArnT &&value)
Definition Grant.h:105
Grant & WithGranteePrincipalArn(GranteePrincipalArnT &&value)
Definition Grant.h:123
bool StatusReasonHasBeenSet() const
Definition Grant.h:168
const Aws::String & GetHomeRegion() const
Definition Grant.h:133
GrantType GetGrantType() const
Definition Grant.h:248
bool GrantNameHasBeenSet() const
Definition Grant.h:62
GrantStatus GetGrantStatus() const
Definition Grant.h:151
const Aws::String & GetGranteePrincipalArn() const
Definition Grant.h:115
void SetGrantStatus(GrantStatus value)
Definition Grant.h:153
const Aws::String & GetStatusReason() const
Definition Grant.h:167
AWS_LICENSEMANAGER_API Grant()=default
const Options & GetOptions() const
Definition Grant.h:226
void SetGrantedOperations(GrantedOperationsT &&value)
Definition Grant.h:206
Grant & WithGrantType(GrantType value)
Definition Grant.h:254
Grant & WithGrantedOperations(GrantedOperationsT &&value)
Definition Grant.h:211
bool GranteePrincipalArnHasBeenSet() const
Definition Grant.h:116
void SetOptions(OptionsT &&value)
Definition Grant.h:229
void SetHomeRegion(HomeRegionT &&value)
Definition Grant.h:136
Grant & WithParentArn(ParentArnT &&value)
Definition Grant.h:87
bool ParentArnHasBeenSet() const
Definition Grant.h:80
AWS_LICENSEMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
bool GrantedOperationsHasBeenSet() const
Definition Grant.h:204
const Aws::String & GetGrantArn() const
Definition Grant.h:43
void SetStatusReason(StatusReasonT &&value)
Definition Grant.h:170
const Aws::String & GetVersion() const
Definition Grant.h:185
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue