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

package mock_replicates

import (
	context "context"

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

	replicates "github.com/milvus-io/milvus/internal/streamingnode/server/wal/interceptors/replicate/replicates"

	replicateutil "github.com/milvus-io/milvus/pkg/v2/util/replicateutil"

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

// MockReplicatesManager is an autogenerated mock type for the ReplicatesManager type
type MockReplicatesManager struct {
	mock.Mock
}

type MockReplicatesManager_Expecter struct {
	mock *mock.Mock
}

func (_m *MockReplicatesManager) EXPECT() *MockReplicatesManager_Expecter {
	return &MockReplicatesManager_Expecter{mock: &_m.Mock}
}

// BeginReplicateMessage provides a mock function with given fields: ctx, msg
func (_m *MockReplicatesManager) BeginReplicateMessage(ctx context.Context, msg message.MutableMessage) (replicates.ReplicateAcker, error) {
	ret := _m.Called(ctx, msg)

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

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

	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
}

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

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

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

func (_c *MockReplicatesManager_BeginReplicateMessage_Call) Return(_a0 replicates.ReplicateAcker, _a1 error) *MockReplicatesManager_BeginReplicateMessage_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockReplicatesManager_BeginReplicateMessage_Call) RunAndReturn(run func(context.Context, message.MutableMessage) (replicates.ReplicateAcker, error)) *MockReplicatesManager_BeginReplicateMessage_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

	return r0, r1
}

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

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

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

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

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

// Role provides a mock function with no fields
func (_m *MockReplicatesManager) Role() replicateutil.Role {
	ret := _m.Called()

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

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

	return r0
}

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

// Role is a helper method to define mock.On call
func (_e *MockReplicatesManager_Expecter) Role() *MockReplicatesManager_Role_Call {
	return &MockReplicatesManager_Role_Call{Call: _e.mock.On("Role")}
}

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

func (_c *MockReplicatesManager_Role_Call) Return(_a0 replicateutil.Role) *MockReplicatesManager_Role_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockReplicatesManager_Role_Call) RunAndReturn(run func() replicateutil.Role) *MockReplicatesManager_Role_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

	return r0
}

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

// SwitchReplicateMode is a helper method to define mock.On call
//   - ctx context.Context
//   - msg message.MutableAlterReplicateConfigMessageV2
func (_e *MockReplicatesManager_Expecter) SwitchReplicateMode(ctx interface{}, msg interface{}) *MockReplicatesManager_SwitchReplicateMode_Call {
	return &MockReplicatesManager_SwitchReplicateMode_Call{Call: _e.mock.On("SwitchReplicateMode", ctx, msg)}
}

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

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

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

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

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

	return mock
}
