AWS SDK for C++  0.12.9
AWS SDK for C++
PolicyRole.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>
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Xml
25 {
26  class XmlNode;
27 } // namespace Xml
28 } // namespace Utils
29 namespace IAM
30 {
31 namespace Model
32 {
33 
43  {
44  public:
45  PolicyRole();
46  PolicyRole(const Aws::Utils::Xml::XmlNode& xmlNode);
47  PolicyRole& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
48 
49  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
50  void OutputToStream(Aws::OStream& oStream, const char* location) const;
51 
55  inline const Aws::String& GetRoleName() const{ return m_roleName; }
56 
60  inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
61 
65  inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
66 
70  inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); }
71 
75  inline PolicyRole& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;}
76 
80  inline PolicyRole& WithRoleName(Aws::String&& value) { SetRoleName(value); return *this;}
81 
85  inline PolicyRole& WithRoleName(const char* value) { SetRoleName(value); return *this;}
86 
93  inline const Aws::String& GetRoleId() const{ return m_roleId; }
94 
101  inline void SetRoleId(const Aws::String& value) { m_roleIdHasBeenSet = true; m_roleId = value; }
102 
109  inline void SetRoleId(Aws::String&& value) { m_roleIdHasBeenSet = true; m_roleId = value; }
110 
117  inline void SetRoleId(const char* value) { m_roleIdHasBeenSet = true; m_roleId.assign(value); }
118 
125  inline PolicyRole& WithRoleId(const Aws::String& value) { SetRoleId(value); return *this;}
126 
133  inline PolicyRole& WithRoleId(Aws::String&& value) { SetRoleId(value); return *this;}
134 
141  inline PolicyRole& WithRoleId(const char* value) { SetRoleId(value); return *this;}
142 
143  private:
144  Aws::String m_roleName;
145  bool m_roleNameHasBeenSet;
146  Aws::String m_roleId;
147  bool m_roleIdHasBeenSet;
148  };
149 
150 } // namespace Model
151 } // namespace IAM
152 } // namespace Aws
void SetRoleName(const Aws::String &value)
Definition: PolicyRole.h:60
void SetRoleId(Aws::String &&value)
Definition: PolicyRole.h:109
PolicyRole & WithRoleId(const char *value)
Definition: PolicyRole.h:141
PolicyRole & WithRoleName(const Aws::String &value)
Definition: PolicyRole.h:75
const Aws::String & GetRoleId() const
Definition: PolicyRole.h:93
void SetRoleId(const char *value)
Definition: PolicyRole.h:117
void SetRoleId(const Aws::String &value)
Definition: PolicyRole.h:101
void SetRoleName(Aws::String &&value)
Definition: PolicyRole.h:65
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const Aws::String & GetRoleName() const
Definition: PolicyRole.h:55
void SetRoleName(const char *value)
Definition: PolicyRole.h:70
PolicyRole & WithRoleId(Aws::String &&value)
Definition: PolicyRole.h:133
PolicyRole & WithRoleName(Aws::String &&value)
Definition: PolicyRole.h:80
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
PolicyRole & WithRoleId(const Aws::String &value)
Definition: PolicyRole.h:125
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:34
PolicyRole & WithRoleName(const char *value)
Definition: PolicyRole.h:85
JSON (JavaScript Object Notation).