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

package mocks

import (
	"time"

	"github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
	"github.com/argoproj/argo-workflows/v3/workflow/sync"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Throttler_Expecter struct {
	mock *mock.Mock
}

func (_m *Throttler) EXPECT() *Throttler_Expecter {
	return &Throttler_Expecter{mock: &_m.Mock}
}

// Add provides a mock function for the type Throttler
func (_mock *Throttler) Add(key sync.Key, priority int32, creationTime time.Time) {
	_mock.Called(key, priority, creationTime)
	return
}

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

// Add is a helper method to define mock.On call
//   - key sync.Key
//   - priority int32
//   - creationTime time.Time
func (_e *Throttler_Expecter) Add(key interface{}, priority interface{}, creationTime interface{}) *Throttler_Add_Call {
	return &Throttler_Add_Call{Call: _e.mock.On("Add", key, priority, creationTime)}
}

func (_c *Throttler_Add_Call) Run(run func(key sync.Key, priority int32, creationTime time.Time)) *Throttler_Add_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 sync.Key
		if args[0] != nil {
			arg0 = args[0].(sync.Key)
		}
		var arg1 int32
		if args[1] != nil {
			arg1 = args[1].(int32)
		}
		var arg2 time.Time
		if args[2] != nil {
			arg2 = args[2].(time.Time)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Throttler_Add_Call) RunAndReturn(run func(key sync.Key, priority int32, creationTime time.Time)) *Throttler_Add_Call {
	_c.Run(run)
	return _c
}

// Admit provides a mock function for the type Throttler
func (_mock *Throttler) Admit(key sync.Key) bool {
	ret := _mock.Called(key)

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

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

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

// Admit is a helper method to define mock.On call
//   - key sync.Key
func (_e *Throttler_Expecter) Admit(key interface{}) *Throttler_Admit_Call {
	return &Throttler_Admit_Call{Call: _e.mock.On("Admit", key)}
}

func (_c *Throttler_Admit_Call) Run(run func(key sync.Key)) *Throttler_Admit_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 sync.Key
		if args[0] != nil {
			arg0 = args[0].(sync.Key)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Throttler_Admit_Call) Return(b bool) *Throttler_Admit_Call {
	_c.Call.Return(b)
	return _c
}

func (_c *Throttler_Admit_Call) RunAndReturn(run func(key sync.Key) bool) *Throttler_Admit_Call {
	_c.Call.Return(run)
	return _c
}

// Init provides a mock function for the type Throttler
func (_mock *Throttler) Init(wfs []v1alpha1.Workflow) error {
	ret := _mock.Called(wfs)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func([]v1alpha1.Workflow) error); ok {
		r0 = returnFunc(wfs)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Init is a helper method to define mock.On call
//   - wfs []v1alpha1.Workflow
func (_e *Throttler_Expecter) Init(wfs interface{}) *Throttler_Init_Call {
	return &Throttler_Init_Call{Call: _e.mock.On("Init", wfs)}
}

func (_c *Throttler_Init_Call) Run(run func(wfs []v1alpha1.Workflow)) *Throttler_Init_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []v1alpha1.Workflow
		if args[0] != nil {
			arg0 = args[0].([]v1alpha1.Workflow)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Throttler_Init_Call) RunAndReturn(run func(wfs []v1alpha1.Workflow) error) *Throttler_Init_Call {
	_c.Call.Return(run)
	return _c
}

// Remove provides a mock function for the type Throttler
func (_mock *Throttler) Remove(key sync.Key) {
	_mock.Called(key)
	return
}

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

// Remove is a helper method to define mock.On call
//   - key sync.Key
func (_e *Throttler_Expecter) Remove(key interface{}) *Throttler_Remove_Call {
	return &Throttler_Remove_Call{Call: _e.mock.On("Remove", key)}
}

func (_c *Throttler_Remove_Call) Run(run func(key sync.Key)) *Throttler_Remove_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 sync.Key
		if args[0] != nil {
			arg0 = args[0].(sync.Key)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Throttler_Remove_Call) RunAndReturn(run func(key sync.Key)) *Throttler_Remove_Call {
	_c.Run(run)
	return _c
}

// ResetNamespaceParallelism provides a mock function for the type Throttler
func (_mock *Throttler) ResetNamespaceParallelism(namespace string) {
	_mock.Called(namespace)
	return
}

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

// ResetNamespaceParallelism is a helper method to define mock.On call
//   - namespace string
func (_e *Throttler_Expecter) ResetNamespaceParallelism(namespace interface{}) *Throttler_ResetNamespaceParallelism_Call {
	return &Throttler_ResetNamespaceParallelism_Call{Call: _e.mock.On("ResetNamespaceParallelism", namespace)}
}

func (_c *Throttler_ResetNamespaceParallelism_Call) Run(run func(namespace string)) *Throttler_ResetNamespaceParallelism_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 *Throttler_ResetNamespaceParallelism_Call) Return() *Throttler_ResetNamespaceParallelism_Call {
	_c.Call.Return()
	return _c
}

func (_c *Throttler_ResetNamespaceParallelism_Call) RunAndReturn(run func(namespace string)) *Throttler_ResetNamespaceParallelism_Call {
	_c.Run(run)
	return _c
}

// UpdateNamespaceParallelism provides a mock function for the type Throttler
func (_mock *Throttler) UpdateNamespaceParallelism(namespace string, limit int) {
	_mock.Called(namespace, limit)
	return
}

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

// UpdateNamespaceParallelism is a helper method to define mock.On call
//   - namespace string
//   - limit int
func (_e *Throttler_Expecter) UpdateNamespaceParallelism(namespace interface{}, limit interface{}) *Throttler_UpdateNamespaceParallelism_Call {
	return &Throttler_UpdateNamespaceParallelism_Call{Call: _e.mock.On("UpdateNamespaceParallelism", namespace, limit)}
}

func (_c *Throttler_UpdateNamespaceParallelism_Call) Run(run func(namespace string, limit int)) *Throttler_UpdateNamespaceParallelism_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		var arg1 int
		if args[1] != nil {
			arg1 = args[1].(int)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *Throttler_UpdateNamespaceParallelism_Call) RunAndReturn(run func(namespace string, limit int)) *Throttler_UpdateNamespaceParallelism_Call {
	_c.Run(run)
	return _c
}

// UpdateParallelism provides a mock function for the type Throttler
func (_mock *Throttler) UpdateParallelism(limit int) {
	_mock.Called(limit)
	return
}

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

// UpdateParallelism is a helper method to define mock.On call
//   - limit int
func (_e *Throttler_Expecter) UpdateParallelism(limit interface{}) *Throttler_UpdateParallelism_Call {
	return &Throttler_UpdateParallelism_Call{Call: _e.mock.On("UpdateParallelism", limit)}
}

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

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

func (_c *Throttler_UpdateParallelism_Call) RunAndReturn(run func(limit int)) *Throttler_UpdateParallelism_Call {
	_c.Run(run)
	return _c
}
