// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"context"

	mock "github.com/stretchr/testify/mock"
	"github.com/tidbcloud/cluster-service-ng/pkg/runtime/actions"
	"github.com/tidbcloud/cluster-service-ng/pkg/runtime/dag"
	"github.com/tidbcloud/cluster-service-ng/pkg/runtime/executor"
)

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

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

	return mock
}

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

type ActionRender_Expecter struct {
	mock *mock.Mock
}

func (_m *ActionRender) EXPECT() *ActionRender_Expecter {
	return &ActionRender_Expecter{mock: &_m.Mock}
}

// Render provides a mock function for the type ActionRender
func (_mock *ActionRender) Render(in string) (actions.Action, error) {
	ret := _mock.Called(in)

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

	var r0 actions.Action
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string) (actions.Action, error)); ok {
		return returnFunc(in)
	}
	if returnFunc, ok := ret.Get(0).(func(string) actions.Action); ok {
		r0 = returnFunc(in)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(actions.Action)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
		r1 = returnFunc(in)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Render is a helper method to define mock.On call
//   - in string
func (_e *ActionRender_Expecter) Render(in interface{}) *ActionRender_Render_Call {
	return &ActionRender_Render_Call{Call: _e.mock.On("Render", in)}
}

func (_c *ActionRender_Render_Call) Run(run func(in string)) *ActionRender_Render_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ActionRender_Render_Call) Return(action actions.Action, err error) *ActionRender_Render_Call {
	_c.Call.Return(action, err)
	return _c
}

func (_c *ActionRender_Render_Call) RunAndReturn(run func(in string) (actions.Action, error)) *ActionRender_Render_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}

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

type EventReceiver_Expecter struct {
	mock *mock.Mock
}

func (_m *EventReceiver) EXPECT() *EventReceiver_Expecter {
	return &EventReceiver_Expecter{mock: &_m.Mock}
}

// OnEvent provides a mock function for the type EventReceiver
func (_mock *EventReceiver) OnEvent(name executor.EventName, data ...executor.EventData) {
	if len(data) > 0 {
		_mock.Called(name, data)
	} else {
		_mock.Called(name)
	}

	return
}

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

// OnEvent is a helper method to define mock.On call
//   - name executor.EventName
//   - data ...executor.EventData
func (_e *EventReceiver_Expecter) OnEvent(name interface{}, data ...interface{}) *EventReceiver_OnEvent_Call {
	return &EventReceiver_OnEvent_Call{Call: _e.mock.On("OnEvent",
		append([]interface{}{name}, data...)...)}
}

func (_c *EventReceiver_OnEvent_Call) Run(run func(name executor.EventName, data ...executor.EventData)) *EventReceiver_OnEvent_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 executor.EventName
		if args[0] != nil {
			arg0 = args[0].(executor.EventName)
		}
		var arg1 []executor.EventData
		var variadicArgs []executor.EventData
		if len(args) > 1 {
			variadicArgs = args[1].([]executor.EventData)
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

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

func (_c *EventReceiver_OnEvent_Call) RunAndReturn(run func(name executor.EventName, data ...executor.EventData)) *EventReceiver_OnEvent_Call {
	_c.Run(run)
	return _c
}

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

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

	return mock
}

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

type EventHub_Expecter struct {
	mock *mock.Mock
}

func (_m *EventHub) EXPECT() *EventHub_Expecter {
	return &EventHub_Expecter{mock: &_m.Mock}
}

// RegisterReceiver provides a mock function for the type EventHub
func (_mock *EventHub) RegisterReceiver(receiver executor.EventReceiver) {
	_mock.Called(receiver)
	return
}

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

// RegisterReceiver is a helper method to define mock.On call
//   - receiver executor.EventReceiver
func (_e *EventHub_Expecter) RegisterReceiver(receiver interface{}) *EventHub_RegisterReceiver_Call {
	return &EventHub_RegisterReceiver_Call{Call: _e.mock.On("RegisterReceiver", receiver)}
}

func (_c *EventHub_RegisterReceiver_Call) Run(run func(receiver executor.EventReceiver)) *EventHub_RegisterReceiver_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 executor.EventReceiver
		if args[0] != nil {
			arg0 = args[0].(executor.EventReceiver)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *EventHub_RegisterReceiver_Call) RunAndReturn(run func(receiver executor.EventReceiver)) *EventHub_RegisterReceiver_Call {
	_c.Run(run)
	return _c
}

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

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

	return mock
}

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

type RemoteExecutor_Expecter struct {
	mock *mock.Mock
}

func (_m *RemoteExecutor) EXPECT() *RemoteExecutor_Expecter {
	return &RemoteExecutor_Expecter{mock: &_m.Mock}
}

// Abort provides a mock function for the type RemoteExecutor
func (_mock *RemoteExecutor) Abort(ctx context.Context, execId string) error {
	ret := _mock.Called(ctx, execId)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = returnFunc(ctx, execId)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Abort is a helper method to define mock.On call
//   - ctx context.Context
//   - execId string
func (_e *RemoteExecutor_Expecter) Abort(ctx interface{}, execId interface{}) *RemoteExecutor_Abort_Call {
	return &RemoteExecutor_Abort_Call{Call: _e.mock.On("Abort", ctx, execId)}
}

func (_c *RemoteExecutor_Abort_Call) Run(run func(ctx context.Context, execId string)) *RemoteExecutor_Abort_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *RemoteExecutor_Abort_Call) Return(err error) *RemoteExecutor_Abort_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *RemoteExecutor_Abort_Call) RunAndReturn(run func(ctx context.Context, execId string) error) *RemoteExecutor_Abort_Call {
	_c.Call.Return(run)
	return _c
}

// QueryRunnings provides a mock function for the type RemoteExecutor
func (_mock *RemoteExecutor) QueryRunnings(ctx context.Context, planName string, matchFilter executor.MatchFilter) (executor.ExecTaskIdStatus, error) {
	ret := _mock.Called(ctx, planName, matchFilter)

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

	var r0 executor.ExecTaskIdStatus
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, executor.MatchFilter) (executor.ExecTaskIdStatus, error)); ok {
		return returnFunc(ctx, planName, matchFilter)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, executor.MatchFilter) executor.ExecTaskIdStatus); ok {
		r0 = returnFunc(ctx, planName, matchFilter)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(executor.ExecTaskIdStatus)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, executor.MatchFilter) error); ok {
		r1 = returnFunc(ctx, planName, matchFilter)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// QueryRunnings is a helper method to define mock.On call
//   - ctx context.Context
//   - planName string
//   - matchFilter executor.MatchFilter
func (_e *RemoteExecutor_Expecter) QueryRunnings(ctx interface{}, planName interface{}, matchFilter interface{}) *RemoteExecutor_QueryRunnings_Call {
	return &RemoteExecutor_QueryRunnings_Call{Call: _e.mock.On("QueryRunnings", ctx, planName, matchFilter)}
}

func (_c *RemoteExecutor_QueryRunnings_Call) Run(run func(ctx context.Context, planName string, matchFilter executor.MatchFilter)) *RemoteExecutor_QueryRunnings_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 executor.MatchFilter
		if args[2] != nil {
			arg2 = args[2].(executor.MatchFilter)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *RemoteExecutor_QueryRunnings_Call) Return(execTaskIdStatus executor.ExecTaskIdStatus, err error) *RemoteExecutor_QueryRunnings_Call {
	_c.Call.Return(execTaskIdStatus, err)
	return _c
}

func (_c *RemoteExecutor_QueryRunnings_Call) RunAndReturn(run func(ctx context.Context, planName string, matchFilter executor.MatchFilter) (executor.ExecTaskIdStatus, error)) *RemoteExecutor_QueryRunnings_Call {
	_c.Call.Return(run)
	return _c
}

// Submit provides a mock function for the type RemoteExecutor
func (_mock *RemoteExecutor) Submit(ctx context.Context, planName string, args actions.ActionArgs, execId string) error {
	ret := _mock.Called(ctx, planName, args, execId)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, actions.ActionArgs, string) error); ok {
		r0 = returnFunc(ctx, planName, args, execId)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Submit is a helper method to define mock.On call
//   - ctx context.Context
//   - planName string
//   - args actions.ActionArgs
//   - execId string
func (_e *RemoteExecutor_Expecter) Submit(ctx interface{}, planName interface{}, args interface{}, execId interface{}) *RemoteExecutor_Submit_Call {
	return &RemoteExecutor_Submit_Call{Call: _e.mock.On("Submit", ctx, planName, args, execId)}
}

func (_c *RemoteExecutor_Submit_Call) Run(run func(ctx context.Context, planName string, args actions.ActionArgs, execId string)) *RemoteExecutor_Submit_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 actions.ActionArgs
		if args[2] != nil {
			arg2 = args[2].(actions.ActionArgs)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *RemoteExecutor_Submit_Call) Return(err error) *RemoteExecutor_Submit_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *RemoteExecutor_Submit_Call) RunAndReturn(run func(ctx context.Context, planName string, args actions.ActionArgs, execId string) error) *RemoteExecutor_Submit_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}

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

type DagNodeRender_Expecter struct {
	mock *mock.Mock
}

func (_m *DagNodeRender) EXPECT() *DagNodeRender_Expecter {
	return &DagNodeRender_Expecter{mock: &_m.Mock}
}

