//                           _       _
// __      _____  __ ___   ___  __ _| |_ ___
// \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
//  \ 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 authorization

import (
	mock "github.com/stretchr/testify/mock"
	authentication "github.com/weaviate/weaviate/usecases/auth/authentication"
)

// MockController is an autogenerated mock type for the Controller type
type MockController struct {
	mock.Mock
}

type MockController_Expecter struct {
	mock *mock.Mock
}

func (_m *MockController) EXPECT() *MockController_Expecter {
	return &MockController_Expecter{mock: &_m.Mock}
}

// AddRolesForUser provides a mock function with given fields: user, roles
func (_m *MockController) 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
}

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

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

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

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

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

// CreateRolesPermissions provides a mock function with given fields: roles
func (_m *MockController) CreateRolesPermissions(roles map[string][]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][]Policy) error); ok {
		r0 = rf(roles)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

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

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

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

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

// DeleteRoles provides a mock function with given fields: roles
func (_m *MockController) 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
}

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

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

func (_c *MockController_DeleteRoles_Call) Run(run func(roles ...string)) *MockController_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 *MockController_DeleteRoles_Call) Return(_a0 error) *MockController_DeleteRoles_Call {
	_c.Call.Return(_a0)
	return _c
}

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

// GetRoles provides a mock function with given fields: names
func (_m *MockController) GetRoles(names ...string) (map[string][]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][]Policy
	var r1 error
	if rf, ok := ret.Get(0).(func(...string) (map[string][]Policy, error)); ok {
		return rf(names...)
	}
	if rf, ok := ret.Get(0).(func(...string) map[string][]Policy); ok {
		r0 = rf(names...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string][]Policy)
		}
	}

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

	return r0, r1
}

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

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

func (_c *MockController_GetRoles_Call) Run(run func(names ...string)) *MockController_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 *MockController_GetRoles_Call) Return(_a0 map[string][]Policy, _a1 error) *MockController_GetRoles_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

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

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

	var r0 map[string][]Policy
	var r1 error
	if rf, ok := ret.Get(0).(func(string, authentication.AuthType, bool) (map[string][]Policy, error)); ok {
		return rf(user, authMethod, isGroup)
	}
	if rf, ok := ret.Get(0).(func(string, authentication.AuthType, bool) map[string][]Policy); ok {
		r0 = rf(user, authMethod, isGroup)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string][]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
}

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

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

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

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

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

// GetUsersOrGroupForRole provides a mock function with given fields: role, authMethod, IsGroup
func (_m *MockController) 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
}

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

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

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

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

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

// GetUsersOrGroupsWithRoles provides a mock function with given fields: isGroup, authMethod
func (_m *MockController) 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
}

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

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

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

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

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

// HasPermission provides a mock function with given fields: role, permission
func (_m *MockController) HasPermission(role string, permission *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, *Policy) (bool, error)); ok {
		return rf(role, permission)
	}
	if rf, ok := ret.Get(0).(func(string, *Policy) bool); ok {
		r0 = rf(role, permission)
	} else {
		r0 = ret.Get(0).(bool)
	}

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

	return r0, r1
}

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

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

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

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

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

// RemovePermissions provides a mock function with given fields: role, permissions
func (_m *MockController) RemovePermissions(role string, permissions []*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, []*Policy) error); ok {
		r0 = rf(role, permissions)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

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

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

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

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

// RevokeRolesForUser provides a mock function with given fields: user, roles
func (_m *MockController) 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
}

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

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

func (_c *MockController_RevokeRolesForUser_Call) Run(run func(user string, roles ...string)) *MockController_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 *MockController_RevokeRolesForUser_Call) Return(_a0 error) *MockController_RevokeRolesForUser_Call {
	_c.Call.Return(_a0)
	return _c
}

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

// UpdateRolesPermissions provides a mock function with given fields: roles
func (_m *MockController) UpdateRolesPermissions(roles map[string][]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][]Policy) error); ok {
		r0 = rf(roles)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

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

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

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

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

// NewMockController creates a new instance of MockController. 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 NewMockController(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockController {
	mock := &MockController{}
	mock.Mock.Test(t)

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

	return mock
}
