// Copyright (c) Abstract Machines

// SPDX-License-Identifier: Apache-2.0

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"context"

	"github.com/absmach/supermq/groups"
	"github.com/absmach/supermq/pkg/roles"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Repository_Expecter struct {
	mock *mock.Mock
}

func (_m *Repository) EXPECT() *Repository_Expecter {
	return &Repository_Expecter{mock: &_m.Mock}
}

// AddRoles provides a mock function for the type Repository
func (_mock *Repository) AddRoles(ctx context.Context, rps []roles.RoleProvision) ([]roles.RoleProvision, error) {
	ret := _mock.Called(ctx, rps)

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

	var r0 []roles.RoleProvision
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []roles.RoleProvision) ([]roles.RoleProvision, error)); ok {
		return returnFunc(ctx, rps)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, []roles.RoleProvision) []roles.RoleProvision); ok {
		r0 = returnFunc(ctx, rps)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]roles.RoleProvision)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, []roles.RoleProvision) error); ok {
		r1 = returnFunc(ctx, rps)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// AddRoles is a helper method to define mock.On call
//   - ctx context.Context
//   - rps []roles.RoleProvision
func (_e *Repository_Expecter) AddRoles(ctx interface{}, rps interface{}) *Repository_AddRoles_Call {
	return &Repository_AddRoles_Call{Call: _e.mock.On("AddRoles", ctx, rps)}
}

func (_c *Repository_AddRoles_Call) Run(run func(ctx context.Context, rps []roles.RoleProvision)) *Repository_AddRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []roles.RoleProvision
		if args[1] != nil {
			arg1 = args[1].([]roles.RoleProvision)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_AddRoles_Call) Return(roleProvisions []roles.RoleProvision, err error) *Repository_AddRoles_Call {
	_c.Call.Return(roleProvisions, err)
	return _c
}

func (_c *Repository_AddRoles_Call) RunAndReturn(run func(ctx context.Context, rps []roles.RoleProvision) ([]roles.RoleProvision, error)) *Repository_AddRoles_Call {
	_c.Call.Return(run)
	return _c
}

// AssignParentGroup provides a mock function for the type Repository
func (_mock *Repository) AssignParentGroup(ctx context.Context, parentGroupID string, groupIDs ...string) error {
	var tmpRet mock.Arguments
	if len(groupIDs) > 0 {
		tmpRet = _mock.Called(ctx, parentGroupID, groupIDs)
	} else {
		tmpRet = _mock.Called(ctx, parentGroupID)
	}
	ret := tmpRet

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...string) error); ok {
		r0 = returnFunc(ctx, parentGroupID, groupIDs...)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// AssignParentGroup is a helper method to define mock.On call
//   - ctx context.Context
//   - parentGroupID string
//   - groupIDs ...string
func (_e *Repository_Expecter) AssignParentGroup(ctx interface{}, parentGroupID interface{}, groupIDs ...interface{}) *Repository_AssignParentGroup_Call {
	return &Repository_AssignParentGroup_Call{Call: _e.mock.On("AssignParentGroup",
		append([]interface{}{ctx, parentGroupID}, groupIDs...)...)}
}

func (_c *Repository_AssignParentGroup_Call) Run(run func(ctx context.Context, parentGroupID string, groupIDs ...string)) *Repository_AssignParentGroup_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []string
		var variadicArgs []string
		if len(args) > 2 {
			variadicArgs = args[2].([]string)
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *Repository_AssignParentGroup_Call) Return(err error) *Repository_AssignParentGroup_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_AssignParentGroup_Call) RunAndReturn(run func(ctx context.Context, parentGroupID string, groupIDs ...string) error) *Repository_AssignParentGroup_Call {
	_c.Call.Return(run)
	return _c
}

