AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
User.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/Tag.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace IAM {
24namespace Model {
25
38class User {
39 public:
40 AWS_IAM_API User() = default;
41 AWS_IAM_API User(const Aws::Utils::Xml::XmlNode& xmlNode);
42 AWS_IAM_API User& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43
44 AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45 AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
46
48
54 inline const Aws::String& GetPath() const { return m_path; }
55 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
56 template <typename PathT = Aws::String>
57 void SetPath(PathT&& value) {
58 m_pathHasBeenSet = true;
59 m_path = std::forward<PathT>(value);
60 }
61 template <typename PathT = Aws::String>
62 User& WithPath(PathT&& value) {
63 SetPath(std::forward<PathT>(value));
64 return *this;
65 }
67
69
72 inline const Aws::String& GetUserName() const { return m_userName; }
73 inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; }
74 template <typename UserNameT = Aws::String>
75 void SetUserName(UserNameT&& value) {
76 m_userNameHasBeenSet = true;
77 m_userName = std::forward<UserNameT>(value);
78 }
79 template <typename UserNameT = Aws::String>
80 User& WithUserName(UserNameT&& value) {
81 SetUserName(std::forward<UserNameT>(value));
82 return *this;
83 }
85
87
93 inline const Aws::String& GetUserId() const { return m_userId; }
94 inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
95 template <typename UserIdT = Aws::String>
96 void SetUserId(UserIdT&& value) {
97 m_userIdHasBeenSet = true;
98 m_userId = std::forward<UserIdT>(value);
99 }
100 template <typename UserIdT = Aws::String>
101 User& WithUserId(UserIdT&& value) {
102 SetUserId(std::forward<UserIdT>(value));
103 return *this;
104 }
106
108
114 inline const Aws::String& GetArn() const { return m_arn; }
115 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
116 template <typename ArnT = Aws::String>
117 void SetArn(ArnT&& value) {
118 m_arnHasBeenSet = true;
119 m_arn = std::forward<ArnT>(value);
120 }
121 template <typename ArnT = Aws::String>
122 User& WithArn(ArnT&& value) {
123 SetArn(std::forward<ArnT>(value));
124 return *this;
125 }
127
129
133 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
134 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
135 template <typename CreateDateT = Aws::Utils::DateTime>
136 void SetCreateDate(CreateDateT&& value) {
137 m_createDateHasBeenSet = true;
138 m_createDate = std::forward<CreateDateT>(value);
139 }
140 template <typename CreateDateT = Aws::Utils::DateTime>
141 User& WithCreateDate(CreateDateT&& value) {
142 SetCreateDate(std::forward<CreateDateT>(value));
143 return *this;
144 }
146
148
169 inline const Aws::Utils::DateTime& GetPasswordLastUsed() const { return m_passwordLastUsed; }
170 inline bool PasswordLastUsedHasBeenSet() const { return m_passwordLastUsedHasBeenSet; }
171 template <typename PasswordLastUsedT = Aws::Utils::DateTime>
172 void SetPasswordLastUsed(PasswordLastUsedT&& value) {
173 m_passwordLastUsedHasBeenSet = true;
174 m_passwordLastUsed = std::forward<PasswordLastUsedT>(value);
175 }
176 template <typename PasswordLastUsedT = Aws::Utils::DateTime>
177 User& WithPasswordLastUsed(PasswordLastUsedT&& value) {
178 SetPasswordLastUsed(std::forward<PasswordLastUsedT>(value));
179 return *this;
180 }
182
184
189 inline const AttachedPermissionsBoundary& GetPermissionsBoundary() const { return m_permissionsBoundary; }
190 inline bool PermissionsBoundaryHasBeenSet() const { return m_permissionsBoundaryHasBeenSet; }
191 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
192 void SetPermissionsBoundary(PermissionsBoundaryT&& value) {
193 m_permissionsBoundaryHasBeenSet = true;
194 m_permissionsBoundary = std::forward<PermissionsBoundaryT>(value);
195 }
196 template <typename PermissionsBoundaryT = AttachedPermissionsBoundary>
197 User& WithPermissionsBoundary(PermissionsBoundaryT&& value) {
198 SetPermissionsBoundary(std::forward<PermissionsBoundaryT>(value));
199 return *this;
200 }
202
204
210 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
211 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
212 template <typename TagsT = Aws::Vector<Tag>>
213 void SetTags(TagsT&& value) {
214 m_tagsHasBeenSet = true;
215 m_tags = std::forward<TagsT>(value);
216 }
217 template <typename TagsT = Aws::Vector<Tag>>
218 User& WithTags(TagsT&& value) {
219 SetTags(std::forward<TagsT>(value));
220 return *this;
221 }
222 template <typename TagsT = Tag>
223 User& AddTags(TagsT&& value) {
224 m_tagsHasBeenSet = true;
225 m_tags.emplace_back(std::forward<TagsT>(value));
226 return *this;
227 }
229 private:
230 Aws::String m_path;
231
232 Aws::String m_userName;
233
234 Aws::String m_userId;
235
236 Aws::String m_arn;
237
238 Aws::Utils::DateTime m_createDate{};
239
240 Aws::Utils::DateTime m_passwordLastUsed{};
241
242 AttachedPermissionsBoundary m_permissionsBoundary;
243
244 Aws::Vector<Tag> m_tags;
245 bool m_pathHasBeenSet = false;
246 bool m_userNameHasBeenSet = false;
247 bool m_userIdHasBeenSet = false;
248 bool m_arnHasBeenSet = false;
249 bool m_createDateHasBeenSet = false;
250 bool m_passwordLastUsedHasBeenSet = false;
251 bool m_permissionsBoundaryHasBeenSet = false;
252 bool m_tagsHasBeenSet = false;
253};
254
255} // namespace Model
256} // namespace IAM
257} // namespace Aws
void SetUserName(UserNameT &&value)
Definition User.h:75
User & WithPasswordLastUsed(PasswordLastUsedT &&value)
Definition User.h:177
void SetPermissionsBoundary(PermissionsBoundaryT &&value)
Definition User.h:192
const AttachedPermissionsBoundary & GetPermissionsBoundary() const
Definition User.h:189
AWS_IAM_API User & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Vector< Tag > & GetTags() const
Definition User.h:210
bool TagsHasBeenSet() const
Definition User.h:211
void SetUserId(UserIdT &&value)
Definition User.h:96
const Aws::Utils::DateTime & GetPasswordLastUsed() const
Definition User.h:169
User & AddTags(TagsT &&value)
Definition User.h:223
AWS_IAM_API void OutputToStream(Aws::OStream &oStream, const char *location) const
User & WithTags(TagsT &&value)
Definition User.h:218
User & WithPath(PathT &&value)
Definition User.h:62
const Aws::String & GetUserName() const
Definition User.h:72
User & WithCreateDate(CreateDateT &&value)
Definition User.h:141
User & WithUserId(UserIdT &&value)
Definition User.h:101
void SetArn(ArnT &&value)
Definition User.h:117
bool UserIdHasBeenSet() const
Definition User.h:94
const Aws::Utils::DateTime & GetCreateDate() const
Definition User.h:133
bool PermissionsBoundaryHasBeenSet() const
Definition User.h:190
const Aws::String & GetPath() const
Definition User.h:54
bool UserNameHasBeenSet() const
Definition User.h:73
User & WithUserName(UserNameT &&value)
Definition User.h:80
void SetTags(TagsT &&value)
Definition User.h:213
void SetPasswordLastUsed(PasswordLastUsedT &&value)
Definition User.h:172
User & WithPermissionsBoundary(PermissionsBoundaryT &&value)
Definition User.h:197
const Aws::String & GetUserId() const
Definition User.h:93
AWS_IAM_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
bool PathHasBeenSet() const
Definition User.h:55
const Aws::String & GetArn() const
Definition User.h:114
void SetCreateDate(CreateDateT &&value)
Definition User.h:136
void SetPath(PathT &&value)
Definition User.h:57
bool PasswordLastUsedHasBeenSet() const
Definition User.h:170
AWS_IAM_API User(const Aws::Utils::Xml::XmlNode &xmlNode)
bool ArnHasBeenSet() const
Definition User.h:115
bool CreateDateHasBeenSet() const
Definition User.h:134
AWS_IAM_API User()=default
User & WithArn(ArnT &&value)
Definition User.h:122
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