AWS SDK for C++

AWS SDK for C++ Version 1.11.935

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
206 inline int GetMaxSigninSessionDuration() const { return m_maxSigninSessionDuration; }
207 inline bool MaxSigninSessionDurationHasBeenSet() const { return m_maxSigninSessionDurationHasBeenSet; }
208 inline void SetMaxSigninSessionDuration(int value) {
209 m_maxSigninSessionDurationHasBeenSet = true;
210 m_maxSigninSessionDuration = value;
211 }
214 return *this;
215 }
217
219
225 inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const { return m_permissionsBoundary; }
226 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
227 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
228 void SetPermissionsBoundary(PermissionsBoundaryT&& value) {
229 m_permissionsBoundaryHasBeenSet = true;
230 m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value);
231 }
232 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
233 Role& WithPermissionsBoundary(PermissionsBoundaryT&& value) {
234 SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value));
235 return *this;
236 }
238
240
246 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
247 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
248 template <typename TagsT = Aws::Vector<Tag>>
249 void SetTags(TagsT&& value) {
250 m_tagsHasBeenSet = true;
251 m_tags = std::forward<TagsT>(value);
252 }
253 template <typename TagsT = Aws::Vector<Tag>>
254 Role& WithTags(TagsT&& value) {
255 SetTags(std::forward<TagsT>(value));
256 return *this;
257 }
258 template <typename TagsT = Tag>
259 Role& AddTags(TagsT&& value) {
260 m_tagsHasBeenSet = true;
261 m_tags.emplace_back(std::forward<TagsT>(value));
262 return *this;
263 }
265
267
276 inline const RoleLastUsed& GetRoleLastUsed() const { return m_roleLastUsed; }
277 inline bool RoleLastUsedHasBeenSet() const { return m_roleLastUsedHasBeenSet; }
278 template <typename RoleLastUsedT = RoleLastUsed>
279 void SetRoleLastUsed(RoleLastUsedT&& value) {
280 m_roleLastUsedHasBeenSet = true;
281 m_roleLastUsed = std::forward<RoleLastUsedT>(value);
282 }
283 template <typename RoleLastUsedT = RoleLastUsed>
284 Role& WithRoleLastUsed(RoleLastUsedT&& value) {
285 SetRoleLastUsed(std::forward<RoleLastUsedT>(value));
286 return *this;
287 }
289
291
296 inline const SourceRoleTemplate& GetSourceRoleTemplate() const { return m_sourceRoleTemplate; }
297 inline bool SourceRoleTemplateHasBeenSet() const { return m_sourceRoleTemplateHasBeenSet; }
298 template <typename SourceRoleTemplateT = SourceRoleTemplate>
299 void SetSourceRoleTemplate(SourceRoleTemplateT&& value) {
300 m_sourceRoleTemplateHasBeenSet = true;
301 m_sourceRoleTemplate = std::forward<SourceRoleTemplateT>(value);
302 }
303 template <typename SourceRoleTemplateT = SourceRoleTemplate>
304 Role& WithSourceRoleTemplate(SourceRoleTemplateT&& value) {
305 SetSourceRoleTemplate(std::forward<SourceRoleTemplateT>(value));
306 return *this;
307 }
309 private:
310 Aws::String m_path;
311
312 Aws::String m_roleName;
313
314 Aws::String m_roleId;
315
316 Aws::String m_arn;
317
318 Aws::Utils::DateTime m_createDate{};
319
320 Aws::String m_assumeRolePolicyDocument;
321
322 Aws::String m_description;
323
324 int m_maxSessionDuration{0};
325
326 int m_maxSigninSessionDuration{0};
327
328 AttachedPermissionsBoundary m_permissionsBoundary;
329
330 Aws::Vector<Tag> m_tags;
331
332 RoleLastUsed m_roleLastUsed;
333
334 SourceRoleTemplate m_sourceRoleTemplate;
335 bool m_pathHasBeenSet = false;
336 bool m_roleNameHasBeenSet = false;
337 bool m_roleIdHasBeenSet = false;
338 bool m_arnHasBeenSet = false;
339 bool m_createDateHasBeenSet = false;
340 bool m_assumeRolePolicyDocumentHasBeenSet = false;
341 bool m_descriptionHasBeenSet = false;
342 bool m_maxSessionDurationHasBeenSet = false;
343 bool m_maxSigninSessionDurationHasBeenSet = false;
344 bool m_permissionsBoundaryHasBeenSet = false;
345 bool m_tagsHasBeenSet = false;
346 bool m_roleLastUsedHasBeenSet = false;
347 bool m_sourceRoleTemplateHasBeenSet = false;
348};
349
350} // namespace Model
351} // namespace IAM
352} // 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:226
void SetTags(TagsT &&value)
Definition Role.h:249
bool SourceRoleTemplateHasBeenSet() const
Definition Role.h:297
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:296
Role & WithCreateDate(CreateDateT &&value)
Definition Role.h:137
bool RoleLastUsedHasBeenSet() const
Definition Role.h:277
Role & WithRoleName(RoleNameT &&value)
Definition Role.h:76
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition Role.h:225
Role & WithTags(TagsT &&value)
Definition Role.h:254
const Aws::String & GetRoleId() const
Definition Role.h:89
bool PathHasBeenSet() const
Definition Role.h:51
int GetMaxSigninSessionDuration() const
Definition Role.h:206
Role & WithMaxSessionDuration(int value)
Definition Role.h:192
Role & WithPermissionsBoundary(PermissionsBoundaryT &&value)
Definition Role.h:233
bool TagsHasBeenSet() const
Definition Role.h:247
void SetMaxSessionDuration(int value)
Definition Role.h:188
void SetPermissionsBoundary(PermissionsBoundaryT &&value)
Definition Role.h:228
void SetSourceRoleTemplate(SourceRoleTemplateT &&value)
Definition Role.h:299
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:304
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:246
bool MaxSigninSessionDurationHasBeenSet() const
Definition Role.h:207
void SetCreateDate(CreateDateT &&value)
Definition Role.h:132
const Aws::String & GetArn() const
Definition Role.h:110
const RoleLastUsed & GetRoleLastUsed() const
Definition Role.h:276
void SetMaxSigninSessionDuration(int value)
Definition Role.h:208
Role & WithRoleLastUsed(RoleLastUsedT &&value)
Definition Role.h:284
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:259
Role & WithMaxSigninSessionDuration(int value)
Definition Role.h:212
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:279
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::basic_ostream< char, std::char_traits< char > > OStream
std::vector< T, Aws::Allocator< T > > Vector