// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/anyproto/any-sync/commonspace/object/tree/synctree (interfaces: SyncTree,HeadNotifiable,SyncClient,RequestFactory)
//
// Generated by this command:
//
//	mockgen -destination mock_synctree/mock_synctree.go github.com/anyproto/any-sync/commonspace/object/tree/synctree SyncTree,HeadNotifiable,SyncClient,RequestFactory
//

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

import (
	context "context"
	reflect "reflect"
	time "time"

	list "github.com/anyproto/any-sync/commonspace/object/acl/list"
	objecttree "github.com/anyproto/any-sync/commonspace/object/tree/objecttree"
	response "github.com/anyproto/any-sync/commonspace/object/tree/synctree/response"
	updatelistener "github.com/anyproto/any-sync/commonspace/object/tree/synctree/updatelistener"
	treechangeproto "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto"
	objectmessages "github.com/anyproto/any-sync/commonspace/sync/objectsync/objectmessages"
	syncdeps "github.com/anyproto/any-sync/commonspace/sync/syncdeps"
	syncstatus "github.com/anyproto/any-sync/commonspace/syncstatus"
	peer "github.com/anyproto/any-sync/net/peer"
	gomock "go.uber.org/mock/gomock"
	proto "google.golang.org/protobuf/proto"
	drpc "storj.io/drpc"
)

// MockSyncTree is a mock of SyncTree interface.
type MockSyncTree struct {
	ctrl     *gomock.Controller
	recorder *MockSyncTreeMockRecorder
	isgomock struct{}
}

// MockSyncTreeMockRecorder is the mock recorder for MockSyncTree.
type MockSyncTreeMockRecorder struct {
	mock *MockSyncTree
}

// NewMockSyncTree creates a new mock instance.
func NewMockSyncTree(ctrl *gomock.Controller) *MockSyncTree {
	mock := &MockSyncTree{ctrl: ctrl}
	mock.recorder = &MockSyncTreeMockRecorder{mock}
	return mock
}

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

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

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

