/** * 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 ManagedGrafana { namespace Model { /** *

Contains the instructions for one Grafana role permission update in a UpdatePermissions * operation.

See Also:

AWS * API Reference

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

Specifies whether this update is to add or revoke role permissions.

*/ inline const UpdateAction& GetAction() const{ return m_action; } /** *

Specifies whether this update is to add or revoke role permissions.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

Specifies whether this update is to add or revoke role permissions.

*/ inline void SetAction(const UpdateAction& value) { m_actionHasBeenSet = true; m_action = value; } /** *

Specifies whether this update is to add or revoke role permissions.

*/ inline void SetAction(UpdateAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

Specifies whether this update is to add or revoke role permissions.

*/ inline UpdateInstruction& WithAction(const UpdateAction& value) { SetAction(value); return *this;} /** *

Specifies whether this update is to add or revoke role permissions.

*/ inline UpdateInstruction& WithAction(UpdateAction&& value) { SetAction(std::move(value)); return *this;} /** *

The role to add or revoke for the user or the group specified in * users.

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

The role to add or revoke for the user or the group specified in * users.

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

The role to add or revoke for the user or the group specified in * users.

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

The role to add or revoke for the user or the group specified in * users.

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

The role to add or revoke for the user or the group specified in * users.

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

The role to add or revoke for the user or the group specified in * users.

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

A structure that specifies the user or group to add or revoke the role * for.

*/ inline const Aws::Vector& GetUsers() const{ return m_users; } /** *

A structure that specifies the user or group to add or revoke the role * for.

*/ inline bool UsersHasBeenSet() const { return m_usersHasBeenSet; } /** *

A structure that specifies the user or group to add or revoke the role * for.

*/ inline void SetUsers(const Aws::Vector& value) { m_usersHasBeenSet = true; m_users = value; } /** *

A structure that specifies the user or group to add or revoke the role * for.

*/ inline void SetUsers(Aws::Vector&& value) { m_usersHasBeenSet = true; m_users = std::move(value); } /** *

A structure that specifies the user or group to add or revoke the role * for.

*/ inline UpdateInstruction& WithUsers(const Aws::Vector& value) { SetUsers(value); return *this;} /** *

A structure that specifies the user or group to add or revoke the role * for.

*/ inline UpdateInstruction& WithUsers(Aws::Vector&& value) { SetUsers(std::move(value)); return *this;} /** *

A structure that specifies the user or group to add or revoke the role * for.

*/ inline UpdateInstruction& AddUsers(const User& value) { m_usersHasBeenSet = true; m_users.push_back(value); return *this; } /** *

A structure that specifies the user or group to add or revoke the role * for.

*/ inline UpdateInstruction& AddUsers(User&& value) { m_usersHasBeenSet = true; m_users.push_back(std::move(value)); return *this; } private: UpdateAction m_action; bool m_actionHasBeenSet = false; Role m_role; bool m_roleHasBeenSet = false; Aws::Vector m_users; bool m_usersHasBeenSet = false; }; } // namespace Model } // namespace ManagedGrafana } // namespace Aws