// Code generated by mockery v2.53.3. DO NOT EDIT.

package mock_recovery

import (
	context "context"

	message "github.com/milvus-io/milvus/pkg/v3/streaming/util/message"
	mock "github.com/stretchr/testify/mock"

	recovery "github.com/milvus-io/milvus/internal/streamingnode/server/wal/recovery"

	schemapb "github.com/milvus-io/milvus-proto/go-api/v3/schemapb"
)

// MockRecoveryStorage is an autogenerated mock type for the RecoveryStorage type
type MockRecoveryStorage struct {
	mock.Mock
}

type MockRecoveryStorage_Expecter struct {
	mock *mock.Mock
}

func (_m *MockRecoveryStorage) EXPECT() *MockRecoveryStorage_Expecter {
	return &MockRecoveryStorage_Expecter{mock: &_m.Mock}
}

// Close provides a mock function with no fields
func (_m *MockRecoveryStorage) Close() {
	_m.Called()
}

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

// Close is a helper method to define mock.On call
func (_e *MockRecoveryStorage_Expecter) Close() *MockRecoveryStorage_Close_Call {
	return &MockRecoveryStorage_Close_Call{Call: _e.mock.On("Close")}
}

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

func (_c *MockRecoveryStorage_Close_Call) Return() *MockRecoveryStorage_Close_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockRecoveryStorage_Close_Call) RunAndReturn(run func()) *MockRecoveryStorage_Close_Call {
	_c.Run(run)
	return _c
}

// GetFlusherCheckpointByTimeTick provides a mock function with given fields: ctx
func (_m *MockRecoveryStorage) GetFlusherCheckpointByTimeTick(ctx context.Context) *recovery.WALCheckpoint {
	ret := _m.Called(ctx)

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

	var r0 *recovery.WALCheckpoint
	if rf, ok := ret.Get(0).(func(context.Context) *recovery.WALCheckpoint); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*recovery.WALCheckpoint)
		}
	}

	return r0
}

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

// GetFlusherCheckpointByTimeTick is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockRecoveryStorage_Expecter) GetFlusherCheckpointByTimeTick(ctx interface{}) *MockRecoveryStorage_GetFlusherCheckpointByTimeTick_Call {
	return &MockRecoveryStorage_GetFlusherCheckpointByTimeTick_Call{Call: _e.mock.On("GetFlusherCheckpointByTimeTick", ctx)}
}

func (_c *MockRecoveryStorage_GetFlusherCheckpointByTimeTick_Call) Run(run func(ctx context.Context)) *MockRecoveryStorage_GetFlusherCheckpointByTimeTick_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *MockRecoveryStorage_GetFlusherCheckpointByTimeTick_Call) Return(_a0 *recovery.WALCheckpoint) *MockRecoveryStorage_GetFlusherCheckpointByTimeTick_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockRecoveryStorage_GetFlusherCheckpointByTimeTick_Call) RunAndReturn(run func(context.Context) *recovery.WALCheckpoint) *MockRecoveryStorage_GetFlusherCheckpointByTimeTick_Call {
	_c.Call.Return(run)
	return _c
}

// GetSchema provides a mock function with given fields: ctx, vchannel, timetick
func (_m *MockRecoveryStorage) GetSchema(ctx context.Context, vchannel string, timetick uint64) (*schemapb.CollectionSchema, error) {
	ret := _m.Called(ctx, vchannel, timetick)

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

	var r0 *schemapb.CollectionSchema
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, uint64) (*schemapb.CollectionSchema, error)); ok {
		return rf(ctx, vchannel, timetick)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, uint64) *schemapb.CollectionSchema); ok {
		r0 = rf(ctx, vchannel, timetick)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*schemapb.CollectionSchema)
		}
	}

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

	return r0, r1
}

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

// GetSchema is a helper method to define mock.On call
//   - ctx context.Context
//   - vchannel string
//   - timetick uint64
func (_e *MockRecoveryStorage_Expecter) GetSchema(ctx interface{}, vchannel interface{}, timetick interface{}) *MockRecoveryStorage_GetSchema_Call {
	return &MockRecoveryStorage_GetSchema_Call{Call: _e.mock.On("GetSchema", ctx, vchannel, timetick)}
}

