// Code generated by mockery. DO NOT EDIT.

package mock_chatsubscription

import (
	context "context"

	app "github.com/anyproto/any-sync/app"
	chatsubscription "github.com/anyproto/anytype-heart/core/block/chats/chatsubscription"

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

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

// GetManager provides a mock function with given fields: spaceId, chatObjectId
func (_m *MockService) GetManager(spaceId string, chatObjectId string) (chatsubscription.Manager, error) {
	ret := _m.Called(spaceId, chatObjectId)

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

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

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

	return r0, r1
}

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

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

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

func (_c *MockService_GetManager_Call) Return(_a0 chatsubscription.Manager, _a1 error) *MockService_GetManager_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_GetManager_Call) RunAndReturn(run func(string, string) (chatsubscription.Manager, error)) *MockService_GetManager_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
}

// SubscribeLastMessages provides a mock function with given fields: ctx, req
func (_m *MockService) SubscribeLastMessages(ctx context.Context, req chatsubscription.SubscribeLastMessagesRequest) (*chatsubscription.SubscribeLastMessagesResponse, error) {
	ret := _m.Called(ctx, req)

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

	var r0 *chatsubscription.SubscribeLastMessagesResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, chatsubscription.SubscribeLastMessagesRequest) (*chatsubscription.SubscribeLastMessagesResponse, error)); ok {
		return rf(ctx, req)
	}
	if rf, ok := ret.Get(0).(func(context.Context, chatsubscription.SubscribeLastMessagesRequest) *chatsubscription.SubscribeLastMessagesResponse); ok {
		r0 = rf(ctx, req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*chatsubscription.SubscribeLastMessagesResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, chatsubscription.SubscribeLastMessagesRequest) error); ok {
		r1 = rf(ctx, req)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

func (_c *MockService_SubscribeLastMessages_Call) Run(run func(ctx context.Context, req chatsubscription.SubscribeLastMessagesRequest)) *MockService_SubscribeLastMessages_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(chatsubscription.SubscribeLastMessagesRequest))
	})
	return _c
}

func (_c *MockService_SubscribeLastMessages_Call) Return(_a0 *chatsubscription.SubscribeLastMessagesResponse, _a1 error) *MockService_SubscribeLastMessages_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_SubscribeLastMessages_Call) RunAndReturn(run func(context.Context, chatsubscription.SubscribeLastMessagesRequest) (*chatsubscription.SubscribeLastMessagesResponse, error)) *MockService_SubscribeLastMessages_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string) error); ok {
		r0 = rf(chatObjectId, 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
//   - chatObjectId string
//   - subId string
func (_e *MockService_Expecter) Unsubscribe(chatObjectId interface{}, subId interface{}) *MockService_Unsubscribe_Call {
	return &MockService_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", chatObjectId, subId)}
}

func (_c *MockService_Unsubscribe_Call) Run(run func(chatObjectId string, subId string)) *MockService_Unsubscribe_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(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, 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
}
