AWS SDK for C++

AWS SDK for C++ Version 1.11.746

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
95 inline const Aws::Vector<Aws::String>& GetPrincipals() const { return m_principals; }
96 inline bool PrincipalsHasBeenSet() const { return m_principalsHasBeenSet; }
97 template <typename PrincipalsT = Aws::Vector<Aws::String>>
98 void SetPrincipals(PrincipalsT&& value) {
99 m_principalsHasBeenSet = true;
100 m_principals = std::forward<PrincipalsT>(value);
101 }
102 template <typename PrincipalsT = Aws::Vector<Aws::String>>
103 ListPrincipalsRequest& WithPrincipals(PrincipalsT&& value) {
104 SetPrincipals(std::forward<PrincipalsT>(value));
105 return *this;
106 }
107 template <typename PrincipalsT = Aws::String>
108 ListPrincipalsRequest& AddPrincipals(PrincipalsT&& value) {
109 m_principalsHasBeenSet = true;
110 m_principals.emplace_back(std::forward<PrincipalsT>(value));
111 return *this;
112 }
114
116
121 inline const Aws::String& GetResourceType() const { return m_resourceType; }
122 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
123 template <typename ResourceTypeT = Aws::String>
124 void SetResourceType(ResourceTypeT&& value) {
125 m_resourceTypeHasBeenSet = true;
126 m_resourceType = std::forward<ResourceTypeT>(value);
127 }
128 template <typename ResourceTypeT = Aws::String>
129 ListPrincipalsRequest& WithResourceType(ResourceTypeT&& value) {
130 SetResourceType(std::forward<ResourceTypeT>(value));
131 return *this;
132 }
134
136
142 inline const Aws::Vector<Aws::String>& GetResourceShareArns() const { return m_resourceShareArns; }
143 inline bool ResourceShareArnsHasBeenSet() const { return m_resourceShareArnsHasBeenSet; }
144 template <typename ResourceShareArnsT = Aws::Vector<Aws::String>>
145 void SetResourceShareArns(ResourceShareArnsT&& value) {
146 m_resourceShareArnsHasBeenSet = true;
147 m_resourceShareArns = std::forward<ResourceShareArnsT>(value);
148 }
149 template <typename ResourceShareArnsT = Aws::Vector<Aws::String>>
150 ListPrincipalsRequest& WithResourceShareArns(ResourceShareArnsT&& value) {
151 SetResourceShareArns(std::forward<ResourceShareArnsT>(value));
152 return *this;
153 }
154 template <typename ResourceShareArnsT = Aws::String>
155 ListPrincipalsRequest& AddResourceShareArns(ResourceShareArnsT&& value) {
156 m_resourceShareArnsHasBeenSet = true;
157 m_resourceShareArns.emplace_back(std::forward<ResourceShareArnsT>(value));
158 return *this;
159 }
161
163
170 inline const Aws::String& GetNextToken() const { return m_nextToken; }
171 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
172 template <typename NextTokenT = Aws::String>
173 void SetNextToken(NextTokenT&& value) {
174 m_nextTokenHasBeenSet = true;
175 m_nextToken = std::forward<NextTokenT>(value);
176 }
177 template <typename NextTokenT = Aws::String>
179 SetNextToken(std::forward<NextTokenT>(value));
180 return *this;
181 }
183
185
196 inline int GetMaxResults() const { return m_maxResults; }
197 inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
198 inline void SetMaxResults(int value) {
199 m_maxResultsHasBeenSet = true;
200 m_maxResults = value;
201 }
203 SetMaxResults(value);
204 return *this;
205 }
207 private:
208 ResourceOwner m_resourceOwner{ResourceOwner::NOT_SET};
209
210 Aws::String m_resourceArn;
211
212 Aws::Vector<Aws::String> m_principals;
213
214 Aws::String m_resourceType;
215
216 Aws::Vector<Aws::String> m_resourceShareArns;
217
218 Aws::String m_nextToken;
219
220 int m_maxResults{0};
221 bool m_resourceOwnerHasBeenSet = false;
222 bool m_resourceArnHasBeenSet = false;
223 bool m_principalsHasBeenSet = false;
224 bool m_resourceTypeHasBeenSet = false;
225 bool m_resourceShareArnsHasBeenSet = false;
226 bool m_nextTokenHasBeenSet = false;
227 bool m_maxResultsHasBeenSet = false;
228};
229
230} // namespace Model
231} // namespace RAM
232} // 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