// 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/clients"
	"github.com/absmach/supermq/pkg/authn"
	"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}
}

// AddConnections provides a mock function for the type Repository
func (_mock *Repository) AddConnections(ctx context.Context, conns []clients.Connection) error {
	ret := _mock.Called(ctx, conns)

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

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

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

// AddConnections is a helper method to define mock.On call
//   - ctx context.Context
//   - conns []clients.Connection
func (_e *Repository_Expecter) AddConnections(ctx interface{}, conns interface{}) *Repository_AddConnections_Call {
	return &Repository_AddConnections_Call{Call: _e.mock.On("AddConnections", ctx, conns)}
}

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

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

func (_c *Repository_AddConnections_Call) RunAndReturn(run func(ctx context.Context, conns []clients.Connection) error) *Repository_AddConnections_Call {
	_c.Call.Return(run)
	return _c
}

// 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
}

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

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

	var r0 clients.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, clients.Client) (clients.Client, error)); ok {
		return returnFunc(ctx, client)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, clients.Client) clients.Client); ok {
		r0 = returnFunc(ctx, client)
	} else {
		r0 = ret.Get(0).(clients.Client)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, clients.Client) error); ok {
		r1 = returnFunc(ctx, client)
	} 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
//   - client clients.Client
func (_e *Repository_Expecter) ChangeStatus(ctx interface{}, client interface{}) *Repository_ChangeStatus_Call {
	return &Repository_ChangeStatus_Call{Call: _e.mock.On("ChangeStatus", ctx, client)}
}

func (_c *Repository_ChangeStatus_Call) Run(run func(ctx context.Context, client clients.Client)) *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 clients.Client
		if args[1] != nil {
			arg1 = args[1].(clients.Client)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_ChangeStatus_Call) Return(client1 clients.Client, err error) *Repository_ChangeStatus_Call {
	_c.Call.Return(client1, err)
	return _c
}

func (_c *Repository_ChangeStatus_Call) RunAndReturn(run func(ctx context.Context, client clients.Client) (clients.Client, error)) *Repository_ChangeStatus_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	var r0 uint64
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (uint64, error)); ok {
		return returnFunc(ctx, id)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) uint64); ok {
		r0 = returnFunc(ctx, id)
	} else {
		r0 = ret.Get(0).(uint64)
	}
	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_ClientConnectionsCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientConnectionsCount'
type Repository_ClientConnectionsCount_Call struct {
	*mock.Call
}

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

func (_c *Repository_ClientConnectionsCount_Call) Run(run func(ctx context.Context, id string)) *Repository_ClientConnectionsCount_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_ClientConnectionsCount_Call) Return(v uint64, err error) *Repository_ClientConnectionsCount_Call {
	_c.Call.Return(v, err)
	return _c
}

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

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

	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, clientIDs...)
	} 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
//   - clientIDs ...string
func (_e *Repository_Expecter) Delete(ctx interface{}, clientIDs ...interface{}) *Repository_Delete_Call {
	return &Repository_Delete_Call{Call: _e.mock.On("Delete",
		append([]interface{}{ctx}, clientIDs...)...)}
}

func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, clientIDs ...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
		var variadicArgs []string
		if len(args) > 1 {
			variadicArgs = args[1].([]string)
		}
		arg1 = variadicArgs
		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, clientIDs ...string) error) *Repository_Delete_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	var r0 bool
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
		return returnFunc(ctx, id)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
		r0 = returnFunc(ctx, id)
	} else {
		r0 = ret.Get(0).(bool)
	}
	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_DoesClientHaveConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoesClientHaveConnections'
type Repository_DoesClientHaveConnections_Call struct {
	*mock.Call
}

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

func (_c *Repository_DoesClientHaveConnections_Call) Run(run func(ctx context.Context, id string)) *Repository_DoesClientHaveConnections_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_DoesClientHaveConnections_Call) Return(b bool, err error) *Repository_DoesClientHaveConnections_Call {
	_c.Call.Return(b, err)
	return _c
}

func (_c *Repository_DoesClientHaveConnections_Call) RunAndReturn(run func(ctx context.Context, id string) (bool, error)) *Repository_DoesClientHaveConnections_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
}

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

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

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

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

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

func (_c *Repository_RemoveChannelConnections_Call) Run(run func(ctx context.Context, channelID string)) *Repository_RemoveChannelConnections_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_RemoveChannelConnections_Call) Return(err error) *Repository_RemoveChannelConnections_Call {
	_c.Call.Return(err)
	return _c
}

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

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

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

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

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

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

func (_c *Repository_RemoveClientConnections_Call) Run(run func(ctx context.Context, clientID string)) *Repository_RemoveClientConnections_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_RemoveClientConnections_Call) Return(err error) *Repository_RemoveClientConnections_Call {
	_c.Call.Return(err)
	return _c
}

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

// RemoveConnections provides a mock function for the type Repository
func (_mock *Repository) RemoveConnections(ctx context.Context, conns []clients.Connection) error {
	ret := _mock.Called(ctx, conns)

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

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

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

// RemoveConnections is a helper method to define mock.On call
//   - ctx context.Context
//   - conns []clients.Connection
func (_e *Repository_Expecter) RemoveConnections(ctx interface{}, conns interface{}) *Repository_RemoveConnections_Call {
	return &Repository_RemoveConnections_Call{Call: _e.mock.On("RemoveConnections", ctx, conns)}
}

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

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

func (_c *Repository_RemoveConnections_Call) RunAndReturn(run func(ctx context.Context, conns []clients.Connection) error) *Repository_RemoveConnections_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
}

// RemoveParentGroup provides a mock function for the type Repository
func (_mock *Repository) RemoveParentGroup(ctx context.Context, cli clients.Client) error {
	ret := _mock.Called(ctx, cli)

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

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

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

// RemoveParentGroup is a helper method to define mock.On call
//   - ctx context.Context
//   - cli clients.Client
func (_e *Repository_Expecter) RemoveParentGroup(ctx interface{}, cli interface{}) *Repository_RemoveParentGroup_Call {
	return &Repository_RemoveParentGroup_Call{Call: _e.mock.On("RemoveParentGroup", ctx, cli)}
}

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

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

func (_c *Repository_RemoveParentGroup_Call) RunAndReturn(run func(ctx context.Context, cli clients.Client) error) *Repository_RemoveParentGroup_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 clients.Page) (clients.ClientsPage, error) {
	ret := _mock.Called(ctx, pm)

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

	var r0 clients.ClientsPage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, clients.Page) (clients.ClientsPage, error)); ok {
		return returnFunc(ctx, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, clients.Page) clients.ClientsPage); ok {
		r0 = returnFunc(ctx, pm)
	} else {
		r0 = ret.Get(0).(clients.ClientsPage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, clients.Page) 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 clients.Page
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 clients.Page)) *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 clients.Page
		if args[1] != nil {
			arg1 = args[1].(clients.Page)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RetrieveAll_Call) Return(clientsPage clients.ClientsPage, err error) *Repository_RetrieveAll_Call {
	_c.Call.Return(clientsPage, err)
	return _c
}

func (_c *Repository_RetrieveAll_Call) RunAndReturn(run func(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)) *Repository_RetrieveAll_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) (clients.Client, error) {
	ret := _mock.Called(ctx, id)

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

	var r0 clients.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (clients.Client, error)); ok {
		return returnFunc(ctx, id)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) clients.Client); ok {
		r0 = returnFunc(ctx, id)
	} else {
		r0 = ret.Get(0).(clients.Client)
	}
	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(client clients.Client, err error) *Repository_RetrieveByID_Call {
	_c.Call.Return(client, err)
	return _c
}

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

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

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

	var r0 clients.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (clients.Client, error)); ok {
		return returnFunc(ctx, id, memberID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) clients.Client); ok {
		r0 = returnFunc(ctx, id, memberID)
	} else {
		r0 = ret.Get(0).(clients.Client)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = returnFunc(ctx, id, 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
//   - id string
//   - memberID string
func (_e *Repository_Expecter) RetrieveByIDWithRoles(ctx interface{}, id interface{}, memberID interface{}) *Repository_RetrieveByIDWithRoles_Call {
	return &Repository_RetrieveByIDWithRoles_Call{Call: _e.mock.On("RetrieveByIDWithRoles", ctx, id, memberID)}
}

func (_c *Repository_RetrieveByIDWithRoles_Call) Run(run func(ctx context.Context, id 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(client clients.Client, err error) *Repository_RetrieveByIDWithRoles_Call {
	_c.Call.Return(client, err)
	return _c
}

func (_c *Repository_RetrieveByIDWithRoles_Call) RunAndReturn(run func(ctx context.Context, id string, memberID string) (clients.Client, 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, ids []string) (clients.ClientsPage, error) {
	ret := _mock.Called(ctx, ids)

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

	var r0 clients.ClientsPage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []string) (clients.ClientsPage, error)); ok {
		return returnFunc(ctx, ids)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, []string) clients.ClientsPage); ok {
		r0 = returnFunc(ctx, ids)
	} else {
		r0 = ret.Get(0).(clients.ClientsPage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, []string) error); ok {
		r1 = returnFunc(ctx, 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
//   - ids []string
func (_e *Repository_Expecter) RetrieveByIds(ctx interface{}, ids interface{}) *Repository_RetrieveByIds_Call {
	return &Repository_RetrieveByIds_Call{Call: _e.mock.On("RetrieveByIds", ctx, ids)}
}

func (_c *Repository_RetrieveByIds_Call) Run(run func(ctx context.Context, 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 []string
		if args[1] != nil {
			arg1 = args[1].([]string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_RetrieveByIds_Call) Return(clientsPage clients.ClientsPage, err error) *Repository_RetrieveByIds_Call {
	_c.Call.Return(clientsPage, err)
	return _c
}

func (_c *Repository_RetrieveByIds_Call) RunAndReturn(run func(ctx context.Context, ids []string) (clients.ClientsPage, error)) *Repository_RetrieveByIds_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveBySecret provides a mock function for the type Repository
func (_mock *Repository) RetrieveBySecret(ctx context.Context, key string, id string, prefix authn.AuthPrefix) (clients.Client, error) {
	ret := _mock.Called(ctx, key, id, prefix)

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

	var r0 clients.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, authn.AuthPrefix) (clients.Client, error)); ok {
		return returnFunc(ctx, key, id, prefix)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, authn.AuthPrefix) clients.Client); ok {
		r0 = returnFunc(ctx, key, id, prefix)
	} else {
		r0 = ret.Get(0).(clients.Client)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, authn.AuthPrefix) error); ok {
		r1 = returnFunc(ctx, key, id, prefix)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

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

func (_c *Repository_RetrieveBySecret_Call) Run(run func(ctx context.Context, key string, id string, prefix authn.AuthPrefix)) *Repository_RetrieveBySecret_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 authn.AuthPrefix
		if args[3] != nil {
			arg3 = args[3].(authn.AuthPrefix)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Repository_RetrieveBySecret_Call) Return(client clients.Client, err error) *Repository_RetrieveBySecret_Call {
	_c.Call.Return(client, err)
	return _c
}

func (_c *Repository_RetrieveBySecret_Call) RunAndReturn(run func(ctx context.Context, key string, id string, prefix authn.AuthPrefix) (clients.Client, error)) *Repository_RetrieveBySecret_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
}

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

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

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

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

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

func (_c *Repository_RetrieveParentGroupClients_Call) Run(run func(ctx context.Context, parentGroupID string)) *Repository_RetrieveParentGroupClients_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_RetrieveParentGroupClients_Call) Return(clients1 []clients.Client, err error) *Repository_RetrieveParentGroupClients_Call {
	_c.Call.Return(clients1, err)
	return _c
}

func (_c *Repository_RetrieveParentGroupClients_Call) RunAndReturn(run func(ctx context.Context, parentGroupID string) ([]clients.Client, error)) *Repository_RetrieveParentGroupClients_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
}

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

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

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

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

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

func (_c *Repository_RetrieveUserClients_Call) Run(run func(ctx context.Context, domainID string, userID string, pm clients.Page)) *Repository_RetrieveUserClients_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 clients.Page
		if args[3] != nil {
			arg3 = args[3].(clients.Page)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Repository_RetrieveUserClients_Call) Return(clientsPage clients.ClientsPage, err error) *Repository_RetrieveUserClients_Call {
	_c.Call.Return(clientsPage, err)
	return _c
}

func (_c *Repository_RetrieveUserClients_Call) RunAndReturn(run func(ctx context.Context, domainID string, userID string, pm clients.Page) (clients.ClientsPage, error)) *Repository_RetrieveUserClients_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, client ...clients.Client) ([]clients.Client, error) {
	var tmpRet mock.Arguments
	if len(client) > 0 {
		tmpRet = _mock.Called(ctx, client)
	} else {
		tmpRet = _mock.Called(ctx)
	}
	ret := tmpRet

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

	var r0 []clients.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, ...clients.Client) ([]clients.Client, error)); ok {
		return returnFunc(ctx, client...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, ...clients.Client) []clients.Client); ok {
		r0 = returnFunc(ctx, client...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]clients.Client)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, ...clients.Client) error); ok {
		r1 = returnFunc(ctx, client...)
	} 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
//   - client ...clients.Client
func (_e *Repository_Expecter) Save(ctx interface{}, client ...interface{}) *Repository_Save_Call {
	return &Repository_Save_Call{Call: _e.mock.On("Save",
		append([]interface{}{ctx}, client...)...)}
}

func (_c *Repository_Save_Call) Run(run func(ctx context.Context, client ...clients.Client)) *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 []clients.Client
		var variadicArgs []clients.Client
		if len(args) > 1 {
			variadicArgs = args[1].([]clients.Client)
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

func (_c *Repository_Save_Call) Return(clients1 []clients.Client, err error) *Repository_Save_Call {
	_c.Call.Return(clients1, err)
	return _c
}

func (_c *Repository_Save_Call) RunAndReturn(run func(ctx context.Context, client ...clients.Client) ([]clients.Client, error)) *Repository_Save_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

// SearchClients is a helper method to define mock.On call
//   - ctx context.Context
//   - pm clients.Page
func (_e *Repository_Expecter) SearchClients(ctx interface{}, pm interface{}) *Repository_SearchClients_Call {
	return &Repository_SearchClients_Call{Call: _e.mock.On("SearchClients", ctx, pm)}
}

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

func (_c *Repository_SearchClients_Call) Return(clientsPage clients.ClientsPage, err error) *Repository_SearchClients_Call {
	_c.Call.Return(clientsPage, err)
	return _c
}

func (_c *Repository_SearchClients_Call) RunAndReturn(run func(ctx context.Context, pm clients.Page) (clients.ClientsPage, error)) *Repository_SearchClients_Call {
	_c.Call.Return(run)
	return _c
}

// SetParentGroup provides a mock function for the type Repository
func (_mock *Repository) SetParentGroup(ctx context.Context, cli clients.Client) error {
	ret := _mock.Called(ctx, cli)

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

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

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

// SetParentGroup is a helper method to define mock.On call
//   - ctx context.Context
//   - cli clients.Client
func (_e *Repository_Expecter) SetParentGroup(ctx interface{}, cli interface{}) *Repository_SetParentGroup_Call {
	return &Repository_SetParentGroup_Call{Call: _e.mock.On("SetParentGroup", ctx, cli)}
}

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

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

func (_c *Repository_SetParentGroup_Call) RunAndReturn(run func(ctx context.Context, cli clients.Client) error) *Repository_SetParentGroup_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

func (_c *Repository_UnsetParentGroupFromClient_Call) Run(run func(ctx context.Context, parentGroupID string)) *Repository_UnsetParentGroupFromClient_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_UnsetParentGroupFromClient_Call) Return(err error) *Repository_UnsetParentGroupFromClient_Call {
	_c.Call.Return(err)
	return _c
}

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

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

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

	var r0 clients.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, clients.Client) (clients.Client, error)); ok {
		return returnFunc(ctx, client)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, clients.Client) clients.Client); ok {
		r0 = returnFunc(ctx, client)
	} else {
		r0 = ret.Get(0).(clients.Client)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, clients.Client) error); ok {
		r1 = returnFunc(ctx, client)
	} 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
//   - client clients.Client
func (_e *Repository_Expecter) Update(ctx interface{}, client interface{}) *Repository_Update_Call {
	return &Repository_Update_Call{Call: _e.mock.On("Update", ctx, client)}
}

func (_c *Repository_Update_Call) Run(run func(ctx context.Context, client clients.Client)) *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 clients.Client
		if args[1] != nil {
			arg1 = args[1].(clients.Client)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_Update_Call) Return(client1 clients.Client, err error) *Repository_Update_Call {
	_c.Call.Return(client1, err)
	return _c
}

func (_c *Repository_Update_Call) RunAndReturn(run func(ctx context.Context, client clients.Client) (clients.Client, error)) *Repository_Update_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateIdentity provides a mock function for the type Repository
func (_mock *Repository) UpdateIdentity(ctx context.Context, client clients.Client) (clients.Client, error) {
	ret := _mock.Called(ctx, client)

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

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

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

// UpdateIdentity is a helper method to define mock.On call
//   - ctx context.Context
//   - client clients.Client
func (_e *Repository_Expecter) UpdateIdentity(ctx interface{}, client interface{}) *Repository_UpdateIdentity_Call {
	return &Repository_UpdateIdentity_Call{Call: _e.mock.On("UpdateIdentity", ctx, client)}
}

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

func (_c *Repository_UpdateIdentity_Call) Return(client1 clients.Client, err error) *Repository_UpdateIdentity_Call {
	_c.Call.Return(client1, err)
	return _c
}

func (_c *Repository_UpdateIdentity_Call) RunAndReturn(run func(ctx context.Context, client clients.Client) (clients.Client, error)) *Repository_UpdateIdentity_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
}

// UpdateSecret provides a mock function for the type Repository
func (_mock *Repository) UpdateSecret(ctx context.Context, client clients.Client) (clients.Client, error) {
	ret := _mock.Called(ctx, client)

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

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

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

// UpdateSecret is a helper method to define mock.On call
//   - ctx context.Context
//   - client clients.Client
func (_e *Repository_Expecter) UpdateSecret(ctx interface{}, client interface{}) *Repository_UpdateSecret_Call {
	return &Repository_UpdateSecret_Call{Call: _e.mock.On("UpdateSecret", ctx, client)}
}

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

func (_c *Repository_UpdateSecret_Call) Return(client1 clients.Client, err error) *Repository_UpdateSecret_Call {
	_c.Call.Return(client1, err)
	return _c
}

func (_c *Repository_UpdateSecret_Call) RunAndReturn(run func(ctx context.Context, client clients.Client) (clients.Client, error)) *Repository_UpdateSecret_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	var r0 clients.Client
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, clients.Client) (clients.Client, error)); ok {
		return returnFunc(ctx, client)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, clients.Client) clients.Client); ok {
		r0 = returnFunc(ctx, client)
	} else {
		r0 = ret.Get(0).(clients.Client)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, clients.Client) error); ok {
		r1 = returnFunc(ctx, client)
	} 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
//   - client clients.Client
func (_e *Repository_Expecter) UpdateTags(ctx interface{}, client interface{}) *Repository_UpdateTags_Call {
	return &Repository_UpdateTags_Call{Call: _e.mock.On("UpdateTags", ctx, client)}
}

func (_c *Repository_UpdateTags_Call) Run(run func(ctx context.Context, client clients.Client)) *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 clients.Client
		if args[1] != nil {
			arg1 = args[1].(clients.Client)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Repository_UpdateTags_Call) Return(client1 clients.Client, err error) *Repository_UpdateTags_Call {
	_c.Call.Return(client1, err)
	return _c
}

func (_c *Repository_UpdateTags_Call) RunAndReturn(run func(ctx context.Context, client clients.Client) (clients.Client, error)) *Repository_UpdateTags_Call {
	_c.Call.Return(run)
	return _c
}
