AWS SDK for C++  1.8.7
AWS SDK for C++
Role.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/iam/IAM_EXPORTS.h>
14 #include <aws/iam/model/Tag.h>
15 #include <utility>
16 
17 namespace Aws
18 {
19 namespace Utils
20 {
21 namespace Xml
22 {
23  class XmlNode;
24 } // namespace Xml
25 } // namespace Utils
26 namespace IAM
27 {
28 namespace Model
29 {
30 
39  {
40  public:
41  Role();
42  Role(const Aws::Utils::Xml::XmlNode& xmlNode);
43  Role& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
48 
54  inline const Aws::String& GetPath() const{ return m_path; }
55 
61  inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
62 
68  inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
69 
75  inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
76 
82  inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
83 
89  inline Role& WithPath(const Aws::String& value) { SetPath(value); return *this;}
90 
96  inline Role& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
97 
103  inline Role& WithPath(const char* value) { SetPath(value); return *this;}
104 
105 
109  inline const Aws::String& GetRoleName() const{ return m_roleName; }
110 
114  inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
115 
119  inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
120 
124  inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); }
125 
129  inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); }
130 
134  inline Role& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;}
135 
139  inline Role& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;}
140 
144  inline Role& WithRoleName(const char* value) { SetRoleName(value); return *this;}
145 
146 
153  inline const Aws::String& GetRoleId() const{ return m_roleId; }
154 
161  inline bool RoleIdHasBeenSet() const { return m_roleIdHasBeenSet; }
162 
169  inline void SetRoleId(const Aws::String& value) { m_roleIdHasBeenSet = true; m_roleId = value; }
170 
177  inline void SetRoleId(Aws::String&& value) { m_roleIdHasBeenSet = true; m_roleId = std::move(value); }
178 
185  inline void SetRoleId(const char* value) { m_roleIdHasBeenSet = true; m_roleId.assign(value); }
186 
193  inline Role& WithRoleId(const Aws::String& value) { SetRoleId(value); return *this;}
194 
201  inline Role& WithRoleId(Aws::String&& value) { SetRoleId(std::move(value)); return *this;}
202 
209  inline Role& WithRoleId(const char* value) { SetRoleId(value); return *this;}
210 
211 
218  inline const Aws::String& GetArn() const{ return m_arn; }
219 
226  inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
227 
234  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
235 
242  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
243 
250  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
251 
258  inline Role& WithArn(const Aws::String& value) { SetArn(value); return *this;}
259 
266  inline Role& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
267 
274  inline Role& WithArn(const char* value) { SetArn(value); return *this;}
275 
276 
281  inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; }
282 
287  inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
288 
293  inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; }
294 
299  inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); }
300 
305  inline Role& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;}
306 
311  inline Role& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;}
312 
313 
317  inline const Aws::String& GetAssumeRolePolicyDocument() const{ return m_assumeRolePolicyDocument; }
318 
322  inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
323 
327  inline void SetAssumeRolePolicyDocument(const Aws::String& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = value; }
328 
332  inline void SetAssumeRolePolicyDocument(Aws::String&& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = std::move(value); }
333 
337  inline void SetAssumeRolePolicyDocument(const char* value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument.assign(value); }
338 
342  inline Role& WithAssumeRolePolicyDocument(const Aws::String& value) { SetAssumeRolePolicyDocument(value); return *this;}
343 
347  inline Role& WithAssumeRolePolicyDocument(Aws::String&& value) { SetAssumeRolePolicyDocument(std::move(value)); return *this;}
348 
352  inline Role& WithAssumeRolePolicyDocument(const char* value) { SetAssumeRolePolicyDocument(value); return *this;}
353 
354 
358  inline const Aws::String& GetDescription() const{ return m_description; }
359 
363  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
364 
368  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
369 
373  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
374 
378  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
379 
383  inline Role& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
384 
388  inline Role& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
389 
393  inline Role& WithDescription(const char* value) { SetDescription(value); return *this;}
394 
395 
402  inline int GetMaxSessionDuration() const{ return m_maxSessionDuration; }
403 
410  inline bool MaxSessionDurationHasBeenSet() const { return m_maxSessionDurationHasBeenSet; }
411 
418  inline void SetMaxSessionDuration(int value) { m_maxSessionDurationHasBeenSet = true; m_maxSessionDuration = value; }
419 
426  inline Role& WithMaxSessionDuration(int value) { SetMaxSessionDuration(value); return *this;}
427 
428 
435  inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const{ return m_permissionsBoundary; }
436 
443  inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
444 
451  inline void SetPermissionsBoundary(const AttachedPermissionsBoundary& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = value; }
452 
459  inline void SetPermissionsBoundary(AttachedPermissionsBoundary&& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = std::move(value); }
460 
467  inline Role& WithPermissionsBoundary(const AttachedPermissionsBoundary& value) { SetPermissionsBoundary(value); return *this;}
468 
475  inline Role& WithPermissionsBoundary(AttachedPermissionsBoundary&& value) { SetPermissionsBoundary(std::move(value)); return *this;}
476 
477 
484  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
485 
492  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
493 
500  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
501 
508  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
509 
516  inline Role& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
517 
524  inline Role& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
525 
532  inline Role& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
533 
540  inline Role& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
541 
542 
552  inline const RoleLastUsed& GetRoleLastUsed() const{ return m_roleLastUsed; }
553 
563  inline bool RoleLastUsedHasBeenSet() const { return m_roleLastUsedHasBeenSet; }
564 
574  inline void SetRoleLastUsed(const RoleLastUsed& value) { m_roleLastUsedHasBeenSet = true; m_roleLastUsed = value; }
575 
585  inline void SetRoleLastUsed(RoleLastUsed&& value) { m_roleLastUsedHasBeenSet = true; m_roleLastUsed = std::move(value); }
586 
596  inline Role& WithRoleLastUsed(const RoleLastUsed& value) { SetRoleLastUsed(value); return *this;}
597 
607  inline Role& WithRoleLastUsed(RoleLastUsed&& value) { SetRoleLastUsed(std::move(value)); return *this;}
608 
609  private:
610 
611  Aws::String m_path;
612  bool m_pathHasBeenSet;
613 
614  Aws::String m_roleName;
615  bool m_roleNameHasBeenSet;
616 
617  Aws::String m_roleId;
618  bool m_roleIdHasBeenSet;
619 
620  Aws::String m_arn;
621  bool m_arnHasBeenSet;
622 
623  Aws::Utils::DateTime m_createDate;
624  bool m_createDateHasBeenSet;
625 
626  Aws::String m_assumeRolePolicyDocument;
627  bool m_assumeRolePolicyDocumentHasBeenSet;
628 
629  Aws::String m_description;
630  bool m_descriptionHasBeenSet;
631 
632  int m_maxSessionDuration;
633  bool m_maxSessionDurationHasBeenSet;
634 
635  AttachedPermissionsBoundary m_permissionsBoundary;
636  bool m_permissionsBoundaryHasBeenSet;
637 
638  Aws::Vector<Tag> m_tags;
639  bool m_tagsHasBeenSet;
640 
641  RoleLastUsed m_roleLastUsed;
642  bool m_roleLastUsedHasBeenSet;
643  };
644 
645 } // namespace Model
646 } // namespace IAM
647 } // namespace Aws
Role & WithMaxSessionDuration(int value)
Definition: Role.h:426
const Aws::String & GetAssumeRolePolicyDocument() const
Definition: Role.h:317
bool RoleIdHasBeenSet() const
Definition: Role.h:161
Role & AddTags(const Tag &value)
Definition: Role.h:532
Role & WithPath(const char *value)
Definition: Role.h:103
Role & WithRoleName(const char *value)
Definition: Role.h:144
bool RoleLastUsedHasBeenSet() const
Definition: Role.h:563
Role & WithRoleLastUsed(RoleLastUsed &&value)
Definition: Role.h:607
const Aws::Utils::DateTime & GetCreateDate() const
Definition: Role.h:281
bool PermissionsBoundaryHasBeenSet() const
Definition: Role.h:443
Role & WithRoleName(const Aws::String &value)
Definition: Role.h:134
bool CreateDateHasBeenSet() const
Definition: Role.h:287
void SetRoleName(Aws::String &&value)
Definition: Role.h:124
const Aws::String & GetRoleId() const
Definition: Role.h:153
void SetPath(const char *value)
Definition: Role.h:82
const Aws::String & GetDescription() const
Definition: Role.h:358
void SetArn(const Aws::String &value)
Definition: Role.h:234
void SetDescription(const char *value)
Definition: Role.h:378
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Role & WithPermissionsBoundary(AttachedPermissionsBoundary &&value)
Definition: Role.h:475
void SetMaxSessionDuration(int value)
Definition: Role.h:418
void SetPermissionsBoundary(AttachedPermissionsBoundary &&value)
Definition: Role.h:459
void SetCreateDate(const Aws::Utils::DateTime &value)
Definition: Role.h:293
void SetRoleId(const Aws::String &value)
Definition: Role.h:169
Role & WithArn(const Aws::String &value)
Definition: Role.h:258
int index
Definition: cJSON.h:171
Role & WithTags(Aws::Vector< Tag > &&value)
Definition: Role.h:524
Role & WithCreateDate(Aws::Utils::DateTime &&value)
Definition: Role.h:311
void SetRoleLastUsed(RoleLastUsed &&value)
Definition: Role.h:585
Role & WithRoleName(Aws::String &&value)
Definition: Role.h:139
void SetPath(const Aws::String &value)
Definition: Role.h:68
Role & WithAssumeRolePolicyDocument(const Aws::String &value)
Definition: Role.h:342
const Aws::String & GetRoleName() const
Definition: Role.h:109
Role & WithRoleId(const char *value)
Definition: Role.h:209
Role & WithArn(Aws::String &&value)
Definition: Role.h:266
bool RoleNameHasBeenSet() const
Definition: Role.h:114
const RoleLastUsed & GetRoleLastUsed() const
Definition: Role.h:552
Role & WithDescription(Aws::String &&value)
Definition: Role.h:388
const Aws::Vector< Tag > & GetTags() const
Definition: Role.h:484
bool DescriptionHasBeenSet() const
Definition: Role.h:363
Role & WithDescription(const Aws::String &value)
Definition: Role.h:383
void SetArn(Aws::String &&value)
Definition: Role.h:242
bool MaxSessionDurationHasBeenSet() const
Definition: Role.h:410
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Role & AddTags(Tag &&value)
Definition: Role.h:540
void SetAssumeRolePolicyDocument(const Aws::String &value)
Definition: Role.h:327
Role & WithArn(const char *value)
Definition: Role.h:274
void SetRoleLastUsed(const RoleLastUsed &value)
Definition: Role.h:574
bool PathHasBeenSet() const
Definition: Role.h:61
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition: Role.h:435
Role & WithPath(Aws::String &&value)
Definition: Role.h:96
void SetCreateDate(Aws::Utils::DateTime &&value)
Definition: Role.h:299
void SetRoleId(const char *value)
Definition: Role.h:185
Role & WithRoleId(const Aws::String &value)
Definition: Role.h:193
void SetDescription(const Aws::String &value)
Definition: Role.h:368
void SetTags(Aws::Vector< Tag > &&value)
Definition: Role.h:508
void SetRoleId(Aws::String &&value)
Definition: Role.h:177
void SetPermissionsBoundary(const AttachedPermissionsBoundary &value)
Definition: Role.h:451
void SetRoleName(const char *value)
Definition: Role.h:129
Role & WithTags(const Aws::Vector< Tag > &value)
Definition: Role.h:516
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetRoleName(const Aws::String &value)
Definition: Role.h:119
Role & WithRoleLastUsed(const RoleLastUsed &value)
Definition: Role.h:596
Role & WithRoleId(Aws::String &&value)
Definition: Role.h:201
void SetDescription(Aws::String &&value)
Definition: Role.h:373
Role & WithAssumeRolePolicyDocument(const char *value)
Definition: Role.h:352
const Aws::String & GetArn() const
Definition: Role.h:218
Role & WithCreateDate(const Aws::Utils::DateTime &value)
Definition: Role.h:305
void SetAssumeRolePolicyDocument(const char *value)
Definition: Role.h:337
void SetArn(const char *value)
Definition: Role.h:250
void SetPath(Aws::String &&value)
Definition: Role.h:75
int GetMaxSessionDuration() const
Definition: Role.h:402
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:28
bool ArnHasBeenSet() const
Definition: Role.h:226
bool TagsHasBeenSet() const
Definition: Role.h:492
Role & WithDescription(const char *value)
Definition: Role.h:393
void SetTags(const Aws::Vector< Tag > &value)
Definition: Role.h:500
Role & WithAssumeRolePolicyDocument(Aws::String &&value)
Definition: Role.h:347
void SetAssumeRolePolicyDocument(Aws::String &&value)
Definition: Role.h:332
Role & WithPath(const Aws::String &value)
Definition: Role.h:89
Role & WithPermissionsBoundary(const AttachedPermissionsBoundary &value)
Definition: Role.h:467
const Aws::String & GetPath() const
Definition: Role.h:54
bool AssumeRolePolicyDocumentHasBeenSet() const
Definition: Role.h:322