// Code generated by mockery. DO NOT EDIT.

package mock_crossspacesub

import (
	context "context"

	app "github.com/anyproto/any-sync/app"

	crossspacesub "github.com/anyproto/anytype-heart/core/subscription/crossspacesub"

	mock "github.com/stretchr/testify/mock"

	subscription "github.com/anyproto/anytype-heart/core/subscription"
)

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

type MockService_Expecter struct {
	mock *mock.Mock
}

func (_m *MockService) EXPECT() *MockService_Expecter {
	return &MockService_Expecter{mock: &_m.Mock}
}

// Close provides a mock function with given fields: ctx
func (_m *MockService) Close(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

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

// Close is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockService_Expecter) Close(ctx interface{}) *MockService_Close_Call {
	return &MockService_Close_Call{Call: _e.mock.On("Close", ctx)}
}

func (_c *MockService_Close_Call) Run(run func(ctx context.Context)) *MockService_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

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

func (_c *MockService_Close_Call) RunAndReturn(run func(context.Context) error) *MockService_Close_Call {
	_c.Call.Return(run)
	return _c
}

// Init provides a mock function with given fields: a
func (_m *MockService) Init(a *app.App) error {
	ret := _m.Called(a)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(*app.App) error); ok {
		r0 = rf(a)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Init is a helper method to define mock.On call
//   - a *app.App
func (_e *MockService_Expecter) Init(a interface{}) *MockService_Init_Call {
	return &MockService_Init_Call{Call: _e.mock.On("Init", a)}
}

func (_c *MockService_Init_Call) Run(run func(a *app.App)) *MockService_Init_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*app.App))
	})
	return _c
}

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

func (_c *MockService_Init_Call) RunAndReturn(run func(*app.App) error) *MockService_Init_Call {
	_c.Call.Return(run)
	return _c
}

// Name provides a mock function with given fields:
func (_m *MockService) Name() string {
	ret := _m.Called()

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

	var r0 string
	if rf, ok := ret.Get(0).(func() string); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

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

// Name is a helper method to define mock.On call
func (_e *MockService_Expecter) Name() *MockService_Name_Call {
	return &MockService_Name_Call{Call: _e.mock.On("Name")}
}

func (_c *MockService_Name_Call) Run(run func()) *MockService_Name_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockService_Name_Call) Return(name string) *MockService_Name_Call {
	_c.Call.Return(name)
	return _c
}

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

// Run provides a mock function with given fields: ctx
func (_m *MockService) Run(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

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

// Run is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockService_Expecter) Run(ctx interface{}) *MockService_Run_Call {
	return &MockService_Run_Call{Call: _e.mock.On("Run", ctx)}
}

func (_c *MockService_Run_Call) Run(run func(ctx context.Context)) *MockService_Run_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

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

func (_c *MockService_Run_Call) RunAndReturn(run func(context.Context) error) *MockService_Run_Call {
	_c.Call.Return(run)
	return _c
}

// Subscribe provides a mock function with given fields: req, predicate
func (_m *MockService) Subscribe(req subscription.SubscribeRequest, predicate crossspacesub.Predicate) (*subscription.SubscribeResponse, error) {
	ret := _m.Called(req, predicate)

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

	var r0 *subscription.SubscribeResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(subscription.SubscribeRequest, crossspacesub.Predicate) (*subscription.SubscribeResponse, error)); ok {
		return rf(req, predicate)
	}
	if rf, ok := ret.Get(0).(func(subscription.SubscribeRequest, crossspacesub.Predicate) *subscription.SubscribeResponse); ok {
		r0 = rf(req, predicate)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*subscription.SubscribeResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(subscription.SubscribeRequest, crossspacesub.Predicate) error); ok {
		r1 = rf(req, predicate)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Subscribe is a helper method to define mock.On call
//   - req subscription.SubscribeRequest
//   - predicate crossspacesub.Predicate
func (_e *MockService_Expecter) Subscribe(req interface{}, predicate interface{}) *MockService_Subscribe_Call {
	return &MockService_Subscribe_Call{Call: _e.mock.On("Subscribe", req, predicate)}
}

func (_c *MockService_Subscribe_Call) Run(run func(req subscription.SubscribeRequest, predicate crossspacesub.Predicate)) *MockService_Subscribe_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(subscription.SubscribeRequest), args[1].(crossspacesub.Predicate))
	})
	return _c
}

func (_c *MockService_Subscribe_Call) Return(_a0 *subscription.SubscribeResponse, _a1 error) *MockService_Subscribe_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_Subscribe_Call) RunAndReturn(run func(subscription.SubscribeRequest, crossspacesub.Predicate) (*subscription.SubscribeResponse, error)) *MockService_Subscribe_Call {
	_c.Call.Return(run)
	return _c
}

// Unsubscribe provides a mock function with given fields: subId
func (_m *MockService) Unsubscribe(subId string) error {
	ret := _m.Called(subId)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(string) error); ok {
		r0 = rf(subId)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Unsubscribe is a helper method to define mock.On call
//   - subId string
func (_e *MockService_Expecter) Unsubscribe(subId interface{}) *MockService_Unsubscribe_Call {
	return &MockService_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", subId)}
}

func (_c *MockService_Unsubscribe_Call) Run(run func(subId string)) *MockService_Unsubscribe_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

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

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

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

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

	return mock
}
