// Code generated by mockery. DO NOT EDIT.

package mock_cache

import (
	context "context"

	domain "github.com/anyproto/anytype-heart/core/domain"
	mock "github.com/stretchr/testify/mock"

	smartblock "github.com/anyproto/anytype-heart/core/block/editor/smartblock"
)

// MockCachedObjectGetter is an autogenerated mock type for the CachedObjectGetter type
type MockCachedObjectGetter struct {
	mock.Mock
}

type MockCachedObjectGetter_Expecter struct {
	mock *mock.Mock
}

func (_m *MockCachedObjectGetter) EXPECT() *MockCachedObjectGetter_Expecter {
	return &MockCachedObjectGetter_Expecter{mock: &_m.Mock}
}

// GetObject provides a mock function with given fields: ctx, objectID
func (_m *MockCachedObjectGetter) GetObject(ctx context.Context, objectID string) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, objectID)

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

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, objectID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) smartblock.SmartBlock); ok {
		r0 = rf(ctx, objectID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

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

	return r0, r1
}

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

// GetObject is a helper method to define mock.On call
//   - ctx context.Context
//   - objectID string
func (_e *MockCachedObjectGetter_Expecter) GetObject(ctx interface{}, objectID interface{}) *MockCachedObjectGetter_GetObject_Call {
	return &MockCachedObjectGetter_GetObject_Call{Call: _e.mock.On("GetObject", ctx, objectID)}
}

func (_c *MockCachedObjectGetter_GetObject_Call) Run(run func(ctx context.Context, objectID string)) *MockCachedObjectGetter_GetObject_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockCachedObjectGetter_GetObject_Call) Return(sb smartblock.SmartBlock, err error) *MockCachedObjectGetter_GetObject_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockCachedObjectGetter_GetObject_Call) RunAndReturn(run func(context.Context, string) (smartblock.SmartBlock, error)) *MockCachedObjectGetter_GetObject_Call {
	_c.Call.Return(run)
	return _c
}

// GetObjectByFullID provides a mock function with given fields: ctx, id
func (_m *MockCachedObjectGetter) GetObjectByFullID(ctx context.Context, id domain.FullID) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, id)

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

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, domain.FullID) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, id)
	}
	if rf, ok := ret.Get(0).(func(context.Context, domain.FullID) smartblock.SmartBlock); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, domain.FullID) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetObjectByFullID is a helper method to define mock.On call
//   - ctx context.Context
//   - id domain.FullID
func (_e *MockCachedObjectGetter_Expecter) GetObjectByFullID(ctx interface{}, id interface{}) *MockCachedObjectGetter_GetObjectByFullID_Call {
	return &MockCachedObjectGetter_GetObjectByFullID_Call{Call: _e.mock.On("GetObjectByFullID", ctx, id)}
}

func (_c *MockCachedObjectGetter_GetObjectByFullID_Call) Run(run func(ctx context.Context, id domain.FullID)) *MockCachedObjectGetter_GetObjectByFullID_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(domain.FullID))
	})
	return _c
}

func (_c *MockCachedObjectGetter_GetObjectByFullID_Call) Return(sb smartblock.SmartBlock, err error) *MockCachedObjectGetter_GetObjectByFullID_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockCachedObjectGetter_GetObjectByFullID_Call) RunAndReturn(run func(context.Context, domain.FullID) (smartblock.SmartBlock, error)) *MockCachedObjectGetter_GetObjectByFullID_Call {
	_c.Call.Return(run)
	return _c
}

// TryRemoveFromCache provides a mock function with given fields: ctx, objectId
func (_m *MockCachedObjectGetter) TryRemoveFromCache(ctx context.Context, objectId string) (bool, error) {
	ret := _m.Called(ctx, objectId)

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

	var r0 bool
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
		return rf(ctx, objectId)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) bool); ok {
		r0 = rf(ctx, objectId)
	} else {
		r0 = ret.Get(0).(bool)
	}

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

	return r0, r1
}

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

// TryRemoveFromCache is a helper method to define mock.On call
//   - ctx context.Context
//   - objectId string
func (_e *MockCachedObjectGetter_Expecter) TryRemoveFromCache(ctx interface{}, objectId interface{}) *MockCachedObjectGetter_TryRemoveFromCache_Call {
	return &MockCachedObjectGetter_TryRemoveFromCache_Call{Call: _e.mock.On("TryRemoveFromCache", ctx, objectId)}
}

func (_c *MockCachedObjectGetter_TryRemoveFromCache_Call) Run(run func(ctx context.Context, objectId string)) *MockCachedObjectGetter_TryRemoveFromCache_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockCachedObjectGetter_TryRemoveFromCache_Call) Return(res bool, err error) *MockCachedObjectGetter_TryRemoveFromCache_Call {
	_c.Call.Return(res, err)
	return _c
}

func (_c *MockCachedObjectGetter_TryRemoveFromCache_Call) RunAndReturn(run func(context.Context, string) (bool, error)) *MockCachedObjectGetter_TryRemoveFromCache_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
