AWS SDK for C++

AWS SDK for C++ Version 1.11.709

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
96 inline const Aws::Vector<Aws::String>& GetPrincipals() const { return m_principals; }
97 inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; }
98 template <typename PrincipalsT = Aws::Vector<Aws::String>>
99 void SetPrincipals(PrincipalsT&& value) {
100 m_principalsHasBeenSet = true;
101 m_principals = std::forward<PrincipalsT>(value);
102 }
103 template <typename PrincipalsT = Aws::Vector<Aws::String>>
105 SetPrincipals(std::forward<PrincipalsT>(value));
106 return *this;
107 }
108 template <typename PrincipalsT = Aws::String>
110 m_principalsHasBeenSet = true;
111 m_principals.emplace_back(std::forward<PrincipalsT>(value));
112 return *this;
113 }
115
117
121 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
122 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
123 template <typename TagsT = Aws::Vector<Tag>>
124 void SetTags(TagsT&& value) {
125 m_tagsHasBeenSet = true;
126 m_tags = std::forward<TagsT>(value);
127 }
128 template <typename TagsT = Aws::Vector<Tag>>
130 SetTags(std::forward<TagsT>(value));
131 return *this;
132 }
133 template <typename TagsT = Tag>
135 m_tagsHasBeenSet = true;
136 m_tags.emplace_back(std::forward<TagsT>(value));
137 return *this;
138 }
140
142
150 inline bool GetAllowExternalPrincipals() const { return m_allowExternalPrincipals; }
151 inline bool AllowExternalPrincipalsHasBeenSet() const { return m_allowExternalPrincipalsHasBeenSet; }
152 inline void SetAllowExternalPrincipals(bool value) {
153 m_allowExternalPrincipalsHasBeenSet = true;
154 m_allowExternalPrincipals = value;
155 }
158 return *this;
159 }
161
163
175 inline const Aws::String& GetClientToken() const { return m_clientToken; }
176 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
177 template <typename ClientTokenT = Aws::String>
178 void SetClientToken(ClientTokenT&& value) {
179 m_clientTokenHasBeenSet = true;
180 m_clientToken = std::forward<ClientTokenT>(value);
181 }
182 template <typename ClientTokenT = Aws::String>
184 SetClientToken(std::forward<ClientTokenT>(value));
185 return *this;
186 }
188
190
199 inline const Aws::Vector<Aws::String>& GetPermissionArns() const { return m_permissionArns; }
200 inline bool PermissionArnsHasBeenSet() const { return m_permissionArnsHasBeenSet; }
201 template <typename PermissionArnsT = Aws::Vector<Aws::String>>
202 void SetPermissionArns(PermissionArnsT&& value) {
203 m_permissionArnsHasBeenSet = true;
204 m_permissionArns = std::forward<PermissionArnsT>(value);
205 }
206 template <typename PermissionArnsT = Aws::Vector<Aws::String>>
208 SetPermissionArns(std::forward<PermissionArnsT>(value));
209 return *this;
210 }
211 template <typename PermissionArnsT = Aws::String>
213 m_permissionArnsHasBeenSet = true;
214 m_permissionArns.emplace_back(std::forward<PermissionArnsT>(value));
215 return *this;
216 }
218
220
224 inline const Aws::Vector<Aws::String>& GetSources() const { return m_sources; }
225 inline bool SourcesHasBeenSet() const { return m_sourcesHasBeenSet; }
226 template <typename SourcesT = Aws::Vector<Aws::String>>
227 void SetSources(SourcesT&& value) {
228 m_sourcesHasBeenSet = true;
229 m_sources = std::forward<SourcesT>(value);
230 }
231 template <typename SourcesT = Aws::Vector<Aws::String>>
233 SetSources(std::forward<SourcesT>(value));
234 return *this;
235 }
236 template <typename SourcesT = Aws::String>
238 m_sourcesHasBeenSet = true;
239 m_sources.emplace_back(std::forward<SourcesT>(value));
240 return *this;
241 }
243 private:
244 Aws::String m_name;
245
246 Aws::Vector<Aws::String> m_resourceArns;
247
248 Aws::Vector<Aws::String> m_principals;
249
250 Aws::Vector<Tag> m_tags;
251
252 bool m_allowExternalPrincipals{false};
253
254 Aws::String m_clientToken;
255
256 Aws::Vector<Aws::String> m_permissionArns;
257
258 Aws::Vector<Aws::String> m_sources;
259 bool m_nameHasBeenSet = false;
260 bool m_resourceArnsHasBeenSet = false;
261 bool m_principalsHasBeenSet = false;
262 bool m_tagsHasBeenSet = false;
263 bool m_allowExternalPrincipalsHasBeenSet = false;
264 bool m_clientTokenHasBeenSet = false;
265 bool m_permissionArnsHasBeenSet = false;
266 bool m_sourcesHasBeenSet = false;
267};
268
269} // namespace Model
270} // namespace RAM
271} // 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