// Render provides a mock function for the type DagNodeRender
func (_mock *DagNodeRender) Render(node *dag.DagNode) error {
	ret := _mock.Called(node)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*dag.DagNode) error); ok {
		r0 = returnFunc(node)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Render is a helper method to define mock.On call
//   - node *dag.DagNode
func (_e *DagNodeRender_Expecter) Render(node interface{}) *DagNodeRender_Render_Call {
	return &DagNodeRender_Render_Call{Call: _e.mock.On("Render", node)}
}

func (_c *DagNodeRender_Render_Call) Run(run func(node *dag.DagNode)) *DagNodeRender_Render_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *dag.DagNode
		if args[0] != nil {
			arg0 = args[0].(*dag.DagNode)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *DagNodeRender_Render_Call) Return(err error) *DagNodeRender_Render_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *DagNodeRender_Render_Call) RunAndReturn(run func(node *dag.DagNode) error) *DagNodeRender_Render_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}

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

type ActionTaskScheduler_Expecter struct {
	mock *mock.Mock
}

func (_m *ActionTaskScheduler) EXPECT() *ActionTaskScheduler_Expecter {
	return &ActionTaskScheduler_Expecter{mock: &_m.Mock}
}

// Add provides a mock function for the type ActionTaskScheduler
func (_mock *ActionTaskScheduler) Add(tasks ...*executor.ActionTask) {
	if len(tasks) > 0 {
		_mock.Called(tasks)
	} else {
		_mock.Called()
	}

	return
}

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

// Add is a helper method to define mock.On call
//   - tasks ...*executor.ActionTask
func (_e *ActionTaskScheduler_Expecter) Add(tasks ...interface{}) *ActionTaskScheduler_Add_Call {
	return &ActionTaskScheduler_Add_Call{Call: _e.mock.On("Add",
		append([]interface{}{}, tasks...)...)}
}

func (_c *ActionTaskScheduler_Add_Call) Run(run func(tasks ...*executor.ActionTask)) *ActionTaskScheduler_Add_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []*executor.ActionTask
		var variadicArgs []*executor.ActionTask
		if len(args) > 0 {
			variadicArgs = args[0].([]*executor.ActionTask)
		}
		arg0 = variadicArgs
		run(
			arg0...,
		)
	})
	return _c
}

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

func (_c *ActionTaskScheduler_Add_Call) RunAndReturn(run func(tasks ...*executor.ActionTask)) *ActionTaskScheduler_Add_Call {
	_c.Run(run)
	return _c
}

// Len provides a mock function for the type ActionTaskScheduler
func (_mock *ActionTaskScheduler) Len() int {
	ret := _mock.Called()

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

	var r0 int
	if returnFunc, ok := ret.Get(0).(func() int); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(int)
	}
	return r0
}

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

// Len is a helper method to define mock.On call
func (_e *ActionTaskScheduler_Expecter) Len() *ActionTaskScheduler_Len_Call {
	return &ActionTaskScheduler_Len_Call{Call: _e.mock.On("Len")}
}

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

func (_c *ActionTaskScheduler_Len_Call) Return(n int) *ActionTaskScheduler_Len_Call {
	_c.Call.Return(n)
	return _c
}

func (_c *ActionTaskScheduler_Len_Call) RunAndReturn(run func() int) *ActionTaskScheduler_Len_Call {
	_c.Call.Return(run)
	return _c
}

// PopToBeRuns provides a mock function for the type ActionTaskScheduler
func (_mock *ActionTaskScheduler) PopToBeRuns(runningActionTasks map[string]*executor.ActionTask) executor.ActionTasks {
	ret := _mock.Called(runningActionTasks)

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

	var r0 executor.ActionTasks
	if returnFunc, ok := ret.Get(0).(func(map[string]*executor.ActionTask) executor.ActionTasks); ok {
		r0 = returnFunc(runningActionTasks)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(executor.ActionTasks)
		}
	}
	return r0
}

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

// PopToBeRuns is a helper method to define mock.On call
//   - runningActionTasks map[string]*executor.ActionTask
func (_e *ActionTaskScheduler_Expecter) PopToBeRuns(runningActionTasks interface{}) *ActionTaskScheduler_PopToBeRuns_Call {
	return &ActionTaskScheduler_PopToBeRuns_Call{Call: _e.mock.On("PopToBeRuns", runningActionTasks)}
}

func (_c *ActionTaskScheduler_PopToBeRuns_Call) Run(run func(runningActionTasks map[string]*executor.ActionTask)) *ActionTaskScheduler_PopToBeRuns_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 map[string]*executor.ActionTask
		if args[0] != nil {
			arg0 = args[0].(map[string]*executor.ActionTask)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *ActionTaskScheduler_PopToBeRuns_Call) Return(actionTasks executor.ActionTasks) *ActionTaskScheduler_PopToBeRuns_Call {
	_c.Call.Return(actionTasks)
	return _c
}

func (_c *ActionTaskScheduler_PopToBeRuns_Call) RunAndReturn(run func(runningActionTasks map[string]*executor.ActionTask) executor.ActionTasks) *ActionTaskScheduler_PopToBeRuns_Call {
	_c.Call.Return(run)
	return _c
}
