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

package retry

import (
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type mockRetryable_Expecter struct {
	mock *mock.Mock
}

func (_m *mockRetryable) EXPECT() *mockRetryable_Expecter {
	return &mockRetryable_Expecter{mock: &_m.Mock}
}

// Run provides a mock function for the type mockRetryable
func (_mock *mockRetryable) Run() error {
	ret := _mock.Called()

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

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

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

// Run is a helper method to define mock.On call
func (_e *mockRetryable_Expecter) Run() *mockRetryable_Run_Call {
	return &mockRetryable_Run_Call{Call: _e.mock.On("Run")}
}

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

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

func (_c *mockRetryable_Run_Call) RunAndReturn(run func() error) *mockRetryable_Run_Call {
	_c.Call.Return(run)
	return _c
}

// ShouldRetry provides a mock function for the type mockRetryable
func (_mock *mockRetryable) ShouldRetry(tries int, err error) bool {
	ret := _mock.Called(tries, err)

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

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

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

// ShouldRetry is a helper method to define mock.On call
//   - tries int
//   - err error
func (_e *mockRetryable_Expecter) ShouldRetry(tries interface{}, err interface{}) *mockRetryable_ShouldRetry_Call {
	return &mockRetryable_ShouldRetry_Call{Call: _e.mock.On("ShouldRetry", tries, err)}
}

func (_c *mockRetryable_ShouldRetry_Call) Run(run func(tries int, err error)) *mockRetryable_ShouldRetry_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int
		if args[0] != nil {
			arg0 = args[0].(int)
		}
		var arg1 error
		if args[1] != nil {
			arg1 = args[1].(error)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *mockRetryable_ShouldRetry_Call) RunAndReturn(run func(tries int, err error) bool) *mockRetryable_ShouldRetry_Call {
	_c.Call.Return(run)
	return _c
}

// newMockValueRetryable creates a new instance of mockValueRetryable. 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 newMockValueRetryable[T any](t interface {
	mock.TestingT
	Cleanup(func())
}) *mockValueRetryable[T] {
	mock := &mockValueRetryable[T]{}
	mock.Mock.Test(t)

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

	return mock
}

// mockValueRetryable is an autogenerated mock type for the valueRetryable type
type mockValueRetryable[T any] struct {
	mock.Mock
}

type mockValueRetryable_Expecter[T any] struct {
	mock *mock.Mock
}

func (_m *mockValueRetryable[T]) EXPECT() *mockValueRetryable_Expecter[T] {
	return &mockValueRetryable_Expecter[T]{mock: &_m.Mock}
}

// Run provides a mock function for the type mockValueRetryable
func (_mock *mockValueRetryable[T]) Run() (T, error) {
	ret := _mock.Called()

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

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

// mockValueRetryable_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
type mockValueRetryable_Run_Call[T any] struct {
	*mock.Call
}

// Run is a helper method to define mock.On call
func (_e *mockValueRetryable_Expecter[T]) Run() *mockValueRetryable_Run_Call[T] {
	return &mockValueRetryable_Run_Call[T]{Call: _e.mock.On("Run")}
}

func (_c *mockValueRetryable_Run_Call[T]) Run(run func()) *mockValueRetryable_Run_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *mockValueRetryable_Run_Call[T]) Return(v T, err error) *mockValueRetryable_Run_Call[T] {
	_c.Call.Return(v, err)
	return _c
}

func (_c *mockValueRetryable_Run_Call[T]) RunAndReturn(run func() (T, error)) *mockValueRetryable_Run_Call[T] {
	_c.Call.Return(run)
	return _c
}

// ShouldRetry provides a mock function for the type mockValueRetryable
func (_mock *mockValueRetryable[T]) ShouldRetry(tries int, err error) bool {
	ret := _mock.Called(tries, err)

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

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

// mockValueRetryable_ShouldRetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldRetry'
type mockValueRetryable_ShouldRetry_Call[T any] struct {
	*mock.Call
}

// ShouldRetry is a helper method to define mock.On call
//   - tries int
//   - err error
func (_e *mockValueRetryable_Expecter[T]) ShouldRetry(tries interface{}, err interface{}) *mockValueRetryable_ShouldRetry_Call[T] {
	return &mockValueRetryable_ShouldRetry_Call[T]{Call: _e.mock.On("ShouldRetry", tries, err)}
}

func (_c *mockValueRetryable_ShouldRetry_Call[T]) Run(run func(tries int, err error)) *mockValueRetryable_ShouldRetry_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int
		if args[0] != nil {
			arg0 = args[0].(int)
		}
		var arg1 error
		if args[1] != nil {
			arg1 = args[1].(error)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *mockValueRetryable_ShouldRetry_Call[T]) Return(b bool) *mockValueRetryable_ShouldRetry_Call[T] {
	_c.Call.Return(b)
	return _c
}

func (_c *mockValueRetryable_ShouldRetry_Call[T]) RunAndReturn(run func(tries int, err error) bool) *mockValueRetryable_ShouldRetry_Call[T] {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}

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

type MockProvider_Expecter struct {
	mock *mock.Mock
}

func (_m *MockProvider) EXPECT() *MockProvider_Expecter {
	return &MockProvider_Expecter{mock: &_m.Mock}
}

// NewRetry provides a mock function for the type MockProvider
func (_mock *MockProvider) NewRetry() *Retry {
	ret := _mock.Called()

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

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

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

// NewRetry is a helper method to define mock.On call
func (_e *MockProvider_Expecter) NewRetry() *MockProvider_NewRetry_Call {
	return &MockProvider_NewRetry_Call{Call: _e.mock.On("NewRetry")}
}

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

func (_c *MockProvider_NewRetry_Call) Return(retry *Retry) *MockProvider_NewRetry_Call {
	_c.Call.Return(retry)
	return _c
}

func (_c *MockProvider_NewRetry_Call) RunAndReturn(run func() *Retry) *MockProvider_NewRetry_Call {
	_c.Call.Return(run)
	return _c
}
