AWS SDK for C++  0.14.3
AWS SDK for C++
PolicyUser.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  PolicyUser();
46  PolicyUser(const Aws::Utils::Xml::XmlNode& xmlNode);
47  PolicyUser& 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& GetUserName() const{ return m_userName; }
56 
60  inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; }
61 
65  inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = value; }
66 
70  inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); }
71 
75  inline PolicyUser& WithUserName(const Aws::String& value) { SetUserName(value); return *this;}
76 
80  inline PolicyUser& WithUserName(Aws::String&& value) { SetUserName(value); return *this;}
81 
85  inline PolicyUser& WithUserName(const char* value) { SetUserName(value); return *this;}
86 
93  inline const Aws::String& GetUserId() const{ return m_userId; }
94 
101  inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; }
102 
109  inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = value; }
110 
117  inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); }
118 
125  inline PolicyUser& WithUserId(const Aws::String& value) { SetUserId(value); return *this;}
126 
133  inline PolicyUser& WithUserId(Aws::String&& value) { SetUserId(value); return *this;}
134 
141  inline PolicyUser& WithUserId(const char* value) { SetUserId(value); return *this;}
142 
143  private:
144  Aws::String m_userName;
145  bool m_userNameHasBeenSet;
146  Aws::String m_userId;
147  bool m_userIdHasBeenSet;
148  };
149 
150 } // namespace Model
151 } // namespace IAM
152 } // namespace Aws
PolicyUser & WithUserName(Aws::String &&value)
Definition: PolicyUser.h:80
void SetUserName(Aws::String &&value)
Definition: PolicyUser.h:65
PolicyUser & WithUserId(const Aws::String &value)
Definition: PolicyUser.h:125
void SetUserId(const Aws::String &value)
Definition: PolicyUser.h:101
PolicyUser & WithUserId(const char *value)
Definition: PolicyUser.h:141
PolicyUser & WithUserName(const Aws::String &value)
Definition: PolicyUser.h:75
void SetUserName(const Aws::String &value)
Definition: PolicyUser.h:60
const Aws::String & GetUserName() const
Definition: PolicyUser.h:55
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetUserId(const char *value)
Definition: PolicyUser.h:117
void SetUserId(Aws::String &&value)
Definition: PolicyUser.h:109
PolicyUser & WithUserId(Aws::String &&value)
Definition: PolicyUser.h:133
PolicyUser & WithUserName(const char *value)
Definition: PolicyUser.h:85
const Aws::String & GetUserId() const
Definition: PolicyUser.h:93
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:37
void SetUserName(const char *value)
Definition: PolicyUser.h:70
JSON (JavaScript Object Notation).