// ChangeStatus provides a mock function for the type Repository
func (_mock *Repository) ChangeStatus(ctx context.Context, group groups.Group) (groups.Group, error) {
	ret := _mock.Called(ctx, group)

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

	var r0 groups.Group
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.Group) (groups.Group, error)); ok {
		return returnFunc(ctx, group)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.Group) groups.Group); ok {
		r0 = returnFunc(ctx, group)
	} else {
		r0 = ret.Get(0).(groups.Group)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, groups.Group) error); ok {
		r1 = returnFunc(ctx, group)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ChangeStatus is a helper method to define mock.On call
//   - ctx context.Context
//   - group groups.Group
func (_e *Repository_Expecter) ChangeStatus(ctx interface{}, group interface{}) *Repository_ChangeStatus_Call {
	return &Repository_ChangeStatus_Call{Call: _e.mock.On("ChangeStatus", ctx, group)}
}

func (_c *Repository_ChangeStatus_Call) Run(run func(ctx context.Context, group groups.Group)) *Repository_ChangeStatus_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 groups.Group
		if args[1] != nil {
			arg1 = args[1].(groups.Group)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_ChangeStatus_Call) Return(group1 groups.Group, err error) *Repository_ChangeStatus_Call {
	_c.Call.Return(group1, err)
	return _c
}

func (_c *Repository_ChangeStatus_Call) RunAndReturn(run func(ctx context.Context, group groups.Group) (groups.Group, error)) *Repository_ChangeStatus_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function for the type Repository
func (_mock *Repository) Delete(ctx context.Context, groupID string) error {
	ret := _mock.Called(ctx, groupID)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = returnFunc(ctx, groupID)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - groupID string
func (_e *Repository_Expecter) Delete(ctx interface{}, groupID interface{}) *Repository_Delete_Call {
	return &Repository_Delete_Call{Call: _e.mock.On("Delete", ctx, groupID)}
}

func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, groupID string)) *Repository_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_Delete_Call) Return(err error) *Repository_Delete_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_Delete_Call) RunAndReturn(run func(ctx context.Context, groupID string) error) *Repository_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// ListEntityMembers provides a mock function for the type Repository
func (_mock *Repository) ListEntityMembers(ctx context.Context, entityID string, pageQuery roles.MembersRolePageQuery) (roles.MembersRolePage, error) {
	ret := _mock.Called(ctx, entityID, pageQuery)

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

	var r0 roles.MembersRolePage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, roles.MembersRolePageQuery) (roles.MembersRolePage, error)); ok {
		return returnFunc(ctx, entityID, pageQuery)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, roles.MembersRolePageQuery) roles.MembersRolePage); ok {
		r0 = returnFunc(ctx, entityID, pageQuery)
	} else {
		r0 = ret.Get(0).(roles.MembersRolePage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, roles.MembersRolePageQuery) error); ok {
		r1 = returnFunc(ctx, entityID, pageQuery)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListEntityMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - entityID string
//   - pageQuery roles.MembersRolePageQuery
func (_e *Repository_Expecter) ListEntityMembers(ctx interface{}, entityID interface{}, pageQuery interface{}) *Repository_ListEntityMembers_Call {
	return &Repository_ListEntityMembers_Call{Call: _e.mock.On("ListEntityMembers", ctx, entityID, pageQuery)}
}

func (_c *Repository_ListEntityMembers_Call) Run(run func(ctx context.Context, entityID string, pageQuery roles.MembersRolePageQuery)) *Repository_ListEntityMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 roles.MembersRolePageQuery
		if args[2] != nil {
			arg2 = args[2].(roles.MembersRolePageQuery)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_ListEntityMembers_Call) Return(membersRolePage roles.MembersRolePage, err error) *Repository_ListEntityMembers_Call {
	_c.Call.Return(membersRolePage, err)
	return _c
}

func (_c *Repository_ListEntityMembers_Call) RunAndReturn(run func(ctx context.Context, entityID string, pageQuery roles.MembersRolePageQuery) (roles.MembersRolePage, error)) *Repository_ListEntityMembers_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveEntityMembers provides a mock function for the type Repository
func (_mock *Repository) RemoveEntityMembers(ctx context.Context, entityID string, members []string) error {
	ret := _mock.Called(ctx, entityID, members)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string) error); ok {
		r0 = returnFunc(ctx, entityID, members)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RemoveEntityMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - entityID string
//   - members []string
func (_e *Repository_Expecter) RemoveEntityMembers(ctx interface{}, entityID interface{}, members interface{}) *Repository_RemoveEntityMembers_Call {
	return &Repository_RemoveEntityMembers_Call{Call: _e.mock.On("RemoveEntityMembers", ctx, entityID, members)}
}

func (_c *Repository_RemoveEntityMembers_Call) Run(run func(ctx context.Context, entityID string, members []string)) *Repository_RemoveEntityMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []string
		if args[2] != nil {
			arg2 = args[2].([]string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RemoveEntityMembers_Call) Return(err error) *Repository_RemoveEntityMembers_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_RemoveEntityMembers_Call) RunAndReturn(run func(ctx context.Context, entityID string, members []string) error) *Repository_RemoveEntityMembers_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveMemberFromAllRoles provides a mock function for the type Repository
func (_mock *Repository) RemoveMemberFromAllRoles(ctx context.Context, memberID string) error {
	ret := _mock.Called(ctx, memberID)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = returnFunc(ctx, memberID)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RemoveMemberFromAllRoles is a helper method to define mock.On call
//   - ctx context.Context
//   - memberID string
func (_e *Repository_Expecter) RemoveMemberFromAllRoles(ctx interface{}, memberID interface{}) *Repository_RemoveMemberFromAllRoles_Call {
	return &Repository_RemoveMemberFromAllRoles_Call{Call: _e.mock.On("RemoveMemberFromAllRoles", ctx, memberID)}
}

func (_c *Repository_RemoveMemberFromAllRoles_Call) Run(run func(ctx context.Context, memberID string)) *Repository_RemoveMemberFromAllRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RemoveMemberFromAllRoles_Call) Return(err error) *Repository_RemoveMemberFromAllRoles_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_RemoveMemberFromAllRoles_Call) RunAndReturn(run func(ctx context.Context, memberID string) error) *Repository_RemoveMemberFromAllRoles_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveRoles provides a mock function for the type Repository
func (_mock *Repository) RemoveRoles(ctx context.Context, roleIDs []string) error {
	ret := _mock.Called(ctx, roleIDs)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []string) error); ok {
		r0 = returnFunc(ctx, roleIDs)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RemoveRoles is a helper method to define mock.On call
//   - ctx context.Context
//   - roleIDs []string
func (_e *Repository_Expecter) RemoveRoles(ctx interface{}, roleIDs interface{}) *Repository_RemoveRoles_Call {
	return &Repository_RemoveRoles_Call{Call: _e.mock.On("RemoveRoles", ctx, roleIDs)}
}

func (_c *Repository_RemoveRoles_Call) Run(run func(ctx context.Context, roleIDs []string)) *Repository_RemoveRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []string
		if args[1] != nil {
			arg1 = args[1].([]string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RemoveRoles_Call) Return(err error) *Repository_RemoveRoles_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_RemoveRoles_Call) RunAndReturn(run func(ctx context.Context, roleIDs []string) error) *Repository_RemoveRoles_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveAll provides a mock function for the type Repository
func (_mock *Repository) RetrieveAll(ctx context.Context, pm groups.PageMeta) (groups.Page, error) {
	ret := _mock.Called(ctx, pm)

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

	var r0 groups.Page
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.PageMeta) (groups.Page, error)); ok {
		return returnFunc(ctx, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.PageMeta) groups.Page); ok {
		r0 = returnFunc(ctx, pm)
	} else {
		r0 = ret.Get(0).(groups.Page)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, groups.PageMeta) error); ok {
		r1 = returnFunc(ctx, pm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveAll is a helper method to define mock.On call
//   - ctx context.Context
//   - pm groups.PageMeta
func (_e *Repository_Expecter) RetrieveAll(ctx interface{}, pm interface{}) *Repository_RetrieveAll_Call {
	return &Repository_RetrieveAll_Call{Call: _e.mock.On("RetrieveAll", ctx, pm)}
}

func (_c *Repository_RetrieveAll_Call) Run(run func(ctx context.Context, pm groups.PageMeta)) *Repository_RetrieveAll_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 groups.PageMeta
		if args[1] != nil {
			arg1 = args[1].(groups.PageMeta)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RetrieveAll_Call) Return(page groups.Page, err error) *Repository_RetrieveAll_Call {
	_c.Call.Return(page, err)
	return _c
}

func (_c *Repository_RetrieveAll_Call) RunAndReturn(run func(ctx context.Context, pm groups.PageMeta) (groups.Page, error)) *Repository_RetrieveAll_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveAllParentGroups provides a mock function for the type Repository
func (_mock *Repository) RetrieveAllParentGroups(ctx context.Context, domainID string, userID string, groupID string, pm groups.PageMeta) (groups.Page, error) {
	ret := _mock.Called(ctx, domainID, userID, groupID, pm)

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

	var r0 groups.Page
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, groups.PageMeta) (groups.Page, error)); ok {
		return returnFunc(ctx, domainID, userID, groupID, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, groups.PageMeta) groups.Page); ok {
		r0 = returnFunc(ctx, domainID, userID, groupID, pm)
	} else {
		r0 = ret.Get(0).(groups.Page)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, groups.PageMeta) error); ok {
		r1 = returnFunc(ctx, domainID, userID, groupID, pm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveAllParentGroups is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
//   - userID string
//   - groupID string
//   - pm groups.PageMeta
func (_e *Repository_Expecter) RetrieveAllParentGroups(ctx interface{}, domainID interface{}, userID interface{}, groupID interface{}, pm interface{}) *Repository_RetrieveAllParentGroups_Call {
	return &Repository_RetrieveAllParentGroups_Call{Call: _e.mock.On("RetrieveAllParentGroups", ctx, domainID, userID, groupID, pm)}
}

func (_c *Repository_RetrieveAllParentGroups_Call) Run(run func(ctx context.Context, domainID string, userID string, groupID string, pm groups.PageMeta)) *Repository_RetrieveAllParentGroups_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 groups.PageMeta
		if args[4] != nil {
			arg4 = args[4].(groups.PageMeta)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

func (_c *Repository_RetrieveAllParentGroups_Call) Return(page groups.Page, err error) *Repository_RetrieveAllParentGroups_Call {
	_c.Call.Return(page, err)
	return _c
}

func (_c *Repository_RetrieveAllParentGroups_Call) RunAndReturn(run func(ctx context.Context, domainID string, userID string, groupID string, pm groups.PageMeta) (groups.Page, error)) *Repository_RetrieveAllParentGroups_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveAllRoles provides a mock function for the type Repository
func (_mock *Repository) RetrieveAllRoles(ctx context.Context, entityID string, limit uint64, offset uint64) (roles.RolePage, error) {
	ret := _mock.Called(ctx, entityID, limit, offset)

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

	var r0 roles.RolePage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, uint64, uint64) (roles.RolePage, error)); ok {
		return returnFunc(ctx, entityID, limit, offset)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, uint64, uint64) roles.RolePage); ok {
		r0 = returnFunc(ctx, entityID, limit, offset)
	} else {
		r0 = ret.Get(0).(roles.RolePage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, uint64, uint64) error); ok {
		r1 = returnFunc(ctx, entityID, limit, offset)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveAllRoles is a helper method to define mock.On call
//   - ctx context.Context
//   - entityID string
//   - limit uint64
//   - offset uint64
func (_e *Repository_Expecter) RetrieveAllRoles(ctx interface{}, entityID interface{}, limit interface{}, offset interface{}) *Repository_RetrieveAllRoles_Call {
	return &Repository_RetrieveAllRoles_Call{Call: _e.mock.On("RetrieveAllRoles", ctx, entityID, limit, offset)}
}

func (_c *Repository_RetrieveAllRoles_Call) Run(run func(ctx context.Context, entityID string, limit uint64, offset uint64)) *Repository_RetrieveAllRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 uint64
		if args[2] != nil {
			arg2 = args[2].(uint64)
		}
		var arg3 uint64
		if args[3] != nil {
			arg3 = args[3].(uint64)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Repository_RetrieveAllRoles_Call) Return(rolePage roles.RolePage, err error) *Repository_RetrieveAllRoles_Call {
	_c.Call.Return(rolePage, err)
	return _c
}

func (_c *Repository_RetrieveAllRoles_Call) RunAndReturn(run func(ctx context.Context, entityID string, limit uint64, offset uint64) (roles.RolePage, error)) *Repository_RetrieveAllRoles_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveByID provides a mock function for the type Repository
func (_mock *Repository) RetrieveByID(ctx context.Context, id string) (groups.Group, error) {
	ret := _mock.Called(ctx, id)

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

	var r0 groups.Group
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (groups.Group, error)); ok {
		return returnFunc(ctx, id)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) groups.Group); ok {
		r0 = returnFunc(ctx, id)
	} else {
		r0 = ret.Get(0).(groups.Group)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, id)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveByID is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *Repository_Expecter) RetrieveByID(ctx interface{}, id interface{}) *Repository_RetrieveByID_Call {
	return &Repository_RetrieveByID_Call{Call: _e.mock.On("RetrieveByID", ctx, id)}
}

func (_c *Repository_RetrieveByID_Call) Run(run func(ctx context.Context, id string)) *Repository_RetrieveByID_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RetrieveByID_Call) Return(group groups.Group, err error) *Repository_RetrieveByID_Call {
	_c.Call.Return(group, err)
	return _c
}

func (_c *Repository_RetrieveByID_Call) RunAndReturn(run func(ctx context.Context, id string) (groups.Group, error)) *Repository_RetrieveByID_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveByIDAndUser provides a mock function for the type Repository
func (_mock *Repository) RetrieveByIDAndUser(ctx context.Context, domainID string, userID string, groupID string) (groups.Group, error) {
	ret := _mock.Called(ctx, domainID, userID, groupID)

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

	var r0 groups.Group
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (groups.Group, error)); ok {
		return returnFunc(ctx, domainID, userID, groupID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) groups.Group); ok {
		r0 = returnFunc(ctx, domainID, userID, groupID)
	} else {
		r0 = ret.Get(0).(groups.Group)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = returnFunc(ctx, domainID, userID, groupID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveByIDAndUser is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
//   - userID string
//   - groupID string
func (_e *Repository_Expecter) RetrieveByIDAndUser(ctx interface{}, domainID interface{}, userID interface{}, groupID interface{}) *Repository_RetrieveByIDAndUser_Call {
	return &Repository_RetrieveByIDAndUser_Call{Call: _e.mock.On("RetrieveByIDAndUser", ctx, domainID, userID, groupID)}
}

func (_c *Repository_RetrieveByIDAndUser_Call) Run(run func(ctx context.Context, domainID string, userID string, groupID string)) *Repository_RetrieveByIDAndUser_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Repository_RetrieveByIDAndUser_Call) Return(group groups.Group, err error) *Repository_RetrieveByIDAndUser_Call {
	_c.Call.Return(group, err)
	return _c
}

func (_c *Repository_RetrieveByIDAndUser_Call) RunAndReturn(run func(ctx context.Context, domainID string, userID string, groupID string) (groups.Group, error)) *Repository_RetrieveByIDAndUser_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveByIDWithRoles provides a mock function for the type Repository
func (_mock *Repository) RetrieveByIDWithRoles(ctx context.Context, groupID string, memberID string) (groups.Group, error) {
	ret := _mock.Called(ctx, groupID, memberID)

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

	var r0 groups.Group
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (groups.Group, error)); ok {
		return returnFunc(ctx, groupID, memberID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) groups.Group); ok {
		r0 = returnFunc(ctx, groupID, memberID)
	} else {
		r0 = ret.Get(0).(groups.Group)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = returnFunc(ctx, groupID, memberID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveByIDWithRoles is a helper method to define mock.On call
//   - ctx context.Context
//   - groupID string
//   - memberID string
func (_e *Repository_Expecter) RetrieveByIDWithRoles(ctx interface{}, groupID interface{}, memberID interface{}) *Repository_RetrieveByIDWithRoles_Call {
	return &Repository_RetrieveByIDWithRoles_Call{Call: _e.mock.On("RetrieveByIDWithRoles", ctx, groupID, memberID)}
}

func (_c *Repository_RetrieveByIDWithRoles_Call) Run(run func(ctx context.Context, groupID string, memberID string)) *Repository_RetrieveByIDWithRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RetrieveByIDWithRoles_Call) Return(group groups.Group, err error) *Repository_RetrieveByIDWithRoles_Call {
	_c.Call.Return(group, err)
	return _c
}

func (_c *Repository_RetrieveByIDWithRoles_Call) RunAndReturn(run func(ctx context.Context, groupID string, memberID string) (groups.Group, error)) *Repository_RetrieveByIDWithRoles_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveByIDs provides a mock function for the type Repository
func (_mock *Repository) RetrieveByIDs(ctx context.Context, pm groups.PageMeta, ids ...string) (groups.Page, error) {
	var tmpRet mock.Arguments
	if len(ids) > 0 {
		tmpRet = _mock.Called(ctx, pm, ids)
	} else {
		tmpRet = _mock.Called(ctx, pm)
	}
	ret := tmpRet

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

	var r0 groups.Page
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.PageMeta, ...string) (groups.Page, error)); ok {
		return returnFunc(ctx, pm, ids...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.PageMeta, ...string) groups.Page); ok {
		r0 = returnFunc(ctx, pm, ids...)
	} else {
		r0 = ret.Get(0).(groups.Page)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, groups.PageMeta, ...string) error); ok {
		r1 = returnFunc(ctx, pm, ids...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveByIDs is a helper method to define mock.On call
//   - ctx context.Context
//   - pm groups.PageMeta
//   - ids ...string
func (_e *Repository_Expecter) RetrieveByIDs(ctx interface{}, pm interface{}, ids ...interface{}) *Repository_RetrieveByIDs_Call {
	return &Repository_RetrieveByIDs_Call{Call: _e.mock.On("RetrieveByIDs",
		append([]interface{}{ctx, pm}, ids...)...)}
}

func (_c *Repository_RetrieveByIDs_Call) Run(run func(ctx context.Context, pm groups.PageMeta, ids ...string)) *Repository_RetrieveByIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 groups.PageMeta
		if args[1] != nil {
			arg1 = args[1].(groups.PageMeta)
		}
		var arg2 []string
		var variadicArgs []string
		if len(args) > 2 {
			variadicArgs = args[2].([]string)
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *Repository_RetrieveByIDs_Call) Return(page groups.Page, err error) *Repository_RetrieveByIDs_Call {
	_c.Call.Return(page, err)
	return _c
}

func (_c *Repository_RetrieveByIDs_Call) RunAndReturn(run func(ctx context.Context, pm groups.PageMeta, ids ...string) (groups.Page, error)) *Repository_RetrieveByIDs_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveChildrenGroups provides a mock function for the type Repository
func (_mock *Repository) RetrieveChildrenGroups(ctx context.Context, domainID string, userID string, groupID string, startLevel int64, endLevel int64, pm groups.PageMeta) (groups.Page, error) {
	ret := _mock.Called(ctx, domainID, userID, groupID, startLevel, endLevel, pm)

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

	var r0 groups.Page
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, int64, int64, groups.PageMeta) (groups.Page, error)); ok {
		return returnFunc(ctx, domainID, userID, groupID, startLevel, endLevel, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, int64, int64, groups.PageMeta) groups.Page); ok {
		r0 = returnFunc(ctx, domainID, userID, groupID, startLevel, endLevel, pm)
	} else {
		r0 = ret.Get(0).(groups.Page)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, int64, int64, groups.PageMeta) error); ok {
		r1 = returnFunc(ctx, domainID, userID, groupID, startLevel, endLevel, pm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveChildrenGroups is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
//   - userID string
//   - groupID string
//   - startLevel int64
//   - endLevel int64
//   - pm groups.PageMeta
func (_e *Repository_Expecter) RetrieveChildrenGroups(ctx interface{}, domainID interface{}, userID interface{}, groupID interface{}, startLevel interface{}, endLevel interface{}, pm interface{}) *Repository_RetrieveChildrenGroups_Call {
	return &Repository_RetrieveChildrenGroups_Call{Call: _e.mock.On("RetrieveChildrenGroups", ctx, domainID, userID, groupID, startLevel, endLevel, pm)}
}

func (_c *Repository_RetrieveChildrenGroups_Call) Run(run func(ctx context.Context, domainID string, userID string, groupID string, startLevel int64, endLevel int64, pm groups.PageMeta)) *Repository_RetrieveChildrenGroups_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 int64
		if args[4] != nil {
			arg4 = args[4].(int64)
		}
		var arg5 int64
		if args[5] != nil {
			arg5 = args[5].(int64)
		}
		var arg6 groups.PageMeta
		if args[6] != nil {
			arg6 = args[6].(groups.PageMeta)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
			arg5,
			arg6,
		)
	})
	return _c
}

func (_c *Repository_RetrieveChildrenGroups_Call) Return(page groups.Page, err error) *Repository_RetrieveChildrenGroups_Call {
	_c.Call.Return(page, err)
	return _c
}

func (_c *Repository_RetrieveChildrenGroups_Call) RunAndReturn(run func(ctx context.Context, domainID string, userID string, groupID string, startLevel int64, endLevel int64, pm groups.PageMeta) (groups.Page, error)) *Repository_RetrieveChildrenGroups_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveEntitiesRolesActionsMembers provides a mock function for the type Repository
func (_mock *Repository) RetrieveEntitiesRolesActionsMembers(ctx context.Context, entityIDs []string) ([]roles.EntityActionRole, []roles.EntityMemberRole, error) {
	ret := _mock.Called(ctx, entityIDs)

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

	var r0 []roles.EntityActionRole
	var r1 []roles.EntityMemberRole
	var r2 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []string) ([]roles.EntityActionRole, []roles.EntityMemberRole, error)); ok {
		return returnFunc(ctx, entityIDs)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, []string) []roles.EntityActionRole); ok {
		r0 = returnFunc(ctx, entityIDs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]roles.EntityActionRole)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, []string) []roles.EntityMemberRole); ok {
		r1 = returnFunc(ctx, entityIDs)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).([]roles.EntityMemberRole)
		}
	}
	if returnFunc, ok := ret.Get(2).(func(context.Context, []string) error); ok {
		r2 = returnFunc(ctx, entityIDs)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}

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

// RetrieveEntitiesRolesActionsMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - entityIDs []string
func (_e *Repository_Expecter) RetrieveEntitiesRolesActionsMembers(ctx interface{}, entityIDs interface{}) *Repository_RetrieveEntitiesRolesActionsMembers_Call {
	return &Repository_RetrieveEntitiesRolesActionsMembers_Call{Call: _e.mock.On("RetrieveEntitiesRolesActionsMembers", ctx, entityIDs)}
}

