AWS SDK for C++

AWS SDK for C++ Version 1.11.709

Loading...
Searching...
No Matches
ListPrincipalsRequest.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/ResourceOwner.h>
12
13#include <utility>
14
15namespace Aws {
16namespace RAM {
17namespace Model {
18
22 public:
23 AWS_RAM_API ListPrincipalsRequest() = 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 "ListPrincipals"; }
30
31 AWS_RAM_API Aws::String SerializePayload() const override;
32
34
41 inline ResourceOwner GetResourceOwner() const { return m_resourceOwner; }
42 inline bool ResourceOwnerHasBeenSet() const { return m_resourceOwnerHasBeenSet; }
43 inline void SetResourceOwner(ResourceOwner value) {
44 m_resourceOwnerHasBeenSet = true;
45 m_resourceOwner = value;
46 }
48 SetResourceOwner(value);
49 return *this;
50 }
52
54
60 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
61 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
62 template <typename ResourceArnT = Aws::String>
63 void SetResourceArn(ResourceArnT&& value) {
64 m_resourceArnHasBeenSet = true;
65 m_resourceArn = std::forward<ResourceArnT>(value);
66 }
67 template <typename ResourceArnT = Aws::String>
68 ListPrincipalsRequest& WithResourceArn(ResourceArnT&& value) {
69 SetResourceArn(std::forward<ResourceArnT>(value));
70 return *this;
71 }
73
75
94 inline const Aws::Vector<Aws::String>& GetPrincipals() const { return m_principals; }
95 inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; }
96 template <typename PrincipalsT = Aws::Vector<Aws::String>>
97 void SetPrincipals(PrincipalsT&& value) {
98 m_principalsHasBeenSet = true;
99 m_principals = std::forward<PrincipalsT>(value);
100 }
101 template <typename PrincipalsT = Aws::Vector<Aws::String>>
102 ListPrincipalsRequest& WithPrincipals(PrincipalsT&& value) {
103 SetPrincipals(std::forward<PrincipalsT>(value));
104 return *this;
105 }
106 template <typename PrincipalsT = Aws::String>
107 ListPrincipalsRequest& AddPrincipals(PrincipalsT&& value) {
108 m_principalsHasBeenSet = true;
109 m_principals.emplace_back(std::forward<PrincipalsT>(value));
110 return *this;
111 }
113
115
120 inline const Aws::String& GetResourceType() const { return m_resourceType; }
121 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
122 template <typename ResourceTypeT = Aws::String>
123 void SetResourceType(ResourceTypeT&& value) {
124 m_resourceTypeHasBeenSet = true;
125 m_resourceType = std::forward<ResourceTypeT>(value);
126 }
127 template <typename ResourceTypeT = Aws::String>
128 ListPrincipalsRequest& WithResourceType(ResourceTypeT&& value) {
129 SetResourceType(std::forward<ResourceTypeT>(value));
130 return *this;
131 }
133
135
141 inline const Aws::Vector<Aws::String>& GetResourceShareArns() const { return m_resourceShareArns; }
142 inline bool ResourceShareArnsHasBeenSet() const { return m_resourceShareArnsHasBeenSet; }
143 template <typename ResourceShareArnsT = Aws::Vector<Aws::String>>
144 void SetResourceShareArns(ResourceShareArnsT&& value) {
145 m_resourceShareArnsHasBeenSet = true;
146 m_resourceShareArns = std::forward<ResourceShareArnsT>(value);
147 }
148 template <typename ResourceShareArnsT = Aws::Vector<Aws::String>>
149 ListPrincipalsRequest& WithResourceShareArns(ResourceShareArnsT&& value) {
150 SetResourceShareArns(std::forward<ResourceShareArnsT>(value));
151 return *this;
152 }
153 template <typename ResourceShareArnsT = Aws::String>
154 ListPrincipalsRequest& AddResourceShareArns(ResourceShareArnsT&& value) {
155 m_resourceShareArnsHasBeenSet = true;
156 m_resourceShareArns.emplace_back(std::forward<ResourceShareArnsT>(value));
157 return *this;
158 }
160
162
169 inline const Aws::String& GetNextToken() const { return m_nextToken; }
170 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
171 template <typename NextTokenT = Aws::String>
172 void SetNextToken(NextTokenT&& value) {
173 m_nextTokenHasBeenSet = true;
174 m_nextToken = std::forward<NextTokenT>(value);
175 }
176 template <typename NextTokenT = Aws::String>
178 SetNextToken(std::forward<NextTokenT>(value));
179 return *this;
180 }
182
184
195 inline int GetMaxResults() const { return m_maxResults; }
196 inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
197 inline void SetMaxResults(int value) {
198 m_maxResultsHasBeenSet = true;
199 m_maxResults = value;
200 }
202 SetMaxResults(value);
203 return *this;
204 }
206 private:
207 ResourceOwner m_resourceOwner{ResourceOwner::NOT_SET};
208
209 Aws::String m_resourceArn;
210
211 Aws::Vector<Aws::String> m_principals;
212
213 Aws::String m_resourceType;
214
215 Aws::Vector<Aws::String> m_resourceShareArns;
216
217 Aws::String m_nextToken;
218
219 int m_maxResults{0};
220 bool m_resourceOwnerHasBeenSet = false;
221 bool m_resourceArnHasBeenSet = false;
222 bool m_principalsHasBeenSet = false;
223 bool m_resourceTypeHasBeenSet = false;
224 bool m_resourceShareArnsHasBeenSet = false;
225 bool m_nextTokenHasBeenSet = false;
226 bool m_maxResultsHasBeenSet = false;
227};
228
229} // namespace Model
230} // namespace RAM
231} // namespace Aws
ListPrincipalsRequest & WithResourceArn(ResourceArnT &&value)
virtual const char * GetServiceRequestName() const override
ListPrincipalsRequest & WithPrincipals(PrincipalsT &&value)
const Aws::Vector< Aws::String > & GetPrincipals() const
ListPrincipalsRequest & WithResourceOwner(ResourceOwner value)
ListPrincipalsRequest & AddPrincipals(PrincipalsT &&value)
ListPrincipalsRequest & WithResourceShareArns(ResourceShareArnsT &&value)
ListPrincipalsRequest & WithNextToken(NextTokenT &&value)
ListPrincipalsRequest & WithMaxResults(int value)
AWS_RAM_API ListPrincipalsRequest()=default
const Aws::Vector< Aws::String > & GetResourceShareArns() const
void SetResourceShareArns(ResourceShareArnsT &&value)
ListPrincipalsRequest & WithResourceType(ResourceTypeT &&value)
ListPrincipalsRequest & AddResourceShareArns(ResourceShareArnsT &&value)
AWS_RAM_API Aws::String SerializePayload() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector