AWS SDK for C++  0.12.9
AWS SDK for C++
RoleDetail.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/iam/IAM_EXPORTS.h>
24 
25 namespace Aws
26 {
27 namespace Utils
28 {
29 namespace Xml
30 {
31  class XmlNode;
32 } // namespace Xml
33 } // namespace Utils
34 namespace IAM
35 {
36 namespace Model
37 {
38 
45  {
46  public:
47  RoleDetail();
48  RoleDetail(const Aws::Utils::Xml::XmlNode& xmlNode);
49  RoleDetail& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
50 
51  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
52  void OutputToStream(Aws::OStream& oStream, const char* location) const;
53 
59  inline const Aws::String& GetPath() const{ return m_path; }
60 
66  inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
67 
73  inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = value; }
74 
80  inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
81 
87  inline RoleDetail& WithPath(const Aws::String& value) { SetPath(value); return *this;}
88 
94  inline RoleDetail& WithPath(Aws::String&& value) { SetPath(value); return *this;}
95 
101  inline RoleDetail& WithPath(const char* value) { SetPath(value); return *this;}
102 
106  inline const Aws::String& GetRoleName() const{ return m_roleName; }
107 
111  inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
112 
116  inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
117 
121  inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); }
122 
126  inline RoleDetail& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;}
127 
131  inline RoleDetail& WithRoleName(Aws::String&& value) { SetRoleName(value); return *this;}
132 
136  inline RoleDetail& WithRoleName(const char* value) { SetRoleName(value); return *this;}
137 
144  inline const Aws::String& GetRoleId() const{ return m_roleId; }
145 
152  inline void SetRoleId(const Aws::String& value) { m_roleIdHasBeenSet = true; m_roleId = value; }
153 
160  inline void SetRoleId(Aws::String&& value) { m_roleIdHasBeenSet = true; m_roleId = value; }
161 
168  inline void SetRoleId(const char* value) { m_roleIdHasBeenSet = true; m_roleId.assign(value); }
169 
176  inline RoleDetail& WithRoleId(const Aws::String& value) { SetRoleId(value); return *this;}
177 
184  inline RoleDetail& WithRoleId(Aws::String&& value) { SetRoleId(value); return *this;}
185 
192  inline RoleDetail& WithRoleId(const char* value) { SetRoleId(value); return *this;}
193 
194 
195  inline const Aws::String& GetArn() const{ return m_arn; }
196 
197 
198  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
199 
200 
201  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = value; }
202 
203 
204  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
205 
206 
207  inline RoleDetail& WithArn(const Aws::String& value) { SetArn(value); return *this;}
208 
209 
210  inline RoleDetail& WithArn(Aws::String&& value) { SetArn(value); return *this;}
211 
212 
213  inline RoleDetail& WithArn(const char* value) { SetArn(value); return *this;}
214 
219  inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; }
220 
225  inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; }
226 
231  inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = value; }
232 
237  inline RoleDetail& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;}
238 
243  inline RoleDetail& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(value); return *this;}
244 
248  inline const Aws::String& GetAssumeRolePolicyDocument() const{ return m_assumeRolePolicyDocument; }
249 
253  inline void SetAssumeRolePolicyDocument(const Aws::String& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = value; }
254 
258  inline void SetAssumeRolePolicyDocument(Aws::String&& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = value; }
259 
263  inline void SetAssumeRolePolicyDocument(const char* value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument.assign(value); }
264 
268  inline RoleDetail& WithAssumeRolePolicyDocument(const Aws::String& value) { SetAssumeRolePolicyDocument(value); return *this;}
269 
273  inline RoleDetail& WithAssumeRolePolicyDocument(Aws::String&& value) { SetAssumeRolePolicyDocument(value); return *this;}
274 
278  inline RoleDetail& WithAssumeRolePolicyDocument(const char* value) { SetAssumeRolePolicyDocument(value); return *this;}
279 
280 
281  inline const Aws::Vector<InstanceProfile>& GetInstanceProfileList() const{ return m_instanceProfileList; }
282 
283 
284  inline void SetInstanceProfileList(const Aws::Vector<InstanceProfile>& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList = value; }
285 
286 
287  inline void SetInstanceProfileList(Aws::Vector<InstanceProfile>&& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList = value; }
288 
289 
290  inline RoleDetail& WithInstanceProfileList(const Aws::Vector<InstanceProfile>& value) { SetInstanceProfileList(value); return *this;}
291 
292 
293  inline RoleDetail& WithInstanceProfileList(Aws::Vector<InstanceProfile>&& value) { SetInstanceProfileList(value); return *this;}
294 
295 
296  inline RoleDetail& AddInstanceProfileList(const InstanceProfile& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList.push_back(value); return *this; }
297 
298 
299  inline RoleDetail& AddInstanceProfileList(InstanceProfile&& value) { m_instanceProfileListHasBeenSet = true; m_instanceProfileList.push_back(value); return *this; }
300 
305  inline const Aws::Vector<PolicyDetail>& GetRolePolicyList() const{ return m_rolePolicyList; }
306 
311  inline void SetRolePolicyList(const Aws::Vector<PolicyDetail>& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList = value; }
312 
317  inline void SetRolePolicyList(Aws::Vector<PolicyDetail>&& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList = value; }
318 
323  inline RoleDetail& WithRolePolicyList(const Aws::Vector<PolicyDetail>& value) { SetRolePolicyList(value); return *this;}
324 
329  inline RoleDetail& WithRolePolicyList(Aws::Vector<PolicyDetail>&& value) { SetRolePolicyList(value); return *this;}
330 
335  inline RoleDetail& AddRolePolicyList(const PolicyDetail& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList.push_back(value); return *this; }
336 
341  inline RoleDetail& AddRolePolicyList(PolicyDetail&& value) { m_rolePolicyListHasBeenSet = true; m_rolePolicyList.push_back(value); return *this; }
342 
347  inline const Aws::Vector<AttachedPolicy>& GetAttachedManagedPolicies() const{ return m_attachedManagedPolicies; }
348 
353  inline void SetAttachedManagedPolicies(const Aws::Vector<AttachedPolicy>& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies = value; }
354 
359  inline void SetAttachedManagedPolicies(Aws::Vector<AttachedPolicy>&& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies = value; }
360 
365  inline RoleDetail& WithAttachedManagedPolicies(const Aws::Vector<AttachedPolicy>& value) { SetAttachedManagedPolicies(value); return *this;}
366 
371  inline RoleDetail& WithAttachedManagedPolicies(Aws::Vector<AttachedPolicy>&& value) { SetAttachedManagedPolicies(value); return *this;}
372 
377  inline RoleDetail& AddAttachedManagedPolicies(const AttachedPolicy& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies.push_back(value); return *this; }
378 
383  inline RoleDetail& AddAttachedManagedPolicies(AttachedPolicy&& value) { m_attachedManagedPoliciesHasBeenSet = true; m_attachedManagedPolicies.push_back(value); return *this; }
384 
385  private:
386  Aws::String m_path;
387  bool m_pathHasBeenSet;
388  Aws::String m_roleName;
389  bool m_roleNameHasBeenSet;
390  Aws::String m_roleId;
391  bool m_roleIdHasBeenSet;
392  Aws::String m_arn;
393  bool m_arnHasBeenSet;
394  Aws::Utils::DateTime m_createDate;
395  bool m_createDateHasBeenSet;
396  Aws::String m_assumeRolePolicyDocument;
397  bool m_assumeRolePolicyDocumentHasBeenSet;
398  Aws::Vector<InstanceProfile> m_instanceProfileList;
399  bool m_instanceProfileListHasBeenSet;
400  Aws::Vector<PolicyDetail> m_rolePolicyList;
401  bool m_rolePolicyListHasBeenSet;
402  Aws::Vector<AttachedPolicy> m_attachedManagedPolicies;
403  bool m_attachedManagedPoliciesHasBeenSet;
404  };
405 
406 } // namespace Model
407 } // namespace IAM
408 } // namespace Aws
void SetCreateDate(const Aws::Utils::DateTime &value)
Definition: RoleDetail.h:225
void SetPath(const Aws::String &value)
Definition: RoleDetail.h:66
RoleDetail & WithArn(const char *value)
Definition: RoleDetail.h:213
void SetRoleName(Aws::String &&value)
Definition: RoleDetail.h:116
RoleDetail & WithRoleId(const char *value)
Definition: RoleDetail.h:192
void SetInstanceProfileList(Aws::Vector< InstanceProfile > &&value)
Definition: RoleDetail.h:287
void SetAssumeRolePolicyDocument(const char *value)
Definition: RoleDetail.h:263
void SetArn(Aws::String &&value)
Definition: RoleDetail.h:201
RoleDetail & WithRolePolicyList(const Aws::Vector< PolicyDetail > &value)
Definition: RoleDetail.h:323
void SetRoleId(const char *value)
Definition: RoleDetail.h:168
RoleDetail & AddRolePolicyList(const PolicyDetail &value)
Definition: RoleDetail.h:335
RoleDetail & WithPath(Aws::String &&value)
Definition: RoleDetail.h:94
void SetRoleId(Aws::String &&value)
Definition: RoleDetail.h:160
RoleDetail & WithRolePolicyList(Aws::Vector< PolicyDetail > &&value)
Definition: RoleDetail.h:329
void SetCreateDate(Aws::Utils::DateTime &&value)
Definition: RoleDetail.h:231
RoleDetail & AddInstanceProfileList(InstanceProfile &&value)
Definition: RoleDetail.h:299
void SetArn(const Aws::String &value)
Definition: RoleDetail.h:198
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::String & GetAssumeRolePolicyDocument() const
Definition: RoleDetail.h:248
RoleDetail & WithAssumeRolePolicyDocument(const char *value)
Definition: RoleDetail.h:278
RoleDetail & WithRoleId(const Aws::String &value)
Definition: RoleDetail.h:176
RoleDetail & WithRoleName(const char *value)
Definition: RoleDetail.h:136
void SetRoleName(const char *value)
Definition: RoleDetail.h:121
RoleDetail & WithArn(Aws::String &&value)
Definition: RoleDetail.h:210
RoleDetail & WithPath(const char *value)
Definition: RoleDetail.h:101
void SetAssumeRolePolicyDocument(const Aws::String &value)
Definition: RoleDetail.h:253
void SetInstanceProfileList(const Aws::Vector< InstanceProfile > &value)
Definition: RoleDetail.h:284
const Aws::Utils::DateTime & GetCreateDate() const
Definition: RoleDetail.h:219
void SetRolePolicyList(const Aws::Vector< PolicyDetail > &value)
Definition: RoleDetail.h:311
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const Aws::Vector< InstanceProfile > & GetInstanceProfileList() const
Definition: RoleDetail.h:281
RoleDetail & WithAssumeRolePolicyDocument(const Aws::String &value)
Definition: RoleDetail.h:268
void SetAssumeRolePolicyDocument(Aws::String &&value)
Definition: RoleDetail.h:258
const Aws::Vector< AttachedPolicy > & GetAttachedManagedPolicies() const
Definition: RoleDetail.h:347
void SetPath(const char *value)
Definition: RoleDetail.h:80
RoleDetail & WithAttachedManagedPolicies(const Aws::Vector< AttachedPolicy > &value)
Definition: RoleDetail.h:365
void SetAttachedManagedPolicies(const Aws::Vector< AttachedPolicy > &value)
Definition: RoleDetail.h:353
void SetRoleId(const Aws::String &value)
Definition: RoleDetail.h:152
const Aws::Vector< PolicyDetail > & GetRolePolicyList() const
Definition: RoleDetail.h:305
RoleDetail & WithArn(const Aws::String &value)
Definition: RoleDetail.h:207
RoleDetail & WithAssumeRolePolicyDocument(Aws::String &&value)
Definition: RoleDetail.h:273
RoleDetail & AddAttachedManagedPolicies(const AttachedPolicy &value)
Definition: RoleDetail.h:377
const Aws::String & GetArn() const
Definition: RoleDetail.h:195
RoleDetail & WithPath(const Aws::String &value)
Definition: RoleDetail.h:87
RoleDetail & WithInstanceProfileList(Aws::Vector< InstanceProfile > &&value)
Definition: RoleDetail.h:293
RoleDetail & WithRoleName(Aws::String &&value)
Definition: RoleDetail.h:131
RoleDetail & AddRolePolicyList(PolicyDetail &&value)
Definition: RoleDetail.h:341
void SetPath(Aws::String &&value)
Definition: RoleDetail.h:73
RoleDetail & WithCreateDate(const Aws::Utils::DateTime &value)
Definition: RoleDetail.h:237
RoleDetail & WithRoleName(const Aws::String &value)
Definition: RoleDetail.h:126
RoleDetail & WithAttachedManagedPolicies(Aws::Vector< AttachedPolicy > &&value)
Definition: RoleDetail.h:371
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetArn(const char *value)
Definition: RoleDetail.h:204
const Aws::String & GetPath() const
Definition: RoleDetail.h:59
RoleDetail & WithCreateDate(Aws::Utils::DateTime &&value)
Definition: RoleDetail.h:243
void SetRoleName(const Aws::String &value)
Definition: RoleDetail.h:111
RoleDetail & WithRoleId(Aws::String &&value)
Definition: RoleDetail.h:184
RoleDetail & WithInstanceProfileList(const Aws::Vector< InstanceProfile > &value)
Definition: RoleDetail.h:290
void SetAttachedManagedPolicies(Aws::Vector< AttachedPolicy > &&value)
Definition: RoleDetail.h:359
RoleDetail & AddAttachedManagedPolicies(AttachedPolicy &&value)
Definition: RoleDetail.h:383
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:34
RoleDetail & AddInstanceProfileList(const InstanceProfile &value)
Definition: RoleDetail.h:296
const Aws::String & GetRoleId() const
Definition: RoleDetail.h:144
void SetRolePolicyList(Aws::Vector< PolicyDetail > &&value)
Definition: RoleDetail.h:317
JSON (JavaScript Object Notation).
const Aws::String & GetRoleName() const
Definition: RoleDetail.h:106