AWS SDK for C++

AWS SDK for C++ Version 1.11.716

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/Options.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace LicenseManager {
24namespace Model {
25
31class Grant {
32 public:
33 AWS_LICENSEMANAGER_API Grant() = default;
34 AWS_LICENSEMANAGER_API Grant(Aws::Utils::Json::JsonView jsonValue);
35 AWS_LICENSEMANAGER_API Grant& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_LICENSEMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetGrantArn() const { return m_grantArn; }
43 inline bool GrantArnHasBeenSet() const { return m_grantArnHasBeenSet; }
44 template <typename GrantArnT = Aws::String>
45 void SetGrantArn(GrantArnT&& value) {
46 m_grantArnHasBeenSet = true;
47 m_grantArn = std::forward<GrantArnT>(value);
48 }
49 template <typename GrantArnT = Aws::String>
50 Grant& WithGrantArn(GrantArnT&& value) {
51 SetGrantArn(std::forward<GrantArnT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetGrantName() const { return m_grantName; }
61 inline bool GrantNameHasBeenSet() const { return m_grantNameHasBeenSet; }
62 template <typename GrantNameT = Aws::String>
63 void SetGrantName(GrantNameT&& value) {
64 m_grantNameHasBeenSet = true;
65 m_grantName = std::forward<GrantNameT>(value);
66 }
67 template <typename GrantNameT = Aws::String>
68 Grant& WithGrantName(GrantNameT&& value) {
69 SetGrantName(std::forward<GrantNameT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::String& GetParentArn() const { return m_parentArn; }
79 inline bool ParentArnHasBeenSet() const { return m_parentArnHasBeenSet; }
80 template <typename ParentArnT = Aws::String>
81 void SetParentArn(ParentArnT&& value) {
82 m_parentArnHasBeenSet = true;
83 m_parentArn = std::forward<ParentArnT>(value);
84 }
85 template <typename ParentArnT = Aws::String>
86 Grant& WithParentArn(ParentArnT&& value) {
87 SetParentArn(std::forward<ParentArnT>(value));
88 return *this;
89 }
91
93
96 inline const Aws::String& GetLicenseArn() const { return m_licenseArn; }
97 inline bool LicenseArnHasBeenSet() const { return m_licenseArnHasBeenSet; }
98 template <typename LicenseArnT = Aws::String>
99 void SetLicenseArn(LicenseArnT&& value) {
100 m_licenseArnHasBeenSet = true;
101 m_licenseArn = std::forward<LicenseArnT>(value);
102 }
103 template <typename LicenseArnT = Aws::String>
104 Grant& WithLicenseArn(LicenseArnT&& value) {
105 SetLicenseArn(std::forward<LicenseArnT>(value));
106 return *this;
107 }
109
111
114 inline const Aws::String& GetGranteePrincipalArn() const { return m_granteePrincipalArn; }
115 inline bool GranteePrincipalArnHasBeenSet() const { return m_granteePrincipalArnHasBeenSet; }
116 template <typename GranteePrincipalArnT = Aws::String>
117 void SetGranteePrincipalArn(GranteePrincipalArnT&& value) {
118 m_granteePrincipalArnHasBeenSet = true;
119 m_granteePrincipalArn = std::forward<GranteePrincipalArnT>(value);
120 }
121 template <typename GranteePrincipalArnT = Aws::String>
122 Grant& WithGranteePrincipalArn(GranteePrincipalArnT&& value) {
123 SetGranteePrincipalArn(std::forward<GranteePrincipalArnT>(value));
124 return *this;
125 }
127
129
132 inline const Aws::String& GetHomeRegion() const { return m_homeRegion; }
133 inline bool HomeRegionHasBeenSet() const { return m_homeRegionHasBeenSet; }
134 template <typename HomeRegionT = Aws::String>
135 void SetHomeRegion(HomeRegionT&& value) {
136 m_homeRegionHasBeenSet = true;
137 m_homeRegion = std::forward<HomeRegionT>(value);
138 }
139 template <typename HomeRegionT = Aws::String>
140 Grant& WithHomeRegion(HomeRegionT&& value) {
141 SetHomeRegion(std::forward<HomeRegionT>(value));
142 return *this;
143 }
145
147
150 inline GrantStatus GetGrantStatus() const { return m_grantStatus; }
151 inline bool GrantStatusHasBeenSet() const { return m_grantStatusHasBeenSet; }
152 inline void SetGrantStatus(GrantStatus value) {
153 m_grantStatusHasBeenSet = true;
154 m_grantStatus = value;
155 }
157 SetGrantStatus(value);
158 return *this;
159 }
161
163
166 inline const Aws::String& GetStatusReason() const { return m_statusReason; }
167 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
168 template <typename StatusReasonT = Aws::String>
169 void SetStatusReason(StatusReasonT&& value) {
170 m_statusReasonHasBeenSet = true;
171 m_statusReason = std::forward<StatusReasonT>(value);
172 }
173 template <typename StatusReasonT = Aws::String>
174 Grant& WithStatusReason(StatusReasonT&& value) {
175 SetStatusReason(std::forward<StatusReasonT>(value));
176 return *this;
177 }
179
181
184 inline const Aws::String& GetVersion() const { return m_version; }
185 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
186 template <typename VersionT = Aws::String>
187 void SetVersion(VersionT&& value) {
188 m_versionHasBeenSet = true;
189 m_version = std::forward<VersionT>(value);
190 }
191 template <typename VersionT = Aws::String>
192 Grant& WithVersion(VersionT&& value) {
193 SetVersion(std::forward<VersionT>(value));
194 return *this;
195 }
197
199
202 inline const Aws::Vector<AllowedOperation>& GetGrantedOperations() const { return m_grantedOperations; }
203 inline bool GrantedOperationsHasBeenSet() const { return m_grantedOperationsHasBeenSet; }
204 template <typename GrantedOperationsT = Aws::Vector<AllowedOperation>>
205 void SetGrantedOperations(GrantedOperationsT&& value) {
206 m_grantedOperationsHasBeenSet = true;
207 m_grantedOperations = std::forward<GrantedOperationsT>(value);
208 }
209 template <typename GrantedOperationsT = Aws::Vector<AllowedOperation>>
210 Grant& WithGrantedOperations(GrantedOperationsT&& value) {
211 SetGrantedOperations(std::forward<GrantedOperationsT>(value));
212 return *this;
213 }
215 m_grantedOperationsHasBeenSet = true;
216 m_grantedOperations.push_back(value);
217 return *this;
218 }
220
222
225 inline const Options& GetOptions() const { return m_options; }
226 inline bool OptionsHasBeenSet() const { return m_optionsHasBeenSet; }
227 template <typename OptionsT = Options>
228 void SetOptions(OptionsT&& value) {
229 m_optionsHasBeenSet = true;
230 m_options = std::forward<OptionsT>(value);
231 }
232 template <typename OptionsT = Options>
233 Grant& WithOptions(OptionsT&& value) {
234 SetOptions(std::forward<OptionsT>(value));
235 return *this;
236 }
238 private:
239 Aws::String m_grantArn;
240
241 Aws::String m_grantName;
242
243 Aws::String m_parentArn;
244
245 Aws::String m_licenseArn;
246
247 Aws::String m_granteePrincipalArn;
248
249 Aws::String m_homeRegion;
250
251 GrantStatus m_grantStatus{GrantStatus::NOT_SET};
252
253 Aws::String m_statusReason;
254
255 Aws::String m_version;
256
257 Aws::Vector<AllowedOperation> m_grantedOperations;
258
259 Options m_options;
260 bool m_grantArnHasBeenSet = false;
261 bool m_grantNameHasBeenSet = false;
262 bool m_parentArnHasBeenSet = false;
263 bool m_licenseArnHasBeenSet = false;
264 bool m_granteePrincipalArnHasBeenSet = false;
265 bool m_homeRegionHasBeenSet = false;
266 bool m_grantStatusHasBeenSet = false;
267 bool m_statusReasonHasBeenSet = false;
268 bool m_versionHasBeenSet = false;
269 bool m_grantedOperationsHasBeenSet = false;
270 bool m_optionsHasBeenSet = false;
271};
272
273} // namespace Model
274} // namespace LicenseManager
275} // namespace Aws
Grant & AddGrantedOperations(AllowedOperation value)
Definition Grant.h:214
Grant & WithOptions(OptionsT &&value)
Definition Grant.h:233
void SetLicenseArn(LicenseArnT &&value)
Definition Grant.h:99
Grant & WithGrantArn(GrantArnT &&value)
Definition Grant.h:50
const Aws::String & GetLicenseArn() const
Definition Grant.h:96
Grant & WithHomeRegion(HomeRegionT &&value)
Definition Grant.h:140
const Aws::String & GetParentArn() const
Definition Grant.h:78
bool LicenseArnHasBeenSet() const
Definition Grant.h:97
const Aws::Vector< AllowedOperation > & GetGrantedOperations() const
Definition Grant.h:202
void SetVersion(VersionT &&value)
Definition Grant.h:187
void SetGranteePrincipalArn(GranteePrincipalArnT &&value)
Definition Grant.h:117
const Aws::String & GetGrantName() const
Definition Grant.h:60
Grant & WithGrantName(GrantNameT &&value)
Definition Grant.h:68
void SetGrantArn(GrantArnT &&value)
Definition Grant.h:45
void SetParentArn(ParentArnT &&value)
Definition Grant.h:81
AWS_LICENSEMANAGER_API Grant(Aws::Utils::Json::JsonView jsonValue)
Grant & WithStatusReason(StatusReasonT &&value)
Definition Grant.h:174
Grant & WithVersion(VersionT &&value)
Definition Grant.h:192
void SetGrantName(GrantNameT &&value)
Definition Grant.h:63
Grant & WithGrantStatus(GrantStatus value)
Definition Grant.h:156
bool GrantStatusHasBeenSet() const
Definition Grant.h:151
AWS_LICENSEMANAGER_API Grant & operator=(Aws::Utils::Json::JsonView jsonValue)
bool GrantArnHasBeenSet() const
Definition Grant.h:43
bool HomeRegionHasBeenSet() const
Definition Grant.h:133
Grant & WithLicenseArn(LicenseArnT &&value)
Definition Grant.h:104
Grant & WithGranteePrincipalArn(GranteePrincipalArnT &&value)
Definition Grant.h:122
bool StatusReasonHasBeenSet() const
Definition Grant.h:167
const Aws::String & GetHomeRegion() const
Definition Grant.h:132
bool GrantNameHasBeenSet() const
Definition Grant.h:61
GrantStatus GetGrantStatus() const
Definition Grant.h:150
const Aws::String & GetGranteePrincipalArn() const
Definition Grant.h:114
void SetGrantStatus(GrantStatus value)
Definition Grant.h:152
const Aws::String & GetStatusReason() const
Definition Grant.h:166
AWS_LICENSEMANAGER_API Grant()=default
const Options & GetOptions() const
Definition Grant.h:225
void SetGrantedOperations(GrantedOperationsT &&value)
Definition Grant.h:205
Grant & WithGrantedOperations(GrantedOperationsT &&value)
Definition Grant.h:210
bool GranteePrincipalArnHasBeenSet() const
Definition Grant.h:115
void SetOptions(OptionsT &&value)
Definition Grant.h:228
void SetHomeRegion(HomeRegionT &&value)
Definition Grant.h:135
Grant & WithParentArn(ParentArnT &&value)
Definition Grant.h:86
bool ParentArnHasBeenSet() const
Definition Grant.h:79
AWS_LICENSEMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
bool GrantedOperationsHasBeenSet() const
Definition Grant.h:203
const Aws::String & GetGrantArn() const
Definition Grant.h:42
void SetStatusReason(StatusReasonT &&value)
Definition Grant.h:169
const Aws::String & GetVersion() const
Definition Grant.h:184
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue