AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
RoleDetail.h
1
6#pragma once
7#include <aws/iam/IAM_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/iam/model/AttachedPermissionsBoundary.h>
13#include <aws/iam/model/RoleLastUsed.h>
14#include <aws/iam/model/InstanceProfile.h>
15#include <aws/iam/model/PolicyDetail.h>
16#include <aws/iam/model/AttachedPolicy.h>
17#include <aws/iam/model/Tag.h>
18#include <utility>
19
20namespace Aws
21{
22namespace Utils
23{
24namespace Xml
25{
26 class XmlNode;
27} // namespace Xml
28} // namespace Utils
29namespace IAM
30{
31namespace Model
32{
33
43 {
44 public:
45 AWS_IAM_API RoleDetail() = default;
46 AWS_IAM_API RoleDetail(const Aws::Utils::Xml::XmlNode& xmlNode);
47 AWS_IAM_API RoleDetail& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
48
49 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
50 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
51
52
54
59 inline const Aws::String& GetPath() const { return m_path; }
60 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
61 template<typename PathT = Aws::String>
62 void SetPath(PathT&& value) { m_pathHasBeenSet = true; m_path = std::forward<PathT>(value); }
63 template<typename PathT = Aws::String>
64 RoleDetail& WithPath(PathT&& value) { SetPath(std::forward<PathT>(value)); return *this;}
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) { m_roleNameHasBeenSet = true; m_roleName = std::forward<RoleNameT>(value); }
75 template<typename RoleNameT = Aws::String>
76 RoleDetail& WithRoleName(RoleNameT&& value) { SetRoleName(std::forward<RoleNameT>(value)); return *this;}
78
80
86 inline const Aws::String& GetRoleId() const { return m_roleId; }
87 inline bool RoleIdHasBeenSet() const { return m_roleIdHasBeenSet; }
88 template<typename RoleIdT = Aws::String>
89 void SetRoleId(RoleIdT&& value) { m_roleIdHasBeenSet = true; m_roleId = std::forward<RoleIdT>(value); }
90 template<typename RoleIdT = Aws::String>
91 RoleDetail& WithRoleId(RoleIdT&& value) { SetRoleId(std::forward<RoleIdT>(value)); return *this;}
93
95
96 inline const Aws::String& GetArn() const { return m_arn; }
97 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
98 template<typename ArnT = Aws::String>
99 void SetArn(ArnT&& value) { m_arnHasBeenSet = true; m_arn = std::forward<ArnT>(value); }
100 template<typename ArnT = Aws::String>
101 RoleDetail& WithArn(ArnT&& value) { SetArn(std::forward<ArnT>(value)); return *this;}
103
105
109 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
110 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
111 template<typename CreateDateT = Aws::Utils::DateTime>
112 void SetCreateDate(CreateDateT&& value) { m_createDateHasBeenSet = true; m_createDate = std::forward<CreateDateT>(value); }
113 template<typename CreateDateT = Aws::Utils::DateTime>
114 RoleDetail& WithCreateDate(CreateDateT&& value) { SetCreateDate(std::forward<CreateDateT>(value)); return *this;}
116
118
121 inline const Aws::String& GetAssumeRolePolicyDocument() const { return m_assumeRolePolicyDocument; }
122 inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
123 template<typename AssumeRolePolicyDocumentT = Aws::String>
124 void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = std::forward<AssumeRolePolicyDocumentT>(value); }
125 template<typename AssumeRolePolicyDocumentT = Aws::String>
126 RoleDetail& WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) { SetAssumeRolePolicyDocument(std::forward<AssumeRolePolicyDocumentT>(value)); return *this;}
128
130
133 inline const Aws::Vector<InstanceProfile>& GetInstanceProfileList() const { return m_instanceProfileList; }
134 inline bool InstanceProfileListHasBeenSet() const { return m_instanceProfileListHasBeenSet; }
135 template<typename InstanceProfileListT = Aws::Vector<InstanceProfile>>
136 void SetInstanceProfileList(InstanceProfileListT&& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList = std::forward<InstanceProfileListT>(value); }
137 template<typename InstanceProfileListT = Aws::Vector<InstanceProfile>>
138 RoleDetail& WithInstanceProfileList(InstanceProfileListT&& value) { SetInstanceProfileList(std::forward<InstanceProfileListT>(value)); return *this;}
139 template<typename InstanceProfileListT = InstanceProfile>
140 RoleDetail& AddInstanceProfileList(InstanceProfileListT&& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList.emplace_back(std::forward<InstanceProfileListT>(value)); return *this; }
142
144
148 inline const Aws::Vector<PolicyDetail>& GetRolePolicyList() const { return m_rolePolicyList; }
149 inline bool RolePolicyListHasBeenSet() const { return m_rolePolicyListHasBeenSet; }
150 template<typename RolePolicyListT = Aws::Vector<PolicyDetail>>
151 void SetRolePolicyList(RolePolicyListT&& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList = std::forward<RolePolicyListT>(value); }
152 template<typename RolePolicyListT = Aws::Vector<PolicyDetail>>
153 RoleDetail& WithRolePolicyList(RolePolicyListT&& value) { SetRolePolicyList(std::forward<RolePolicyListT>(value)); return *this;}
154 template<typename RolePolicyListT = PolicyDetail>
155 RoleDetail& AddRolePolicyList(RolePolicyListT&& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList.emplace_back(std::forward<RolePolicyListT>(value)); return *this; }
157
159
163 inline const Aws::Vector<AttachedPolicy>& GetAttachedManagedPolicies() const { return m_attachedManagedPolicies; }
164 inline bool AttachedManagedPoliciesHasBeenSet() const { return m_attachedManagedPoliciesHasBeenSet; }
165 template<typename AttachedManagedPoliciesT = Aws::Vector<AttachedPolicy>>
166 void SetAttachedManagedPolicies(AttachedManagedPoliciesT&& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies = std::forward<AttachedManagedPoliciesT>(value); }
167 template<typename AttachedManagedPoliciesT = Aws::Vector<AttachedPolicy>>
168 RoleDetail& WithAttachedManagedPolicies(AttachedManagedPoliciesT&& value) { SetAttachedManagedPolicies(std::forward<AttachedManagedPoliciesT>(value)); return *this;}
169 template<typename AttachedManagedPoliciesT = AttachedPolicy>
170 RoleDetail& AddAttachedManagedPolicies(AttachedManagedPoliciesT&& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies.emplace_back(std::forward<AttachedManagedPoliciesT>(value)); return *this; }
172
174
180 inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const { return m_permissionsBoundary; }
181 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
182 template<typename PermissionsBoundaryT = AttachedPermissionsBoundary>
183 void SetPermissionsBoundary(PermissionsBoundaryT&& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value); }
184 template<typename PermissionsBoundaryT = AttachedPermissionsBoundary>
185 RoleDetail& WithPermissionsBoundary(PermissionsBoundaryT&& value) { SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value)); return *this;}
187
189
195 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
196 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
197 template<typename TagsT = Aws::Vector<Tag>>
198 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
199 template<typename TagsT = Aws::Vector<Tag>>
200 RoleDetail& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
201 template<typename TagsT = Tag>
202 RoleDetail& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
204
206
215 inline const RoleLastUsed& GetRoleLastUsed() const { return m_roleLastUsed; }
216 inline bool RoleLastUsedHasBeenSet() const { return m_roleLastUsedHasBeenSet; }
217 template<typename RoleLastUsedT = RoleLastUsed>
218 void SetRoleLastUsed(RoleLastUsedT&& value) { m_roleLastUsedHasBeenSet = true; m_roleLastUsed = std::forward<RoleLastUsedT>(value); }
219 template<typename RoleLastUsedT = RoleLastUsed>
220 RoleDetail& WithRoleLastUsed(RoleLastUsedT&& value) { SetRoleLastUsed(std::forward<RoleLastUsedT>(value)); return *this;}
222 private:
223
224 Aws::String m_path;
225 bool m_pathHasBeenSet = false;
226
227 Aws::String m_roleName;
228 bool m_roleNameHasBeenSet = false;
229
230 Aws::String m_roleId;
231 bool m_roleIdHasBeenSet = false;
232
233 Aws::String m_arn;
234 bool m_arnHasBeenSet = false;
235
236 Aws::Utils::DateTime m_createDate{};
237 bool m_createDateHasBeenSet = false;
238
239 Aws::String m_assumeRolePolicyDocument;
240 bool m_assumeRolePolicyDocumentHasBeenSet = false;
241
242 Aws::Vector<InstanceProfile> m_instanceProfileList;
243 bool m_instanceProfileListHasBeenSet = false;
244
245 Aws::Vector<PolicyDetail> m_rolePolicyList;
246 bool m_rolePolicyListHasBeenSet = false;
247
248 Aws::Vector<AttachedPolicy> m_attachedManagedPolicies;
249 bool m_attachedManagedPoliciesHasBeenSet = false;
250
251 AttachedPermissionsBoundary m_permissionsBoundary;
252 bool m_permissionsBoundaryHasBeenSet = false;
253
254 Aws::Vector<Tag> m_tags;
255 bool m_tagsHasBeenSet = false;
256
257 RoleLastUsed m_roleLastUsed;
258 bool m_roleLastUsedHasBeenSet = false;
259 };
260
261} // namespace Model
262} // namespace IAM
263} // namespace Aws
RoleDetail & WithAttachedManagedPolicies(AttachedManagedPoliciesT &&value)
Definition RoleDetail.h:168
RoleDetail & WithRoleLastUsed(RoleLastUsedT &&value)
Definition RoleDetail.h:220
void SetArn(ArnT &&value)
Definition RoleDetail.h:99
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition RoleDetail.h:180
bool InstanceProfileListHasBeenSet() const
Definition RoleDetail.h:134
const Aws::Vector< Tag > & GetTags() const
Definition RoleDetail.h:195
RoleDetail & WithArn(ArnT &&value)
Definition RoleDetail.h:101
bool RolePolicyListHasBeenSet() const
Definition RoleDetail.h:149
const Aws::Vector< InstanceProfile > & GetInstanceProfileList() const
Definition RoleDetail.h:133
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:198
bool AttachedManagedPoliciesHasBeenSet() const
Definition RoleDetail.h:164
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
bool CreateDateHasBeenSet() const
Definition RoleDetail.h:110
const Aws::String & GetArn() const
Definition RoleDetail.h:96
AWS_IAM_API RoleDetail()=default
const RoleLastUsed & GetRoleLastUsed() const
Definition RoleDetail.h:215
RoleDetail & AddRolePolicyList(RolePolicyListT &&value)
Definition RoleDetail.h:155
void SetPath(PathT &&value)
Definition RoleDetail.h:62
RoleDetail & AddInstanceProfileList(InstanceProfileListT &&value)
Definition RoleDetail.h:140
void SetAttachedManagedPolicies(AttachedManagedPoliciesT &&value)
Definition RoleDetail.h:166
void SetRoleName(RoleNameT &&value)
Definition RoleDetail.h:74
const Aws::Vector< PolicyDetail > & GetRolePolicyList() const
Definition RoleDetail.h:148
void SetRoleLastUsed(RoleLastUsedT &&value)
Definition RoleDetail.h:218
RoleDetail & WithPath(PathT &&value)
Definition RoleDetail.h:64
RoleDetail & WithCreateDate(CreateDateT &&value)
Definition RoleDetail.h:114
const Aws::String & GetPath() const
Definition RoleDetail.h:59
RoleDetail & WithInstanceProfileList(InstanceProfileListT &&value)
Definition RoleDetail.h:138
bool RoleLastUsedHasBeenSet() const
Definition RoleDetail.h:216
void SetInstanceProfileList(InstanceProfileListT &&value)
Definition RoleDetail.h:136
void SetRolePolicyList(RolePolicyListT &&value)
Definition RoleDetail.h:151
RoleDetail & AddTags(TagsT &&value)
Definition RoleDetail.h:202
const Aws::String & GetRoleId() const
Definition RoleDetail.h:86
const Aws::String & GetRoleName() const
Definition RoleDetail.h:71
void SetCreateDate(CreateDateT &&value)
Definition RoleDetail.h:112
const Aws::Vector< AttachedPolicy > & GetAttachedManagedPolicies() const
Definition RoleDetail.h:163
RoleDetail & WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition RoleDetail.h:126
bool RoleIdHasBeenSet() const
Definition RoleDetail.h:87
bool AssumeRolePolicyDocumentHasBeenSet() const
Definition RoleDetail.h:122
void SetPermissionsBoundary(PermissionsBoundaryT &&value)
Definition RoleDetail.h:183
void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition RoleDetail.h:124
AWS_IAM_API RoleDetail(const Aws::Utils::Xml::XmlNode &xmlNode)
RoleDetail & WithRoleId(RoleIdT &&value)
Definition RoleDetail.h:91
RoleDetail & WithPermissionsBoundary(PermissionsBoundaryT &&value)
Definition RoleDetail.h:185
RoleDetail & WithRolePolicyList(RolePolicyListT &&value)
Definition RoleDetail.h:153
RoleDetail & WithTags(TagsT &&value)
Definition RoleDetail.h:200
const Aws::Utils::DateTime & GetCreateDate() const
Definition RoleDetail.h:109
void SetRoleId(RoleIdT &&value)
Definition RoleDetail.h:89
AWS_IAM_API RoleDetail & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetAssumeRolePolicyDocument() const
Definition RoleDetail.h:121
bool PermissionsBoundaryHasBeenSet() const
Definition RoleDetail.h:181
RoleDetail & WithRoleName(RoleNameT &&value)
Definition RoleDetail.h:76
RoleDetail & AddAttachedManagedPolicies(AttachedManagedPoliciesT &&value)
Definition RoleDetail.h:170
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