AWS SDK for C++

AWS SDK for C++ Version 1.11.750

Loading...
Searching...
No Matches
RoleDetail.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/iam/IAM_EXPORTS.h>
12#include <aws/iam/model/AttachedPermissionsBoundary.h>
13#include <aws/iam/model/AttachedPolicy.h>
14#include <aws/iam/model/InstanceProfile.h>
15#include <aws/iam/model/PolicyDetail.h>
16#include <aws/iam/model/RoleLastUsed.h>
17#include <aws/iam/model/Tag.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Utils {
23namespace Xml {
24class XmlNode;
25} // namespace Xml
26} // namespace Utils
27namespace IAM {
28namespace Model {
29
39 public:
40 AWS_IAM_API RoleDetail() = default;
41 AWS_IAM_API RoleDetail(const Aws::Utils::Xml::XmlNode& xmlNode);
42 AWS_IAM_API RoleDetail& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43
44 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
46
48
53 inline const Aws::String& GetPath() const { return m_path; }
54 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
55 template <typename PathT = Aws::String>
56 void SetPath(PathT&& value) {
57 m_pathHasBeenSet = true;
58 m_path = std::forward<PathT>(value);
59 }
60 template <typename PathT = Aws::String>
61 RoleDetail& WithPath(PathT&& value) {
62 SetPath(std::forward<PathT>(value));
63 return *this;
64 }
66
68
71 inline const Aws::String& GetRoleName() const { return m_roleName; }
72 inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
73 template <typename RoleNameT = Aws::String>
74 void SetRoleName(RoleNameT&& value) {
75 m_roleNameHasBeenSet = true;
76 m_roleName = std::forward<RoleNameT>(value);
77 }
78 template <typename RoleNameT = Aws::String>
79 RoleDetail& WithRoleName(RoleNameT&& value) {
80 SetRoleName(std::forward<RoleNameT>(value));
81 return *this;
82 }
84
86
92 inline const Aws::String& GetRoleId() const { return m_roleId; }
93 inline bool RoleIdHasBeenSet() const { return m_roleIdHasBeenSet; }
94 template <typename RoleIdT = Aws::String>
95 void SetRoleId(RoleIdT&& value) {
96 m_roleIdHasBeenSet = true;
97 m_roleId = std::forward<RoleIdT>(value);
98 }
99 template <typename RoleIdT = Aws::String>
100 RoleDetail& WithRoleId(RoleIdT&& value) {
101 SetRoleId(std::forward<RoleIdT>(value));
102 return *this;
103 }
105
107
108 inline const Aws::String& GetArn() const { return m_arn; }
109 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
110 template <typename ArnT = Aws::String>
111 void SetArn(ArnT&& value) {
112 m_arnHasBeenSet = true;
113 m_arn = std::forward<ArnT>(value);
114 }
115 template <typename ArnT = Aws::String>
116 RoleDetail& WithArn(ArnT&& value) {
117 SetArn(std::forward<ArnT>(value));
118 return *this;
119 }
121
123
127 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
128 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
129 template <typename CreateDateT = Aws::Utils::DateTime>
130 void SetCreateDate(CreateDateT&& value) {
131 m_createDateHasBeenSet = true;
132 m_createDate = std::forward<CreateDateT>(value);
133 }
134 template <typename CreateDateT = Aws::Utils::DateTime>
135 RoleDetail& WithCreateDate(CreateDateT&& value) {
136 SetCreateDate(std::forward<CreateDateT>(value));
137 return *this;
138 }
140
142
145 inline const Aws::String& GetAssumeRolePolicyDocument() const { return m_assumeRolePolicyDocument; }
146 inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
147 template <typename AssumeRolePolicyDocumentT = Aws::String>
148 void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) {
149 m_assumeRolePolicyDocumentHasBeenSet = true;
150 m_assumeRolePolicyDocument = std::forward<AssumeRolePolicyDocumentT>(value);
151 }
152 template <typename AssumeRolePolicyDocumentT = Aws::String>
153 RoleDetail& WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) {
154 SetAssumeRolePolicyDocument(std::forward<AssumeRolePolicyDocumentT>(value));
155 return *this;
156 }
158
160
163 inline const Aws::Vector<InstanceProfile>& GetInstanceProfileList() const { return m_instanceProfileList; }
164 inline bool InstanceProfileListHasBeenSet() const { return m_instanceProfileListHasBeenSet; }
165 template <typename InstanceProfileListT = Aws::Vector<InstanceProfile>>
166 void SetInstanceProfileList(InstanceProfileListT&& value) {
167 m_instanceProfileListHasBeenSet = true;
168 m_instanceProfileList = std::forward<InstanceProfileListT>(value);
169 }
170 template <typename InstanceProfileListT = Aws::Vector<InstanceProfile>>
171 RoleDetail& WithInstanceProfileList(InstanceProfileListT&& value) {
172 SetInstanceProfileList(std::forward<InstanceProfileListT>(value));
173 return *this;
174 }
175 template <typename InstanceProfileListT = InstanceProfile>
176 RoleDetail& AddInstanceProfileList(InstanceProfileListT&& value) {
177 m_instanceProfileListHasBeenSet = true;
178 m_instanceProfileList.emplace_back(std::forward<InstanceProfileListT>(value));
179 return *this;
180 }
182
184
188 inline const Aws::Vector<PolicyDetail>& GetRolePolicyList() const { return m_rolePolicyList; }
189 inline bool RolePolicyListHasBeenSet() const { return m_rolePolicyListHasBeenSet; }
190 template <typename RolePolicyListT = Aws::Vector<PolicyDetail>>
191 void SetRolePolicyList(RolePolicyListT&& value) {
192 m_rolePolicyListHasBeenSet = true;
193 m_rolePolicyList = std::forward<RolePolicyListT>(value);
194 }
195 template <typename RolePolicyListT = Aws::Vector<PolicyDetail>>
196 RoleDetail& WithRolePolicyList(RolePolicyListT&& value) {
197 SetRolePolicyList(std::forward<RolePolicyListT>(value));
198 return *this;
199 }
200 template <typename RolePolicyListT = PolicyDetail>
201 RoleDetail& AddRolePolicyList(RolePolicyListT&& value) {
202 m_rolePolicyListHasBeenSet = true;
203 m_rolePolicyList.emplace_back(std::forward<RolePolicyListT>(value));
204 return *this;
205 }
207
209
213 inline const Aws::Vector<AttachedPolicy>& GetAttachedManagedPolicies() const { return m_attachedManagedPolicies; }
214 inline bool AttachedManagedPoliciesHasBeenSet() const { return m_attachedManagedPoliciesHasBeenSet; }
215 template <typename AttachedManagedPoliciesT = Aws::Vector<AttachedPolicy>>
216 void SetAttachedManagedPolicies(AttachedManagedPoliciesT&& value) {
217 m_attachedManagedPoliciesHasBeenSet = true;
218 m_attachedManagedPolicies = std::forward<AttachedManagedPoliciesT>(value);
219 }
220 template <typename AttachedManagedPoliciesT = Aws::Vector<AttachedPolicy>>
221 RoleDetail& WithAttachedManagedPolicies(AttachedManagedPoliciesT&& value) {
222 SetAttachedManagedPolicies(std::forward<AttachedManagedPoliciesT>(value));
223 return *this;
224 }
225 template <typename AttachedManagedPoliciesT = AttachedPolicy>
226 RoleDetail& AddAttachedManagedPolicies(AttachedManagedPoliciesT&& value) {
227 m_attachedManagedPoliciesHasBeenSet = true;
228 m_attachedManagedPolicies.emplace_back(std::forward<AttachedManagedPoliciesT>(value));
229 return *this;
230 }
232
234
240 inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const { return m_permissionsBoundary; }
241 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
242 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
243 void SetPermissionsBoundary(PermissionsBoundaryT&& value) {
244 m_permissionsBoundaryHasBeenSet = true;
245 m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value);
246 }
247 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
248 RoleDetail& WithPermissionsBoundary(PermissionsBoundaryT&& value) {
249 SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value));
250 return *this;
251 }
253
255
261 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
262 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
263 template <typename TagsT = Aws::Vector<Tag>>
264 void SetTags(TagsT&& value) {
265 m_tagsHasBeenSet = true;
266 m_tags = std::forward<TagsT>(value);
267 }
268 template <typename TagsT = Aws::Vector<Tag>>
269 RoleDetail& WithTags(TagsT&& value) {
270 SetTags(std::forward<TagsT>(value));
271 return *this;
272 }
273 template <typename TagsT = Tag>
274 RoleDetail& AddTags(TagsT&& value) {
275 m_tagsHasBeenSet = true;
276 m_tags.emplace_back(std::forward<TagsT>(value));
277 return *this;
278 }
280
282
291 inline const RoleLastUsed& GetRoleLastUsed() const { return m_roleLastUsed; }
292 inline bool RoleLastUsedHasBeenSet() const { return m_roleLastUsedHasBeenSet; }
293 template <typename RoleLastUsedT = RoleLastUsed>
294 void SetRoleLastUsed(RoleLastUsedT&& value) {
295 m_roleLastUsedHasBeenSet = true;
296 m_roleLastUsed = std::forward<RoleLastUsedT>(value);
297 }
298 template <typename RoleLastUsedT = RoleLastUsed>
299 RoleDetail& WithRoleLastUsed(RoleLastUsedT&& value) {
300 SetRoleLastUsed(std::forward<RoleLastUsedT>(value));
301 return *this;
302 }
304 private:
305 Aws::String m_path;
306
307 Aws::String m_roleName;
308
309 Aws::String m_roleId;
310
311 Aws::String m_arn;
312
313 Aws::Utils::DateTime m_createDate{};
314
315 Aws::String m_assumeRolePolicyDocument;
316
317 Aws::Vector<InstanceProfile> m_instanceProfileList;
318
319 Aws::Vector<PolicyDetail> m_rolePolicyList;
320
321 Aws::Vector<AttachedPolicy> m_attachedManagedPolicies;
322
323 AttachedPermissionsBoundary m_permissionsBoundary;
324
325 Aws::Vector<Tag> m_tags;
326
327 RoleLastUsed m_roleLastUsed;
328 bool m_pathHasBeenSet = false;
329 bool m_roleNameHasBeenSet = false;
330 bool m_roleIdHasBeenSet = false;
331 bool m_arnHasBeenSet = false;
332 bool m_createDateHasBeenSet = false;
333 bool m_assumeRolePolicyDocumentHasBeenSet = false;
334 bool m_instanceProfileListHasBeenSet = false;
335 bool m_rolePolicyListHasBeenSet = false;
336 bool m_attachedManagedPoliciesHasBeenSet = false;
337 bool m_permissionsBoundaryHasBeenSet = false;
338 bool m_tagsHasBeenSet = false;
339 bool m_roleLastUsedHasBeenSet = false;
340};
341
342} // namespace Model
343} // namespace IAM
344} // namespace Aws
RoleDetail & WithAttachedManagedPolicies(AttachedManagedPoliciesT &&value)
Definition RoleDetail.h:221
RoleDetail & WithRoleLastUsed(RoleLastUsedT &&value)
Definition RoleDetail.h:299
void SetArn(ArnT &&value)
Definition RoleDetail.h:111
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition RoleDetail.h:240
bool InstanceProfileListHasBeenSet() const
Definition RoleDetail.h:164
const Aws::Vector< Tag > & GetTags() const
Definition RoleDetail.h:261
RoleDetail & WithArn(ArnT &&value)
Definition RoleDetail.h:116
bool RolePolicyListHasBeenSet() const
Definition RoleDetail.h:189
const Aws::Vector< InstanceProfile > & GetInstanceProfileList() const
Definition RoleDetail.h:163
bool RoleNameHasBeenSet() const
Definition RoleDetail.h:72
AWS_IAM_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetTags(TagsT &&value)
Definition RoleDetail.h:264
bool AttachedManagedPoliciesHasBeenSet() const
Definition RoleDetail.h:214
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
bool CreateDateHasBeenSet() const
Definition RoleDetail.h:128
const Aws::String & GetArn() const
Definition RoleDetail.h:108
AWS_IAM_API RoleDetail()=default
const RoleLastUsed & GetRoleLastUsed() const
Definition RoleDetail.h:291
RoleDetail & AddRolePolicyList(RolePolicyListT &&value)
Definition RoleDetail.h:201
void SetPath(PathT &&value)
Definition RoleDetail.h:56
RoleDetail & AddInstanceProfileList(InstanceProfileListT &&value)
Definition RoleDetail.h:176
void SetAttachedManagedPolicies(AttachedManagedPoliciesT &&value)
Definition RoleDetail.h:216
void SetRoleName(RoleNameT &&value)
Definition RoleDetail.h:74
const Aws::Vector< PolicyDetail > & GetRolePolicyList() const
Definition RoleDetail.h:188
void SetRoleLastUsed(RoleLastUsedT &&value)
Definition RoleDetail.h:294
RoleDetail & WithPath(PathT &&value)
Definition RoleDetail.h:61
RoleDetail & WithCreateDate(CreateDateT &&value)
Definition RoleDetail.h:135
const Aws::String & GetPath() const
Definition RoleDetail.h:53
RoleDetail & WithInstanceProfileList(InstanceProfileListT &&value)
Definition RoleDetail.h:171
bool RoleLastUsedHasBeenSet() const
Definition RoleDetail.h:292
void SetInstanceProfileList(InstanceProfileListT &&value)
Definition RoleDetail.h:166
void SetRolePolicyList(RolePolicyListT &&value)
Definition RoleDetail.h:191
RoleDetail & AddTags(TagsT &&value)
Definition RoleDetail.h:274
const Aws::String & GetRoleId() const
Definition RoleDetail.h:92
const Aws::String & GetRoleName() const
Definition RoleDetail.h:71
void SetCreateDate(CreateDateT &&value)
Definition RoleDetail.h:130
const Aws::Vector< AttachedPolicy > & GetAttachedManagedPolicies() const
Definition RoleDetail.h:213
RoleDetail & WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition RoleDetail.h:153
bool RoleIdHasBeenSet() const
Definition RoleDetail.h:93
bool AssumeRolePolicyDocumentHasBeenSet() const
Definition RoleDetail.h:146
void SetPermissionsBoundary(PermissionsBoundaryT &&value)
Definition RoleDetail.h:243
void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition RoleDetail.h:148
AWS_IAM_API RoleDetail(const Aws::Utils::Xml::XmlNode &xmlNode)
RoleDetail & WithRoleId(RoleIdT &&value)
Definition RoleDetail.h:100
RoleDetail & WithPermissionsBoundary(PermissionsBoundaryT &&value)
Definition RoleDetail.h:248
RoleDetail & WithRolePolicyList(RolePolicyListT &&value)
Definition RoleDetail.h:196
RoleDetail & WithTags(TagsT &&value)
Definition RoleDetail.h:269
const Aws::Utils::DateTime & GetCreateDate() const
Definition RoleDetail.h:127
void SetRoleId(RoleIdT &&value)
Definition RoleDetail.h:95
AWS_IAM_API RoleDetail & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetAssumeRolePolicyDocument() const
Definition RoleDetail.h:145
bool PermissionsBoundaryHasBeenSet() const
Definition RoleDetail.h:241
RoleDetail & WithRoleName(RoleNameT &&value)
Definition RoleDetail.h:79
RoleDetail & AddAttachedManagedPolicies(AttachedManagedPoliciesT &&value)
Definition RoleDetail.h:226
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream