AWS SDK for C++

AWS SDK for C++ Version 1.11.681

Loading...
Searching...
No Matches
CreateGrantRequest.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/LicenseManagerRequest.h>
10#include <aws/license-manager/LicenseManager_EXPORTS.h>
11#include <aws/license-manager/model/AllowedOperation.h>
12#include <aws/license-manager/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace LicenseManager {
18namespace Model {
19
23 public:
24 AWS_LICENSEMANAGER_API CreateGrantRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "CreateGrant"; }
31
32 AWS_LICENSEMANAGER_API Aws::String SerializePayload() const override;
33
34 AWS_LICENSEMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
35
37
41 inline const Aws::String& GetClientToken() const { return m_clientToken; }
42 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
43 template <typename ClientTokenT = Aws::String>
44 void SetClientToken(ClientTokenT&& value) {
45 m_clientTokenHasBeenSet = true;
46 m_clientToken = std::forward<ClientTokenT>(value);
47 }
48 template <typename ClientTokenT = Aws::String>
49 CreateGrantRequest& WithClientToken(ClientTokenT&& value) {
50 SetClientToken(std::forward<ClientTokenT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetGrantName() const { return m_grantName; }
60 inline bool GrantNameHasBeenSet() const { return m_grantNameHasBeenSet; }
61 template <typename GrantNameT = Aws::String>
62 void SetGrantName(GrantNameT&& value) {
63 m_grantNameHasBeenSet = true;
64 m_grantName = std::forward<GrantNameT>(value);
65 }
66 template <typename GrantNameT = Aws::String>
67 CreateGrantRequest& WithGrantName(GrantNameT&& value) {
68 SetGrantName(std::forward<GrantNameT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetLicenseArn() const { return m_licenseArn; }
78 inline bool LicenseArnHasBeenSet() const { return m_licenseArnHasBeenSet; }
79 template <typename LicenseArnT = Aws::String>
80 void SetLicenseArn(LicenseArnT&& value) {
81 m_licenseArnHasBeenSet = true;
82 m_licenseArn = std::forward<LicenseArnT>(value);
83 }
84 template <typename LicenseArnT = Aws::String>
85 CreateGrantRequest& WithLicenseArn(LicenseArnT&& value) {
86 SetLicenseArn(std::forward<LicenseArnT>(value));
87 return *this;
88 }
90
92
100 inline const Aws::Vector<Aws::String>& GetPrincipals() const { return m_principals; }
101 inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; }
102 template <typename PrincipalsT = Aws::Vector<Aws::String>>
103 void SetPrincipals(PrincipalsT&& value) {
104 m_principalsHasBeenSet = true;
105 m_principals = std::forward<PrincipalsT>(value);
106 }
107 template <typename PrincipalsT = Aws::Vector<Aws::String>>
108 CreateGrantRequest& WithPrincipals(PrincipalsT&& value) {
109 SetPrincipals(std::forward<PrincipalsT>(value));
110 return *this;
111 }
112 template <typename PrincipalsT = Aws::String>
113 CreateGrantRequest& AddPrincipals(PrincipalsT&& value) {
114 m_principalsHasBeenSet = true;
115 m_principals.emplace_back(std::forward<PrincipalsT>(value));
116 return *this;
117 }
119
121
124 inline const Aws::String& GetHomeRegion() const { return m_homeRegion; }
125 inline bool HomeRegionHasBeenSet() const { return m_homeRegionHasBeenSet; }
126 template <typename HomeRegionT = Aws::String>
127 void SetHomeRegion(HomeRegionT&& value) {
128 m_homeRegionHasBeenSet = true;
129 m_homeRegion = std::forward<HomeRegionT>(value);
130 }
131 template <typename HomeRegionT = Aws::String>
132 CreateGrantRequest& WithHomeRegion(HomeRegionT&& value) {
133 SetHomeRegion(std::forward<HomeRegionT>(value));
134 return *this;
135 }
137
139
142 inline const Aws::Vector<AllowedOperation>& GetAllowedOperations() const { return m_allowedOperations; }
143 inline bool AllowedOperationsHasBeenSet() const { return m_allowedOperationsHasBeenSet; }
144 template <typename AllowedOperationsT = Aws::Vector<AllowedOperation>>
145 void SetAllowedOperations(AllowedOperationsT&& value) {
146 m_allowedOperationsHasBeenSet = true;
147 m_allowedOperations = std::forward<AllowedOperationsT>(value);
148 }
149 template <typename AllowedOperationsT = Aws::Vector<AllowedOperation>>
150 CreateGrantRequest& WithAllowedOperations(AllowedOperationsT&& value) {
151 SetAllowedOperations(std::forward<AllowedOperationsT>(value));
152 return *this;
153 }
155 m_allowedOperationsHasBeenSet = true;
156 m_allowedOperations.push_back(value);
157 return *this;
158 }
160
162
168 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
169 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
170 template <typename TagsT = Aws::Vector<Tag>>
171 void SetTags(TagsT&& value) {
172 m_tagsHasBeenSet = true;
173 m_tags = std::forward<TagsT>(value);
174 }
175 template <typename TagsT = Aws::Vector<Tag>>
176 CreateGrantRequest& WithTags(TagsT&& value) {
177 SetTags(std::forward<TagsT>(value));
178 return *this;
179 }
180 template <typename TagsT = Tag>
181 CreateGrantRequest& AddTags(TagsT&& value) {
182 m_tagsHasBeenSet = true;
183 m_tags.emplace_back(std::forward<TagsT>(value));
184 return *this;
185 }
187 private:
188 Aws::String m_clientToken;
189 bool m_clientTokenHasBeenSet = false;
190
191 Aws::String m_grantName;
192 bool m_grantNameHasBeenSet = false;
193
194 Aws::String m_licenseArn;
195 bool m_licenseArnHasBeenSet = false;
196
197 Aws::Vector<Aws::String> m_principals;
198 bool m_principalsHasBeenSet = false;
199
200 Aws::String m_homeRegion;
201 bool m_homeRegionHasBeenSet = false;
202
203 Aws::Vector<AllowedOperation> m_allowedOperations;
204 bool m_allowedOperationsHasBeenSet = false;
205
206 Aws::Vector<Tag> m_tags;
207 bool m_tagsHasBeenSet = false;
208};
209
210} // namespace Model
211} // namespace LicenseManager
212} // namespace Aws
CreateGrantRequest & AddPrincipals(PrincipalsT &&value)
const Aws::Vector< AllowedOperation > & GetAllowedOperations() const
virtual const char * GetServiceRequestName() const override
CreateGrantRequest & WithTags(TagsT &&value)
CreateGrantRequest & WithGrantName(GrantNameT &&value)
CreateGrantRequest & WithHomeRegion(HomeRegionT &&value)
const Aws::Vector< Aws::String > & GetPrincipals() const
CreateGrantRequest & WithLicenseArn(LicenseArnT &&value)
void SetAllowedOperations(AllowedOperationsT &&value)
AWS_LICENSEMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateGrantRequest & WithPrincipals(PrincipalsT &&value)
CreateGrantRequest & WithAllowedOperations(AllowedOperationsT &&value)
AWS_LICENSEMANAGER_API Aws::String SerializePayload() const override
CreateGrantRequest & AddTags(TagsT &&value)
AWS_LICENSEMANAGER_API CreateGrantRequest()=default
const Aws::Vector< Tag > & GetTags() const
CreateGrantRequest & AddAllowedOperations(AllowedOperation value)
CreateGrantRequest & WithClientToken(ClientTokenT &&value)
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