// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/anyproto/any-sync-node/nodehead (interfaces: NodeHead)
//
// Generated by this command:
//
//	mockgen -destination mock_nodehead/mock_nodehead.go github.com/anyproto/any-sync-node/nodehead NodeHead
//

// Package mock_nodehead is a generated GoMock package.
package mock_nodehead

import (
	context "context"
	reflect "reflect"

	app "github.com/anyproto/any-sync/app"
	ldiff "github.com/anyproto/any-sync/app/ldiff"
	gomock "go.uber.org/mock/gomock"
)

// MockNodeHead is a mock of NodeHead interface.
type MockNodeHead struct {
	ctrl     *gomock.Controller
	recorder *MockNodeHeadMockRecorder
	isgomock struct{}
}

// MockNodeHeadMockRecorder is the mock recorder for MockNodeHead.
type MockNodeHeadMockRecorder struct {
	mock *MockNodeHead
}

// NewMockNodeHead creates a new mock instance.
func NewMockNodeHead(ctrl *gomock.Controller) *MockNodeHead {
	mock := &MockNodeHead{ctrl: ctrl}
	mock.recorder = &MockNodeHeadMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockNodeHead) EXPECT() *MockNodeHeadMockRecorder {
	return m.recorder
}

// Close mocks base method.
func (m *MockNodeHead) Close(ctx context.Context) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close", ctx)
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close.
func (mr *MockNodeHeadMockRecorder) Close(ctx any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockNodeHead)(nil).Close), ctx)
}

// DeleteHeads mocks base method.
func (m *MockNodeHead) DeleteHeads(spaceId string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteHeads", spaceId)
	ret0, _ := ret[0].(error)
	return ret0
}

// DeleteHeads indicates an expected call of DeleteHeads.
func (mr *MockNodeHeadMockRecorder) DeleteHeads(spaceId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteHeads", reflect.TypeOf((*MockNodeHead)(nil).DeleteHeads), spaceId)
}

// GetHead mocks base method.
func (m *MockNodeHead) GetHead(spaceId string) (string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetHead", spaceId)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetHead indicates an expected call of GetHead.
func (mr *MockNodeHeadMockRecorder) GetHead(spaceId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHead", reflect.TypeOf((*MockNodeHead)(nil).GetHead), spaceId)
}

// GetOldHead mocks base method.
func (m *MockNodeHead) GetOldHead(spaceId string) (string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetOldHead", spaceId)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetOldHead indicates an expected call of GetOldHead.
func (mr *MockNodeHeadMockRecorder) GetOldHead(spaceId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOldHead", reflect.TypeOf((*MockNodeHead)(nil).GetOldHead), spaceId)
}

// Init mocks base method.
func (m *MockNodeHead) Init(a *app.App) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Init", a)
	ret0, _ := ret[0].(error)
	return ret0
}

// Init indicates an expected call of Init.
func (mr *MockNodeHeadMockRecorder) Init(a any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockNodeHead)(nil).Init), a)
}

// LDiff mocks base method.
func (m *MockNodeHead) LDiff(partId int) ldiff.Diff {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "LDiff", partId)
	ret0, _ := ret[0].(ldiff.Diff)
	return ret0
}

// LDiff indicates an expected call of LDiff.
func (mr *MockNodeHeadMockRecorder) LDiff(partId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LDiff", reflect.TypeOf((*MockNodeHead)(nil).LDiff), partId)
}

// Name mocks base method.
func (m *MockNodeHead) Name() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Name")
	ret0, _ := ret[0].(string)
	return ret0
}

// Name indicates an expected call of Name.
func (mr *MockNodeHeadMockRecorder) Name() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockNodeHead)(nil).Name))
}

// Ranges mocks base method.
func (m *MockNodeHead) Ranges(ctx context.Context, part int, ranges []ldiff.Range, resBuf []ldiff.RangeResult) ([]ldiff.RangeResult, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Ranges", ctx, part, ranges, resBuf)
	ret0, _ := ret[0].([]ldiff.RangeResult)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Ranges indicates an expected call of Ranges.
func (mr *MockNodeHeadMockRecorder) Ranges(ctx, part, ranges, resBuf any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ranges", reflect.TypeOf((*MockNodeHead)(nil).Ranges), ctx, part, ranges, resBuf)
}

// ReloadHeadFromStore mocks base method.
func (m *MockNodeHead) ReloadHeadFromStore(ctx context.Context, spaceId string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ReloadHeadFromStore", ctx, spaceId)
	ret0, _ := ret[0].(error)
	return ret0
}

// ReloadHeadFromStore indicates an expected call of ReloadHeadFromStore.
func (mr *MockNodeHeadMockRecorder) ReloadHeadFromStore(ctx, spaceId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReloadHeadFromStore", reflect.TypeOf((*MockNodeHead)(nil).ReloadHeadFromStore), ctx, spaceId)
}

// Run mocks base method.
func (m *MockNodeHead) Run(ctx context.Context) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Run", ctx)
	ret0, _ := ret[0].(error)
	return ret0
}

// Run indicates an expected call of Run.
func (mr *MockNodeHeadMockRecorder) Run(ctx any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockNodeHead)(nil).Run), ctx)
}

// SetHead mocks base method.
func (m *MockNodeHead) SetHead(spaceId, oldHead, newHead string) (int, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SetHead", spaceId, oldHead, newHead)
	ret0, _ := ret[0].(int)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// SetHead indicates an expected call of SetHead.
func (mr *MockNodeHeadMockRecorder) SetHead(spaceId, oldHead, newHead any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHead", reflect.TypeOf((*MockNodeHead)(nil).SetHead), spaceId, oldHead, newHead)
}
