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

The Identity and Access Management (IAM) action definition details. *

See Also:

AWS * API Reference

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

The Amazon Resource Name (ARN) of the policy to be attached.

*/ inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } /** *

The Amazon Resource Name (ARN) of the policy to be attached.

*/ inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the policy to be attached.

*/ inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } /** *

The Amazon Resource Name (ARN) of the policy to be attached.

*/ inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the policy to be attached.

*/ inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the policy to be attached.

*/ inline IamActionDefinition& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the policy to be attached.

*/ inline IamActionDefinition& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the policy to be attached.

*/ inline IamActionDefinition& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} /** *

A list of roles to be attached. There must be at least one role.

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

A list of roles to be attached. There must be at least one role.

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

A list of roles to be attached. There must be at least one role.

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

A list of roles to be attached. There must be at least one role.

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

A list of roles to be attached. There must be at least one role.

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

A list of roles to be attached. There must be at least one role.

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

A list of roles to be attached. There must be at least one role.

*/ inline IamActionDefinition& AddRoles(const Aws::String& value) { m_rolesHasBeenSet = true; m_roles.push_back(value); return *this; } /** *

A list of roles to be attached. There must be at least one role.

*/ inline IamActionDefinition& AddRoles(Aws::String&& value) { m_rolesHasBeenSet = true; m_roles.push_back(std::move(value)); return *this; } /** *

A list of roles to be attached. There must be at least one role.

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

A list of groups to be attached. There must be at least one group.

*/ inline const Aws::Vector& GetGroups() const{ return m_groups; } /** *

A list of groups to be attached. There must be at least one group.

*/ inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; } /** *

A list of groups to be attached. There must be at least one group.

*/ inline void SetGroups(const Aws::Vector& value) { m_groupsHasBeenSet = true; m_groups = value; } /** *

A list of groups to be attached. There must be at least one group.

*/ inline void SetGroups(Aws::Vector&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); } /** *

A list of groups to be attached. There must be at least one group.

*/ inline IamActionDefinition& WithGroups(const Aws::Vector& value) { SetGroups(value); return *this;} /** *

A list of groups to be attached. There must be at least one group.

*/ inline IamActionDefinition& WithGroups(Aws::Vector&& value) { SetGroups(std::move(value)); return *this;} /** *

A list of groups to be attached. There must be at least one group.

*/ inline IamActionDefinition& AddGroups(const Aws::String& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

A list of groups to be attached. There must be at least one group.

*/ inline IamActionDefinition& AddGroups(Aws::String&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; } /** *

A list of groups to be attached. There must be at least one group.

*/ inline IamActionDefinition& AddGroups(const char* value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

A list of users to be attached. There must be at least one user.

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

A list of users to be attached. There must be at least one user.

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

A list of users to be attached. There must be at least one user.

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

A list of users to be attached. There must be at least one user.

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

A list of users to be attached. There must be at least one user.

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

A list of users to be attached. There must be at least one user.

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

A list of users to be attached. There must be at least one user.

*/ inline IamActionDefinition& AddUsers(const Aws::String& value) { m_usersHasBeenSet = true; m_users.push_back(value); return *this; } /** *

A list of users to be attached. There must be at least one user.

*/ inline IamActionDefinition& AddUsers(Aws::String&& value) { m_usersHasBeenSet = true; m_users.push_back(std::move(value)); return *this; } /** *

A list of users to be attached. There must be at least one user.

*/ inline IamActionDefinition& AddUsers(const char* value) { m_usersHasBeenSet = true; m_users.push_back(value); return *this; } private: Aws::String m_policyArn; bool m_policyArnHasBeenSet = false; Aws::Vector m_roles; bool m_rolesHasBeenSet = false; Aws::Vector m_groups; bool m_groupsHasBeenSet = false; Aws::Vector m_users; bool m_usersHasBeenSet = false; }; } // namespace Model } // namespace Budgets } // namespace Aws