AWS SDK for C++  0.14.3
AWS SDK for C++
Role.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>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace IAM
31 {
32 namespace Model
33 {
34 
42  {
43  public:
44  Role();
45  Role(const Aws::Utils::Xml::XmlNode& xmlNode);
46  Role& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
47 
48  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
49  void OutputToStream(Aws::OStream& oStream, const char* location) const;
50 
56  inline const Aws::String& GetPath() const{ return m_path; }
57 
63  inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
64 
70  inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = value; }
71 
77  inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
78 
84  inline Role& WithPath(const Aws::String& value) { SetPath(value); return *this;}
85 
91  inline Role& WithPath(Aws::String&& value) { SetPath(value); return *this;}
92 
98  inline Role& WithPath(const char* value) { SetPath(value); return *this;}
99 
103  inline const Aws::String& GetRoleName() const{ return m_roleName; }
104 
108  inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
109 
113  inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
114 
118  inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); }
119 
123  inline Role& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;}
124 
128  inline Role& WithRoleName(Aws::String&& value) { SetRoleName(value); return *this;}
129 
133  inline Role& WithRoleName(const char* value) { SetRoleName(value); return *this;}
134 
141  inline const Aws::String& GetRoleId() const{ return m_roleId; }
142 
149  inline void SetRoleId(const Aws::String& value) { m_roleIdHasBeenSet = true; m_roleId = value; }
150 
157  inline void SetRoleId(Aws::String&& value) { m_roleIdHasBeenSet = true; m_roleId = value; }
158 
165  inline void SetRoleId(const char* value) { m_roleIdHasBeenSet = true; m_roleId.assign(value); }
166 
173  inline Role& WithRoleId(const Aws::String& value) { SetRoleId(value); return *this;}
174 
181  inline Role& WithRoleId(Aws::String&& value) { SetRoleId(value); return *this;}
182 
189  inline Role& WithRoleId(const char* value) { SetRoleId(value); return *this;}
190 
197  inline const Aws::String& GetArn() const{ return m_arn; }
198 
205  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
206 
213  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = value; }
214 
221  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
222 
229  inline Role& WithArn(const Aws::String& value) { SetArn(value); return *this;}
230 
237  inline Role& WithArn(Aws::String&& value) { SetArn(value); return *this;}
238 
245  inline Role& WithArn(const char* value) { SetArn(value); return *this;}
246 
251  inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; }
252 
257  inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; }
258 
263  inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = value; }
264 
269  inline Role& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;}
270 
275  inline Role& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(value); return *this;}
276 
280  inline const Aws::String& GetAssumeRolePolicyDocument() const{ return m_assumeRolePolicyDocument; }
281 
285  inline void SetAssumeRolePolicyDocument(const Aws::String& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = value; }
286 
290  inline void SetAssumeRolePolicyDocument(Aws::String&& value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument = value; }
291 
295  inline void SetAssumeRolePolicyDocument(const char* value) { m_assumeRolePolicyDocumentHasBeenSet = true; m_assumeRolePolicyDocument.assign(value); }
296 
300  inline Role& WithAssumeRolePolicyDocument(const Aws::String& value) { SetAssumeRolePolicyDocument(value); return *this;}
301 
305  inline Role& WithAssumeRolePolicyDocument(Aws::String&& value) { SetAssumeRolePolicyDocument(value); return *this;}
306 
310  inline Role& WithAssumeRolePolicyDocument(const char* value) { SetAssumeRolePolicyDocument(value); return *this;}
311 
312  private:
313  Aws::String m_path;
314  bool m_pathHasBeenSet;
315  Aws::String m_roleName;
316  bool m_roleNameHasBeenSet;
317  Aws::String m_roleId;
318  bool m_roleIdHasBeenSet;
319  Aws::String m_arn;
320  bool m_arnHasBeenSet;
321  Aws::Utils::DateTime m_createDate;
322  bool m_createDateHasBeenSet;
323  Aws::String m_assumeRolePolicyDocument;
324  bool m_assumeRolePolicyDocumentHasBeenSet;
325  };
326 
327 } // namespace Model
328 } // namespace IAM
329 } // namespace Aws
const Aws::String & GetRoleId() const
Definition: Role.h:141
Role & WithPath(const char *value)
Definition: Role.h:98
const Aws::String & GetAssumeRolePolicyDocument() const
Definition: Role.h:280
Role & WithRoleName(const char *value)
Definition: Role.h:133
Role & WithRoleName(const Aws::String &value)
Definition: Role.h:123
void SetRoleName(Aws::String &&value)
Definition: Role.h:113
void SetPath(const char *value)
Definition: Role.h:77
const Aws::String & GetRoleName() const
Definition: Role.h:103
void SetArn(const Aws::String &value)
Definition: Role.h:205
void SetCreateDate(const Aws::Utils::DateTime &value)
Definition: Role.h:257
const Aws::Utils::DateTime & GetCreateDate() const
Definition: Role.h:251
void SetRoleId(const Aws::String &value)
Definition: Role.h:149
Role & WithArn(const Aws::String &value)
Definition: Role.h:229
Role & WithCreateDate(Aws::Utils::DateTime &&value)
Definition: Role.h:275
Role & WithRoleName(Aws::String &&value)
Definition: Role.h:128
void SetPath(const Aws::String &value)
Definition: Role.h:63
Role & WithAssumeRolePolicyDocument(const Aws::String &value)
Definition: Role.h:300
Role & WithRoleId(const char *value)
Definition: Role.h:189
Role & WithArn(Aws::String &&value)
Definition: Role.h:237
void SetArn(Aws::String &&value)
Definition: Role.h:213
const Aws::String & GetArn() const
Definition: Role.h:197
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetAssumeRolePolicyDocument(const Aws::String &value)
Definition: Role.h:285
Role & WithArn(const char *value)
Definition: Role.h:245
Role & WithPath(Aws::String &&value)
Definition: Role.h:91
void SetCreateDate(Aws::Utils::DateTime &&value)
Definition: Role.h:263
void SetRoleId(const char *value)
Definition: Role.h:165
Role & WithRoleId(const Aws::String &value)
Definition: Role.h:173
void SetRoleId(Aws::String &&value)
Definition: Role.h:157
void SetRoleName(const char *value)
Definition: Role.h:118
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:108
Role & WithRoleId(Aws::String &&value)
Definition: Role.h:181
const Aws::String & GetPath() const
Definition: Role.h:56
Role & WithAssumeRolePolicyDocument(const char *value)
Definition: Role.h:310
Role & WithCreateDate(const Aws::Utils::DateTime &value)
Definition: Role.h:269
void SetAssumeRolePolicyDocument(const char *value)
Definition: Role.h:295
void SetArn(const char *value)
Definition: Role.h:221
void SetPath(Aws::String &&value)
Definition: Role.h:70
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:37
Role & WithAssumeRolePolicyDocument(Aws::String &&value)
Definition: Role.h:305
void SetAssumeRolePolicyDocument(Aws::String &&value)
Definition: Role.h:290
Role & WithPath(const Aws::String &value)
Definition: Role.h:84
JSON (JavaScript Object Notation).