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

package mock_streaming

import (
	context "context"

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

	streaming "github.com/milvus-io/milvus/internal/distributed/streaming"

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

// MockWALAccesser is an autogenerated mock type for the WALAccesser type
type MockWALAccesser struct {
	mock.Mock
}

type MockWALAccesser_Expecter struct {
	mock *mock.Mock
}

func (_m *MockWALAccesser) EXPECT() *MockWALAccesser_Expecter {
	return &MockWALAccesser_Expecter{mock: &_m.Mock}
}

// AppendMessages provides a mock function with given fields: ctx, msgs
func (_m *MockWALAccesser) AppendMessages(ctx context.Context, msgs ...message.MutableMessage) types.AppendResponses {
	_va := make([]interface{}, len(msgs))
	for _i := range msgs {
		_va[_i] = msgs[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 types.AppendResponses
	if rf, ok := ret.Get(0).(func(context.Context, ...message.MutableMessage) types.AppendResponses); ok {
		r0 = rf(ctx, msgs...)
	} else {
		r0 = ret.Get(0).(types.AppendResponses)
	}

	return r0
}

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

// AppendMessages is a helper method to define mock.On call
//   - ctx context.Context
//   - msgs ...message.MutableMessage
func (_e *MockWALAccesser_Expecter) AppendMessages(ctx interface{}, msgs ...interface{}) *MockWALAccesser_AppendMessages_Call {
	return &MockWALAccesser_AppendMessages_Call{Call: _e.mock.On("AppendMessages",
		append([]interface{}{ctx}, msgs...)...)}
}

func (_c *MockWALAccesser_AppendMessages_Call) Run(run func(ctx context.Context, msgs ...message.MutableMessage)) *MockWALAccesser_AppendMessages_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]message.MutableMessage, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(message.MutableMessage)
			}
		}
		run(args[0].(context.Context), variadicArgs...)
	})
	return _c
}

func (_c *MockWALAccesser_AppendMessages_Call) Return(_a0 types.AppendResponses) *MockWALAccesser_AppendMessages_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWALAccesser_AppendMessages_Call) RunAndReturn(run func(context.Context, ...message.MutableMessage) types.AppendResponses) *MockWALAccesser_AppendMessages_Call {
	_c.Call.Return(run)
	return _c
}

// Balancer provides a mock function with no fields
func (_m *MockWALAccesser) Balancer() streaming.Balancer {
	ret := _m.Called()

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

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

	return r0
}

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

// Balancer is a helper method to define mock.On call
func (_e *MockWALAccesser_Expecter) Balancer() *MockWALAccesser_Balancer_Call {
	return &MockWALAccesser_Balancer_Call{Call: _e.mock.On("Balancer")}
}

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

func (_c *MockWALAccesser_Balancer_Call) Return(_a0 streaming.Balancer) *MockWALAccesser_Balancer_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWALAccesser_Balancer_Call) RunAndReturn(run func() streaming.Balancer) *MockWALAccesser_Balancer_Call {
	_c.Call.Return(run)
	return _c
}

// Broadcast provides a mock function with no fields
func (_m *MockWALAccesser) Broadcast() streaming.Broadcast {
	ret := _m.Called()

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

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

	return r0
}

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

// Broadcast is a helper method to define mock.On call
func (_e *MockWALAccesser_Expecter) Broadcast() *MockWALAccesser_Broadcast_Call {
	return &MockWALAccesser_Broadcast_Call{Call: _e.mock.On("Broadcast")}
}

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

func (_c *MockWALAccesser_Broadcast_Call) Return(_a0 streaming.Broadcast) *MockWALAccesser_Broadcast_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWALAccesser_Broadcast_Call) RunAndReturn(run func() streaming.Broadcast) *MockWALAccesser_Broadcast_Call {
	_c.Call.Return(run)
	return _c
}

// ControlChannel provides a mock function with no fields
func (_m *MockWALAccesser) ControlChannel() string {
	ret := _m.Called()

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

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

	return r0
}

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

// ControlChannel is a helper method to define mock.On call
func (_e *MockWALAccesser_Expecter) ControlChannel() *MockWALAccesser_ControlChannel_Call {
	return &MockWALAccesser_ControlChannel_Call{Call: _e.mock.On("ControlChannel")}
}

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

func (_c *MockWALAccesser_ControlChannel_Call) Return(_a0 string) *MockWALAccesser_ControlChannel_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWALAccesser_ControlChannel_Call) RunAndReturn(run func() string) *MockWALAccesser_ControlChannel_Call {
	_c.Call.Return(run)
	return _c
}

// ForwardService provides a mock function with no fields
func (_m *MockWALAccesser) ForwardService() streaming.ForwardService {
	ret := _m.Called()

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

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

	return r0
}

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