// AddContent mocks base method.
func (m *MockSyncTree) AddContent(ctx context.Context, content objecttree.SignableChangeContent) (objecttree.AddResult, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddContent", ctx, content)
	ret0, _ := ret[0].(objecttree.AddResult)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

// AddContentWithValidator mocks base method.
func (m *MockSyncTree) AddContentWithValidator(ctx context.Context, content objecttree.SignableChangeContent, validate objecttree.ChangeValidator) (objecttree.AddResult, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddContentWithValidator", ctx, content, validate)
	ret0, _ := ret[0].(objecttree.AddResult)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// AddContentWithValidator indicates an expected call of AddContentWithValidator.
func (mr *MockSyncTreeMockRecorder) AddContentWithValidator(ctx, content, validate any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddContentWithValidator", reflect.TypeOf((*MockSyncTree)(nil).AddContentWithValidator), ctx, content, validate)
}

// AddRawChanges mocks base method.
func (m *MockSyncTree) AddRawChanges(ctx context.Context, changes objecttree.RawChangesPayload) (objecttree.AddResult, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddRawChanges", ctx, changes)
	ret0, _ := ret[0].(objecttree.AddResult)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

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

// AddRawChangesFromPeer mocks base method.
func (m *MockSyncTree) AddRawChangesFromPeer(ctx context.Context, peerId string, changesPayload objecttree.RawChangesPayload) (objecttree.AddResult, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddRawChangesFromPeer", ctx, peerId, changesPayload)
	ret0, _ := ret[0].(objecttree.AddResult)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// AddRawChangesFromPeer indicates an expected call of AddRawChangesFromPeer.
func (mr *MockSyncTreeMockRecorder) AddRawChangesFromPeer(ctx, peerId, changesPayload any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChangesFromPeer", reflect.TypeOf((*MockSyncTree)(nil).AddRawChangesFromPeer), ctx, peerId, changesPayload)
}

// AddRawChangesWithUpdater mocks base method.
func (m *MockSyncTree) AddRawChangesWithUpdater(ctx context.Context, changes objecttree.RawChangesPayload, updater objecttree.Updater) (objecttree.AddResult, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddRawChangesWithUpdater", ctx, changes, updater)
	ret0, _ := ret[0].(objecttree.AddResult)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// AddRawChangesWithUpdater indicates an expected call of AddRawChangesWithUpdater.
func (mr *MockSyncTreeMockRecorder) AddRawChangesWithUpdater(ctx, changes, updater any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRawChangesWithUpdater", reflect.TypeOf((*MockSyncTree)(nil).AddRawChangesWithUpdater), ctx, changes, updater)
}

// ChangeInfo mocks base method.
func (m *MockSyncTree) ChangeInfo() *treechangeproto.TreeChangeInfo {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ChangeInfo")
	ret0, _ := ret[0].(*treechangeproto.TreeChangeInfo)
	return ret0
}

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

// ChangesAfterCommonSnapshotLoader mocks base method.
func (m *MockSyncTree) ChangesAfterCommonSnapshotLoader(snapshotPath, heads []string) (objecttree.LoadIterator, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ChangesAfterCommonSnapshotLoader", snapshotPath, heads)
	ret0, _ := ret[0].(objecttree.LoadIterator)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// ChangesAfterCommonSnapshotLoader indicates an expected call of ChangesAfterCommonSnapshotLoader.
func (mr *MockSyncTreeMockRecorder) ChangesAfterCommonSnapshotLoader(snapshotPath, heads any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangesAfterCommonSnapshotLoader", reflect.TypeOf((*MockSyncTree)(nil).ChangesAfterCommonSnapshotLoader), snapshotPath, heads)
}

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

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

// Debug mocks base method.
func (m *MockSyncTree) Debug(parser objecttree.DescriptionParser) (objecttree.DebugInfo, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Debug", parser)
	ret0, _ := ret[0].(objecttree.DebugInfo)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Debug indicates an expected call of Debug.
func (mr *MockSyncTreeMockRecorder) Debug(parser any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockSyncTree)(nil).Debug), parser)
}

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

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

// GetChange mocks base method.
func (m *MockSyncTree) GetChange(arg0 string) (*objecttree.Change, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetChange", arg0)
	ret0, _ := ret[0].(*objecttree.Change)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetChange indicates an expected call of GetChange.
func (mr *MockSyncTreeMockRecorder) GetChange(arg0 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChange", reflect.TypeOf((*MockSyncTree)(nil).GetChange), arg0)
}

// HandleHeadUpdate mocks base method.
func (m *MockSyncTree) HandleHeadUpdate(ctx context.Context, statusUpdater syncstatus.StatusUpdater, headUpdate drpc.Message) (syncdeps.Request, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "HandleHeadUpdate", ctx, statusUpdater, headUpdate)
	ret0, _ := ret[0].(syncdeps.Request)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// HandleHeadUpdate indicates an expected call of HandleHeadUpdate.
func (mr *MockSyncTreeMockRecorder) HandleHeadUpdate(ctx, statusUpdater, headUpdate any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleHeadUpdate", reflect.TypeOf((*MockSyncTree)(nil).HandleHeadUpdate), ctx, statusUpdater, headUpdate)
}

// HandleResponse mocks base method.
func (m *MockSyncTree) HandleResponse(ctx context.Context, peerId, objectId string, resp syncdeps.Response) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "HandleResponse", ctx, peerId, objectId, resp)
	ret0, _ := ret[0].(error)
	return ret0
}

// HandleResponse indicates an expected call of HandleResponse.
func (mr *MockSyncTreeMockRecorder) HandleResponse(ctx, peerId, objectId, resp any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleResponse", reflect.TypeOf((*MockSyncTree)(nil).HandleResponse), ctx, peerId, objectId, resp)
}

// HandleStreamRequest mocks base method.
func (m *MockSyncTree) HandleStreamRequest(ctx context.Context, rq syncdeps.Request, updater syncdeps.QueueSizeUpdater, send func(proto.Message) error) (syncdeps.Request, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "HandleStreamRequest", ctx, rq, updater, send)
	ret0, _ := ret[0].(syncdeps.Request)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// HandleStreamRequest indicates an expected call of HandleStreamRequest.
func (mr *MockSyncTreeMockRecorder) HandleStreamRequest(ctx, rq, updater, send any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStreamRequest", reflect.TypeOf((*MockSyncTree)(nil).HandleStreamRequest), ctx, rq, updater, send)
}

// HasChanges mocks base method.
func (m *MockSyncTree) HasChanges(arg0 ...string) bool {
	m.ctrl.T.Helper()
	varargs := []any{}
	for _, a := range arg0 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "HasChanges", varargs...)
	ret0, _ := ret[0].(bool)
	return ret0
}

// HasChanges indicates an expected call of HasChanges.
func (mr *MockSyncTreeMockRecorder) HasChanges(arg0 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasChanges", reflect.TypeOf((*MockSyncTree)(nil).HasChanges), arg0...)
}

// Header mocks base method.
func (m *MockSyncTree) Header() *treechangeproto.RawTreeChangeWithId {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Header")
	ret0, _ := ret[0].(*treechangeproto.RawTreeChangeWithId)
	return ret0
}

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

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

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

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

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

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

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

// IterateFrom mocks base method.
func (m *MockSyncTree) IterateFrom(id string, convert objecttree.ChangeConvertFunc, iterate objecttree.ChangeIterateFunc) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IterateFrom", id, convert, iterate)
	ret0, _ := ret[0].(error)
	return ret0
}

// IterateFrom indicates an expected call of IterateFrom.
func (mr *MockSyncTreeMockRecorder) IterateFrom(id, convert, iterate any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateFrom", reflect.TypeOf((*MockSyncTree)(nil).IterateFrom), id, convert, iterate)
}

// IterateRoot mocks base method.
func (m *MockSyncTree) IterateRoot(convert objecttree.ChangeConvertFunc, iterate objecttree.ChangeIterateFunc) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IterateRoot", convert, iterate)
	ret0, _ := ret[0].(error)
	return ret0
}

