AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Grant.h
1
6#pragma once
7#include <aws/license-manager/LicenseManager_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/license-manager/model/GrantStatus.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/license-manager/model/Options.h>
12#include <aws/license-manager/model/AllowedOperation.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Json
20{
21 class JsonValue;
22 class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace LicenseManager
26{
27namespace Model
28{
29
35 class Grant
36 {
37 public:
38 AWS_LICENSEMANAGER_API Grant() = default;
39 AWS_LICENSEMANAGER_API Grant(Aws::Utils::Json::JsonView jsonValue);
40 AWS_LICENSEMANAGER_API Grant& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_LICENSEMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline const Aws::String& GetGrantArn() const { return m_grantArn; }
49 inline bool GrantArnHasBeenSet() const { return m_grantArnHasBeenSet; }
50 template<typename GrantArnT = Aws::String>
51 void SetGrantArn(GrantArnT&& value) { m_grantArnHasBeenSet = true; m_grantArn = std::forward<GrantArnT>(value); }
52 template<typename GrantArnT = Aws::String>
53 Grant& WithGrantArn(GrantArnT&& value) { SetGrantArn(std::forward<GrantArnT>(value)); return *this;}
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) { m_grantNameHasBeenSet = true; m_grantName = std::forward<GrantNameT>(value); }
64 template<typename GrantNameT = Aws::String>
65 Grant& WithGrantName(GrantNameT&& value) { SetGrantName(std::forward<GrantNameT>(value)); return *this;}
67
69
72 inline const Aws::String& GetParentArn() const { return m_parentArn; }
73 inline bool ParentArnHasBeenSet() const { return m_parentArnHasBeenSet; }
74 template<typename ParentArnT = Aws::String>
75 void SetParentArn(ParentArnT&& value) { m_parentArnHasBeenSet = true; m_parentArn = std::forward<ParentArnT>(value); }
76 template<typename ParentArnT = Aws::String>
77 Grant& WithParentArn(ParentArnT&& value) { SetParentArn(std::forward<ParentArnT>(value)); return *this;}
79
81
84 inline const Aws::String& GetLicenseArn() const { return m_licenseArn; }
85 inline bool LicenseArnHasBeenSet() const { return m_licenseArnHasBeenSet; }
86 template<typename LicenseArnT = Aws::String>
87 void SetLicenseArn(LicenseArnT&& value) { m_licenseArnHasBeenSet = true; m_licenseArn = std::forward<LicenseArnT>(value); }
88 template<typename LicenseArnT = Aws::String>
89 Grant& WithLicenseArn(LicenseArnT&& value) { SetLicenseArn(std::forward<LicenseArnT>(value)); return *this;}
91
93
96 inline const Aws::String& GetGranteePrincipalArn() const { return m_granteePrincipalArn; }
97 inline bool GranteePrincipalArnHasBeenSet() const { return m_granteePrincipalArnHasBeenSet; }
98 template<typename GranteePrincipalArnT = Aws::String>
99 void SetGranteePrincipalArn(GranteePrincipalArnT&& value) { m_granteePrincipalArnHasBeenSet = true; m_granteePrincipalArn = std::forward<GranteePrincipalArnT>(value); }
100 template<typename GranteePrincipalArnT = Aws::String>
101 Grant& WithGranteePrincipalArn(GranteePrincipalArnT&& value) { SetGranteePrincipalArn(std::forward<GranteePrincipalArnT>(value)); return *this;}
103
105
108 inline const Aws::String& GetHomeRegion() const { return m_homeRegion; }
109 inline bool HomeRegionHasBeenSet() const { return m_homeRegionHasBeenSet; }
110 template<typename HomeRegionT = Aws::String>
111 void SetHomeRegion(HomeRegionT&& value) { m_homeRegionHasBeenSet = true; m_homeRegion = std::forward<HomeRegionT>(value); }
112 template<typename HomeRegionT = Aws::String>
113 Grant& WithHomeRegion(HomeRegionT&& value) { SetHomeRegion(std::forward<HomeRegionT>(value)); return *this;}
115
117
120 inline GrantStatus GetGrantStatus() const { return m_grantStatus; }
121 inline bool GrantStatusHasBeenSet() const { return m_grantStatusHasBeenSet; }
122 inline void SetGrantStatus(GrantStatus value) { m_grantStatusHasBeenSet = true; m_grantStatus = value; }
123 inline Grant& WithGrantStatus(GrantStatus value) { SetGrantStatus(value); return *this;}
125
127
130 inline const Aws::String& GetStatusReason() const { return m_statusReason; }
131 inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
132 template<typename StatusReasonT = Aws::String>
133 void SetStatusReason(StatusReasonT&& value) { m_statusReasonHasBeenSet = true; m_statusReason = std::forward<StatusReasonT>(value); }
134 template<typename StatusReasonT = Aws::String>
135 Grant& WithStatusReason(StatusReasonT&& value) { SetStatusReason(std::forward<StatusReasonT>(value)); return *this;}
137
139
142 inline const Aws::String& GetVersion() const { return m_version; }
143 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
144 template<typename VersionT = Aws::String>
145 void SetVersion(VersionT&& value) { m_versionHasBeenSet = true; m_version = std::forward<VersionT>(value); }
146 template<typename VersionT = Aws::String>
147 Grant& WithVersion(VersionT&& value) { SetVersion(std::forward<VersionT>(value)); return *this;}
149
151
154 inline const Aws::Vector<AllowedOperation>& GetGrantedOperations() const { return m_grantedOperations; }
155 inline bool GrantedOperationsHasBeenSet() const { return m_grantedOperationsHasBeenSet; }
156 template<typename GrantedOperationsT = Aws::Vector<AllowedOperation>>
157 void SetGrantedOperations(GrantedOperationsT&& value) { m_grantedOperationsHasBeenSet = true; m_grantedOperations = std::forward<GrantedOperationsT>(value); }
158 template<typename GrantedOperationsT = Aws::Vector<AllowedOperation>>
159 Grant& WithGrantedOperations(GrantedOperationsT&& value) { SetGrantedOperations(std::forward<GrantedOperationsT>(value)); return *this;}
160 inline Grant& AddGrantedOperations(AllowedOperation value) { m_grantedOperationsHasBeenSet = true; m_grantedOperations.push_back(value); return *this; }
162
164
167 inline const Options& GetOptions() const { return m_options; }
168 inline bool OptionsHasBeenSet() const { return m_optionsHasBeenSet; }
169 template<typename OptionsT = Options>
170 void SetOptions(OptionsT&& value) { m_optionsHasBeenSet = true; m_options = std::forward<OptionsT>(value); }
171 template<typename OptionsT = Options>
172 Grant& WithOptions(OptionsT&& value) { SetOptions(std::forward<OptionsT>(value)); return *this;}
174 private:
175
176 Aws::String m_grantArn;
177 bool m_grantArnHasBeenSet = false;
178
179 Aws::String m_grantName;
180 bool m_grantNameHasBeenSet = false;
181
182 Aws::String m_parentArn;
183 bool m_parentArnHasBeenSet = false;
184
185 Aws::String m_licenseArn;
186 bool m_licenseArnHasBeenSet = false;
187
188 Aws::String m_granteePrincipalArn;
189 bool m_granteePrincipalArnHasBeenSet = false;
190
191 Aws::String m_homeRegion;
192 bool m_homeRegionHasBeenSet = false;
193
194 GrantStatus m_grantStatus{GrantStatus::NOT_SET};
195 bool m_grantStatusHasBeenSet = false;
196
197 Aws::String m_statusReason;
198 bool m_statusReasonHasBeenSet = false;
199
200 Aws::String m_version;
201 bool m_versionHasBeenSet = false;
202
203 Aws::Vector<AllowedOperation> m_grantedOperations;
204 bool m_grantedOperationsHasBeenSet = false;
205
206 Options m_options;
207 bool m_optionsHasBeenSet = false;
208 };
209
210} // namespace Model
211} // namespace LicenseManager
212} // namespace Aws
Grant & AddGrantedOperations(AllowedOperation value)
Definition Grant.h:160
Grant & WithOptions(OptionsT &&value)
Definition Grant.h:172
void SetLicenseArn(LicenseArnT &&value)
Definition Grant.h:87
Grant & WithGrantArn(GrantArnT &&value)
Definition Grant.h:53
const Aws::String & GetLicenseArn() const
Definition Grant.h:84
Grant & WithHomeRegion(HomeRegionT &&value)
Definition Grant.h:113
const Aws::String & GetParentArn() const
Definition Grant.h:72
bool LicenseArnHasBeenSet() const
Definition Grant.h:85
const Aws::Vector< AllowedOperation > & GetGrantedOperations() const
Definition Grant.h:154
void SetVersion(VersionT &&value)
Definition Grant.h:145
void SetGranteePrincipalArn(GranteePrincipalArnT &&value)
Definition Grant.h:99
const Aws::String & GetGrantName() const
Definition Grant.h:60
Grant & WithGrantName(GrantNameT &&value)
Definition Grant.h:65
void SetGrantArn(GrantArnT &&value)
Definition Grant.h:51
void SetParentArn(ParentArnT &&value)
Definition Grant.h:75
AWS_LICENSEMANAGER_API Grant(Aws::Utils::Json::JsonView jsonValue)
Grant & WithStatusReason(StatusReasonT &&value)
Definition Grant.h:135
Grant & WithVersion(VersionT &&value)
Definition Grant.h:147
void SetGrantName(GrantNameT &&value)
Definition Grant.h:63
Grant & WithGrantStatus(GrantStatus value)
Definition Grant.h:123
bool GrantStatusHasBeenSet() const
Definition Grant.h:121
AWS_LICENSEMANAGER_API Grant & operator=(Aws::Utils::Json::JsonView jsonValue)
bool GrantArnHasBeenSet() const
Definition Grant.h:49
bool HomeRegionHasBeenSet() const
Definition Grant.h:109
Grant & WithLicenseArn(LicenseArnT &&value)
Definition Grant.h:89
Grant & WithGranteePrincipalArn(GranteePrincipalArnT &&value)
Definition Grant.h:101
bool StatusReasonHasBeenSet() const
Definition Grant.h:131
const Aws::String & GetHomeRegion() const
Definition Grant.h:108
bool GrantNameHasBeenSet() const
Definition Grant.h:61
GrantStatus GetGrantStatus() const
Definition Grant.h:120
const Aws::String & GetGranteePrincipalArn() const
Definition Grant.h:96
void SetGrantStatus(GrantStatus value)
Definition Grant.h:122
const Aws::String & GetStatusReason() const
Definition Grant.h:130
AWS_LICENSEMANAGER_API Grant()=default
const Options & GetOptions() const
Definition Grant.h:167
void SetGrantedOperations(GrantedOperationsT &&value)
Definition Grant.h:157
Grant & WithGrantedOperations(GrantedOperationsT &&value)
Definition Grant.h:159
bool GranteePrincipalArnHasBeenSet() const
Definition Grant.h:97
void SetOptions(OptionsT &&value)
Definition Grant.h:170
void SetHomeRegion(HomeRegionT &&value)
Definition Grant.h:111
Grant & WithParentArn(ParentArnT &&value)
Definition Grant.h:77
bool ParentArnHasBeenSet() const
Definition Grant.h:73
AWS_LICENSEMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const
bool GrantedOperationsHasBeenSet() const
Definition Grant.h:155
const Aws::String & GetGrantArn() const
Definition Grant.h:48
void SetStatusReason(StatusReasonT &&value)
Definition Grant.h:133
const Aws::String & GetVersion() const
Definition Grant.h:142
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue