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

package mocks

import (
	"context"

	"github.com/bangumi/server/internal/model"
	"github.com/bangumi/server/internal/user"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type UserRepo_Expecter struct {
	mock *mock.Mock
}

func (_m *UserRepo) EXPECT() *UserRepo_Expecter {
	return &UserRepo_Expecter{mock: &_m.Mock}
}

// CheckIsFriendToOthers provides a mock function for the type UserRepo
func (_mock *UserRepo) CheckIsFriendToOthers(ctx context.Context, selfID model.UserID, otherIDs ...model.UserID) (bool, error) {
	var tmpRet mock.Arguments
	if len(otherIDs) > 0 {
		tmpRet = _mock.Called(ctx, selfID, otherIDs)
	} else {
		tmpRet = _mock.Called(ctx, selfID)
	}
	ret := tmpRet

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

	var r0 bool
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.UserID, ...model.UserID) (bool, error)); ok {
		return returnFunc(ctx, selfID, otherIDs...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.UserID, ...model.UserID) bool); ok {
		r0 = returnFunc(ctx, selfID, otherIDs...)
	} else {
		r0 = ret.Get(0).(bool)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.UserID, ...model.UserID) error); ok {
		r1 = returnFunc(ctx, selfID, otherIDs...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// CheckIsFriendToOthers is a helper method to define mock.On call
//   - ctx context.Context
//   - selfID model.UserID
//   - otherIDs ...model.UserID
func (_e *UserRepo_Expecter) CheckIsFriendToOthers(ctx interface{}, selfID interface{}, otherIDs ...interface{}) *UserRepo_CheckIsFriendToOthers_Call {
	return &UserRepo_CheckIsFriendToOthers_Call{Call: _e.mock.On("CheckIsFriendToOthers",
		append([]interface{}{ctx, selfID}, otherIDs...)...)}
}

func (_c *UserRepo_CheckIsFriendToOthers_Call) Run(run func(ctx context.Context, selfID model.UserID, otherIDs ...model.UserID)) *UserRepo_CheckIsFriendToOthers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 model.UserID
		if args[1] != nil {
			arg1 = args[1].(model.UserID)
		}
		var arg2 []model.UserID
		var variadicArgs []model.UserID
		if len(args) > 2 {
			variadicArgs = args[2].([]model.UserID)
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

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

func (_c *UserRepo_CheckIsFriendToOthers_Call) RunAndReturn(run func(ctx context.Context, selfID model.UserID, otherIDs ...model.UserID) (bool, error)) *UserRepo_CheckIsFriendToOthers_Call {
	_c.Call.Return(run)
	return _c
}

// GetByID provides a mock function for the type UserRepo
func (_mock *UserRepo) GetByID(ctx context.Context, userID model.UserID) (user.User, error) {
	ret := _mock.Called(ctx, userID)

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

	var r0 user.User
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.UserID) (user.User, error)); ok {
		return returnFunc(ctx, userID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.UserID) user.User); ok {
		r0 = returnFunc(ctx, userID)
	} else {
		r0 = ret.Get(0).(user.User)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.UserID) error); ok {
		r1 = returnFunc(ctx, userID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetByID is a helper method to define mock.On call
//   - ctx context.Context
//   - userID model.UserID
func (_e *UserRepo_Expecter) GetByID(ctx interface{}, userID interface{}) *UserRepo_GetByID_Call {
	return &UserRepo_GetByID_Call{Call: _e.mock.On("GetByID", ctx, userID)}
}

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

func (_c *UserRepo_GetByID_Call) Return(user1 user.User, err error) *UserRepo_GetByID_Call {
	_c.Call.Return(user1, err)
	return _c
}

func (_c *UserRepo_GetByID_Call) RunAndReturn(run func(ctx context.Context, userID model.UserID) (user.User, error)) *UserRepo_GetByID_Call {
	_c.Call.Return(run)
	return _c
}

// GetByIDs provides a mock function for the type UserRepo
func (_mock *UserRepo) GetByIDs(ctx context.Context, ids []model.UserID) (map[model.UserID]user.User, error) {
	ret := _mock.Called(ctx, ids)

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

	var r0 map[model.UserID]user.User
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []model.UserID) (map[model.UserID]user.User, error)); ok {
		return returnFunc(ctx, ids)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, []model.UserID) map[model.UserID]user.User); ok {
		r0 = returnFunc(ctx, ids)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[model.UserID]user.User)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, []model.UserID) error); ok {
		r1 = returnFunc(ctx, ids)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetByIDs is a helper method to define mock.On call
//   - ctx context.Context
//   - ids []model.UserID
func (_e *UserRepo_Expecter) GetByIDs(ctx interface{}, ids interface{}) *UserRepo_GetByIDs_Call {
	return &UserRepo_GetByIDs_Call{Call: _e.mock.On("GetByIDs", ctx, ids)}
}

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

func (_c *UserRepo_GetByIDs_Call) Return(vToUser map[model.UserID]user.User, err error) *UserRepo_GetByIDs_Call {
	_c.Call.Return(vToUser, err)
	return _c
}

func (_c *UserRepo_GetByIDs_Call) RunAndReturn(run func(ctx context.Context, ids []model.UserID) (map[model.UserID]user.User, error)) *UserRepo_GetByIDs_Call {
	_c.Call.Return(run)
	return _c
}

// GetByName provides a mock function for the type UserRepo
func (_mock *UserRepo) GetByName(ctx context.Context, username string) (user.User, error) {
	ret := _mock.Called(ctx, username)

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

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

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

// GetByName is a helper method to define mock.On call
//   - ctx context.Context
//   - username string
func (_e *UserRepo_Expecter) GetByName(ctx interface{}, username interface{}) *UserRepo_GetByName_Call {
	return &UserRepo_GetByName_Call{Call: _e.mock.On("GetByName", ctx, username)}
}

func (_c *UserRepo_GetByName_Call) Run(run func(ctx context.Context, username string)) *UserRepo_GetByName_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 *UserRepo_GetByName_Call) Return(user1 user.User, err error) *UserRepo_GetByName_Call {
	_c.Call.Return(user1, err)
	return _c
}

func (_c *UserRepo_GetByName_Call) RunAndReturn(run func(ctx context.Context, username string) (user.User, error)) *UserRepo_GetByName_Call {
	_c.Call.Return(run)
	return _c
}

// GetFieldsByIDs provides a mock function for the type UserRepo
func (_mock *UserRepo) GetFieldsByIDs(ctx context.Context, ids []model.UserID) (map[model.UserID]user.Fields, error) {
	ret := _mock.Called(ctx, ids)

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

	var r0 map[model.UserID]user.Fields
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []model.UserID) (map[model.UserID]user.Fields, error)); ok {
		return returnFunc(ctx, ids)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, []model.UserID) map[model.UserID]user.Fields); ok {
		r0 = returnFunc(ctx, ids)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[model.UserID]user.Fields)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, []model.UserID) error); ok {
		r1 = returnFunc(ctx, ids)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetFieldsByIDs is a helper method to define mock.On call
//   - ctx context.Context
//   - ids []model.UserID
func (_e *UserRepo_Expecter) GetFieldsByIDs(ctx interface{}, ids interface{}) *UserRepo_GetFieldsByIDs_Call {
	return &UserRepo_GetFieldsByIDs_Call{Call: _e.mock.On("GetFieldsByIDs", ctx, ids)}
}

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

func (_c *UserRepo_GetFieldsByIDs_Call) Return(vToFields map[model.UserID]user.Fields, err error) *UserRepo_GetFieldsByIDs_Call {
	_c.Call.Return(vToFields, err)
	return _c
}

func (_c *UserRepo_GetFieldsByIDs_Call) RunAndReturn(run func(ctx context.Context, ids []model.UserID) (map[model.UserID]user.Fields, error)) *UserRepo_GetFieldsByIDs_Call {
	_c.Call.Return(run)
	return _c
}

// GetFriends provides a mock function for the type UserRepo
func (_mock *UserRepo) GetFriends(ctx context.Context, userID model.UserID) (map[model.UserID]user.FriendItem, error) {
	ret := _mock.Called(ctx, userID)

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

	var r0 map[model.UserID]user.FriendItem
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.UserID) (map[model.UserID]user.FriendItem, error)); ok {
		return returnFunc(ctx, userID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.UserID) map[model.UserID]user.FriendItem); ok {
		r0 = returnFunc(ctx, userID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[model.UserID]user.FriendItem)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.UserID) error); ok {
		r1 = returnFunc(ctx, userID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetFriends is a helper method to define mock.On call
//   - ctx context.Context
//   - userID model.UserID
func (_e *UserRepo_Expecter) GetFriends(ctx interface{}, userID interface{}) *UserRepo_GetFriends_Call {
	return &UserRepo_GetFriends_Call{Call: _e.mock.On("GetFriends", ctx, userID)}
}

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

func (_c *UserRepo_GetFriends_Call) Return(vToFriendItem map[model.UserID]user.FriendItem, err error) *UserRepo_GetFriends_Call {
	_c.Call.Return(vToFriendItem, err)
	return _c
}

func (_c *UserRepo_GetFriends_Call) RunAndReturn(run func(ctx context.Context, userID model.UserID) (map[model.UserID]user.FriendItem, error)) *UserRepo_GetFriends_Call {
	_c.Call.Return(run)
	return _c
}

// GetFullUser provides a mock function for the type UserRepo
func (_mock *UserRepo) GetFullUser(ctx context.Context, userID model.UserID) (user.FullUser, error) {
	ret := _mock.Called(ctx, userID)

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

	var r0 user.FullUser
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.UserID) (user.FullUser, error)); ok {
		return returnFunc(ctx, userID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.UserID) user.FullUser); ok {
		r0 = returnFunc(ctx, userID)
	} else {
		r0 = ret.Get(0).(user.FullUser)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.UserID) error); ok {
		r1 = returnFunc(ctx, userID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetFullUser is a helper method to define mock.On call
//   - ctx context.Context
//   - userID model.UserID
func (_e *UserRepo_Expecter) GetFullUser(ctx interface{}, userID interface{}) *UserRepo_GetFullUser_Call {
	return &UserRepo_GetFullUser_Call{Call: _e.mock.On("GetFullUser", ctx, userID)}
}

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

func (_c *UserRepo_GetFullUser_Call) Return(fullUser user.FullUser, err error) *UserRepo_GetFullUser_Call {
	_c.Call.Return(fullUser, err)
	return _c
}

func (_c *UserRepo_GetFullUser_Call) RunAndReturn(run func(ctx context.Context, userID model.UserID) (user.FullUser, error)) *UserRepo_GetFullUser_Call {
	_c.Call.Return(run)
	return _c
}
