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

package balance

import (
	context "context"

	meta "github.com/milvus-io/milvus/internal/querycoordv2/meta"
	mock "github.com/stretchr/testify/mock"
)

// MockBalancer is an autogenerated mock type for the Balance type
type MockBalancer struct {
	mock.Mock
}

type MockBalancer_Expecter struct {
	mock *mock.Mock
}

func (_m *MockBalancer) EXPECT() *MockBalancer_Expecter {
	return &MockBalancer_Expecter{mock: &_m.Mock}
}

// AssignChannel provides a mock function with given fields: ctx, collectionID, channels, nodes, forceAssign
func (_m *MockBalancer) AssignChannel(ctx context.Context, collectionID int64, channels []*meta.DmChannel, nodes []int64, forceAssign bool) []ChannelAssignPlan {
	ret := _m.Called(ctx, collectionID, channels, nodes, forceAssign)

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

	var r0 []ChannelAssignPlan
	if rf, ok := ret.Get(0).(func(context.Context, int64, []*meta.DmChannel, []int64, bool) []ChannelAssignPlan); ok {
		r0 = rf(ctx, collectionID, channels, nodes, forceAssign)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]ChannelAssignPlan)
		}
	}

	return r0
}

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

// AssignChannel is a helper method to define mock.On call
//   - ctx context.Context
//   - collectionID int64
//   - channels []*meta.DmChannel
//   - nodes []int64
//   - forceAssign bool
func (_e *MockBalancer_Expecter) AssignChannel(ctx interface{}, collectionID interface{}, channels interface{}, nodes interface{}, forceAssign interface{}) *MockBalancer_AssignChannel_Call {
	return &MockBalancer_AssignChannel_Call{Call: _e.mock.On("AssignChannel", ctx, collectionID, channels, nodes, forceAssign)}
}

func (_c *MockBalancer_AssignChannel_Call) Run(run func(ctx context.Context, collectionID int64, channels []*meta.DmChannel, nodes []int64, forceAssign bool)) *MockBalancer_AssignChannel_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64), args[2].([]*meta.DmChannel), args[3].([]int64), args[4].(bool))
	})
	return _c
}

func (_c *MockBalancer_AssignChannel_Call) Return(_a0 []ChannelAssignPlan) *MockBalancer_AssignChannel_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockBalancer_AssignChannel_Call) RunAndReturn(run func(context.Context, int64, []*meta.DmChannel, []int64, bool) []ChannelAssignPlan) *MockBalancer_AssignChannel_Call {
	_c.Call.Return(run)
	return _c
}

// AssignSegment provides a mock function with given fields: ctx, collectionID, segments, nodes, forceAssign
func (_m *MockBalancer) AssignSegment(ctx context.Context, collectionID int64, segments []*meta.Segment, nodes []int64, forceAssign bool) []SegmentAssignPlan {
	ret := _m.Called(ctx, collectionID, segments, nodes, forceAssign)

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

	var r0 []SegmentAssignPlan
	if rf, ok := ret.Get(0).(func(context.Context, int64, []*meta.Segment, []int64, bool) []SegmentAssignPlan); ok {
		r0 = rf(ctx, collectionID, segments, nodes, forceAssign)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]SegmentAssignPlan)
		}
	}

	return r0
}

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

// AssignSegment is a helper method to define mock.On call
//   - ctx context.Context
//   - collectionID int64
//   - segments []*meta.Segment
//   - nodes []int64
//   - forceAssign bool
func (_e *MockBalancer_Expecter) AssignSegment(ctx interface{}, collectionID interface{}, segments interface{}, nodes interface{}, forceAssign interface{}) *MockBalancer_AssignSegment_Call {
	return &MockBalancer_AssignSegment_Call{Call: _e.mock.On("AssignSegment", ctx, collectionID, segments, nodes, forceAssign)}
}

func (_c *MockBalancer_AssignSegment_Call) Run(run func(ctx context.Context, collectionID int64, segments []*meta.Segment, nodes []int64, forceAssign bool)) *MockBalancer_AssignSegment_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64), args[2].([]*meta.Segment), args[3].([]int64), args[4].(bool))
	})
	return _c
}

func (_c *MockBalancer_AssignSegment_Call) Return(_a0 []SegmentAssignPlan) *MockBalancer_AssignSegment_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockBalancer_AssignSegment_Call) RunAndReturn(run func(context.Context, int64, []*meta.Segment, []int64, bool) []SegmentAssignPlan) *MockBalancer_AssignSegment_Call {
	_c.Call.Return(run)
	return _c
}

// BalanceReplica provides a mock function with given fields: ctx, replica
func (_m *MockBalancer) BalanceReplica(ctx context.Context, replica *meta.Replica) ([]SegmentAssignPlan, []ChannelAssignPlan) {
	ret := _m.Called(ctx, replica)

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

	var r0 []SegmentAssignPlan
	var r1 []ChannelAssignPlan
	if rf, ok := ret.Get(0).(func(context.Context, *meta.Replica) ([]SegmentAssignPlan, []ChannelAssignPlan)); ok {
		return rf(ctx, replica)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *meta.Replica) []SegmentAssignPlan); ok {
		r0 = rf(ctx, replica)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]SegmentAssignPlan)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *meta.Replica) []ChannelAssignPlan); ok {
		r1 = rf(ctx, replica)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).([]ChannelAssignPlan)
		}
	}

	return r0, r1
}

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

// BalanceReplica is a helper method to define mock.On call
//   - ctx context.Context
//   - replica *meta.Replica
func (_e *MockBalancer_Expecter) BalanceReplica(ctx interface{}, replica interface{}) *MockBalancer_BalanceReplica_Call {
	return &MockBalancer_BalanceReplica_Call{Call: _e.mock.On("BalanceReplica", ctx, replica)}
}

func (_c *MockBalancer_BalanceReplica_Call) Run(run func(ctx context.Context, replica *meta.Replica)) *MockBalancer_BalanceReplica_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*meta.Replica))
	})
	return _c
}

func (_c *MockBalancer_BalanceReplica_Call) Return(_a0 []SegmentAssignPlan, _a1 []ChannelAssignPlan) *MockBalancer_BalanceReplica_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockBalancer_BalanceReplica_Call) RunAndReturn(run func(context.Context, *meta.Replica) ([]SegmentAssignPlan, []ChannelAssignPlan)) *MockBalancer_BalanceReplica_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
