// Code generated by mockery. DO NOT EDIT.

package mock_subscription

import (
	context "context"

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

	domain "github.com/anyproto/anytype-heart/core/domain"

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

	pb "github.com/anyproto/anytype-heart/pb"

	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
}

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

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

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

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

	return r0, r1
}

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

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

func (_c *MockService_Search_Call) Run(run func(req subscription.SubscribeRequest)) *MockService_Search_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(subscription.SubscribeRequest))
	})
	return _c
}

func (_c *MockService_Search_Call) Return(resp *subscription.SubscribeResponse, err error) *MockService_Search_Call {
	_c.Call.Return(resp, err)
	return _c
}

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

// SubscribeGroups provides a mock function with given fields: req
func (_m *MockService) SubscribeGroups(req subscription.SubscribeGroupsRequest) (*pb.RpcObjectGroupsSubscribeResponse, error) {
	ret := _m.Called(req)

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

	var r0 *pb.RpcObjectGroupsSubscribeResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(subscription.SubscribeGroupsRequest) (*pb.RpcObjectGroupsSubscribeResponse, error)); ok {
		return rf(req)
	}
	if rf, ok := ret.Get(0).(func(subscription.SubscribeGroupsRequest) *pb.RpcObjectGroupsSubscribeResponse); ok {
		r0 = rf(req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pb.RpcObjectGroupsSubscribeResponse)
		}
	}

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

	return r0, r1
}

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

// SubscribeGroups is a helper method to define mock.On call
//   - req subscription.SubscribeGroupsRequest
func (_e *MockService_Expecter) SubscribeGroups(req interface{}) *MockService_SubscribeGroups_Call {
	return &MockService_SubscribeGroups_Call{Call: _e.mock.On("SubscribeGroups", req)}
}

func (_c *MockService_SubscribeGroups_Call) Run(run func(req subscription.SubscribeGroupsRequest)) *MockService_SubscribeGroups_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(subscription.SubscribeGroupsRequest))
	})
	return _c
}

func (_c *MockService_SubscribeGroups_Call) Return(_a0 *pb.RpcObjectGroupsSubscribeResponse, _a1 error) *MockService_SubscribeGroups_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_SubscribeGroups_Call) RunAndReturn(run func(subscription.SubscribeGroupsRequest) (*pb.RpcObjectGroupsSubscribeResponse, error)) *MockService_SubscribeGroups_Call {
	_c.Call.Return(run)
	return _c
}

// SubscribeIds provides a mock function with given fields: subId, ids
func (_m *MockService) SubscribeIds(subId string, ids []string) ([]*domain.Details, error) {
	ret := _m.Called(subId, ids)

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

	var r0 []*domain.Details
	var r1 error
	if rf, ok := ret.Get(0).(func(string, []string) ([]*domain.Details, error)); ok {
		return rf(subId, ids)
	}
	if rf, ok := ret.Get(0).(func(string, []string) []*domain.Details); ok {
		r0 = rf(subId, ids)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*domain.Details)
		}
	}

	if rf, ok := ret.Get(1).(func(string, []string) error); ok {
		r1 = rf(subId, ids)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

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

func (_c *MockService_SubscribeIds_Call) Return(records []*domain.Details, err error) *MockService_SubscribeIds_Call {
	_c.Call.Return(records, err)
	return _c
}

func (_c *MockService_SubscribeIds_Call) RunAndReturn(run func(string, []string) ([]*domain.Details, error)) *MockService_SubscribeIds_Call {
	_c.Call.Return(run)
	return _c
}

// SubscribeIdsReq provides a mock function with given fields: req
func (_m *MockService) SubscribeIdsReq(req pb.RpcObjectSubscribeIdsRequest) (*pb.RpcObjectSubscribeIdsResponse, error) {
	ret := _m.Called(req)

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

	var r0 *pb.RpcObjectSubscribeIdsResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(pb.RpcObjectSubscribeIdsRequest) (*pb.RpcObjectSubscribeIdsResponse, error)); ok {
		return rf(req)
	}
	if rf, ok := ret.Get(0).(func(pb.RpcObjectSubscribeIdsRequest) *pb.RpcObjectSubscribeIdsResponse); ok {
		r0 = rf(req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pb.RpcObjectSubscribeIdsResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(pb.RpcObjectSubscribeIdsRequest) error); ok {
		r1 = rf(req)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// SubscribeIdsReq is a helper method to define mock.On call
//   - req pb.RpcObjectSubscribeIdsRequest
func (_e *MockService_Expecter) SubscribeIdsReq(req interface{}) *MockService_SubscribeIdsReq_Call {
	return &MockService_SubscribeIdsReq_Call{Call: _e.mock.On("SubscribeIdsReq", req)}
}

func (_c *MockService_SubscribeIdsReq_Call) Run(run func(req pb.RpcObjectSubscribeIdsRequest)) *MockService_SubscribeIdsReq_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(pb.RpcObjectSubscribeIdsRequest))
	})
	return _c
}

func (_c *MockService_SubscribeIdsReq_Call) Return(resp *pb.RpcObjectSubscribeIdsResponse, err error) *MockService_SubscribeIdsReq_Call {
	_c.Call.Return(resp, err)
	return _c
}

func (_c *MockService_SubscribeIdsReq_Call) RunAndReturn(run func(pb.RpcObjectSubscribeIdsRequest) (*pb.RpcObjectSubscribeIdsResponse, error)) *MockService_SubscribeIdsReq_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

	return r0
}

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

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

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

func (_c *MockService_SubscriptionIDs_Call) Return(_a0 []string) *MockService_SubscriptionIDs_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockService_SubscriptionIDs_Call) RunAndReturn(run func() []string) *MockService_SubscriptionIDs_Call {
	_c.Call.Return(run)
	return _c
}

// Unsubscribe provides a mock function with given fields: subIds
func (_m *MockService) Unsubscribe(subIds ...string) error {
	_va := make([]interface{}, len(subIds))
	for _i := range subIds {
		_va[_i] = subIds[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	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(subIds...)
	} 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
//   - subIds ...string
func (_e *MockService_Expecter) Unsubscribe(subIds ...interface{}) *MockService_Unsubscribe_Call {
	return &MockService_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe",
		append([]interface{}{}, subIds...)...)}
}

func (_c *MockService_Unsubscribe_Call) Run(run func(subIds ...string)) *MockService_Unsubscribe_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]string, len(args)-0)
		for i, a := range args[0:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		run(variadicArgs...)
	})
	return _c
}

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

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

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

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

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

	return r0
}

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

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

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

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

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

// UnsubscribeAndReturnIds provides a mock function with given fields: spaceId, subId
func (_m *MockService) UnsubscribeAndReturnIds(spaceId string, subId string) ([]string, error) {
	ret := _m.Called(spaceId, subId)

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

	var r0 []string
	var r1 error
	if rf, ok := ret.Get(0).(func(string, string) ([]string, error)); ok {
		return rf(spaceId, subId)
	}
	if rf, ok := ret.Get(0).(func(string, string) []string); ok {
		r0 = rf(spaceId, subId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	if rf, ok := ret.Get(1).(func(string, string) error); ok {
		r1 = rf(spaceId, subId)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

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

func (_c *MockService_UnsubscribeAndReturnIds_Call) Return(_a0 []string, _a1 error) *MockService_UnsubscribeAndReturnIds_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_UnsubscribeAndReturnIds_Call) RunAndReturn(run func(string, string) ([]string, error)) *MockService_UnsubscribeAndReturnIds_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
}
