/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ManagedGrafana { namespace Model { /** *

A structure containing the identity of one user or group and the * Admin, Editor, or Viewer role that they * have.

See Also:

AWS * API Reference

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

Specifies whether the user or group has the Admin, * Editor, or Viewer role.

*/ inline const Role& GetRole() const{ return m_role; } /** *

Specifies whether the user or group has the Admin, * Editor, or Viewer role.

*/ inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; } /** *

Specifies whether the user or group has the Admin, * Editor, or Viewer role.

*/ inline void SetRole(const Role& value) { m_roleHasBeenSet = true; m_role = value; } /** *

Specifies whether the user or group has the Admin, * Editor, or Viewer role.

*/ inline void SetRole(Role&& value) { m_roleHasBeenSet = true; m_role = std::move(value); } /** *

Specifies whether the user or group has the Admin, * Editor, or Viewer role.

*/ inline PermissionEntry& WithRole(const Role& value) { SetRole(value); return *this;} /** *

Specifies whether the user or group has the Admin, * Editor, or Viewer role.

*/ inline PermissionEntry& WithRole(Role&& value) { SetRole(std::move(value)); return *this;} /** *

A structure with the ID of the user or group with this role.

*/ inline const User& GetUser() const{ return m_user; } /** *

A structure with the ID of the user or group with this role.

*/ inline bool UserHasBeenSet() const { return m_userHasBeenSet; } /** *

A structure with the ID of the user or group with this role.

*/ inline void SetUser(const User& value) { m_userHasBeenSet = true; m_user = value; } /** *

A structure with the ID of the user or group with this role.

*/ inline void SetUser(User&& value) { m_userHasBeenSet = true; m_user = std::move(value); } /** *

A structure with the ID of the user or group with this role.

*/ inline PermissionEntry& WithUser(const User& value) { SetUser(value); return *this;} /** *

A structure with the ID of the user or group with this role.

*/ inline PermissionEntry& WithUser(User&& value) { SetUser(std::move(value)); return *this;} private: Role m_role; bool m_roleHasBeenSet = false; User m_user; bool m_userHasBeenSet = false; }; } // namespace Model } // namespace ManagedGrafana } // namespace Aws