// IterateRoot indicates an expected call of IterateRoot.
func (mr *MockSyncTreeMockRecorder) IterateRoot(convert, iterate any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateRoot", reflect.TypeOf((*MockSyncTree)(nil).IterateRoot), convert, iterate)
}

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

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

// Lock mocks base method.
func (m *MockSyncTree) Lock() {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Lock")
}

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

// PrepareChange mocks base method.
func (m *MockSyncTree) PrepareChange(content objecttree.SignableChangeContent) (*treechangeproto.RawTreeChangeWithId, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "PrepareChange", content)
	ret0, _ := ret[0].(*treechangeproto.RawTreeChangeWithId)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// PrepareChange indicates an expected call of PrepareChange.
func (mr *MockSyncTreeMockRecorder) PrepareChange(content any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareChange", reflect.TypeOf((*MockSyncTree)(nil).PrepareChange), content)
}

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

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

// Root mocks base method.
func (m *MockSyncTree) Root() *objecttree.Change {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Root")
	ret0, _ := ret[0].(*objecttree.Change)
	return ret0
}

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

// SetFlusher mocks base method.
func (m *MockSyncTree) SetFlusher(flusher objecttree.Flusher) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "SetFlusher", flusher)
}

// SetFlusher indicates an expected call of SetFlusher.
func (mr *MockSyncTreeMockRecorder) SetFlusher(flusher any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFlusher", reflect.TypeOf((*MockSyncTree)(nil).SetFlusher), flusher)
}

// SetListener mocks base method.
func (m *MockSyncTree) SetListener(listener updatelistener.UpdateListener) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "SetListener", listener)
}

// SetListener indicates an expected call of SetListener.
func (mr *MockSyncTreeMockRecorder) SetListener(listener any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetListener", reflect.TypeOf((*MockSyncTree)(nil).SetListener), listener)
}

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

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

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

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

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

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

// TryClose mocks base method.
func (m *MockSyncTree) TryClose(objectTTL time.Duration) (bool, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "TryClose", objectTTL)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// TryClose indicates an expected call of TryClose.
func (mr *MockSyncTreeMockRecorder) TryClose(objectTTL any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockSyncTree)(nil).TryClose), objectTTL)
}

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

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

// Unlock mocks base method.
func (m *MockSyncTree) Unlock() {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Unlock")
}

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

// UnmarshalledHeader mocks base method.
func (m *MockSyncTree) UnmarshalledHeader() *objecttree.Change {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UnmarshalledHeader")
	ret0, _ := ret[0].(*objecttree.Change)
	return ret0
}

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

