AWS SDK for C++

AWS SDK for C++ Version 1.11.778

Loading...
Searching...
No Matches
CreateResourceShareRequest.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/ram/RAMRequest.h>
10#include <aws/ram/RAM_EXPORTS.h>
11#include <aws/ram/model/ResourceShareConfiguration.h>
12#include <aws/ram/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace RAM {
18namespace Model {
19
23 public:
24 AWS_RAM_API CreateResourceShareRequest() = 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 "CreateResourceShare"; }
31
32 AWS_RAM_API Aws::String SerializePayload() const override;
33
35
38 inline const Aws::String& GetName() const { return m_name; }
39 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
40 template <typename NameT = Aws::String>
41 void SetName(NameT&& value) {
42 m_nameHasBeenSet = true;
43 m_name = std::forward<NameT>(value);
44 }
45 template <typename NameT = Aws::String>
47 SetName(std::forward<NameT>(value));
48 return *this;
49 }
51
53
57 inline const Aws::Vector<Aws::String>& GetResourceArns() const { return m_resourceArns; }
58 inline bool ResourceArnsHasBeenSet() const { return m_resourceArnsHasBeenSet; }
59 template <typename ResourceArnsT = Aws::Vector<Aws::String>>
60 void SetResourceArns(ResourceArnsT&& value) {
61 m_resourceArnsHasBeenSet = true;
62 m_resourceArns = std::forward<ResourceArnsT>(value);
63 }
64 template <typename ResourceArnsT = Aws::Vector<Aws::String>>
66 SetResourceArns(std::forward<ResourceArnsT>(value));
67 return *this;
68 }
69 template <typename ResourceArnsT = Aws::String>
71 m_resourceArnsHasBeenSet = true;
72 m_resourceArns.emplace_back(std::forward<ResourceArnsT>(value));
73 return *this;
74 }
76
78
98 inline const Aws::Vector<Aws::String>& GetPrincipals() const { return m_principals; }
99 inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; }
100 template <typename PrincipalsT = Aws::Vector<Aws::String>>
101 void SetPrincipals(PrincipalsT&& value) {
102 m_principalsHasBeenSet = true;
103 m_principals = std::forward<PrincipalsT>(value);
104 }
105 template <typename PrincipalsT = Aws::Vector<Aws::String>>
107 SetPrincipals(std::forward<PrincipalsT>(value));
108 return *this;
109 }
110 template <typename PrincipalsT = Aws::String>
112 m_principalsHasBeenSet = true;
113 m_principals.emplace_back(std::forward<PrincipalsT>(value));
114 return *this;
115 }
117
119
123 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
124 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
125 template <typename TagsT = Aws::Vector<Tag>>
126 void SetTags(TagsT&& value) {
127 m_tagsHasBeenSet = true;
128 m_tags = std::forward<TagsT>(value);
129 }
130 template <typename TagsT = Aws::Vector<Tag>>
132 SetTags(std::forward<TagsT>(value));
133 return *this;
134 }
135 template <typename TagsT = Tag>
137 m_tagsHasBeenSet = true;
138 m_tags.emplace_back(std::forward<TagsT>(value));
139 return *this;
140 }
142
144
152 inline bool GetAllowExternalPrincipals() const { return m_allowExternalPrincipals; }
153 inline bool AllowExternalPrincipalsHasBeenSet() const { return m_allowExternalPrincipalsHasBeenSet; }
154 inline void SetAllowExternalPrincipals(bool value) {
155 m_allowExternalPrincipalsHasBeenSet = true;
156 m_allowExternalPrincipals = value;
157 }
160 return *this;
161 }
163
165
177 inline const Aws::String& GetClientToken() const { return m_clientToken; }
178 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
179 template <typename ClientTokenT = Aws::String>
180 void SetClientToken(ClientTokenT&& value) {
181 m_clientTokenHasBeenSet = true;
182 m_clientToken = std::forward<ClientTokenT>(value);
183 }
184 template <typename ClientTokenT = Aws::String>
186 SetClientToken(std::forward<ClientTokenT>(value));
187 return *this;
188 }
190
192
201 inline const Aws::Vector<Aws::String>& GetPermissionArns() const { return m_permissionArns; }
202 inline bool PermissionArnsHasBeenSet() const { return m_permissionArnsHasBeenSet; }
203 template <typename PermissionArnsT = Aws::Vector<Aws::String>>
204 void SetPermissionArns(PermissionArnsT&& value) {
205 m_permissionArnsHasBeenSet = true;
206 m_permissionArns = std::forward<PermissionArnsT>(value);
207 }
208 template <typename PermissionArnsT = Aws::Vector<Aws::String>>
210 SetPermissionArns(std::forward<PermissionArnsT>(value));
211 return *this;
212 }
213 template <typename PermissionArnsT = Aws::String>
215 m_permissionArnsHasBeenSet = true;
216 m_permissionArns.emplace_back(std::forward<PermissionArnsT>(value));
217 return *this;
218 }
220
222
230 inline const Aws::Vector<Aws::String>& GetSources() const { return m_sources; }
231 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
232 template <typename SourcesT = Aws::Vector<Aws::String>>
233 void SetSources(SourcesT&& value) {
234 m_sourcesHasBeenSet = true;
235 m_sources = std::forward<SourcesT>(value);
236 }
237 template <typename SourcesT = Aws::Vector<Aws::String>>
239 SetSources(std::forward<SourcesT>(value));
240 return *this;
241 }
242 template <typename SourcesT = Aws::String>
244 m_sourcesHasBeenSet = true;
245 m_sources.emplace_back(std::forward<SourcesT>(value));
246 return *this;
247 }
249
251
254 inline const ResourceShareConfiguration& GetResourceShareConfiguration() const { return m_resourceShareConfiguration; }
255 inline bool ResourceShareConfigurationHasBeenSet() const { return m_resourceShareConfigurationHasBeenSet; }
256 template <typename ResourceShareConfigurationT = ResourceShareConfiguration>
257 void SetResourceShareConfiguration(ResourceShareConfigurationT&& value) {
258 m_resourceShareConfigurationHasBeenSet = true;
259 m_resourceShareConfiguration = std::forward<ResourceShareConfigurationT>(value);
260 }
261 template <typename ResourceShareConfigurationT = ResourceShareConfiguration>
262 CreateResourceShareRequest& WithResourceShareConfiguration(ResourceShareConfigurationT&& value) {
263 SetResourceShareConfiguration(std::forward<ResourceShareConfigurationT>(value));
264 return *this;
265 }
267 private:
268 Aws::String m_name;
269
270 Aws::Vector<Aws::String> m_resourceArns;
271
272 Aws::Vector<Aws::String> m_principals;
273
274 Aws::Vector<Tag> m_tags;
275
276 bool m_allowExternalPrincipals{false};
277
278 Aws::String m_clientToken;
279
280 Aws::Vector<Aws::String> m_permissionArns;
281
282 Aws::Vector<Aws::String> m_sources;
283
284 ResourceShareConfiguration m_resourceShareConfiguration;
285 bool m_nameHasBeenSet = false;
286 bool m_resourceArnsHasBeenSet = false;
287 bool m_principalsHasBeenSet = false;
288 bool m_tagsHasBeenSet = false;
289 bool m_allowExternalPrincipalsHasBeenSet = false;
290 bool m_clientTokenHasBeenSet = false;
291 bool m_permissionArnsHasBeenSet = false;
292 bool m_sourcesHasBeenSet = false;
293 bool m_resourceShareConfigurationHasBeenSet = false;
294};
295
296} // namespace Model
297} // namespace RAM
298} // namespace Aws
CreateResourceShareRequest & AddSources(SourcesT &&value)
CreateResourceShareRequest & AddResourceArns(ResourceArnsT &&value)
const Aws::Vector< Aws::String > & GetPermissionArns() const
AWS_RAM_API Aws::String SerializePayload() const override
void SetResourceShareConfiguration(ResourceShareConfigurationT &&value)
CreateResourceShareRequest & WithAllowExternalPrincipals(bool value)
virtual const char * GetServiceRequestName() const override
const ResourceShareConfiguration & GetResourceShareConfiguration() const
CreateResourceShareRequest & WithResourceShareConfiguration(ResourceShareConfigurationT &&value)
CreateResourceShareRequest & WithPrincipals(PrincipalsT &&value)
CreateResourceShareRequest & AddPrincipals(PrincipalsT &&value)
const Aws::Vector< Aws::String > & GetSources() const
CreateResourceShareRequest & WithName(NameT &&value)
AWS_RAM_API CreateResourceShareRequest()=default
const Aws::Vector< Aws::String > & GetPrincipals() const
CreateResourceShareRequest & WithSources(SourcesT &&value)
CreateResourceShareRequest & AddPermissionArns(PermissionArnsT &&value)
CreateResourceShareRequest & WithPermissionArns(PermissionArnsT &&value)
CreateResourceShareRequest & AddTags(TagsT &&value)
const Aws::Vector< Aws::String > & GetResourceArns() const
CreateResourceShareRequest & WithTags(TagsT &&value)
CreateResourceShareRequest & WithClientToken(ClientTokenT &&value)
CreateResourceShareRequest & WithResourceArns(ResourceArnsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector