//                           _       _
// __      _____  __ ___   ___  __ _| |_ ___
// \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
//  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
//   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
//
//  Copyright © 2016 - 2026 Weaviate B.V. All rights reserved.
//
//  CONTACT: hello@weaviate.io
//

// Code generated by mockery v2.53.5. DO NOT EDIT.

package authz

import (
	authentication "github.com/weaviate/weaviate/usecases/auth/authentication"
	apikey "github.com/weaviate/weaviate/usecases/auth/authentication/apikey"

	authorization "github.com/weaviate/weaviate/usecases/auth/authorization"

	mock "github.com/stretchr/testify/mock"
)

// MockControllerAndGetUsers is an autogenerated mock type for the ControllerAndGetUsers type
type MockControllerAndGetUsers struct {
	mock.Mock
}

type MockControllerAndGetUsers_Expecter struct {
	mock *mock.Mock
}

func (_m *MockControllerAndGetUsers) EXPECT() *MockControllerAndGetUsers_Expecter {
	return &MockControllerAndGetUsers_Expecter{mock: &_m.Mock}
}

// AddRolesForUser provides a mock function with given fields: user, roles
func (_m *MockControllerAndGetUsers) AddRolesForUser(user string, roles []string) error {
	ret := _m.Called(user, roles)

	if len(ret) == 0 {
		panic("no return value specified for AddRolesForUser")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(string, []string) error); ok {
		r0 = rf(user, roles)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockControllerAndGetUsers_AddRolesForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddRolesForUser'
type MockControllerAndGetUsers_AddRolesForUser_Call struct {
	*mock.Call
}

// AddRolesForUser is a helper method to define mock.On call
//   - user string
//   - roles []string
func (_e *MockControllerAndGetUsers_Expecter) AddRolesForUser(user interface{}, roles interface{}) *MockControllerAndGetUsers_AddRolesForUser_Call {
	return &MockControllerAndGetUsers_AddRolesForUser_Call{Call: _e.mock.On("AddRolesForUser", user, roles)}
}

func (_c *MockControllerAndGetUsers_AddRolesForUser_Call) Run(run func(user string, roles []string)) *MockControllerAndGetUsers_AddRolesForUser_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].([]string))
	})
	return _c
}

func (_c *MockControllerAndGetUsers_AddRolesForUser_Call) Return(_a0 error) *MockControllerAndGetUsers_AddRolesForUser_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockControllerAndGetUsers_AddRolesForUser_Call) RunAndReturn(run func(string, []string) error) *MockControllerAndGetUsers_AddRolesForUser_Call {
	_c.Call.Return(run)
	return _c
}

// CreateRolesPermissions provides a mock function with given fields: roles
func (_m *MockControllerAndGetUsers) CreateRolesPermissions(roles map[string][]authorization.Policy) error {
	ret := _m.Called(roles)

	if len(ret) == 0 {
		panic("no return value specified for CreateRolesPermissions")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(map[string][]authorization.Policy) error); ok {
		r0 = rf(roles)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockControllerAndGetUsers_CreateRolesPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRolesPermissions'
type MockControllerAndGetUsers_CreateRolesPermissions_Call struct {
	*mock.Call
}

// CreateRolesPermissions is a helper method to define mock.On call
//   - roles map[string][]authorization.Policy
func (_e *MockControllerAndGetUsers_Expecter) CreateRolesPermissions(roles interface{}) *MockControllerAndGetUsers_CreateRolesPermissions_Call {
	return &MockControllerAndGetUsers_CreateRolesPermissions_Call{Call: _e.mock.On("CreateRolesPermissions", roles)}
}

func (_c *MockControllerAndGetUsers_CreateRolesPermissions_Call) Run(run func(roles map[string][]authorization.Policy)) *MockControllerAndGetUsers_CreateRolesPermissions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(map[string][]authorization.Policy))
	})
	return _c
}

func (_c *MockControllerAndGetUsers_CreateRolesPermissions_Call) Return(_a0 error) *MockControllerAndGetUsers_CreateRolesPermissions_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockControllerAndGetUsers_CreateRolesPermissions_Call) RunAndReturn(run func(map[string][]authorization.Policy) error) *MockControllerAndGetUsers_CreateRolesPermissions_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteRoles provides a mock function with given fields: roles
func (_m *MockControllerAndGetUsers) DeleteRoles(roles ...string) error {
	_va := make([]interface{}, len(roles))
	for _i := range roles {
		_va[_i] = roles[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for DeleteRoles")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(...string) error); ok {
		r0 = rf(roles...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockControllerAndGetUsers_DeleteRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRoles'
type MockControllerAndGetUsers_DeleteRoles_Call struct {
	*mock.Call
}

// DeleteRoles is a helper method to define mock.On call
//   - roles ...string
func (_e *MockControllerAndGetUsers_Expecter) DeleteRoles(roles ...interface{}) *MockControllerAndGetUsers_DeleteRoles_Call {
	return &MockControllerAndGetUsers_DeleteRoles_Call{Call: _e.mock.On("DeleteRoles",
		append([]interface{}{}, roles...)...)}
}

func (_c *MockControllerAndGetUsers_DeleteRoles_Call) Run(run func(roles ...string)) *MockControllerAndGetUsers_DeleteRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]string, len(args)-0)
		for i, a := range args[0:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		run(variadicArgs...)
	})
	return _c
}

func (_c *MockControllerAndGetUsers_DeleteRoles_Call) Return(_a0 error) *MockControllerAndGetUsers_DeleteRoles_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockControllerAndGetUsers_DeleteRoles_Call) RunAndReturn(run func(...string) error) *MockControllerAndGetUsers_DeleteRoles_Call {
	_c.Call.Return(run)
	return _c
}

// GetRoles provides a mock function with given fields: names
func (_m *MockControllerAndGetUsers) GetRoles(names ...string) (map[string][]authorization.Policy, error) {
	_va := make([]interface{}, len(names))
	for _i := range names {
		_va[_i] = names[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for GetRoles")
	}

	var r0 map[string][]authorization.Policy
	var r1 error
	if rf, ok := ret.Get(0).(func(...string) (map[string][]authorization.Policy, error)); ok {
		return rf(names...)
	}
	if rf, ok := ret.Get(0).(func(...string) map[string][]authorization.Policy); ok {
		r0 = rf(names...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string][]authorization.Policy)
		}
	}

	if rf, ok := ret.Get(1).(func(...string) error); ok {
		r1 = rf(names...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockControllerAndGetUsers_GetRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoles'
type MockControllerAndGetUsers_GetRoles_Call struct {
	*mock.Call
}

// GetRoles is a helper method to define mock.On call
//   - names ...string
func (_e *MockControllerAndGetUsers_Expecter) GetRoles(names ...interface{}) *MockControllerAndGetUsers_GetRoles_Call {
	return &MockControllerAndGetUsers_GetRoles_Call{Call: _e.mock.On("GetRoles",
		append([]interface{}{}, names...)...)}
}

func (_c *MockControllerAndGetUsers_GetRoles_Call) Run(run func(names ...string)) *MockControllerAndGetUsers_GetRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]string, len(args)-0)
		for i, a := range args[0:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		run(variadicArgs...)
	})
	return _c
}

func (_c *MockControllerAndGetUsers_GetRoles_Call) Return(_a0 map[string][]authorization.Policy, _a1 error) *MockControllerAndGetUsers_GetRoles_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockControllerAndGetUsers_GetRoles_Call) RunAndReturn(run func(...string) (map[string][]authorization.Policy, error)) *MockControllerAndGetUsers_GetRoles_Call {
	_c.Call.Return(run)
	return _c
}

// GetRolesForUserOrGroup provides a mock function with given fields: user, authMethod, isGroup
func (_m *MockControllerAndGetUsers) GetRolesForUserOrGroup(user string, authMethod authentication.AuthType, isGroup bool) (map[string][]authorization.Policy, error) {
	ret := _m.Called(user, authMethod, isGroup)

	if len(ret) == 0 {
		panic("no return value specified for GetRolesForUserOrGroup")
	}

	var r0 map[string][]authorization.Policy
	var r1 error
	if rf, ok := ret.Get(0).(func(string, authentication.AuthType, bool) (map[string][]authorization.Policy, error)); ok {
		return rf(user, authMethod, isGroup)
	}
	if rf, ok := ret.Get(0).(func(string, authentication.AuthType, bool) map[string][]authorization.Policy); ok {
		r0 = rf(user, authMethod, isGroup)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string][]authorization.Policy)
		}
	}

	if rf, ok := ret.Get(1).(func(string, authentication.AuthType, bool) error); ok {
		r1 = rf(user, authMethod, isGroup)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockControllerAndGetUsers_GetRolesForUserOrGroup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRolesForUserOrGroup'
type MockControllerAndGetUsers_GetRolesForUserOrGroup_Call struct {
	*mock.Call
}

// GetRolesForUserOrGroup is a helper method to define mock.On call
//   - user string
//   - authMethod authentication.AuthType
//   - isGroup bool
func (_e *MockControllerAndGetUsers_Expecter) GetRolesForUserOrGroup(user interface{}, authMethod interface{}, isGroup interface{}) *MockControllerAndGetUsers_GetRolesForUserOrGroup_Call {
	return &MockControllerAndGetUsers_GetRolesForUserOrGroup_Call{Call: _e.mock.On("GetRolesForUserOrGroup", user, authMethod, isGroup)}
}

func (_c *MockControllerAndGetUsers_GetRolesForUserOrGroup_Call) Run(run func(user string, authMethod authentication.AuthType, isGroup bool)) *MockControllerAndGetUsers_GetRolesForUserOrGroup_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(authentication.AuthType), args[2].(bool))
	})
	return _c
}

func (_c *MockControllerAndGetUsers_GetRolesForUserOrGroup_Call) Return(_a0 map[string][]authorization.Policy, _a1 error) *MockControllerAndGetUsers_GetRolesForUserOrGroup_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockControllerAndGetUsers_GetRolesForUserOrGroup_Call) RunAndReturn(run func(string, authentication.AuthType, bool) (map[string][]authorization.Policy, error)) *MockControllerAndGetUsers_GetRolesForUserOrGroup_Call {
	_c.Call.Return(run)
	return _c
}

// GetUsers provides a mock function with given fields: userIds
func (_m *MockControllerAndGetUsers) GetUsers(userIds ...string) (map[string]*apikey.User, error) {
	_va := make([]interface{}, len(userIds))
	for _i := range userIds {
		_va[_i] = userIds[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for GetUsers")
	}

	var r0 map[string]*apikey.User
	var r1 error
	if rf, ok := ret.Get(0).(func(...string) (map[string]*apikey.User, error)); ok {
		return rf(userIds...)
	}
	if rf, ok := ret.Get(0).(func(...string) map[string]*apikey.User); ok {
		r0 = rf(userIds...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]*apikey.User)
		}
	}

	if rf, ok := ret.Get(1).(func(...string) error); ok {
		r1 = rf(userIds...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockControllerAndGetUsers_GetUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsers'
type MockControllerAndGetUsers_GetUsers_Call struct {
	*mock.Call
}

// GetUsers is a helper method to define mock.On call
//   - userIds ...string
func (_e *MockControllerAndGetUsers_Expecter) GetUsers(userIds ...interface{}) *MockControllerAndGetUsers_GetUsers_Call {
	return &MockControllerAndGetUsers_GetUsers_Call{Call: _e.mock.On("GetUsers",
		append([]interface{}{}, userIds...)...)}
}

func (_c *MockControllerAndGetUsers_GetUsers_Call) Run(run func(userIds ...string)) *MockControllerAndGetUsers_GetUsers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]string, len(args)-0)
		for i, a := range args[0:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		run(variadicArgs...)
	})
	return _c
}

func (_c *MockControllerAndGetUsers_GetUsers_Call) Return(_a0 map[string]*apikey.User, _a1 error) *MockControllerAndGetUsers_GetUsers_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockControllerAndGetUsers_GetUsers_Call) RunAndReturn(run func(...string) (map[string]*apikey.User, error)) *MockControllerAndGetUsers_GetUsers_Call {
	_c.Call.Return(run)
	return _c
}

// GetUsersOrGroupForRole provides a mock function with given fields: role, authMethod, IsGroup
func (_m *MockControllerAndGetUsers) GetUsersOrGroupForRole(role string, authMethod authentication.AuthType, IsGroup bool) ([]string, error) {
	ret := _m.Called(role, authMethod, IsGroup)

	if len(ret) == 0 {
		panic("no return value specified for GetUsersOrGroupForRole")
	}

	var r0 []string
	var r1 error
	if rf, ok := ret.Get(0).(func(string, authentication.AuthType, bool) ([]string, error)); ok {
		return rf(role, authMethod, IsGroup)
	}
	if rf, ok := ret.Get(0).(func(string, authentication.AuthType, bool) []string); ok {
		r0 = rf(role, authMethod, IsGroup)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	if rf, ok := ret.Get(1).(func(string, authentication.AuthType, bool) error); ok {
		r1 = rf(role, authMethod, IsGroup)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockControllerAndGetUsers_GetUsersOrGroupForRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsersOrGroupForRole'
type MockControllerAndGetUsers_GetUsersOrGroupForRole_Call struct {
	*mock.Call
}

// GetUsersOrGroupForRole is a helper method to define mock.On call
//   - role string
//   - authMethod authentication.AuthType
//   - IsGroup bool
func (_e *MockControllerAndGetUsers_Expecter) GetUsersOrGroupForRole(role interface{}, authMethod interface{}, IsGroup interface{}) *MockControllerAndGetUsers_GetUsersOrGroupForRole_Call {
	return &MockControllerAndGetUsers_GetUsersOrGroupForRole_Call{Call: _e.mock.On("GetUsersOrGroupForRole", role, authMethod, IsGroup)}
}

func (_c *MockControllerAndGetUsers_GetUsersOrGroupForRole_Call) Run(run func(role string, authMethod authentication.AuthType, IsGroup bool)) *MockControllerAndGetUsers_GetUsersOrGroupForRole_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(authentication.AuthType), args[2].(bool))
	})
	return _c
}

func (_c *MockControllerAndGetUsers_GetUsersOrGroupForRole_Call) Return(_a0 []string, _a1 error) *MockControllerAndGetUsers_GetUsersOrGroupForRole_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockControllerAndGetUsers_GetUsersOrGroupForRole_Call) RunAndReturn(run func(string, authentication.AuthType, bool) ([]string, error)) *MockControllerAndGetUsers_GetUsersOrGroupForRole_Call {
	_c.Call.Return(run)
	return _c
}

// GetUsersOrGroupsWithRoles provides a mock function with given fields: isGroup, authMethod
func (_m *MockControllerAndGetUsers) GetUsersOrGroupsWithRoles(isGroup bool, authMethod authentication.AuthType) ([]string, error) {
	ret := _m.Called(isGroup, authMethod)

	if len(ret) == 0 {
		panic("no return value specified for GetUsersOrGroupsWithRoles")
	}

	var r0 []string
	var r1 error
	if rf, ok := ret.Get(0).(func(bool, authentication.AuthType) ([]string, error)); ok {
		return rf(isGroup, authMethod)
	}
	if rf, ok := ret.Get(0).(func(bool, authentication.AuthType) []string); ok {
		r0 = rf(isGroup, authMethod)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	if rf, ok := ret.Get(1).(func(bool, authentication.AuthType) error); ok {
		r1 = rf(isGroup, authMethod)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUsersOrGroupsWithRoles'
type MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call struct {
	*mock.Call
}

// GetUsersOrGroupsWithRoles is a helper method to define mock.On call
//   - isGroup bool
//   - authMethod authentication.AuthType
func (_e *MockControllerAndGetUsers_Expecter) GetUsersOrGroupsWithRoles(isGroup interface{}, authMethod interface{}) *MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call {
	return &MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call{Call: _e.mock.On("GetUsersOrGroupsWithRoles", isGroup, authMethod)}
}

func (_c *MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call) Run(run func(isGroup bool, authMethod authentication.AuthType)) *MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(bool), args[1].(authentication.AuthType))
	})
	return _c
}

func (_c *MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call) Return(_a0 []string, _a1 error) *MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call) RunAndReturn(run func(bool, authentication.AuthType) ([]string, error)) *MockControllerAndGetUsers_GetUsersOrGroupsWithRoles_Call {
	_c.Call.Return(run)
	return _c
}

// HasPermission provides a mock function with given fields: role, permission
func (_m *MockControllerAndGetUsers) HasPermission(role string, permission *authorization.Policy) (bool, error) {
	ret := _m.Called(role, permission)

	if len(ret) == 0 {
		panic("no return value specified for HasPermission")
	}

	var r0 bool
	var r1 error
	if rf, ok := ret.Get(0).(func(string, *authorization.Policy) (bool, error)); ok {
		return rf(role, permission)
	}
	if rf, ok := ret.Get(0).(func(string, *authorization.Policy) bool); ok {
		r0 = rf(role, permission)
	} else {
		r0 = ret.Get(0).(bool)
	}

	if rf, ok := ret.Get(1).(func(string, *authorization.Policy) error); ok {
		r1 = rf(role, permission)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockControllerAndGetUsers_HasPermission_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasPermission'
type MockControllerAndGetUsers_HasPermission_Call struct {
	*mock.Call
}

// HasPermission is a helper method to define mock.On call
//   - role string
//   - permission *authorization.Policy
func (_e *MockControllerAndGetUsers_Expecter) HasPermission(role interface{}, permission interface{}) *MockControllerAndGetUsers_HasPermission_Call {
	return &MockControllerAndGetUsers_HasPermission_Call{Call: _e.mock.On("HasPermission", role, permission)}
}

func (_c *MockControllerAndGetUsers_HasPermission_Call) Run(run func(role string, permission *authorization.Policy)) *MockControllerAndGetUsers_HasPermission_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(*authorization.Policy))
	})
	return _c
}

func (_c *MockControllerAndGetUsers_HasPermission_Call) Return(_a0 bool, _a1 error) *MockControllerAndGetUsers_HasPermission_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockControllerAndGetUsers_HasPermission_Call) RunAndReturn(run func(string, *authorization.Policy) (bool, error)) *MockControllerAndGetUsers_HasPermission_Call {
	_c.Call.Return(run)
	return _c
}

// RemovePermissions provides a mock function with given fields: role, permissions
func (_m *MockControllerAndGetUsers) RemovePermissions(role string, permissions []*authorization.Policy) error {
	ret := _m.Called(role, permissions)

	if len(ret) == 0 {
		panic("no return value specified for RemovePermissions")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(string, []*authorization.Policy) error); ok {
		r0 = rf(role, permissions)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockControllerAndGetUsers_RemovePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePermissions'
type MockControllerAndGetUsers_RemovePermissions_Call struct {
	*mock.Call
}

// RemovePermissions is a helper method to define mock.On call
//   - role string
//   - permissions []*authorization.Policy
func (_e *MockControllerAndGetUsers_Expecter) RemovePermissions(role interface{}, permissions interface{}) *MockControllerAndGetUsers_RemovePermissions_Call {
	return &MockControllerAndGetUsers_RemovePermissions_Call{Call: _e.mock.On("RemovePermissions", role, permissions)}
}

func (_c *MockControllerAndGetUsers_RemovePermissions_Call) Run(run func(role string, permissions []*authorization.Policy)) *MockControllerAndGetUsers_RemovePermissions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].([]*authorization.Policy))
	})
	return _c
}

func (_c *MockControllerAndGetUsers_RemovePermissions_Call) Return(_a0 error) *MockControllerAndGetUsers_RemovePermissions_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockControllerAndGetUsers_RemovePermissions_Call) RunAndReturn(run func(string, []*authorization.Policy) error) *MockControllerAndGetUsers_RemovePermissions_Call {
	_c.Call.Return(run)
	return _c
}

// RevokeRolesForUser provides a mock function with given fields: user, roles
func (_m *MockControllerAndGetUsers) RevokeRolesForUser(user string, roles ...string) error {
	_va := make([]interface{}, len(roles))
	for _i := range roles {
		_va[_i] = roles[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, user)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for RevokeRolesForUser")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(string, ...string) error); ok {
		r0 = rf(user, roles...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockControllerAndGetUsers_RevokeRolesForUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeRolesForUser'
type MockControllerAndGetUsers_RevokeRolesForUser_Call struct {
	*mock.Call
}

// RevokeRolesForUser is a helper method to define mock.On call
//   - user string
//   - roles ...string
func (_e *MockControllerAndGetUsers_Expecter) RevokeRolesForUser(user interface{}, roles ...interface{}) *MockControllerAndGetUsers_RevokeRolesForUser_Call {
	return &MockControllerAndGetUsers_RevokeRolesForUser_Call{Call: _e.mock.On("RevokeRolesForUser",
		append([]interface{}{user}, roles...)...)}
}

func (_c *MockControllerAndGetUsers_RevokeRolesForUser_Call) Run(run func(user string, roles ...string)) *MockControllerAndGetUsers_RevokeRolesForUser_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]string, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		run(args[0].(string), variadicArgs...)
	})
	return _c
}

func (_c *MockControllerAndGetUsers_RevokeRolesForUser_Call) Return(_a0 error) *MockControllerAndGetUsers_RevokeRolesForUser_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockControllerAndGetUsers_RevokeRolesForUser_Call) RunAndReturn(run func(string, ...string) error) *MockControllerAndGetUsers_RevokeRolesForUser_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateRolesPermissions provides a mock function with given fields: roles
func (_m *MockControllerAndGetUsers) UpdateRolesPermissions(roles map[string][]authorization.Policy) error {
	ret := _m.Called(roles)

	if len(ret) == 0 {
		panic("no return value specified for UpdateRolesPermissions")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(map[string][]authorization.Policy) error); ok {
		r0 = rf(roles)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockControllerAndGetUsers_UpdateRolesPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRolesPermissions'
type MockControllerAndGetUsers_UpdateRolesPermissions_Call struct {
	*mock.Call
}

// UpdateRolesPermissions is a helper method to define mock.On call
//   - roles map[string][]authorization.Policy
func (_e *MockControllerAndGetUsers_Expecter) UpdateRolesPermissions(roles interface{}) *MockControllerAndGetUsers_UpdateRolesPermissions_Call {
	return &MockControllerAndGetUsers_UpdateRolesPermissions_Call{Call: _e.mock.On("UpdateRolesPermissions", roles)}
}

func (_c *MockControllerAndGetUsers_UpdateRolesPermissions_Call) Run(run func(roles map[string][]authorization.Policy)) *MockControllerAndGetUsers_UpdateRolesPermissions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(map[string][]authorization.Policy))
	})
	return _c
}

func (_c *MockControllerAndGetUsers_UpdateRolesPermissions_Call) Return(_a0 error) *MockControllerAndGetUsers_UpdateRolesPermissions_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockControllerAndGetUsers_UpdateRolesPermissions_Call) RunAndReturn(run func(map[string][]authorization.Policy) error) *MockControllerAndGetUsers_UpdateRolesPermissions_Call {
	_c.Call.Return(run)
	return _c
}

// NewMockControllerAndGetUsers creates a new instance of MockControllerAndGetUsers. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockControllerAndGetUsers(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockControllerAndGetUsers {
	mock := &MockControllerAndGetUsers{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