// UnpackChange mocks base method.
func (m *MockSyncTree) UnpackChange(raw *treechangeproto.RawTreeChangeWithId) ([]byte, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UnpackChange", raw)
	ret0, _ := ret[0].([]byte)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UnpackChange indicates an expected call of UnpackChange.
func (mr *MockSyncTreeMockRecorder) UnpackChange(raw any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackChange", reflect.TypeOf((*MockSyncTree)(nil).UnpackChange), raw)
}

// MockHeadNotifiable is a mock of HeadNotifiable interface.
type MockHeadNotifiable struct {
	ctrl     *gomock.Controller
	recorder *MockHeadNotifiableMockRecorder
	isgomock struct{}
}

// MockHeadNotifiableMockRecorder is the mock recorder for MockHeadNotifiable.
type MockHeadNotifiableMockRecorder struct {
	mock *MockHeadNotifiable
}

// NewMockHeadNotifiable creates a new mock instance.
func NewMockHeadNotifiable(ctrl *gomock.Controller) *MockHeadNotifiable {
	mock := &MockHeadNotifiable{ctrl: ctrl}
	mock.recorder = &MockHeadNotifiableMockRecorder{mock}
	return mock
}

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

// UpdateHeads mocks base method.
func (m *MockHeadNotifiable) UpdateHeads(id string, heads []string) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "UpdateHeads", id, heads)
}

// UpdateHeads indicates an expected call of UpdateHeads.
func (mr *MockHeadNotifiableMockRecorder) UpdateHeads(id, heads any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateHeads", reflect.TypeOf((*MockHeadNotifiable)(nil).UpdateHeads), id, heads)
}

// MockSyncClient is a mock of SyncClient interface.
type MockSyncClient struct {
	ctrl     *gomock.Controller
	recorder *MockSyncClientMockRecorder
	isgomock struct{}
}

// MockSyncClientMockRecorder is the mock recorder for MockSyncClient.
type MockSyncClientMockRecorder struct {
	mock *MockSyncClient
}

// NewMockSyncClient creates a new mock instance.
func NewMockSyncClient(ctrl *gomock.Controller) *MockSyncClient {
	mock := &MockSyncClient{ctrl: ctrl}
	mock.recorder = &MockSyncClientMockRecorder{mock}
	return mock
}

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

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

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