// ForwardService is a helper method to define mock.On call
func (_e *MockWALAccesser_Expecter) ForwardService() *MockWALAccesser_ForwardService_Call {
	return &MockWALAccesser_ForwardService_Call{Call: _e.mock.On("ForwardService")}
}

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

func (_c *MockWALAccesser_ForwardService_Call) Return(_a0 streaming.ForwardService) *MockWALAccesser_ForwardService_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWALAccesser_ForwardService_Call) RunAndReturn(run func() streaming.ForwardService) *MockWALAccesser_ForwardService_Call {
	_c.Call.Return(run)
	return _c
}

// Local provides a mock function with no fields
func (_m *MockWALAccesser) Local() streaming.Local {
	ret := _m.Called()

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

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

	return r0
}

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

// Local is a helper method to define mock.On call
func (_e *MockWALAccesser_Expecter) Local() *MockWALAccesser_Local_Call {
	return &MockWALAccesser_Local_Call{Call: _e.mock.On("Local")}
}

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

func (_c *MockWALAccesser_Local_Call) Return(_a0 streaming.Local) *MockWALAccesser_Local_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWALAccesser_Local_Call) RunAndReturn(run func() streaming.Local) *MockWALAccesser_Local_Call {
	_c.Call.Return(run)
	return _c
}

// RawAppend provides a mock function with given fields: ctx, msgs, opts
func (_m *MockWALAccesser) RawAppend(ctx context.Context, msgs message.MutableMessage, opts ...streaming.AppendOption) (*types.AppendResult, error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, msgs)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

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

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

	return r0, r1
}

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

// RawAppend is a helper method to define mock.On call
//   - ctx context.Context
//   - msgs message.MutableMessage
//   - opts ...streaming.AppendOption
func (_e *MockWALAccesser_Expecter) RawAppend(ctx interface{}, msgs interface{}, opts ...interface{}) *MockWALAccesser_RawAppend_Call {
	return &MockWALAccesser_RawAppend_Call{Call: _e.mock.On("RawAppend",
		append([]interface{}{ctx, msgs}, opts...)...)}
}

func (_c *MockWALAccesser_RawAppend_Call) Run(run func(ctx context.Context, msgs message.MutableMessage, opts ...streaming.AppendOption)) *MockWALAccesser_RawAppend_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]streaming.AppendOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(streaming.AppendOption)
			}
		}
		run(args[0].(context.Context), args[1].(message.MutableMessage), variadicArgs...)
	})
	return _c
}

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

func (_c *MockWALAccesser_RawAppend_Call) RunAndReturn(run func(context.Context, message.MutableMessage, ...streaming.AppendOption) (*types.AppendResult, error)) *MockWALAccesser_RawAppend_Call {
	_c.Call.Return(run)
	return _c
}

// Read provides a mock function with given fields: ctx, opts
func (_m *MockWALAccesser) Read(ctx context.Context, opts streaming.ReadOption) streaming.Scanner {
	ret := _m.Called(ctx, opts)

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

	var r0 streaming.Scanner
	if rf, ok := ret.Get(0).(func(context.Context, streaming.ReadOption) streaming.Scanner); ok {
		r0 = rf(ctx, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(streaming.Scanner)
		}
	}

	return r0
}

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

// Read is a helper method to define mock.On call
//   - ctx context.Context
//   - opts streaming.ReadOption
func (_e *MockWALAccesser_Expecter) Read(ctx interface{}, opts interface{}) *MockWALAccesser_Read_Call {
	return &MockWALAccesser_Read_Call{Call: _e.mock.On("Read", ctx, opts)}
}

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

func (_c *MockWALAccesser_Read_Call) Return(_a0 streaming.Scanner) *MockWALAccesser_Read_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWALAccesser_Read_Call) RunAndReturn(run func(context.Context, streaming.ReadOption) streaming.Scanner) *MockWALAccesser_Read_Call {
	_c.Call.Return(run)
	return _c
}

// Replicate provides a mock function with no fields
func (_m *MockWALAccesser) Replicate() streaming.ReplicateService {
	ret := _m.Called()

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

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

	return r0
}

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

// Replicate is a helper method to define mock.On call
func (_e *MockWALAccesser_Expecter) Replicate() *MockWALAccesser_Replicate_Call {
	return &MockWALAccesser_Replicate_Call{Call: _e.mock.On("Replicate")}
}

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

func (_c *MockWALAccesser_Replicate_Call) Return(_a0 streaming.ReplicateService) *MockWALAccesser_Replicate_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWALAccesser_Replicate_Call) RunAndReturn(run func() streaming.ReplicateService) *MockWALAccesser_Replicate_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
