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

package mock_interceptors

import (
	context "context"

	interceptors "github.com/milvus-io/milvus/internal/streamingnode/server/wal/interceptors"
	message "github.com/milvus-io/milvus/pkg/v2/streaming/util/message"

	mock "github.com/stretchr/testify/mock"
)

// MockInterceptorWithMetrics is an autogenerated mock type for the InterceptorWithMetrics type
type MockInterceptorWithMetrics struct {
	mock.Mock
}

type MockInterceptorWithMetrics_Expecter struct {
	mock *mock.Mock
}

func (_m *MockInterceptorWithMetrics) EXPECT() *MockInterceptorWithMetrics_Expecter {
	return &MockInterceptorWithMetrics_Expecter{mock: &_m.Mock}
}

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

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

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

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

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

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

// DoAppend provides a mock function with given fields: ctx, msg, append
func (_m *MockInterceptorWithMetrics) DoAppend(ctx context.Context, msg message.MutableMessage, append interceptors.Append) (message.MessageID, error) {
	ret := _m.Called(ctx, msg, append)

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

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

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

	return r0, r1
}

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

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

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

func (_c *MockInterceptorWithMetrics_DoAppend_Call) Return(_a0 message.MessageID, _a1 error) *MockInterceptorWithMetrics_DoAppend_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockInterceptorWithMetrics_DoAppend_Call) RunAndReturn(run func(context.Context, message.MutableMessage, interceptors.Append) (message.MessageID, error)) *MockInterceptorWithMetrics_DoAppend_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

	return r0
}

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

// Name is a helper method to define mock.On call
func (_e *MockInterceptorWithMetrics_Expecter) Name() *MockInterceptorWithMetrics_Name_Call {
	return &MockInterceptorWithMetrics_Name_Call{Call: _e.mock.On("Name")}
}

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

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

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

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

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

	return mock
}
