/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace IAM { namespace Model { /** *

Contains information about a user that a managed policy is attached to.

*

This data type is used as a response element in the * ListEntitiesForPolicy operation.

For more information about * managed policies, refer to Managed * policies and inline policies in the IAM User Guide.

See * Also:

AWS API * Reference

*/ class PolicyUser { public: AWS_IAM_API PolicyUser(); AWS_IAM_API PolicyUser(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API PolicyUser& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The name (friendly name, not ARN) identifying the user.

*/ inline const Aws::String& GetUserName() const{ return m_userName; } /** *

The name (friendly name, not ARN) identifying the user.

*/ inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; } /** *

The name (friendly name, not ARN) identifying the user.

*/ inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; } /** *

The name (friendly name, not ARN) identifying the user.

*/ inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = std::move(value); } /** *

The name (friendly name, not ARN) identifying the user.

*/ inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); } /** *

The name (friendly name, not ARN) identifying the user.

*/ inline PolicyUser& WithUserName(const Aws::String& value) { SetUserName(value); return *this;} /** *

The name (friendly name, not ARN) identifying the user.

*/ inline PolicyUser& WithUserName(Aws::String&& value) { SetUserName(std::move(value)); return *this;} /** *

The name (friendly name, not ARN) identifying the user.

*/ inline PolicyUser& WithUserName(const char* value) { SetUserName(value); return *this;} /** *

The stable and unique string identifying the user. For more information about * IDs, see IAM * identifiers in the IAM User Guide.

*/ inline const Aws::String& GetUserId() const{ return m_userId; } /** *

The stable and unique string identifying the user. For more information about * IDs, see IAM * identifiers in the IAM User Guide.

*/ inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; } /** *

The stable and unique string identifying the user. For more information about * IDs, see IAM * identifiers in the IAM User Guide.

*/ inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; } /** *

The stable and unique string identifying the user. For more information about * IDs, see IAM * identifiers in the IAM User Guide.

*/ inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); } /** *

The stable and unique string identifying the user. For more information about * IDs, see IAM * identifiers in the IAM User Guide.

*/ inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); } /** *

The stable and unique string identifying the user. For more information about * IDs, see IAM * identifiers in the IAM User Guide.

*/ inline PolicyUser& WithUserId(const Aws::String& value) { SetUserId(value); return *this;} /** *

The stable and unique string identifying the user. For more information about * IDs, see IAM * identifiers in the IAM User Guide.

*/ inline PolicyUser& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;} /** *

The stable and unique string identifying the user. For more information about * IDs, see IAM * identifiers in the IAM User Guide.

*/ inline PolicyUser& WithUserId(const char* value) { SetUserId(value); return *this;} private: Aws::String m_userName; bool m_userNameHasBeenSet = false; Aws::String m_userId; bool m_userIdHasBeenSet = false; }; } // namespace Model } // namespace IAM } // namespace Aws