func (_c *MockRecoveryStorage_GetSchema_Call) Run(run func(ctx context.Context, vchannel string, timetick uint64)) *MockRecoveryStorage_GetSchema_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(uint64))
	})
	return _c
}

func (_c *MockRecoveryStorage_GetSchema_Call) Return(_a0 *schemapb.CollectionSchema, _a1 error) *MockRecoveryStorage_GetSchema_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockRecoveryStorage_GetSchema_Call) RunAndReturn(run func(context.Context, string, uint64) (*schemapb.CollectionSchema, error)) *MockRecoveryStorage_GetSchema_Call {
	_c.Call.Return(run)
	return _c
}

// Metrics provides a mock function with no fields
func (_m *MockRecoveryStorage) Metrics() recovery.RecoveryMetrics {
	ret := _m.Called()

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

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

	return r0
}

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

// Metrics is a helper method to define mock.On call
func (_e *MockRecoveryStorage_Expecter) Metrics() *MockRecoveryStorage_Metrics_Call {
	return &MockRecoveryStorage_Metrics_Call{Call: _e.mock.On("Metrics")}
}

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

func (_c *MockRecoveryStorage_Metrics_Call) Return(_a0 recovery.RecoveryMetrics) *MockRecoveryStorage_Metrics_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockRecoveryStorage_Metrics_Call) RunAndReturn(run func() recovery.RecoveryMetrics) *MockRecoveryStorage_Metrics_Call {
	_c.Call.Return(run)
	return _c
}

// ObserveMessage provides a mock function with given fields: ctx, msg
func (_m *MockRecoveryStorage) ObserveMessage(ctx context.Context, msg message.ImmutableMessage) error {
	ret := _m.Called(ctx, msg)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, message.ImmutableMessage) error); ok {
		r0 = rf(ctx, msg)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// ObserveMessage is a helper method to define mock.On call
//   - ctx context.Context
//   - msg message.ImmutableMessage
func (_e *MockRecoveryStorage_Expecter) ObserveMessage(ctx interface{}, msg interface{}) *MockRecoveryStorage_ObserveMessage_Call {
	return &MockRecoveryStorage_ObserveMessage_Call{Call: _e.mock.On("ObserveMessage", ctx, msg)}
}

func (_c *MockRecoveryStorage_ObserveMessage_Call) Run(run func(ctx context.Context, msg message.ImmutableMessage)) *MockRecoveryStorage_ObserveMessage_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(message.ImmutableMessage))
	})
	return _c
}

func (_c *MockRecoveryStorage_ObserveMessage_Call) Return(_a0 error) *MockRecoveryStorage_ObserveMessage_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockRecoveryStorage_ObserveMessage_Call) RunAndReturn(run func(context.Context, message.ImmutableMessage) error) *MockRecoveryStorage_ObserveMessage_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateFlusherCheckpoint provides a mock function with given fields: vchannel, checkpoint
func (_m *MockRecoveryStorage) UpdateFlusherCheckpoint(vchannel string, checkpoint *recovery.WALCheckpoint) {
	_m.Called(vchannel, checkpoint)
}

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

// UpdateFlusherCheckpoint is a helper method to define mock.On call
//   - vchannel string
//   - checkpoint *recovery.WALCheckpoint
func (_e *MockRecoveryStorage_Expecter) UpdateFlusherCheckpoint(vchannel interface{}, checkpoint interface{}) *MockRecoveryStorage_UpdateFlusherCheckpoint_Call {
	return &MockRecoveryStorage_UpdateFlusherCheckpoint_Call{Call: _e.mock.On("UpdateFlusherCheckpoint", vchannel, checkpoint)}
}

func (_c *MockRecoveryStorage_UpdateFlusherCheckpoint_Call) Run(run func(vchannel string, checkpoint *recovery.WALCheckpoint)) *MockRecoveryStorage_UpdateFlusherCheckpoint_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(*recovery.WALCheckpoint))
	})
	return _c
}

func (_c *MockRecoveryStorage_UpdateFlusherCheckpoint_Call) Return() *MockRecoveryStorage_UpdateFlusherCheckpoint_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockRecoveryStorage_UpdateFlusherCheckpoint_Call) RunAndReturn(run func(string, *recovery.WALCheckpoint)) *MockRecoveryStorage_UpdateFlusherCheckpoint_Call {
	_c.Run(run)
	return _c
}

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

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

	return mock
}
