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

package mocks

import (
	"context"

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

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

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

	return mock
}

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

type SubjectRepo_Expecter struct {
	mock *mock.Mock
}

func (_m *SubjectRepo) EXPECT() *SubjectRepo_Expecter {
	return &SubjectRepo_Expecter{mock: &_m.Mock}
}

// Browse provides a mock function for the type SubjectRepo
func (_mock *SubjectRepo) Browse(ctx context.Context, filter subject.BrowseFilter, limit int, offset int) ([]model.Subject, error) {
	ret := _mock.Called(ctx, filter, limit, offset)

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

	var r0 []model.Subject
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, subject.BrowseFilter, int, int) ([]model.Subject, error)); ok {
		return returnFunc(ctx, filter, limit, offset)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, subject.BrowseFilter, int, int) []model.Subject); ok {
		r0 = returnFunc(ctx, filter, limit, offset)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]model.Subject)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, subject.BrowseFilter, int, int) error); ok {
		r1 = returnFunc(ctx, filter, limit, offset)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Browse is a helper method to define mock.On call
//   - ctx context.Context
//   - filter subject.BrowseFilter
//   - limit int
//   - offset int
func (_e *SubjectRepo_Expecter) Browse(ctx interface{}, filter interface{}, limit interface{}, offset interface{}) *SubjectRepo_Browse_Call {
	return &SubjectRepo_Browse_Call{Call: _e.mock.On("Browse", ctx, filter, limit, offset)}
}

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

func (_c *SubjectRepo_Browse_Call) Return(subjects []model.Subject, err error) *SubjectRepo_Browse_Call {
	_c.Call.Return(subjects, err)
	return _c
}

func (_c *SubjectRepo_Browse_Call) RunAndReturn(run func(ctx context.Context, filter subject.BrowseFilter, limit int, offset int) ([]model.Subject, error)) *SubjectRepo_Browse_Call {
	_c.Call.Return(run)
	return _c
}

// Count provides a mock function for the type SubjectRepo
func (_mock *SubjectRepo) Count(ctx context.Context, filter subject.BrowseFilter) (int64, error) {
	ret := _mock.Called(ctx, filter)

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

	var r0 int64
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, subject.BrowseFilter) (int64, error)); ok {
		return returnFunc(ctx, filter)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, subject.BrowseFilter) int64); ok {
		r0 = returnFunc(ctx, filter)
	} else {
		r0 = ret.Get(0).(int64)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, subject.BrowseFilter) error); ok {
		r1 = returnFunc(ctx, filter)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Count is a helper method to define mock.On call
//   - ctx context.Context
//   - filter subject.BrowseFilter
func (_e *SubjectRepo_Expecter) Count(ctx interface{}, filter interface{}) *SubjectRepo_Count_Call {
	return &SubjectRepo_Count_Call{Call: _e.mock.On("Count", ctx, filter)}
}

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

func (_c *SubjectRepo_Count_Call) Return(n int64, err error) *SubjectRepo_Count_Call {
	_c.Call.Return(n, err)
	return _c
}

func (_c *SubjectRepo_Count_Call) RunAndReturn(run func(ctx context.Context, filter subject.BrowseFilter) (int64, error)) *SubjectRepo_Count_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function for the type SubjectRepo
func (_mock *SubjectRepo) Get(ctx context.Context, id model.SubjectID, filter subject.Filter) (model.Subject, error) {
	ret := _mock.Called(ctx, id, filter)

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

	var r0 model.Subject
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.SubjectID, subject.Filter) (model.Subject, error)); ok {
		return returnFunc(ctx, id, filter)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.SubjectID, subject.Filter) model.Subject); ok {
		r0 = returnFunc(ctx, id, filter)
	} else {
		r0 = ret.Get(0).(model.Subject)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.SubjectID, subject.Filter) error); ok {
		r1 = returnFunc(ctx, id, filter)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - id model.SubjectID
//   - filter subject.Filter
func (_e *SubjectRepo_Expecter) Get(ctx interface{}, id interface{}, filter interface{}) *SubjectRepo_Get_Call {
	return &SubjectRepo_Get_Call{Call: _e.mock.On("Get", ctx, id, filter)}
}

func (_c *SubjectRepo_Get_Call) Run(run func(ctx context.Context, id model.SubjectID, filter subject.Filter)) *SubjectRepo_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 model.SubjectID
		if args[1] != nil {
			arg1 = args[1].(model.SubjectID)
		}
		var arg2 subject.Filter
		if args[2] != nil {
			arg2 = args[2].(subject.Filter)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *SubjectRepo_Get_Call) Return(subject1 model.Subject, err error) *SubjectRepo_Get_Call {
	_c.Call.Return(subject1, err)
	return _c
}

func (_c *SubjectRepo_Get_Call) RunAndReturn(run func(ctx context.Context, id model.SubjectID, filter subject.Filter) (model.Subject, error)) *SubjectRepo_Get_Call {
	_c.Call.Return(run)
	return _c
}

// GetActors provides a mock function for the type SubjectRepo
func (_mock *SubjectRepo) GetActors(ctx context.Context, subjectID model.SubjectID, characterIDs []model.CharacterID) (map[model.CharacterID][]model.PersonID, error) {
	ret := _mock.Called(ctx, subjectID, characterIDs)

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

	var r0 map[model.CharacterID][]model.PersonID
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.SubjectID, []model.CharacterID) (map[model.CharacterID][]model.PersonID, error)); ok {
		return returnFunc(ctx, subjectID, characterIDs)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.SubjectID, []model.CharacterID) map[model.CharacterID][]model.PersonID); ok {
		r0 = returnFunc(ctx, subjectID, characterIDs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[model.CharacterID][]model.PersonID)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.SubjectID, []model.CharacterID) error); ok {
		r1 = returnFunc(ctx, subjectID, characterIDs)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetActors is a helper method to define mock.On call
//   - ctx context.Context
//   - subjectID model.SubjectID
//   - characterIDs []model.CharacterID
func (_e *SubjectRepo_Expecter) GetActors(ctx interface{}, subjectID interface{}, characterIDs interface{}) *SubjectRepo_GetActors_Call {
	return &SubjectRepo_GetActors_Call{Call: _e.mock.On("GetActors", ctx, subjectID, characterIDs)}
}

func (_c *SubjectRepo_GetActors_Call) Run(run func(ctx context.Context, subjectID model.SubjectID, characterIDs []model.CharacterID)) *SubjectRepo_GetActors_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 model.SubjectID
		if args[1] != nil {
			arg1 = args[1].(model.SubjectID)
		}
		var arg2 []model.CharacterID
		if args[2] != nil {
			arg2 = args[2].([]model.CharacterID)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *SubjectRepo_GetActors_Call) Return(vToVs map[model.CharacterID][]model.PersonID, err error) *SubjectRepo_GetActors_Call {
	_c.Call.Return(vToVs, err)
	return _c
}

func (_c *SubjectRepo_GetActors_Call) RunAndReturn(run func(ctx context.Context, subjectID model.SubjectID, characterIDs []model.CharacterID) (map[model.CharacterID][]model.PersonID, error)) *SubjectRepo_GetActors_Call {
	_c.Call.Return(run)
	return _c
}

// GetByIDs provides a mock function for the type SubjectRepo
func (_mock *SubjectRepo) GetByIDs(ctx context.Context, ids []model.SubjectID, filter subject.Filter) (map[model.SubjectID]model.Subject, error) {
	ret := _mock.Called(ctx, ids, filter)

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

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

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

// GetByIDs is a helper method to define mock.On call
//   - ctx context.Context
//   - ids []model.SubjectID
//   - filter subject.Filter
func (_e *SubjectRepo_Expecter) GetByIDs(ctx interface{}, ids interface{}, filter interface{}) *SubjectRepo_GetByIDs_Call {
	return &SubjectRepo_GetByIDs_Call{Call: _e.mock.On("GetByIDs", ctx, ids, filter)}
}

func (_c *SubjectRepo_GetByIDs_Call) Run(run func(ctx context.Context, ids []model.SubjectID, filter subject.Filter)) *SubjectRepo_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.SubjectID
		if args[1] != nil {
			arg1 = args[1].([]model.SubjectID)
		}
		var arg2 subject.Filter
		if args[2] != nil {
			arg2 = args[2].(subject.Filter)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *SubjectRepo_GetByIDs_Call) Return(vToSubject map[model.SubjectID]model.Subject, err error) *SubjectRepo_GetByIDs_Call {
	_c.Call.Return(vToSubject, err)
	return _c
}

func (_c *SubjectRepo_GetByIDs_Call) RunAndReturn(run func(ctx context.Context, ids []model.SubjectID, filter subject.Filter) (map[model.SubjectID]model.Subject, error)) *SubjectRepo_GetByIDs_Call {
	_c.Call.Return(run)
	return _c
}

// GetCharacterRelated provides a mock function for the type SubjectRepo
func (_mock *SubjectRepo) GetCharacterRelated(ctx context.Context, characterID model.CharacterID) ([]domain.SubjectCharacterRelation, error) {
	ret := _mock.Called(ctx, characterID)

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

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

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

// GetCharacterRelated is a helper method to define mock.On call
//   - ctx context.Context
//   - characterID model.CharacterID
func (_e *SubjectRepo_Expecter) GetCharacterRelated(ctx interface{}, characterID interface{}) *SubjectRepo_GetCharacterRelated_Call {
	return &SubjectRepo_GetCharacterRelated_Call{Call: _e.mock.On("GetCharacterRelated", ctx, characterID)}
}

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

func (_c *SubjectRepo_GetCharacterRelated_Call) Return(subjectCharacterRelations []domain.SubjectCharacterRelation, err error) *SubjectRepo_GetCharacterRelated_Call {
	_c.Call.Return(subjectCharacterRelations, err)
	return _c
}

func (_c *SubjectRepo_GetCharacterRelated_Call) RunAndReturn(run func(ctx context.Context, characterID model.CharacterID) ([]domain.SubjectCharacterRelation, error)) *SubjectRepo_GetCharacterRelated_Call {
	_c.Call.Return(run)
	return _c
}

// GetPersonRelated provides a mock function for the type SubjectRepo
func (_mock *SubjectRepo) GetPersonRelated(ctx context.Context, personID model.PersonID) ([]domain.SubjectPersonRelation, error) {
	ret := _mock.Called(ctx, personID)

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

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

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

// GetPersonRelated is a helper method to define mock.On call
//   - ctx context.Context
//   - personID model.PersonID
func (_e *SubjectRepo_Expecter) GetPersonRelated(ctx interface{}, personID interface{}) *SubjectRepo_GetPersonRelated_Call {
	return &SubjectRepo_GetPersonRelated_Call{Call: _e.mock.On("GetPersonRelated", ctx, personID)}
}

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

func (_c *SubjectRepo_GetPersonRelated_Call) Return(subjectPersonRelations []domain.SubjectPersonRelation, err error) *SubjectRepo_GetPersonRelated_Call {
	_c.Call.Return(subjectPersonRelations, err)
	return _c
}

func (_c *SubjectRepo_GetPersonRelated_Call) RunAndReturn(run func(ctx context.Context, personID model.PersonID) ([]domain.SubjectPersonRelation, error)) *SubjectRepo_GetPersonRelated_Call {
	_c.Call.Return(run)
	return _c
}

// GetSubjectRelated provides a mock function for the type SubjectRepo
func (_mock *SubjectRepo) GetSubjectRelated(ctx context.Context, subjectID model.SubjectID) ([]domain.SubjectInternalRelation, error) {
	ret := _mock.Called(ctx, subjectID)

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

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

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

// GetSubjectRelated is a helper method to define mock.On call
//   - ctx context.Context
//   - subjectID model.SubjectID
func (_e *SubjectRepo_Expecter) GetSubjectRelated(ctx interface{}, subjectID interface{}) *SubjectRepo_GetSubjectRelated_Call {
	return &SubjectRepo_GetSubjectRelated_Call{Call: _e.mock.On("GetSubjectRelated", ctx, subjectID)}
}

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

func (_c *SubjectRepo_GetSubjectRelated_Call) Return(subjectInternalRelations []domain.SubjectInternalRelation, err error) *SubjectRepo_GetSubjectRelated_Call {
	_c.Call.Return(subjectInternalRelations, err)
	return _c
}

func (_c *SubjectRepo_GetSubjectRelated_Call) RunAndReturn(run func(ctx context.Context, subjectID model.SubjectID) ([]domain.SubjectInternalRelation, error)) *SubjectRepo_GetSubjectRelated_Call {
	_c.Call.Return(run)
	return _c
}
