AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Role.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/iam/model/AttachedPermissionsBoundary.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/iam/model/RoleLastUsed.h>
14#include <aws/iam/model/Tag.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Xml
22{
23 class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace IAM
27{
28namespace Model
29{
30
38 class Role
39 {
40 public:
41 AWS_IAM_API Role();
42 AWS_IAM_API Role(const Aws::Utils::Xml::XmlNode& xmlNode);
43 AWS_IAM_API Role& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44
45 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
47
48
50
55 inline const Aws::String& GetPath() const{ return m_path; }
56 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
57 inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
58 inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
59 inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
60 inline Role& WithPath(const Aws::String& value) { SetPath(value); return *this;}
61 inline Role& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
62 inline Role& WithPath(const char* value) { SetPath(value); return *this;}
64
66
69 inline const Aws::String& GetRoleName() const{ return m_roleName; }
70 inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
71 inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
72 inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); }
73 inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); }
74 inline Role& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;}
75 inline Role& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;}
76 inline Role& WithRoleName(const char* value) { SetRoleName(value); return *this;}
78
80
86 inline const Aws::String& GetRoleId() const{ return m_roleId; }
87 inline bool RoleIdHasBeenSet() const { return m_roleIdHasBeenSet; }
88 inline void SetRoleId(const Aws::String& value) { m_roleIdHasBeenSet = true; m_roleId = value; }
89 inline void SetRoleId(Aws::String&& value) { m_roleIdHasBeenSet = true; m_roleId = std::move(value); }
90 inline void SetRoleId(const char* value) { m_roleIdHasBeenSet = true; m_roleId.assign(value); }
91 inline Role& WithRoleId(const Aws::String& value) { SetRoleId(value); return *this;}
92 inline Role& WithRoleId(Aws::String&& value) { SetRoleId(std::move(value)); return *this;}
93 inline Role& WithRoleId(const char* value) { SetRoleId(value); return *this;}
95
97
103 inline const Aws::String& GetArn() const{ return m_arn; }
104 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
105 inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
106 inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
107 inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
108 inline Role& WithArn(const Aws::String& value) { SetArn(value); return *this;}
109 inline Role& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
110 inline Role& WithArn(const char* value) { SetArn(value); return *this;}
112
114
118 inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; }
119 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
120 inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; }
121 inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); }
122 inline Role& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;}
123 inline Role& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;}
125
127
130 inline const Aws::String& GetAssumeRolePolicyDocument() const{ return m_assumeRolePolicyDocument; }
131 inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
132 inline void SetAssumeRolePolicyDocument(const Aws::String& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = value; }
133 inline void SetAssumeRolePolicyDocument(Aws::String&& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = std::move(value); }
134 inline void SetAssumeRolePolicyDocument(const char* value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument.assign(value); }
135 inline Role& WithAssumeRolePolicyDocument(const Aws::String& value) { SetAssumeRolePolicyDocument(value); return *this;}
136 inline Role& WithAssumeRolePolicyDocument(Aws::String&& value) { SetAssumeRolePolicyDocument(std::move(value)); return *this;}
137 inline Role& WithAssumeRolePolicyDocument(const char* value) { SetAssumeRolePolicyDocument(value); return *this;}
139
141
144 inline const Aws::String& GetDescription() const{ return m_description; }
145 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
146 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
147 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
148 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
149 inline Role& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
150 inline Role& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
151 inline Role& WithDescription(const char* value) { SetDescription(value); return *this;}
153
155
161 inline int GetMaxSessionDuration() const{ return m_maxSessionDuration; }
162 inline bool MaxSessionDurationHasBeenSet() const { return m_maxSessionDurationHasBeenSet; }
163 inline void SetMaxSessionDuration(int value) { m_maxSessionDurationHasBeenSet = true; m_maxSessionDuration = value; }
164 inline Role& WithMaxSessionDuration(int value) { SetMaxSessionDuration(value); return *this;}
166
168
174 inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const{ return m_permissionsBoundary; }
175 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
176 inline void SetPermissionsBoundary(const AttachedPermissionsBoundary& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = value; }
177 inline void SetPermissionsBoundary(AttachedPermissionsBoundary&& value) { m_permissionsBoundaryHasBeenSet = true; m_permissionsBoundary = std::move(value); }
179 inline Role& WithPermissionsBoundary(AttachedPermissionsBoundary&& value) { SetPermissionsBoundary(std::move(value)); return *this;}
181
183
189 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
190 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
191 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
192 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
193 inline Role& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
194 inline Role& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
195 inline Role& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
196 inline Role& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
198
200
209 inline const RoleLastUsed& GetRoleLastUsed() const{ return m_roleLastUsed; }
210 inline bool RoleLastUsedHasBeenSet() const { return m_roleLastUsedHasBeenSet; }
211 inline void SetRoleLastUsed(const RoleLastUsed& value) { m_roleLastUsedHasBeenSet = true; m_roleLastUsed = value; }
212 inline void SetRoleLastUsed(RoleLastUsed&& value) { m_roleLastUsedHasBeenSet = true; m_roleLastUsed = std::move(value); }
213 inline Role& WithRoleLastUsed(const RoleLastUsed& value) { SetRoleLastUsed(value); return *this;}
214 inline Role& WithRoleLastUsed(RoleLastUsed&& value) { SetRoleLastUsed(std::move(value)); return *this;}
216 private:
217
218 Aws::String m_path;
219 bool m_pathHasBeenSet = false;
220
221 Aws::String m_roleName;
222 bool m_roleNameHasBeenSet = false;
223
224 Aws::String m_roleId;
225 bool m_roleIdHasBeenSet = false;
226
227 Aws::String m_arn;
228 bool m_arnHasBeenSet = false;
229
230 Aws::Utils::DateTime m_createDate;
231 bool m_createDateHasBeenSet = false;
232
233 Aws::String m_assumeRolePolicyDocument;
234 bool m_assumeRolePolicyDocumentHasBeenSet = false;
235
236 Aws::String m_description;
237 bool m_descriptionHasBeenSet = false;
238
239 int m_maxSessionDuration;
240 bool m_maxSessionDurationHasBeenSet = false;
241
242 AttachedPermissionsBoundary m_permissionsBoundary;
243 bool m_permissionsBoundaryHasBeenSet = false;
244
245 Aws::Vector<Tag> m_tags;
246 bool m_tagsHasBeenSet = false;
247
248 RoleLastUsed m_roleLastUsed;
249 bool m_roleLastUsedHasBeenSet = false;
250 };
251
252} // namespace Model
253} // namespace IAM
254} // namespace Aws
AWS_IAM_API Role & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool CreateDateHasBeenSet() const
Definition Role.h:119
bool PermissionsBoundaryHasBeenSet() const
Definition Role.h:175
void SetAssumeRolePolicyDocument(const char *value)
Definition Role.h:134
Role & WithRoleLastUsed(RoleLastUsed &&value)
Definition Role.h:214
Role & WithRoleId(const Aws::String &value)
Definition Role.h:91
int GetMaxSessionDuration() const
Definition Role.h:161
Role & WithRoleName(const char *value)
Definition Role.h:76
Role & WithPath(const char *value)
Definition Role.h:62
Role & WithTags(Aws::Vector< Tag > &&value)
Definition Role.h:194
const Aws::String & GetAssumeRolePolicyDocument() const
Definition Role.h:130
void SetRoleLastUsed(const RoleLastUsed &value)
Definition Role.h:211
void SetArn(Aws::String &&value)
Definition Role.h:106
bool RoleIdHasBeenSet() const
Definition Role.h:87
Role & WithTags(const Aws::Vector< Tag > &value)
Definition Role.h:193
void SetRoleName(Aws::String &&value)
Definition Role.h:72
Role & WithAssumeRolePolicyDocument(Aws::String &&value)
Definition Role.h:136
Role & WithArn(const Aws::String &value)
Definition Role.h:108
Role & WithPath(Aws::String &&value)
Definition Role.h:61
void SetDescription(const char *value)
Definition Role.h:148
void SetCreateDate(Aws::Utils::DateTime &&value)
Definition Role.h:121
void SetPath(const Aws::String &value)
Definition Role.h:57
bool RoleLastUsedHasBeenSet() const
Definition Role.h:210
Role & AddTags(Tag &&value)
Definition Role.h:196
void SetPermissionsBoundary(const AttachedPermissionsBoundary &value)
Definition Role.h:176
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition Role.h:174
Role & WithAssumeRolePolicyDocument(const char *value)
Definition Role.h:137
Role & WithRoleName(const Aws::String &value)
Definition Role.h:74
void SetRoleId(const char *value)
Definition Role.h:90
const Aws::String & GetRoleId() const
Definition Role.h:86
bool PathHasBeenSet() const
Definition Role.h:56
Role & AddTags(const Tag &value)
Definition Role.h:195
Role & WithAssumeRolePolicyDocument(const Aws::String &value)
Definition Role.h:135
Role & WithMaxSessionDuration(int value)
Definition Role.h:164
void SetRoleName(const Aws::String &value)
Definition Role.h:71
bool TagsHasBeenSet() const
Definition Role.h:190
Role & WithRoleLastUsed(const RoleLastUsed &value)
Definition Role.h:213
void SetMaxSessionDuration(int value)
Definition Role.h:163
Role & WithCreateDate(Aws::Utils::DateTime &&value)
Definition Role.h:123
bool AssumeRolePolicyDocumentHasBeenSet() const
Definition Role.h:131
void SetRoleLastUsed(RoleLastUsed &&value)
Definition Role.h:212
AWS_IAM_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_IAM_API Role(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetRoleName() const
Definition Role.h:69
void SetArn(const Aws::String &value)
Definition Role.h:105
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetTags(const Aws::Vector< Tag > &value)
Definition Role.h:191
Role & WithRoleId(Aws::String &&value)
Definition Role.h:92
void SetPath(Aws::String &&value)
Definition Role.h:58
void SetRoleName(const char *value)
Definition Role.h:73
Role & WithPermissionsBoundary(const AttachedPermissionsBoundary &value)
Definition Role.h:178
void SetRoleId(const Aws::String &value)
Definition Role.h:88
const Aws::String & GetDescription() const
Definition Role.h:144
bool MaxSessionDurationHasBeenSet() const
Definition Role.h:162
Role & WithRoleName(Aws::String &&value)
Definition Role.h:75
const Aws::Vector< Tag > & GetTags() const
Definition Role.h:189
const Aws::String & GetArn() const
Definition Role.h:103
Role & WithArn(const char *value)
Definition Role.h:110
const RoleLastUsed & GetRoleLastUsed() const
Definition Role.h:209
Role & WithDescription(const char *value)
Definition Role.h:151
void SetDescription(const Aws::String &value)
Definition Role.h:146
const Aws::Utils::DateTime & GetCreateDate() const
Definition Role.h:118
void SetRoleId(Aws::String &&value)
Definition Role.h:89
void SetPath(const char *value)
Definition Role.h:59
Role & WithDescription(Aws::String &&value)
Definition Role.h:150
Role & WithPath(const Aws::String &value)
Definition Role.h:60
bool RoleNameHasBeenSet() const
Definition Role.h:70
Role & WithDescription(const Aws::String &value)
Definition Role.h:149
void SetPermissionsBoundary(AttachedPermissionsBoundary &&value)
Definition Role.h:177
Role & WithArn(Aws::String &&value)
Definition Role.h:109
Role & WithCreateDate(const Aws::Utils::DateTime &value)
Definition Role.h:122
void SetAssumeRolePolicyDocument(const Aws::String &value)
Definition Role.h:132
Role & WithPermissionsBoundary(AttachedPermissionsBoundary &&value)
Definition Role.h:179
Role & WithRoleId(const char *value)
Definition Role.h:93
AWS_IAM_API Role()
void SetCreateDate(const Aws::Utils::DateTime &value)
Definition Role.h:120
bool ArnHasBeenSet() const
Definition Role.h:104
void SetTags(Aws::Vector< Tag > &&value)
Definition Role.h:192
bool DescriptionHasBeenSet() const
Definition Role.h:145
void SetAssumeRolePolicyDocument(Aws::String &&value)
Definition Role.h:133
const Aws::String & GetPath() const
Definition Role.h:55
void SetArn(const char *value)
Definition Role.h:107
void SetDescription(Aws::String &&value)
Definition Role.h:147
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