AWS SDK for C++

AWS SDK for C++ Version 1.11.746

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/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Xml {
21class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace IAM {
25namespace Model {
26
34class Role {
35 public:
36 AWS_IAM_API Role() = default;
37 AWS_IAM_API Role(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_IAM_API Role& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
44
49 inline const Aws::String& GetPath() const { return m_path; }
50 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
51 template <typename PathT = Aws::String>
52 void SetPath(PathT&& value) {
53 m_pathHasBeenSet = true;
54 m_path = std::forward<PathT>(value);
55 }
56 template <typename PathT = Aws::String>
57 Role& WithPath(PathT&& value) {
58 SetPath(std::forward<PathT>(value));
59 return *this;
60 }
62
64
67 inline const Aws::String& GetRoleName() const { return m_roleName; }
68 inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
69 template <typename RoleNameT = Aws::String>
70 void SetRoleName(RoleNameT&& value) {
71 m_roleNameHasBeenSet = true;
72 m_roleName = std::forward<RoleNameT>(value);
73 }
74 template <typename RoleNameT = Aws::String>
75 Role& WithRoleName(RoleNameT&& value) {
76 SetRoleName(std::forward<RoleNameT>(value));
77 return *this;
78 }
80
82
88 inline const Aws::String& GetRoleId() const { return m_roleId; }
89 inline bool RoleIdHasBeenSet() const { return m_roleIdHasBeenSet; }
90 template <typename RoleIdT = Aws::String>
91 void SetRoleId(RoleIdT&& value) {
92 m_roleIdHasBeenSet = true;
93 m_roleId = std::forward<RoleIdT>(value);
94 }
95 template <typename RoleIdT = Aws::String>
96 Role& WithRoleId(RoleIdT&& value) {
97 SetRoleId(std::forward<RoleIdT>(value));
98 return *this;
99 }
101
103
109 inline const Aws::String& GetArn() const { return m_arn; }
110 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
111 template <typename ArnT = Aws::String>
112 void SetArn(ArnT&& value) {
113 m_arnHasBeenSet = true;
114 m_arn = std::forward<ArnT>(value);
115 }
116 template <typename ArnT = Aws::String>
117 Role& WithArn(ArnT&& value) {
118 SetArn(std::forward<ArnT>(value));
119 return *this;
120 }
122
124
128 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
129 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
130 template <typename CreateDateT = Aws::Utils::DateTime>
131 void SetCreateDate(CreateDateT&& value) {
132 m_createDateHasBeenSet = true;
133 m_createDate = std::forward<CreateDateT>(value);
134 }
135 template <typename CreateDateT = Aws::Utils::DateTime>
136 Role& WithCreateDate(CreateDateT&& value) {
137 SetCreateDate(std::forward<CreateDateT>(value));
138 return *this;
139 }
141
143
146 inline const Aws::String& GetAssumeRolePolicyDocument() const { return m_assumeRolePolicyDocument; }
147 inline bool AssumeRolePolicyDocumentHasBeenSet() const { return m_assumeRolePolicyDocumentHasBeenSet; }
148 template <typename AssumeRolePolicyDocumentT = Aws::String>
149 void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) {
150 m_assumeRolePolicyDocumentHasBeenSet = true;
151 m_assumeRolePolicyDocument = std::forward<AssumeRolePolicyDocumentT>(value);
152 }
153 template <typename AssumeRolePolicyDocumentT = Aws::String>
154 Role& WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT&& value) {
155 SetAssumeRolePolicyDocument(std::forward<AssumeRolePolicyDocumentT>(value));
156 return *this;
157 }
159
161
164 inline const Aws::String& GetDescription() const { return m_description; }
165 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
166 template <typename DescriptionT = Aws::String>
167 void SetDescription(DescriptionT&& value) {
168 m_descriptionHasBeenSet = true;
169 m_description = std::forward<DescriptionT>(value);
170 }
171 template <typename DescriptionT = Aws::String>
172 Role& WithDescription(DescriptionT&& value) {
173 SetDescription(std::forward<DescriptionT>(value));
174 return *this;
175 }
177
179
185 inline int GetMaxSessionDuration() const { return m_maxSessionDuration; }
186 inline bool MaxSessionDurationHasBeenSet() const { return m_maxSessionDurationHasBeenSet; }
187 inline void SetMaxSessionDuration(int value) {
188 m_maxSessionDurationHasBeenSet = true;
189 m_maxSessionDuration = value;
190 }
191 inline Role& WithMaxSessionDuration(int value) {
193 return *this;
194 }
196
198
204 inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const { return m_permissionsBoundary; }
205 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
206 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
207 void SetPermissionsBoundary(PermissionsBoundaryT&& value) {
208 m_permissionsBoundaryHasBeenSet = true;
209 m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value);
210 }
211 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
212 Role& WithPermissionsBoundary(PermissionsBoundaryT&& value) {
213 SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value));
214 return *this;
215 }
217
219
225 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
226 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
227 template <typename TagsT = Aws::Vector<Tag>>
228 void SetTags(TagsT&& value) {
229 m_tagsHasBeenSet = true;
230 m_tags = std::forward<TagsT>(value);
231 }
232 template <typename TagsT = Aws::Vector<Tag>>
233 Role& WithTags(TagsT&& value) {
234 SetTags(std::forward<TagsT>(value));
235 return *this;
236 }
237 template <typename TagsT = Tag>
238 Role& AddTags(TagsT&& value) {
239 m_tagsHasBeenSet = true;
240 m_tags.emplace_back(std::forward<TagsT>(value));
241 return *this;
242 }
244
246
255 inline const RoleLastUsed& GetRoleLastUsed() const { return m_roleLastUsed; }
256 inline bool RoleLastUsedHasBeenSet() const { return m_roleLastUsedHasBeenSet; }
257 template <typename RoleLastUsedT = RoleLastUsed>
258 void SetRoleLastUsed(RoleLastUsedT&& value) {
259 m_roleLastUsedHasBeenSet = true;
260 m_roleLastUsed = std::forward<RoleLastUsedT>(value);
261 }
262 template <typename RoleLastUsedT = RoleLastUsed>
263 Role& WithRoleLastUsed(RoleLastUsedT&& value) {
264 SetRoleLastUsed(std::forward<RoleLastUsedT>(value));
265 return *this;
266 }
268 private:
269 Aws::String m_path;
270
271 Aws::String m_roleName;
272
273 Aws::String m_roleId;
274
275 Aws::String m_arn;
276
277 Aws::Utils::DateTime m_createDate{};
278
279 Aws::String m_assumeRolePolicyDocument;
280
281 Aws::String m_description;
282
283 int m_maxSessionDuration{0};
284
285 AttachedPermissionsBoundary m_permissionsBoundary;
286
287 Aws::Vector<Tag> m_tags;
288
289 RoleLastUsed m_roleLastUsed;
290 bool m_pathHasBeenSet = false;
291 bool m_roleNameHasBeenSet = false;
292 bool m_roleIdHasBeenSet = false;
293 bool m_arnHasBeenSet = false;
294 bool m_createDateHasBeenSet = false;
295 bool m_assumeRolePolicyDocumentHasBeenSet = false;
296 bool m_descriptionHasBeenSet = false;
297 bool m_maxSessionDurationHasBeenSet = false;
298 bool m_permissionsBoundaryHasBeenSet = false;
299 bool m_tagsHasBeenSet = false;
300 bool m_roleLastUsedHasBeenSet = false;
301};
302
303} // namespace Model
304} // namespace IAM
305} // namespace Aws
AWS_IAM_API Role & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool CreateDateHasBeenSet() const
Definition Role.h:129
bool PermissionsBoundaryHasBeenSet() const
Definition Role.h:205
void SetTags(TagsT &&value)
Definition Role.h:228
int GetMaxSessionDuration() const
Definition Role.h:185
void SetArn(ArnT &&value)
Definition Role.h:112
const Aws::String & GetAssumeRolePolicyDocument() const
Definition Role.h:146
Role & WithDescription(DescriptionT &&value)
Definition Role.h:172
bool RoleIdHasBeenSet() const
Definition Role.h:89
void SetAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition Role.h:149
Role & WithPath(PathT &&value)
Definition Role.h:57
Role & WithCreateDate(CreateDateT &&value)
Definition Role.h:136
bool RoleLastUsedHasBeenSet() const
Definition Role.h:256
Role & WithRoleName(RoleNameT &&value)
Definition Role.h:75
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition Role.h:204
Role & WithTags(TagsT &&value)
Definition Role.h:233
const Aws::String & GetRoleId() const
Definition Role.h:88
bool PathHasBeenSet() const
Definition Role.h:50
Role & WithMaxSessionDuration(int value)
Definition Role.h:191
Role & WithPermissionsBoundary(PermissionsBoundaryT &&value)
Definition Role.h:212
bool TagsHasBeenSet() const
Definition Role.h:226
void SetMaxSessionDuration(int value)
Definition Role.h:187
void SetPermissionsBoundary(PermissionsBoundaryT &&value)
Definition Role.h:207
void SetPath(PathT &&value)
Definition Role.h:52
bool AssumeRolePolicyDocumentHasBeenSet() const
Definition Role.h:147
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:67
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetRoleName(RoleNameT &&value)
Definition Role.h:70
const Aws::String & GetDescription() const
Definition Role.h:164
bool MaxSessionDurationHasBeenSet() const
Definition Role.h:186
const Aws::Vector< Tag > & GetTags() const
Definition Role.h:225
void SetCreateDate(CreateDateT &&value)
Definition Role.h:131
const Aws::String & GetArn() const
Definition Role.h:109
const RoleLastUsed & GetRoleLastUsed() const
Definition Role.h:255
Role & WithRoleLastUsed(RoleLastUsedT &&value)
Definition Role.h:263
const Aws::Utils::DateTime & GetCreateDate() const
Definition Role.h:128
void SetDescription(DescriptionT &&value)
Definition Role.h:167
AWS_IAM_API Role()=default
Role & WithRoleId(RoleIdT &&value)
Definition Role.h:96
bool RoleNameHasBeenSet() const
Definition Role.h:68
Role & AddTags(TagsT &&value)
Definition Role.h:238
void SetRoleId(RoleIdT &&value)
Definition Role.h:91
Role & WithArn(ArnT &&value)
Definition Role.h:117
bool ArnHasBeenSet() const
Definition Role.h:110
void SetRoleLastUsed(RoleLastUsedT &&value)
Definition Role.h:258
bool DescriptionHasBeenSet() const
Definition Role.h:165
Role & WithAssumeRolePolicyDocument(AssumeRolePolicyDocumentT &&value)
Definition Role.h:154
const Aws::String & GetPath() const
Definition Role.h:49
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