AWS SDK for C++

AWS SDK for C++ Version 1.11.744

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/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace RAM {
17namespace Model {
18
22 public:
23 AWS_RAM_API CreateResourceShareRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "CreateResourceShare"; }
30
31 AWS_RAM_API Aws::String SerializePayload() const override;
32
34
37 inline const Aws::String& GetName() const { return m_name; }
38 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
39 template <typename NameT = Aws::String>
40 void SetName(NameT&& value) {
41 m_nameHasBeenSet = true;
42 m_name = std::forward<NameT>(value);
43 }
44 template <typename NameT = Aws::String>
46 SetName(std::forward<NameT>(value));
47 return *this;
48 }
50
52
56 inline const Aws::Vector<Aws::String>& GetResourceArns() const { return m_resourceArns; }
57 inline bool ResourceArnsHasBeenSet() const { return m_resourceArnsHasBeenSet; }
58 template <typename ResourceArnsT = Aws::Vector<Aws::String>>
59 void SetResourceArns(ResourceArnsT&& value) {
60 m_resourceArnsHasBeenSet = true;
61 m_resourceArns = std::forward<ResourceArnsT>(value);
62 }
63 template <typename ResourceArnsT = Aws::Vector<Aws::String>>
65 SetResourceArns(std::forward<ResourceArnsT>(value));
66 return *this;
67 }
68 template <typename ResourceArnsT = Aws::String>
70 m_resourceArnsHasBeenSet = true;
71 m_resourceArns.emplace_back(std::forward<ResourceArnsT>(value));
72 return *this;
73 }
75
77
97 inline const Aws::Vector<Aws::String>& GetPrincipals() const { return m_principals; }
98 inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; }
99 template <typename PrincipalsT = Aws::Vector<Aws::String>>
100 void SetPrincipals(PrincipalsT&& value) {
101 m_principalsHasBeenSet = true;
102 m_principals = std::forward<PrincipalsT>(value);
103 }
104 template <typename PrincipalsT = Aws::Vector<Aws::String>>
106 SetPrincipals(std::forward<PrincipalsT>(value));
107 return *this;
108 }
109 template <typename PrincipalsT = Aws::String>
111 m_principalsHasBeenSet = true;
112 m_principals.emplace_back(std::forward<PrincipalsT>(value));
113 return *this;
114 }
116
118
122 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
123 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
124 template <typename TagsT = Aws::Vector<Tag>>
125 void SetTags(TagsT&& value) {
126 m_tagsHasBeenSet = true;
127 m_tags = std::forward<TagsT>(value);
128 }
129 template <typename TagsT = Aws::Vector<Tag>>
131 SetTags(std::forward<TagsT>(value));
132 return *this;
133 }
134 template <typename TagsT = Tag>
136 m_tagsHasBeenSet = true;
137 m_tags.emplace_back(std::forward<TagsT>(value));
138 return *this;
139 }
141
143
151 inline bool GetAllowExternalPrincipals() const { return m_allowExternalPrincipals; }
152 inline bool AllowExternalPrincipalsHasBeenSet() const { return m_allowExternalPrincipalsHasBeenSet; }
153 inline void SetAllowExternalPrincipals(bool value) {
154 m_allowExternalPrincipalsHasBeenSet = true;
155 m_allowExternalPrincipals = value;
156 }
159 return *this;
160 }
162
164
176 inline const Aws::String& GetClientToken() const { return m_clientToken; }
177 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
178 template <typename ClientTokenT = Aws::String>
179 void SetClientToken(ClientTokenT&& value) {
180 m_clientTokenHasBeenSet = true;
181 m_clientToken = std::forward<ClientTokenT>(value);
182 }
183 template <typename ClientTokenT = Aws::String>
185 SetClientToken(std::forward<ClientTokenT>(value));
186 return *this;
187 }
189
191
200 inline const Aws::Vector<Aws::String>& GetPermissionArns() const { return m_permissionArns; }
201 inline bool PermissionArnsHasBeenSet() const { return m_permissionArnsHasBeenSet; }
202 template <typename PermissionArnsT = Aws::Vector<Aws::String>>
203 void SetPermissionArns(PermissionArnsT&& value) {
204 m_permissionArnsHasBeenSet = true;
205 m_permissionArns = std::forward<PermissionArnsT>(value);
206 }
207 template <typename PermissionArnsT = Aws::Vector<Aws::String>>
209 SetPermissionArns(std::forward<PermissionArnsT>(value));
210 return *this;
211 }
212 template <typename PermissionArnsT = Aws::String>
214 m_permissionArnsHasBeenSet = true;
215 m_permissionArns.emplace_back(std::forward<PermissionArnsT>(value));
216 return *this;
217 }
219
221
229 inline const Aws::Vector<Aws::String>& GetSources() const { return m_sources; }
230 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
231 template <typename SourcesT = Aws::Vector<Aws::String>>
232 void SetSources(SourcesT&& value) {
233 m_sourcesHasBeenSet = true;
234 m_sources = std::forward<SourcesT>(value);
235 }
236 template <typename SourcesT = Aws::Vector<Aws::String>>
238 SetSources(std::forward<SourcesT>(value));
239 return *this;
240 }
241 template <typename SourcesT = Aws::String>
243 m_sourcesHasBeenSet = true;
244 m_sources.emplace_back(std::forward<SourcesT>(value));
245 return *this;
246 }
248 private:
249 Aws::String m_name;
250
251 Aws::Vector<Aws::String> m_resourceArns;
252
253 Aws::Vector<Aws::String> m_principals;
254
255 Aws::Vector<Tag> m_tags;
256
257 bool m_allowExternalPrincipals{false};
258
259 Aws::String m_clientToken;
260
261 Aws::Vector<Aws::String> m_permissionArns;
262
263 Aws::Vector<Aws::String> m_sources;
264 bool m_nameHasBeenSet = false;
265 bool m_resourceArnsHasBeenSet = false;
266 bool m_principalsHasBeenSet = false;
267 bool m_tagsHasBeenSet = false;
268 bool m_allowExternalPrincipalsHasBeenSet = false;
269 bool m_clientTokenHasBeenSet = false;
270 bool m_permissionArnsHasBeenSet = false;
271 bool m_sourcesHasBeenSet = false;
272};
273
274} // namespace Model
275} // namespace RAM
276} // 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
CreateResourceShareRequest & WithAllowExternalPrincipals(bool value)
virtual const char * GetServiceRequestName() const override
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