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

package mock_wal

import (
	context "context"

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

	types "github.com/milvus-io/milvus/pkg/v2/streaming/util/types"

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

// MockWAL is an autogenerated mock type for the WAL type
type MockWAL struct {
	mock.Mock
}

type MockWAL_Expecter struct {
	mock *mock.Mock
}

func (_m *MockWAL) EXPECT() *MockWAL_Expecter {
	return &MockWAL_Expecter{mock: &_m.Mock}
}

// Append provides a mock function with given fields: ctx, msg
func (_m *MockWAL) Append(ctx context.Context, msg message.MutableMessage) (*wal.AppendResult, error) {
	ret := _m.Called(ctx, msg)

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

	var r0 *wal.AppendResult
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, message.MutableMessage) (*wal.AppendResult, error)); ok {
		return rf(ctx, msg)
	}
	if rf, ok := ret.Get(0).(func(context.Context, message.MutableMessage) *wal.AppendResult); ok {
		r0 = rf(ctx, msg)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*wal.AppendResult)
		}
	}

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

	return r0, r1
}

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

// Append is a helper method to define mock.On call
//   - ctx context.Context
//   - msg message.MutableMessage
func (_e *MockWAL_Expecter) Append(ctx interface{}, msg interface{}) *MockWAL_Append_Call {
	return &MockWAL_Append_Call{Call: _e.mock.On("Append", ctx, msg)}
}

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

func (_c *MockWAL_Append_Call) Return(_a0 *wal.AppendResult, _a1 error) *MockWAL_Append_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockWAL_Append_Call) RunAndReturn(run func(context.Context, message.MutableMessage) (*wal.AppendResult, error)) *MockWAL_Append_Call {
	_c.Call.Return(run)
	return _c
}

// AppendAsync provides a mock function with given fields: ctx, msg, cb
func (_m *MockWAL) AppendAsync(ctx context.Context, msg message.MutableMessage, cb func(*wal.AppendResult, error)) {
	_m.Called(ctx, msg, cb)
}

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

// AppendAsync is a helper method to define mock.On call
//   - ctx context.Context
//   - msg message.MutableMessage
//   - cb func(*wal.AppendResult , error)
func (_e *MockWAL_Expecter) AppendAsync(ctx interface{}, msg interface{}, cb interface{}) *MockWAL_AppendAsync_Call {
	return &MockWAL_AppendAsync_Call{Call: _e.mock.On("AppendAsync", ctx, msg, cb)}
}

func (_c *MockWAL_AppendAsync_Call) Run(run func(ctx context.Context, msg message.MutableMessage, cb func(*wal.AppendResult, error))) *MockWAL_AppendAsync_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(message.MutableMessage), args[2].(func(*wal.AppendResult, error)))
	})
	return _c
}

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

func (_c *MockWAL_AppendAsync_Call) RunAndReturn(run func(context.Context, message.MutableMessage, func(*wal.AppendResult, error))) *MockWAL_AppendAsync_Call {
	_c.Run(run)
	return _c
}

// Available provides a mock function with no fields
func (_m *MockWAL) Available() <-chan struct{} {
	ret := _m.Called()

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

	var r0 <-chan struct{}
	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(<-chan struct{})
		}
	}

	return r0
}

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

// Available is a helper method to define mock.On call
func (_e *MockWAL_Expecter) Available() *MockWAL_Available_Call {
	return &MockWAL_Available_Call{Call: _e.mock.On("Available")}
}

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

func (_c *MockWAL_Available_Call) Return(_a0 <-chan struct{}) *MockWAL_Available_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWAL_Available_Call) RunAndReturn(run func() <-chan struct{}) *MockWAL_Available_Call {
	_c.Call.Return(run)
	return _c
}

// Channel provides a mock function with no fields
func (_m *MockWAL) Channel() types.PChannelInfo {
	ret := _m.Called()

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

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

	return r0
}

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

// Channel is a helper method to define mock.On call
func (_e *MockWAL_Expecter) Channel() *MockWAL_Channel_Call {
	return &MockWAL_Channel_Call{Call: _e.mock.On("Channel")}
}

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

func (_c *MockWAL_Channel_Call) Return(_a0 types.PChannelInfo) *MockWAL_Channel_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWAL_Channel_Call) RunAndReturn(run func() types.PChannelInfo) *MockWAL_Channel_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

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

// GetLatestMVCCTimestamp provides a mock function with given fields: ctx, vchannel
func (_m *MockWAL) GetLatestMVCCTimestamp(ctx context.Context, vchannel string) (uint64, error) {
	ret := _m.Called(ctx, vchannel)

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

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

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

	return r0, r1
}

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

// GetLatestMVCCTimestamp is a helper method to define mock.On call
//   - ctx context.Context
//   - vchannel string
func (_e *MockWAL_Expecter) GetLatestMVCCTimestamp(ctx interface{}, vchannel interface{}) *MockWAL_GetLatestMVCCTimestamp_Call {
	return &MockWAL_GetLatestMVCCTimestamp_Call{Call: _e.mock.On("GetLatestMVCCTimestamp", ctx, vchannel)}
}

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

