AWS SDK for C++

AWS SDK for C++ Version 1.11.875

Loading...
Searching...
No Matches
Role.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/RoleLastUsed.h>
14#include <aws/iam/model/SourceRoleTemplate.h>
15#include <aws/iam/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Xml {
22class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace IAM {
26namespace Model {
27
35class Role {
36 public:
37 AWS_IAM_API Role() = default;
38 AWS_IAM_API Role(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_IAM_API Role& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
45
50 inline const Aws::String& GetPath() const { return m_path; }
51 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
52 template <typename PathT = Aws::String>
53 void SetPath(PathT&& value) {
54 m_pathHasBeenSet = true;
55 m_path = std::forward<PathT>(value);
56 }
57 template <typename PathT = Aws::String>
58 Role& WithPath(PathT&& value) {
59 SetPath(std::forward<PathT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::String& GetRoleName() const { return m_roleName; }
69 inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
70 template <typename RoleNameT = Aws::String>
71 void SetRoleName(RoleNameT&& value) {
72 m_roleNameHasBeenSet = true;
73 m_roleName = std::forward<RoleNameT>(value);
74 }
75 template <typename RoleNameT = Aws::String>
76 Role& WithRoleName(RoleNameT&& value) {
77 SetRoleName(std::forward<RoleNameT>(value));
78 return *this;
79 }
81
83
89 inline const Aws::String& GetRoleId() const { return m_roleId; }
90 inline bool RoleIdHasBeenSet() const { return m_roleIdHasBeenSet; }
91 template <typename RoleIdT = Aws::String>
92 void SetRoleId(RoleIdT&& value) {
93 m_roleIdHasBeenSet = true;
94 m_roleId = std::forward<RoleIdT>(value);
95 }
96 template <typename RoleIdT = Aws::String>
97 Role& WithRoleId(RoleIdT&& value) {
98 SetRoleId(std::forward<RoleIdT>(value));
99 return *this;
100 }
102
104
110 inline const Aws::String& GetArn() const { return m_arn; }
111 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
112 template <typename ArnT = Aws::String>
113 void SetArn(ArnT&& value) {
114 m_arnHasBeenSet = true;
115 m_arn = std::forward<ArnT>(value);
116 }
117 template <typename ArnT = Aws::String>
118 Role& WithArn(ArnT&& value) {
119 SetArn(std::forward<ArnT>(value));
120 return *this;
121 }
123
125
129 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
130 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
131 template <typename CreateDateT = Aws::Utils::DateTime>
132 void SetCreateDate(CreateDateT&& value) {
133 m_createDateHasBeenSet = true;
134 m_createDate = std::forward<CreateDateT>(value);
135 }
136 template <typename CreateDateT = Aws::Utils::DateTime>
137 Role& WithCreateDate(CreateDateT&& value) {
138 SetCreateDate(std::forward<CreateDateT>(value));
139 return *this;
140 }
142
144
147 inline const Aws::String& GetAssumeRolePolicyDocument() const { return m_assumeRolePolicyDocument; }
148 inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
149 template <typename AssumeRolePolicyDocumentT = Aws::String>
150 void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) {
151 m_assumeRolePolicyDocumentHasBeenSet = true;
152 m_assumeRolePolicyDocument = std::forward<AssumeRolePolicyDocumentT>(value);
153 }
154 template <typename AssumeRolePolicyDocumentT = Aws::String>
155 Role& WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) {
156 SetAssumeRolePolicyDocument(std::forward<AssumeRolePolicyDocumentT>(value));
157 return *this;
158 }
160
162
165 inline const Aws::String& GetDescription() const { return m_description; }
166 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
167 template <typename DescriptionT = Aws::String>
168 void SetDescription(DescriptionT&& value) {
169 m_descriptionHasBeenSet = true;
170 m_description = std::forward<DescriptionT>(value);
171 }
172 template <typename DescriptionT = Aws::String>
173 Role& WithDescription(DescriptionT&& value) {
174 SetDescription(std::forward<DescriptionT>(value));
175 return *this;
176 }
178
180
186 inline int GetMaxSessionDuration() const { return m_maxSessionDuration; }
187 inline bool MaxSessionDurationHasBeenSet() const { return m_maxSessionDurationHasBeenSet; }
188 inline void SetMaxSessionDuration(int value) {
189 m_maxSessionDurationHasBeenSet = true;
190 m_maxSessionDuration = value;
191 }
192 inline Role& WithMaxSessionDuration(int value) {
194 return *this;
195 }
197
199
205 inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const { return m_permissionsBoundary; }
206 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
207 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
208 void SetPermissionsBoundary(PermissionsBoundaryT&& value) {
209 m_permissionsBoundaryHasBeenSet = true;
210 m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value);
211 }
212 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
213 Role& WithPermissionsBoundary(PermissionsBoundaryT&& value) {
214 SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value));
215 return *this;
216 }
218
220
226 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
227 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
228 template <typename TagsT = Aws::Vector<Tag>>
229 void SetTags(TagsT&& value) {
230 m_tagsHasBeenSet = true;
231 m_tags = std::forward<TagsT>(value);
232 }
233 template <typename TagsT = Aws::Vector<Tag>>
234 Role& WithTags(TagsT&& value) {
235 SetTags(std::forward<TagsT>(value));
236 return *this;
237 }
238 template <typename TagsT = Tag>
239 Role& AddTags(TagsT&& value) {
240 m_tagsHasBeenSet = true;
241 m_tags.emplace_back(std::forward<TagsT>(value));
242 return *this;
243 }
245
247
256 inline const RoleLastUsed& GetRoleLastUsed() const { return m_roleLastUsed; }
257 inline bool RoleLastUsedHasBeenSet() const { return m_roleLastUsedHasBeenSet; }
258 template <typename RoleLastUsedT = RoleLastUsed>
259 void SetRoleLastUsed(RoleLastUsedT&& value) {
260 m_roleLastUsedHasBeenSet = true;
261 m_roleLastUsed = std::forward<RoleLastUsedT>(value);
262 }
263 template <typename RoleLastUsedT = RoleLastUsed>
264 Role& WithRoleLastUsed(RoleLastUsedT&& value) {
265 SetRoleLastUsed(std::forward<RoleLastUsedT>(value));
266 return *this;
267 }
269
271
276 inline const SourceRoleTemplate& GetSourceRoleTemplate() const { return m_sourceRoleTemplate; }
277 inline bool SourceRoleTemplateHasBeenSet() const { return m_sourceRoleTemplateHasBeenSet; }
278 template <typename SourceRoleTemplateT = SourceRoleTemplate>
279 void SetSourceRoleTemplate(SourceRoleTemplateT&& value) {
280 m_sourceRoleTemplateHasBeenSet = true;
281 m_sourceRoleTemplate = std::forward<SourceRoleTemplateT>(value);
282 }
283 template <typename SourceRoleTemplateT = SourceRoleTemplate>
284 Role& WithSourceRoleTemplate(SourceRoleTemplateT&& value) {
285 SetSourceRoleTemplate(std::forward<SourceRoleTemplateT>(value));
286 return *this;
287 }
289 private:
290 Aws::String m_path;
291
292 Aws::String m_roleName;
293
294 Aws::String m_roleId;
295
296 Aws::String m_arn;
297
298 Aws::Utils::DateTime m_createDate{};
299
300 Aws::String m_assumeRolePolicyDocument;
301
302 Aws::String m_description;
303
304 int m_maxSessionDuration{0};
305
306 AttachedPermissionsBoundary m_permissionsBoundary;
307
308 Aws::Vector<Tag> m_tags;
309
310 RoleLastUsed m_roleLastUsed;
311
312 SourceRoleTemplate m_sourceRoleTemplate;
313 bool m_pathHasBeenSet = false;
314 bool m_roleNameHasBeenSet = false;
315 bool m_roleIdHasBeenSet = false;
316 bool m_arnHasBeenSet = false;
317 bool m_createDateHasBeenSet = false;
318 bool m_assumeRolePolicyDocumentHasBeenSet = false;
319 bool m_descriptionHasBeenSet = false;
320 bool m_maxSessionDurationHasBeenSet = false;
321 bool m_permissionsBoundaryHasBeenSet = false;
322 bool m_tagsHasBeenSet = false;
323 bool m_roleLastUsedHasBeenSet = false;
324 bool m_sourceRoleTemplateHasBeenSet = false;
325};
326
327} // namespace Model
328} // namespace IAM
329} // namespace Aws
AWS_IAM_API Role & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool CreateDateHasBeenSet() const
Definition Role.h:130
bool PermissionsBoundaryHasBeenSet() const
Definition Role.h:206
void SetTags(TagsT &&value)
Definition Role.h:229
bool SourceRoleTemplateHasBeenSet() const
Definition Role.h:277
int GetMaxSessionDuration() const
Definition Role.h:186
void SetArn(ArnT &&value)
Definition Role.h:113
const Aws::String & GetAssumeRolePolicyDocument() const
Definition Role.h:147
Role & WithDescription(DescriptionT &&value)
Definition Role.h:173
bool RoleIdHasBeenSet() const
Definition Role.h:90
void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition Role.h:150
Role & WithPath(PathT &&value)
Definition Role.h:58
const SourceRoleTemplate & GetSourceRoleTemplate() const
Definition Role.h:276
Role & WithCreateDate(CreateDateT &&value)
Definition Role.h:137
bool RoleLastUsedHasBeenSet() const
Definition Role.h:257
Role & WithRoleName(RoleNameT &&value)
Definition Role.h:76
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition Role.h:205
Role & WithTags(TagsT &&value)
Definition Role.h:234
const Aws::String & GetRoleId() const
Definition Role.h:89
bool PathHasBeenSet() const
Definition Role.h:51
Role & WithMaxSessionDuration(int value)
Definition Role.h:192
Role & WithPermissionsBoundary(PermissionsBoundaryT &&value)
Definition Role.h:213
bool TagsHasBeenSet() const
Definition Role.h:227
void SetMaxSessionDuration(int value)
Definition Role.h:188
void SetPermissionsBoundary(PermissionsBoundaryT &&value)
Definition Role.h:208
void SetSourceRoleTemplate(SourceRoleTemplateT &&value)
Definition Role.h:279
void SetPath(PathT &&value)
Definition Role.h:53
bool AssumeRolePolicyDocumentHasBeenSet() const
Definition Role.h:148
AWS_IAM_API void OutputToStream(Aws::OStream &oStream, const char *location) const
Role & WithSourceRoleTemplate(SourceRoleTemplateT &&value)
Definition Role.h:284
AWS_IAM_API Role(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetRoleName() const
Definition Role.h:68
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetRoleName(RoleNameT &&value)
Definition Role.h:71
const Aws::String & GetDescription() const
Definition Role.h:165
bool MaxSessionDurationHasBeenSet() const
Definition Role.h:187
const Aws::Vector< Tag > & GetTags() const
Definition Role.h:226
void SetCreateDate(CreateDateT &&value)
Definition Role.h:132
const Aws::String & GetArn() const
Definition Role.h:110
const RoleLastUsed & GetRoleLastUsed() const
Definition Role.h:256
Role & WithRoleLastUsed(RoleLastUsedT &&value)
Definition Role.h:264
const Aws::Utils::DateTime & GetCreateDate() const
Definition Role.h:129
void SetDescription(DescriptionT &&value)
Definition Role.h:168
AWS_IAM_API Role()=default
Role & WithRoleId(RoleIdT &&value)
Definition Role.h:97
bool RoleNameHasBeenSet() const
Definition Role.h:69
Role & AddTags(TagsT &&value)
Definition Role.h:239
void SetRoleId(RoleIdT &&value)
Definition Role.h:92
Role & WithArn(ArnT &&value)
Definition Role.h:118
bool ArnHasBeenSet() const
Definition Role.h:111
void SetRoleLastUsed(RoleLastUsedT &&value)
Definition Role.h:259
bool DescriptionHasBeenSet() const
Definition Role.h:166
Role & WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition Role.h:155
const Aws::String & GetPath() const
Definition Role.h:50
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