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

Describes a resource.

See Also:

AWS * API Reference

*/ class Principal { public: AWS_WORKDOCS_API Principal(); AWS_WORKDOCS_API Principal(Aws::Utils::Json::JsonView jsonValue); AWS_WORKDOCS_API Principal& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_WORKDOCS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The ID of the resource.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The ID of the resource.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The ID of the resource.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The ID of the resource.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The ID of the resource.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The ID of the resource.

*/ inline Principal& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The ID of the resource.

*/ inline Principal& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The ID of the resource.

*/ inline Principal& WithId(const char* value) { SetId(value); return *this;} /** *

The type of resource.

*/ inline const PrincipalType& GetType() const{ return m_type; } /** *

The type of resource.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of resource.

*/ inline void SetType(const PrincipalType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of resource.

*/ inline void SetType(PrincipalType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of resource.

*/ inline Principal& WithType(const PrincipalType& value) { SetType(value); return *this;} /** *

The type of resource.

*/ inline Principal& WithType(PrincipalType&& value) { SetType(std::move(value)); return *this;} /** *

The permission information for the resource.

*/ inline const Aws::Vector& GetRoles() const{ return m_roles; } /** *

The permission information for the resource.

*/ inline bool RolesHasBeenSet() const { return m_rolesHasBeenSet; } /** *

The permission information for the resource.

*/ inline void SetRoles(const Aws::Vector& value) { m_rolesHasBeenSet = true; m_roles = value; } /** *

The permission information for the resource.

*/ inline void SetRoles(Aws::Vector&& value) { m_rolesHasBeenSet = true; m_roles = std::move(value); } /** *

The permission information for the resource.

*/ inline Principal& WithRoles(const Aws::Vector& value) { SetRoles(value); return *this;} /** *

The permission information for the resource.

*/ inline Principal& WithRoles(Aws::Vector&& value) { SetRoles(std::move(value)); return *this;} /** *

The permission information for the resource.

*/ inline Principal& AddRoles(const PermissionInfo& value) { m_rolesHasBeenSet = true; m_roles.push_back(value); return *this; } /** *

The permission information for the resource.

*/ inline Principal& AddRoles(PermissionInfo&& value) { m_rolesHasBeenSet = true; m_roles.push_back(std::move(value)); return *this; } private: Aws::String m_id; bool m_idHasBeenSet = false; PrincipalType m_type; bool m_typeHasBeenSet = false; Aws::Vector m_roles; bool m_rolesHasBeenSet = false; }; } // namespace Model } // namespace WorkDocs } // namespace Aws