func (_c *MockWAL_GetLatestMVCCTimestamp_Call) Return(_a0 uint64, _a1 error) *MockWAL_GetLatestMVCCTimestamp_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

// GetReplicateCheckpoint provides a mock function with no fields
func (_m *MockWAL) GetReplicateCheckpoint() (*wal.ReplicateCheckpoint, error) {
	ret := _m.Called()

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

	var r0 *wal.ReplicateCheckpoint
	var r1 error
	if rf, ok := ret.Get(0).(func() (*wal.ReplicateCheckpoint, error)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() *wal.ReplicateCheckpoint); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*wal.ReplicateCheckpoint)
		}
	}

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

	return r0, r1
}

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

// GetReplicateCheckpoint is a helper method to define mock.On call
func (_e *MockWAL_Expecter) GetReplicateCheckpoint() *MockWAL_GetReplicateCheckpoint_Call {
	return &MockWAL_GetReplicateCheckpoint_Call{Call: _e.mock.On("GetReplicateCheckpoint")}
}

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

func (_c *MockWAL_GetReplicateCheckpoint_Call) Return(_a0 *wal.ReplicateCheckpoint, _a1 error) *MockWAL_GetReplicateCheckpoint_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockWAL_GetReplicateCheckpoint_Call) RunAndReturn(run func() (*wal.ReplicateCheckpoint, error)) *MockWAL_GetReplicateCheckpoint_Call {
	_c.Call.Return(run)
	return _c
}

// IsAvailable provides a mock function with no fields
func (_m *MockWAL) IsAvailable() bool {
	ret := _m.Called()

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

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

	return r0
}

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

// IsAvailable is a helper method to define mock.On call
func (_e *MockWAL_Expecter) IsAvailable() *MockWAL_IsAvailable_Call {
	return &MockWAL_IsAvailable_Call{Call: _e.mock.On("IsAvailable")}
}

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

func (_c *MockWAL_IsAvailable_Call) Return(_a0 bool) *MockWAL_IsAvailable_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWAL_IsAvailable_Call) RunAndReturn(run func() bool) *MockWAL_IsAvailable_Call {
	_c.Call.Return(run)
	return _c
}

// Metrics provides a mock function with no fields
func (_m *MockWAL) Metrics() types.WALMetrics {
	ret := _m.Called()

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

	var r0 types.WALMetrics
	if rf, ok := ret.Get(0).(func() types.WALMetrics); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(types.WALMetrics)
		}
	}

	return r0
}

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

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

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

func (_c *MockWAL_Metrics_Call) Return(_a0 types.WALMetrics) *MockWAL_Metrics_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWAL_Metrics_Call) RunAndReturn(run func() types.WALMetrics) *MockWAL_Metrics_Call {
	_c.Call.Return(run)
	return _c
}

// Read provides a mock function with given fields: ctx, deliverPolicy
func (_m *MockWAL) Read(ctx context.Context, deliverPolicy wal.ReadOption) (wal.Scanner, error) {
	ret := _m.Called(ctx, deliverPolicy)

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

	var r0 wal.Scanner
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, wal.ReadOption) (wal.Scanner, error)); ok {
		return rf(ctx, deliverPolicy)
	}
	if rf, ok := ret.Get(0).(func(context.Context, wal.ReadOption) wal.Scanner); ok {
		r0 = rf(ctx, deliverPolicy)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(wal.Scanner)
		}
	}

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

	return r0, r1
}

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

// Read is a helper method to define mock.On call
//   - ctx context.Context
//   - deliverPolicy wal.ReadOption
func (_e *MockWAL_Expecter) Read(ctx interface{}, deliverPolicy interface{}) *MockWAL_Read_Call {
	return &MockWAL_Read_Call{Call: _e.mock.On("Read", ctx, deliverPolicy)}
}

func (_c *MockWAL_Read_Call) Run(run func(ctx context.Context, deliverPolicy wal.ReadOption)) *MockWAL_Read_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(wal.ReadOption))
	})
	return _c
}

func (_c *MockWAL_Read_Call) Return(_a0 wal.Scanner, _a1 error) *MockWAL_Read_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockWAL_Read_Call) RunAndReturn(run func(context.Context, wal.ReadOption) (wal.Scanner, error)) *MockWAL_Read_Call {
	_c.Call.Return(run)
	return _c
}

// WALName provides a mock function with no fields
func (_m *MockWAL) WALName() message.WALName {
	ret := _m.Called()

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

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

	return r0
}

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

// WALName is a helper method to define mock.On call
func (_e *MockWAL_Expecter) WALName() *MockWAL_WALName_Call {
	return &MockWAL_WALName_Call{Call: _e.mock.On("WALName")}
}

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

func (_c *MockWAL_WALName_Call) Return(_a0 message.WALName) *MockWAL_WALName_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWAL_WALName_Call) RunAndReturn(run func() message.WALName) *MockWAL_WALName_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