func (_c *Repository_RetrieveEntitiesRolesActionsMembers_Call) Run(run func(ctx context.Context, entityIDs []string)) *Repository_RetrieveEntitiesRolesActionsMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []string
		if args[1] != nil {
			arg1 = args[1].([]string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RetrieveEntitiesRolesActionsMembers_Call) Return(entityActionRoles []roles.EntityActionRole, entityMemberRoles []roles.EntityMemberRole, err error) *Repository_RetrieveEntitiesRolesActionsMembers_Call {
	_c.Call.Return(entityActionRoles, entityMemberRoles, err)
	return _c
}

func (_c *Repository_RetrieveEntitiesRolesActionsMembers_Call) RunAndReturn(run func(ctx context.Context, entityIDs []string) ([]roles.EntityActionRole, []roles.EntityMemberRole, error)) *Repository_RetrieveEntitiesRolesActionsMembers_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveEntityRole provides a mock function for the type Repository
func (_mock *Repository) RetrieveEntityRole(ctx context.Context, entityID string, roleID string) (roles.Role, error) {
	ret := _mock.Called(ctx, entityID, roleID)

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

	var r0 roles.Role
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (roles.Role, error)); ok {
		return returnFunc(ctx, entityID, roleID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) roles.Role); ok {
		r0 = returnFunc(ctx, entityID, roleID)
	} else {
		r0 = ret.Get(0).(roles.Role)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = returnFunc(ctx, entityID, roleID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveEntityRole is a helper method to define mock.On call
//   - ctx context.Context
//   - entityID string
//   - roleID string
func (_e *Repository_Expecter) RetrieveEntityRole(ctx interface{}, entityID interface{}, roleID interface{}) *Repository_RetrieveEntityRole_Call {
	return &Repository_RetrieveEntityRole_Call{Call: _e.mock.On("RetrieveEntityRole", ctx, entityID, roleID)}
}

func (_c *Repository_RetrieveEntityRole_Call) Run(run func(ctx context.Context, entityID string, roleID string)) *Repository_RetrieveEntityRole_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RetrieveEntityRole_Call) Return(role roles.Role, err error) *Repository_RetrieveEntityRole_Call {
	_c.Call.Return(role, err)
	return _c
}

func (_c *Repository_RetrieveEntityRole_Call) RunAndReturn(run func(ctx context.Context, entityID string, roleID string) (roles.Role, error)) *Repository_RetrieveEntityRole_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveHierarchy provides a mock function for the type Repository
func (_mock *Repository) RetrieveHierarchy(ctx context.Context, domainID string, userID string, groupID string, hm groups.HierarchyPageMeta) (groups.HierarchyPage, error) {
	ret := _mock.Called(ctx, domainID, userID, groupID, hm)

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

	var r0 groups.HierarchyPage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, groups.HierarchyPageMeta) (groups.HierarchyPage, error)); ok {
		return returnFunc(ctx, domainID, userID, groupID, hm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, groups.HierarchyPageMeta) groups.HierarchyPage); ok {
		r0 = returnFunc(ctx, domainID, userID, groupID, hm)
	} else {
		r0 = ret.Get(0).(groups.HierarchyPage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, groups.HierarchyPageMeta) error); ok {
		r1 = returnFunc(ctx, domainID, userID, groupID, hm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveHierarchy is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
//   - userID string
//   - groupID string
//   - hm groups.HierarchyPageMeta
func (_e *Repository_Expecter) RetrieveHierarchy(ctx interface{}, domainID interface{}, userID interface{}, groupID interface{}, hm interface{}) *Repository_RetrieveHierarchy_Call {
	return &Repository_RetrieveHierarchy_Call{Call: _e.mock.On("RetrieveHierarchy", ctx, domainID, userID, groupID, hm)}
}

func (_c *Repository_RetrieveHierarchy_Call) Run(run func(ctx context.Context, domainID string, userID string, groupID string, hm groups.HierarchyPageMeta)) *Repository_RetrieveHierarchy_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 groups.HierarchyPageMeta
		if args[4] != nil {
			arg4 = args[4].(groups.HierarchyPageMeta)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

func (_c *Repository_RetrieveHierarchy_Call) Return(hierarchyPage groups.HierarchyPage, err error) *Repository_RetrieveHierarchy_Call {
	_c.Call.Return(hierarchyPage, err)
	return _c
}

func (_c *Repository_RetrieveHierarchy_Call) RunAndReturn(run func(ctx context.Context, domainID string, userID string, groupID string, hm groups.HierarchyPageMeta) (groups.HierarchyPage, error)) *Repository_RetrieveHierarchy_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveRole provides a mock function for the type Repository
func (_mock *Repository) RetrieveRole(ctx context.Context, roleID string) (roles.Role, error) {
	ret := _mock.Called(ctx, roleID)

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

	var r0 roles.Role
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (roles.Role, error)); ok {
		return returnFunc(ctx, roleID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) roles.Role); ok {
		r0 = returnFunc(ctx, roleID)
	} else {
		r0 = ret.Get(0).(roles.Role)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, roleID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveRole is a helper method to define mock.On call
//   - ctx context.Context
//   - roleID string
func (_e *Repository_Expecter) RetrieveRole(ctx interface{}, roleID interface{}) *Repository_RetrieveRole_Call {
	return &Repository_RetrieveRole_Call{Call: _e.mock.On("RetrieveRole", ctx, roleID)}
}

func (_c *Repository_RetrieveRole_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RetrieveRole_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RetrieveRole_Call) Return(role roles.Role, err error) *Repository_RetrieveRole_Call {
	_c.Call.Return(role, err)
	return _c
}

func (_c *Repository_RetrieveRole_Call) RunAndReturn(run func(ctx context.Context, roleID string) (roles.Role, error)) *Repository_RetrieveRole_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveUserGroups provides a mock function for the type Repository
func (_mock *Repository) RetrieveUserGroups(ctx context.Context, domainID string, userID string, pm groups.PageMeta) (groups.Page, error) {
	ret := _mock.Called(ctx, domainID, userID, pm)

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

	var r0 groups.Page
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, groups.PageMeta) (groups.Page, error)); ok {
		return returnFunc(ctx, domainID, userID, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, groups.PageMeta) groups.Page); ok {
		r0 = returnFunc(ctx, domainID, userID, pm)
	} else {
		r0 = ret.Get(0).(groups.Page)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, groups.PageMeta) error); ok {
		r1 = returnFunc(ctx, domainID, userID, pm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveUserGroups is a helper method to define mock.On call
//   - ctx context.Context
//   - domainID string
//   - userID string
//   - pm groups.PageMeta
func (_e *Repository_Expecter) RetrieveUserGroups(ctx interface{}, domainID interface{}, userID interface{}, pm interface{}) *Repository_RetrieveUserGroups_Call {
	return &Repository_RetrieveUserGroups_Call{Call: _e.mock.On("RetrieveUserGroups", ctx, domainID, userID, pm)}
}

func (_c *Repository_RetrieveUserGroups_Call) Run(run func(ctx context.Context, domainID string, userID string, pm groups.PageMeta)) *Repository_RetrieveUserGroups_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 groups.PageMeta
		if args[3] != nil {
			arg3 = args[3].(groups.PageMeta)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Repository_RetrieveUserGroups_Call) Return(page groups.Page, err error) *Repository_RetrieveUserGroups_Call {
	_c.Call.Return(page, err)
	return _c
}

func (_c *Repository_RetrieveUserGroups_Call) RunAndReturn(run func(ctx context.Context, domainID string, userID string, pm groups.PageMeta) (groups.Page, error)) *Repository_RetrieveUserGroups_Call {
	_c.Call.Return(run)
	return _c
}

// RoleAddActions provides a mock function for the type Repository
func (_mock *Repository) RoleAddActions(ctx context.Context, role roles.Role, actions []string) ([]string, error) {
	ret := _mock.Called(ctx, role, actions)

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

	var r0 []string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role, []string) ([]string, error)); ok {
		return returnFunc(ctx, role, actions)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role, []string) []string); ok {
		r0 = returnFunc(ctx, role, actions)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, roles.Role, []string) error); ok {
		r1 = returnFunc(ctx, role, actions)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RoleAddActions is a helper method to define mock.On call
//   - ctx context.Context
//   - role roles.Role
//   - actions []string
func (_e *Repository_Expecter) RoleAddActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleAddActions_Call {
	return &Repository_RoleAddActions_Call{Call: _e.mock.On("RoleAddActions", ctx, role, actions)}
}

func (_c *Repository_RoleAddActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleAddActions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 roles.Role
		if args[1] != nil {
			arg1 = args[1].(roles.Role)
		}
		var arg2 []string
		if args[2] != nil {
			arg2 = args[2].([]string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RoleAddActions_Call) Return(ops []string, err error) *Repository_RoleAddActions_Call {
	_c.Call.Return(ops, err)
	return _c
}

func (_c *Repository_RoleAddActions_Call) RunAndReturn(run func(ctx context.Context, role roles.Role, actions []string) ([]string, error)) *Repository_RoleAddActions_Call {
	_c.Call.Return(run)
	return _c
}

// RoleAddMembers provides a mock function for the type Repository
func (_mock *Repository) RoleAddMembers(ctx context.Context, role roles.Role, members []string) ([]string, error) {
	ret := _mock.Called(ctx, role, members)

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

	var r0 []string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role, []string) ([]string, error)); ok {
		return returnFunc(ctx, role, members)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role, []string) []string); ok {
		r0 = returnFunc(ctx, role, members)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, roles.Role, []string) error); ok {
		r1 = returnFunc(ctx, role, members)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RoleAddMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - role roles.Role
//   - members []string
func (_e *Repository_Expecter) RoleAddMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleAddMembers_Call {
	return &Repository_RoleAddMembers_Call{Call: _e.mock.On("RoleAddMembers", ctx, role, members)}
}

func (_c *Repository_RoleAddMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleAddMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 roles.Role
		if args[1] != nil {
			arg1 = args[1].(roles.Role)
		}
		var arg2 []string
		if args[2] != nil {
			arg2 = args[2].([]string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RoleAddMembers_Call) Return(strings []string, err error) *Repository_RoleAddMembers_Call {
	_c.Call.Return(strings, err)
	return _c
}

func (_c *Repository_RoleAddMembers_Call) RunAndReturn(run func(ctx context.Context, role roles.Role, members []string) ([]string, error)) *Repository_RoleAddMembers_Call {
	_c.Call.Return(run)
	return _c
}

// RoleCheckActionsExists provides a mock function for the type Repository
func (_mock *Repository) RoleCheckActionsExists(ctx context.Context, roleID string, actions []string) (bool, error) {
	ret := _mock.Called(ctx, roleID, actions)

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

	var r0 bool
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string) (bool, error)); ok {
		return returnFunc(ctx, roleID, actions)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string) bool); ok {
		r0 = returnFunc(ctx, roleID, actions)
	} else {
		r0 = ret.Get(0).(bool)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
		r1 = returnFunc(ctx, roleID, actions)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RoleCheckActionsExists is a helper method to define mock.On call
//   - ctx context.Context
//   - roleID string
//   - actions []string
func (_e *Repository_Expecter) RoleCheckActionsExists(ctx interface{}, roleID interface{}, actions interface{}) *Repository_RoleCheckActionsExists_Call {
	return &Repository_RoleCheckActionsExists_Call{Call: _e.mock.On("RoleCheckActionsExists", ctx, roleID, actions)}
}

func (_c *Repository_RoleCheckActionsExists_Call) Run(run func(ctx context.Context, roleID string, actions []string)) *Repository_RoleCheckActionsExists_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []string
		if args[2] != nil {
			arg2 = args[2].([]string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RoleCheckActionsExists_Call) Return(b bool, err error) *Repository_RoleCheckActionsExists_Call {
	_c.Call.Return(b, err)
	return _c
}

func (_c *Repository_RoleCheckActionsExists_Call) RunAndReturn(run func(ctx context.Context, roleID string, actions []string) (bool, error)) *Repository_RoleCheckActionsExists_Call {
	_c.Call.Return(run)
	return _c
}

// RoleCheckMembersExists provides a mock function for the type Repository
func (_mock *Repository) RoleCheckMembersExists(ctx context.Context, roleID string, members []string) (bool, error) {
	ret := _mock.Called(ctx, roleID, members)

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

	var r0 bool
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string) (bool, error)); ok {
		return returnFunc(ctx, roleID, members)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string) bool); ok {
		r0 = returnFunc(ctx, roleID, members)
	} else {
		r0 = ret.Get(0).(bool)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
		r1 = returnFunc(ctx, roleID, members)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RoleCheckMembersExists is a helper method to define mock.On call
//   - ctx context.Context
//   - roleID string
//   - members []string
func (_e *Repository_Expecter) RoleCheckMembersExists(ctx interface{}, roleID interface{}, members interface{}) *Repository_RoleCheckMembersExists_Call {
	return &Repository_RoleCheckMembersExists_Call{Call: _e.mock.On("RoleCheckMembersExists", ctx, roleID, members)}
}

func (_c *Repository_RoleCheckMembersExists_Call) Run(run func(ctx context.Context, roleID string, members []string)) *Repository_RoleCheckMembersExists_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []string
		if args[2] != nil {
			arg2 = args[2].([]string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RoleCheckMembersExists_Call) Return(b bool, err error) *Repository_RoleCheckMembersExists_Call {
	_c.Call.Return(b, err)
	return _c
}

func (_c *Repository_RoleCheckMembersExists_Call) RunAndReturn(run func(ctx context.Context, roleID string, members []string) (bool, error)) *Repository_RoleCheckMembersExists_Call {
	_c.Call.Return(run)
	return _c
}

// RoleListActions provides a mock function for the type Repository
func (_mock *Repository) RoleListActions(ctx context.Context, roleID string) ([]string, error) {
	ret := _mock.Called(ctx, roleID)

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

	var r0 []string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok {
		return returnFunc(ctx, roleID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok {
		r0 = returnFunc(ctx, roleID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, roleID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RoleListActions is a helper method to define mock.On call
//   - ctx context.Context
//   - roleID string
func (_e *Repository_Expecter) RoleListActions(ctx interface{}, roleID interface{}) *Repository_RoleListActions_Call {
	return &Repository_RoleListActions_Call{Call: _e.mock.On("RoleListActions", ctx, roleID)}
}

func (_c *Repository_RoleListActions_Call) Run(run func(ctx context.Context, roleID string)) *Repository_RoleListActions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RoleListActions_Call) Return(strings []string, err error) *Repository_RoleListActions_Call {
	_c.Call.Return(strings, err)
	return _c
}

func (_c *Repository_RoleListActions_Call) RunAndReturn(run func(ctx context.Context, roleID string) ([]string, error)) *Repository_RoleListActions_Call {
	_c.Call.Return(run)
	return _c
}

// RoleListMembers provides a mock function for the type Repository
func (_mock *Repository) RoleListMembers(ctx context.Context, roleID string, limit uint64, offset uint64) (roles.MembersPage, error) {
	ret := _mock.Called(ctx, roleID, limit, offset)

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

	var r0 roles.MembersPage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, uint64, uint64) (roles.MembersPage, error)); ok {
		return returnFunc(ctx, roleID, limit, offset)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, uint64, uint64) roles.MembersPage); ok {
		r0 = returnFunc(ctx, roleID, limit, offset)
	} else {
		r0 = ret.Get(0).(roles.MembersPage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, uint64, uint64) error); ok {
		r1 = returnFunc(ctx, roleID, limit, offset)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RoleListMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - roleID string
//   - limit uint64
//   - offset uint64
func (_e *Repository_Expecter) RoleListMembers(ctx interface{}, roleID interface{}, limit interface{}, offset interface{}) *Repository_RoleListMembers_Call {
	return &Repository_RoleListMembers_Call{Call: _e.mock.On("RoleListMembers", ctx, roleID, limit, offset)}
}

func (_c *Repository_RoleListMembers_Call) Run(run func(ctx context.Context, roleID string, limit uint64, offset uint64)) *Repository_RoleListMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 uint64
		if args[2] != nil {
			arg2 = args[2].(uint64)
		}
		var arg3 uint64
		if args[3] != nil {
			arg3 = args[3].(uint64)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Repository_RoleListMembers_Call) Return(membersPage roles.MembersPage, err error) *Repository_RoleListMembers_Call {
	_c.Call.Return(membersPage, err)
	return _c
}

func (_c *Repository_RoleListMembers_Call) RunAndReturn(run func(ctx context.Context, roleID string, limit uint64, offset uint64) (roles.MembersPage, error)) *Repository_RoleListMembers_Call {
	_c.Call.Return(run)
	return _c
}

// RoleRemoveActions provides a mock function for the type Repository
func (_mock *Repository) RoleRemoveActions(ctx context.Context, role roles.Role, actions []string) error {
	ret := _mock.Called(ctx, role, actions)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role, []string) error); ok {
		r0 = returnFunc(ctx, role, actions)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RoleRemoveActions is a helper method to define mock.On call
//   - ctx context.Context
//   - role roles.Role
//   - actions []string
func (_e *Repository_Expecter) RoleRemoveActions(ctx interface{}, role interface{}, actions interface{}) *Repository_RoleRemoveActions_Call {
	return &Repository_RoleRemoveActions_Call{Call: _e.mock.On("RoleRemoveActions", ctx, role, actions)}
}

func (_c *Repository_RoleRemoveActions_Call) Run(run func(ctx context.Context, role roles.Role, actions []string)) *Repository_RoleRemoveActions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 roles.Role
		if args[1] != nil {
			arg1 = args[1].(roles.Role)
		}
		var arg2 []string
		if args[2] != nil {
			arg2 = args[2].([]string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RoleRemoveActions_Call) Return(err error) *Repository_RoleRemoveActions_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_RoleRemoveActions_Call) RunAndReturn(run func(ctx context.Context, role roles.Role, actions []string) error) *Repository_RoleRemoveActions_Call {
	_c.Call.Return(run)
	return _c
}

// RoleRemoveAllActions provides a mock function for the type Repository
func (_mock *Repository) RoleRemoveAllActions(ctx context.Context, role roles.Role) error {
	ret := _mock.Called(ctx, role)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role) error); ok {
		r0 = returnFunc(ctx, role)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RoleRemoveAllActions is a helper method to define mock.On call
//   - ctx context.Context
//   - role roles.Role
func (_e *Repository_Expecter) RoleRemoveAllActions(ctx interface{}, role interface{}) *Repository_RoleRemoveAllActions_Call {
	return &Repository_RoleRemoveAllActions_Call{Call: _e.mock.On("RoleRemoveAllActions", ctx, role)}
}

func (_c *Repository_RoleRemoveAllActions_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllActions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 roles.Role
		if args[1] != nil {
			arg1 = args[1].(roles.Role)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RoleRemoveAllActions_Call) Return(err error) *Repository_RoleRemoveAllActions_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_RoleRemoveAllActions_Call) RunAndReturn(run func(ctx context.Context, role roles.Role) error) *Repository_RoleRemoveAllActions_Call {
	_c.Call.Return(run)
	return _c
}

// RoleRemoveAllMembers provides a mock function for the type Repository
func (_mock *Repository) RoleRemoveAllMembers(ctx context.Context, role roles.Role) error {
	ret := _mock.Called(ctx, role)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role) error); ok {
		r0 = returnFunc(ctx, role)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RoleRemoveAllMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - role roles.Role
func (_e *Repository_Expecter) RoleRemoveAllMembers(ctx interface{}, role interface{}) *Repository_RoleRemoveAllMembers_Call {
	return &Repository_RoleRemoveAllMembers_Call{Call: _e.mock.On("RoleRemoveAllMembers", ctx, role)}
}

func (_c *Repository_RoleRemoveAllMembers_Call) Run(run func(ctx context.Context, role roles.Role)) *Repository_RoleRemoveAllMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 roles.Role
		if args[1] != nil {
			arg1 = args[1].(roles.Role)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RoleRemoveAllMembers_Call) Return(err error) *Repository_RoleRemoveAllMembers_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_RoleRemoveAllMembers_Call) RunAndReturn(run func(ctx context.Context, role roles.Role) error) *Repository_RoleRemoveAllMembers_Call {
	_c.Call.Return(run)
	return _c
}

// RoleRemoveMembers provides a mock function for the type Repository
func (_mock *Repository) RoleRemoveMembers(ctx context.Context, role roles.Role, members []string) error {
	ret := _mock.Called(ctx, role, members)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role, []string) error); ok {
		r0 = returnFunc(ctx, role, members)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RoleRemoveMembers is a helper method to define mock.On call
//   - ctx context.Context
//   - role roles.Role
//   - members []string
func (_e *Repository_Expecter) RoleRemoveMembers(ctx interface{}, role interface{}, members interface{}) *Repository_RoleRemoveMembers_Call {
	return &Repository_RoleRemoveMembers_Call{Call: _e.mock.On("RoleRemoveMembers", ctx, role, members)}
}

func (_c *Repository_RoleRemoveMembers_Call) Run(run func(ctx context.Context, role roles.Role, members []string)) *Repository_RoleRemoveMembers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 roles.Role
		if args[1] != nil {
			arg1 = args[1].(roles.Role)
		}
		var arg2 []string
		if args[2] != nil {
			arg2 = args[2].([]string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Repository_RoleRemoveMembers_Call) Return(err error) *Repository_RoleRemoveMembers_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_RoleRemoveMembers_Call) RunAndReturn(run func(ctx context.Context, role roles.Role, members []string) error) *Repository_RoleRemoveMembers_Call {
	_c.Call.Return(run)
	return _c
}

// Save provides a mock function for the type Repository
func (_mock *Repository) Save(ctx context.Context, g groups.Group) (groups.Group, error) {
	ret := _mock.Called(ctx, g)

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

	var r0 groups.Group
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.Group) (groups.Group, error)); ok {
		return returnFunc(ctx, g)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.Group) groups.Group); ok {
		r0 = returnFunc(ctx, g)
	} else {
		r0 = ret.Get(0).(groups.Group)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, groups.Group) error); ok {
		r1 = returnFunc(ctx, g)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Save is a helper method to define mock.On call
//   - ctx context.Context
//   - g groups.Group
func (_e *Repository_Expecter) Save(ctx interface{}, g interface{}) *Repository_Save_Call {
	return &Repository_Save_Call{Call: _e.mock.On("Save", ctx, g)}
}

func (_c *Repository_Save_Call) Run(run func(ctx context.Context, g groups.Group)) *Repository_Save_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 groups.Group
		if args[1] != nil {
			arg1 = args[1].(groups.Group)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_Save_Call) Return(group groups.Group, err error) *Repository_Save_Call {
	_c.Call.Return(group, err)
	return _c
}

func (_c *Repository_Save_Call) RunAndReturn(run func(ctx context.Context, g groups.Group) (groups.Group, error)) *Repository_Save_Call {
	_c.Call.Return(run)
	return _c
}

// UnassignAllChildrenGroups provides a mock function for the type Repository
func (_mock *Repository) UnassignAllChildrenGroups(ctx context.Context, id string) error {
	ret := _mock.Called(ctx, id)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = returnFunc(ctx, id)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// UnassignAllChildrenGroups is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *Repository_Expecter) UnassignAllChildrenGroups(ctx interface{}, id interface{}) *Repository_UnassignAllChildrenGroups_Call {
	return &Repository_UnassignAllChildrenGroups_Call{Call: _e.mock.On("UnassignAllChildrenGroups", ctx, id)}
}

func (_c *Repository_UnassignAllChildrenGroups_Call) Run(run func(ctx context.Context, id string)) *Repository_UnassignAllChildrenGroups_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_UnassignAllChildrenGroups_Call) Return(err error) *Repository_UnassignAllChildrenGroups_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_UnassignAllChildrenGroups_Call) RunAndReturn(run func(ctx context.Context, id string) error) *Repository_UnassignAllChildrenGroups_Call {
	_c.Call.Return(run)
	return _c
}

// UnassignParentGroup provides a mock function for the type Repository
func (_mock *Repository) UnassignParentGroup(ctx context.Context, parentGroupID string, groupIDs ...string) error {
	var tmpRet mock.Arguments
	if len(groupIDs) > 0 {
		tmpRet = _mock.Called(ctx, parentGroupID, groupIDs)
	} else {
		tmpRet = _mock.Called(ctx, parentGroupID)
	}
	ret := tmpRet

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...string) error); ok {
		r0 = returnFunc(ctx, parentGroupID, groupIDs...)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// UnassignParentGroup is a helper method to define mock.On call
//   - ctx context.Context
//   - parentGroupID string
//   - groupIDs ...string
func (_e *Repository_Expecter) UnassignParentGroup(ctx interface{}, parentGroupID interface{}, groupIDs ...interface{}) *Repository_UnassignParentGroup_Call {
	return &Repository_UnassignParentGroup_Call{Call: _e.mock.On("UnassignParentGroup",
		append([]interface{}{ctx, parentGroupID}, groupIDs...)...)}
}

func (_c *Repository_UnassignParentGroup_Call) Run(run func(ctx context.Context, parentGroupID string, groupIDs ...string)) *Repository_UnassignParentGroup_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []string
		var variadicArgs []string
		if len(args) > 2 {
			variadicArgs = args[2].([]string)
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *Repository_UnassignParentGroup_Call) Return(err error) *Repository_UnassignParentGroup_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Repository_UnassignParentGroup_Call) RunAndReturn(run func(ctx context.Context, parentGroupID string, groupIDs ...string) error) *Repository_UnassignParentGroup_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function for the type Repository
func (_mock *Repository) Update(ctx context.Context, g groups.Group) (groups.Group, error) {
	ret := _mock.Called(ctx, g)

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

	var r0 groups.Group
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.Group) (groups.Group, error)); ok {
		return returnFunc(ctx, g)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.Group) groups.Group); ok {
		r0 = returnFunc(ctx, g)
	} else {
		r0 = ret.Get(0).(groups.Group)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, groups.Group) error); ok {
		r1 = returnFunc(ctx, g)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - g groups.Group
func (_e *Repository_Expecter) Update(ctx interface{}, g interface{}) *Repository_Update_Call {
	return &Repository_Update_Call{Call: _e.mock.On("Update", ctx, g)}
}

func (_c *Repository_Update_Call) Run(run func(ctx context.Context, g groups.Group)) *Repository_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 groups.Group
		if args[1] != nil {
			arg1 = args[1].(groups.Group)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_Update_Call) Return(group groups.Group, err error) *Repository_Update_Call {
	_c.Call.Return(group, err)
	return _c
}

func (_c *Repository_Update_Call) RunAndReturn(run func(ctx context.Context, g groups.Group) (groups.Group, error)) *Repository_Update_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateRole provides a mock function for the type Repository
func (_mock *Repository) UpdateRole(ctx context.Context, ro roles.Role) (roles.Role, error) {
	ret := _mock.Called(ctx, ro)

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

	var r0 roles.Role
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role) (roles.Role, error)); ok {
		return returnFunc(ctx, ro)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, roles.Role) roles.Role); ok {
		r0 = returnFunc(ctx, ro)
	} else {
		r0 = ret.Get(0).(roles.Role)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, roles.Role) error); ok {
		r1 = returnFunc(ctx, ro)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// UpdateRole is a helper method to define mock.On call
//   - ctx context.Context
//   - ro roles.Role
func (_e *Repository_Expecter) UpdateRole(ctx interface{}, ro interface{}) *Repository_UpdateRole_Call {
	return &Repository_UpdateRole_Call{Call: _e.mock.On("UpdateRole", ctx, ro)}
}

func (_c *Repository_UpdateRole_Call) Run(run func(ctx context.Context, ro roles.Role)) *Repository_UpdateRole_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 roles.Role
		if args[1] != nil {
			arg1 = args[1].(roles.Role)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_UpdateRole_Call) Return(role roles.Role, err error) *Repository_UpdateRole_Call {
	_c.Call.Return(role, err)
	return _c
}

func (_c *Repository_UpdateRole_Call) RunAndReturn(run func(ctx context.Context, ro roles.Role) (roles.Role, error)) *Repository_UpdateRole_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateTags provides a mock function for the type Repository
func (_mock *Repository) UpdateTags(ctx context.Context, g groups.Group) (groups.Group, error) {
	ret := _mock.Called(ctx, g)

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

	var r0 groups.Group
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.Group) (groups.Group, error)); ok {
		return returnFunc(ctx, g)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, groups.Group) groups.Group); ok {
		r0 = returnFunc(ctx, g)
	} else {
		r0 = ret.Get(0).(groups.Group)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, groups.Group) error); ok {
		r1 = returnFunc(ctx, g)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// UpdateTags is a helper method to define mock.On call
//   - ctx context.Context
//   - g groups.Group
func (_e *Repository_Expecter) UpdateTags(ctx interface{}, g interface{}) *Repository_UpdateTags_Call {
	return &Repository_UpdateTags_Call{Call: _e.mock.On("UpdateTags", ctx, g)}
}

func (_c *Repository_UpdateTags_Call) Run(run func(ctx context.Context, g groups.Group)) *Repository_UpdateTags_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 groups.Group
		if args[1] != nil {
			arg1 = args[1].(groups.Group)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_UpdateTags_Call) Return(group groups.Group, err error) *Repository_UpdateTags_Call {
	_c.Call.Return(group, err)
	return _c
}

func (_c *Repository_UpdateTags_Call) RunAndReturn(run func(ctx context.Context, g groups.Group) (groups.Group, error)) *Repository_UpdateTags_Call {
	_c.Call.Return(run)
	return _c
}