// CreateFullSyncRequest mocks base method.
func (m *MockSyncClient) CreateFullSyncRequest(peerId string, t objecttree.ObjectTree) (*objectmessages.Request, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateFullSyncRequest", peerId, t)
	ret0, _ := ret[0].(*objectmessages.Request)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// CreateFullSyncRequest indicates an expected call of CreateFullSyncRequest.
func (mr *MockSyncClientMockRecorder) CreateFullSyncRequest(peerId, t any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncRequest", reflect.TypeOf((*MockSyncClient)(nil).CreateFullSyncRequest), peerId, t)
}

// CreateHeadUpdate mocks base method.
func (m *MockSyncClient) CreateHeadUpdate(t objecttree.ObjectTree, ignoredPeer string, added []*treechangeproto.RawTreeChangeWithId) (*objectmessages.HeadUpdate, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateHeadUpdate", t, ignoredPeer, added)
	ret0, _ := ret[0].(*objectmessages.HeadUpdate)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// CreateHeadUpdate indicates an expected call of CreateHeadUpdate.
func (mr *MockSyncClientMockRecorder) CreateHeadUpdate(t, ignoredPeer, added any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHeadUpdate", reflect.TypeOf((*MockSyncClient)(nil).CreateHeadUpdate), t, ignoredPeer, added)
}

// CreateNewTreeRequest mocks base method.
func (m *MockSyncClient) CreateNewTreeRequest(peerId, objectId string) *objectmessages.Request {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateNewTreeRequest", peerId, objectId)
	ret0, _ := ret[0].(*objectmessages.Request)
	return ret0
}

// CreateNewTreeRequest indicates an expected call of CreateNewTreeRequest.
func (mr *MockSyncClientMockRecorder) CreateNewTreeRequest(peerId, objectId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNewTreeRequest", reflect.TypeOf((*MockSyncClient)(nil).CreateNewTreeRequest), peerId, objectId)
}

// CreateResponseProducer mocks base method.
func (m *MockSyncClient) CreateResponseProducer(t objecttree.ObjectTree, theirHeads, theirSnapshotPath []string) (response.ResponseProducer, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateResponseProducer", t, theirHeads, theirSnapshotPath)
	ret0, _ := ret[0].(response.ResponseProducer)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// CreateResponseProducer indicates an expected call of CreateResponseProducer.
func (mr *MockSyncClientMockRecorder) CreateResponseProducer(t, theirHeads, theirSnapshotPath any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateResponseProducer", reflect.TypeOf((*MockSyncClient)(nil).CreateResponseProducer), t, theirHeads, theirSnapshotPath)
}

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

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

// SendTreeRequest mocks base method.
func (m *MockSyncClient) SendTreeRequest(ctx context.Context, req syncdeps.Request, collector syncdeps.ResponseCollector) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SendTreeRequest", ctx, req, collector)
	ret0, _ := ret[0].(error)
	return ret0
}

// SendTreeRequest indicates an expected call of SendTreeRequest.
func (mr *MockSyncClientMockRecorder) SendTreeRequest(ctx, req, collector any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTreeRequest", reflect.TypeOf((*MockSyncClient)(nil).SendTreeRequest), ctx, req, collector)
}

// MockRequestFactory is a mock of RequestFactory interface.
type MockRequestFactory struct {
	ctrl     *gomock.Controller
	recorder *MockRequestFactoryMockRecorder
	isgomock struct{}
}

// MockRequestFactoryMockRecorder is the mock recorder for MockRequestFactory.
type MockRequestFactoryMockRecorder struct {
	mock *MockRequestFactory
}

// NewMockRequestFactory creates a new mock instance.
func NewMockRequestFactory(ctrl *gomock.Controller) *MockRequestFactory {
	mock := &MockRequestFactory{ctrl: ctrl}
	mock.recorder = &MockRequestFactoryMockRecorder{mock}
	return mock
}

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

// CreateFullSyncRequest mocks base method.
func (m *MockRequestFactory) CreateFullSyncRequest(peerId string, t objecttree.ObjectTree) (*objectmessages.Request, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateFullSyncRequest", peerId, t)
	ret0, _ := ret[0].(*objectmessages.Request)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// CreateFullSyncRequest indicates an expected call of CreateFullSyncRequest.
func (mr *MockRequestFactoryMockRecorder) CreateFullSyncRequest(peerId, t any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateFullSyncRequest", reflect.TypeOf((*MockRequestFactory)(nil).CreateFullSyncRequest), peerId, t)
}

// CreateHeadUpdate mocks base method.
func (m *MockRequestFactory) CreateHeadUpdate(t objecttree.ObjectTree, ignoredPeer string, added []*treechangeproto.RawTreeChangeWithId) (*objectmessages.HeadUpdate, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateHeadUpdate", t, ignoredPeer, added)
	ret0, _ := ret[0].(*objectmessages.HeadUpdate)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// CreateHeadUpdate indicates an expected call of CreateHeadUpdate.
func (mr *MockRequestFactoryMockRecorder) CreateHeadUpdate(t, ignoredPeer, added any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHeadUpdate", reflect.TypeOf((*MockRequestFactory)(nil).CreateHeadUpdate), t, ignoredPeer, added)
}

// CreateNewTreeRequest mocks base method.
func (m *MockRequestFactory) CreateNewTreeRequest(peerId, objectId string) *objectmessages.Request {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateNewTreeRequest", peerId, objectId)
	ret0, _ := ret[0].(*objectmessages.Request)
	return ret0
}

// CreateNewTreeRequest indicates an expected call of CreateNewTreeRequest.
func (mr *MockRequestFactoryMockRecorder) CreateNewTreeRequest(peerId, objectId any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNewTreeRequest", reflect.TypeOf((*MockRequestFactory)(nil).CreateNewTreeRequest), peerId, objectId)
}

// CreateResponseProducer mocks base method.
func (m *MockRequestFactory) CreateResponseProducer(t objecttree.ObjectTree, theirHeads, theirSnapshotPath []string) (response.ResponseProducer, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateResponseProducer", t, theirHeads, theirSnapshotPath)
	ret0, _ := ret[0].(response.ResponseProducer)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// CreateResponseProducer indicates an expected call of CreateResponseProducer.
func (mr *MockRequestFactoryMockRecorder) CreateResponseProducer(t, theirHeads, theirSnapshotPath any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateResponseProducer", reflect.TypeOf((*MockRequestFactory)(nil).CreateResponseProducer), t, theirHeads, theirSnapshotPath)
}
