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

package mock_streaming

import (
	context "context"

	commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"

	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"
)

// MockReplicateService is an autogenerated mock type for the ReplicateService type
type MockReplicateService struct {
	mock.Mock
}

type MockReplicateService_Expecter struct {
	mock *mock.Mock
}

func (_m *MockReplicateService) EXPECT() *MockReplicateService_Expecter {
	return &MockReplicateService_Expecter{mock: &_m.Mock}
}

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

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

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

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

	return r0, r1
}

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

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

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

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

func (_c *MockReplicateService_Append_Call) RunAndReturn(run func(context.Context, message.ReplicateMutableMessage) (*types.AppendResult, error)) *MockReplicateService_Append_Call {
	_c.Call.Return(run)
	return _c
}

// GetReplicateCheckpoint provides a mock function with given fields: ctx, channelName
func (_m *MockReplicateService) GetReplicateCheckpoint(ctx context.Context, channelName string) (*wal.ReplicateCheckpoint, error) {
	ret := _m.Called(ctx, channelName)

	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(context.Context, string) (*wal.ReplicateCheckpoint, error)); ok {
		return rf(ctx, channelName)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) *wal.ReplicateCheckpoint); ok {
		r0 = rf(ctx, channelName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*wal.ReplicateCheckpoint)
		}
	}

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

	return r0, r1
}

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

// GetReplicateCheckpoint is a helper method to define mock.On call
//   - ctx context.Context
//   - channelName string
func (_e *MockReplicateService_Expecter) GetReplicateCheckpoint(ctx interface{}, channelName interface{}) *MockReplicateService_GetReplicateCheckpoint_Call {
	return &MockReplicateService_GetReplicateCheckpoint_Call{Call: _e.mock.On("GetReplicateCheckpoint", ctx, channelName)}
}

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

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

func (_c *MockReplicateService_GetReplicateCheckpoint_Call) RunAndReturn(run func(context.Context, string) (*wal.ReplicateCheckpoint, error)) *MockReplicateService_GetReplicateCheckpoint_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateReplicateConfiguration provides a mock function with given fields: ctx, config
func (_m *MockReplicateService) UpdateReplicateConfiguration(ctx context.Context, config *commonpb.ReplicateConfiguration) error {
	ret := _m.Called(ctx, config)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *commonpb.ReplicateConfiguration) error); ok {
		r0 = rf(ctx, config)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// UpdateReplicateConfiguration is a helper method to define mock.On call
//   - ctx context.Context
//   - config *commonpb.ReplicateConfiguration
func (_e *MockReplicateService_Expecter) UpdateReplicateConfiguration(ctx interface{}, config interface{}) *MockReplicateService_UpdateReplicateConfiguration_Call {
	return &MockReplicateService_UpdateReplicateConfiguration_Call{Call: _e.mock.On("UpdateReplicateConfiguration", ctx, config)}
}

func (_c *MockReplicateService_UpdateReplicateConfiguration_Call) Run(run func(ctx context.Context, config *commonpb.ReplicateConfiguration)) *MockReplicateService_UpdateReplicateConfiguration_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*commonpb.ReplicateConfiguration))
	})
	return _c
}

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

func (_c *MockReplicateService_UpdateReplicateConfiguration_Call) RunAndReturn(run func(context.Context, *commonpb.ReplicateConfiguration) error) *MockReplicateService_UpdateReplicateConfiguration_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
