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

package mocks

import (
	context "context"

	backend "github.com/argoproj-labs/argocd-agent/internal/backend"

	mock "github.com/stretchr/testify/mock"

	time "time"

	v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)

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

type Application_Expecter struct {
	mock *mock.Mock
}

func (_m *Application) EXPECT() *Application_Expecter {
	return &Application_Expecter{mock: &_m.Mock}
}

// Create provides a mock function with given fields: ctx, app
func (_m *Application) Create(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error) {
	ret := _m.Called(ctx, app)

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

	var r0 *v1alpha1.Application
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) (*v1alpha1.Application, error)); ok {
		return rf(ctx, app)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) *v1alpha1.Application); ok {
		r0 = rf(ctx, app)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.Application)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Application) error); ok {
		r1 = rf(ctx, app)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - app *v1alpha1.Application
func (_e *Application_Expecter) Create(ctx interface{}, app interface{}) *Application_Create_Call {
	return &Application_Create_Call{Call: _e.mock.On("Create", ctx, app)}
}

func (_c *Application_Create_Call) Run(run func(ctx context.Context, app *v1alpha1.Application)) *Application_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*v1alpha1.Application))
	})
	return _c
}

func (_c *Application_Create_Call) Return(_a0 *v1alpha1.Application, _a1 error) *Application_Create_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Application_Create_Call) RunAndReturn(run func(context.Context, *v1alpha1.Application) (*v1alpha1.Application, error)) *Application_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function with given fields: ctx, name, namespace, deletionPropagation
func (_m *Application) Delete(ctx context.Context, name string, namespace string, deletionPropagation *backend.DeletionPropagation) error {
	ret := _m.Called(ctx, name, namespace, deletionPropagation)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, *backend.DeletionPropagation) error); ok {
		r0 = rf(ctx, name, namespace, deletionPropagation)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
//   - namespace string
//   - deletionPropagation *backend.DeletionPropagation
func (_e *Application_Expecter) Delete(ctx interface{}, name interface{}, namespace interface{}, deletionPropagation interface{}) *Application_Delete_Call {
	return &Application_Delete_Call{Call: _e.mock.On("Delete", ctx, name, namespace, deletionPropagation)}
}

func (_c *Application_Delete_Call) Run(run func(ctx context.Context, name string, namespace string, deletionPropagation *backend.DeletionPropagation)) *Application_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(*backend.DeletionPropagation))
	})
	return _c
}

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

func (_c *Application_Delete_Call) RunAndReturn(run func(context.Context, string, string, *backend.DeletionPropagation) error) *Application_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// EnsureSynced provides a mock function with given fields: duration
func (_m *Application) EnsureSynced(duration time.Duration) error {
	ret := _m.Called(duration)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(time.Duration) error); ok {
		r0 = rf(duration)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// EnsureSynced is a helper method to define mock.On call
//   - duration time.Duration
func (_e *Application_Expecter) EnsureSynced(duration interface{}) *Application_EnsureSynced_Call {
	return &Application_EnsureSynced_Call{Call: _e.mock.On("EnsureSynced", duration)}
}

func (_c *Application_EnsureSynced_Call) Run(run func(duration time.Duration)) *Application_EnsureSynced_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(time.Duration))
	})
	return _c
}

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

func (_c *Application_EnsureSynced_Call) RunAndReturn(run func(time.Duration) error) *Application_EnsureSynced_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function with given fields: ctx, name, namespace
func (_m *Application) Get(ctx context.Context, name string, namespace string) (*v1alpha1.Application, error) {
	ret := _m.Called(ctx, name, namespace)

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

	var r0 *v1alpha1.Application
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Application, error)); ok {
		return rf(ctx, name, namespace)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Application); ok {
		r0 = rf(ctx, name, namespace)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.Application)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, name, namespace)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
//   - namespace string
func (_e *Application_Expecter) Get(ctx interface{}, name interface{}, namespace interface{}) *Application_Get_Call {
	return &Application_Get_Call{Call: _e.mock.On("Get", ctx, name, namespace)}
}

func (_c *Application_Get_Call) Run(run func(ctx context.Context, name string, namespace string)) *Application_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string))
	})
	return _c
}

func (_c *Application_Get_Call) Return(_a0 *v1alpha1.Application, _a1 error) *Application_Get_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Application_Get_Call) RunAndReturn(run func(context.Context, string, string) (*v1alpha1.Application, error)) *Application_Get_Call {
	_c.Call.Return(run)
	return _c
}

// List provides a mock function with given fields: ctx, selector
func (_m *Application) List(ctx context.Context, selector backend.ApplicationSelector) ([]v1alpha1.Application, error) {
	ret := _m.Called(ctx, selector)

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

	var r0 []v1alpha1.Application
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, backend.ApplicationSelector) ([]v1alpha1.Application, error)); ok {
		return rf(ctx, selector)
	}
	if rf, ok := ret.Get(0).(func(context.Context, backend.ApplicationSelector) []v1alpha1.Application); ok {
		r0 = rf(ctx, selector)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]v1alpha1.Application)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, backend.ApplicationSelector) error); ok {
		r1 = rf(ctx, selector)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// List is a helper method to define mock.On call
//   - ctx context.Context
//   - selector backend.ApplicationSelector
func (_e *Application_Expecter) List(ctx interface{}, selector interface{}) *Application_List_Call {
	return &Application_List_Call{Call: _e.mock.On("List", ctx, selector)}
}

func (_c *Application_List_Call) Run(run func(ctx context.Context, selector backend.ApplicationSelector)) *Application_List_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(backend.ApplicationSelector))
	})
	return _c
}

func (_c *Application_List_Call) Return(_a0 []v1alpha1.Application, _a1 error) *Application_List_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Application_List_Call) RunAndReturn(run func(context.Context, backend.ApplicationSelector) ([]v1alpha1.Application, error)) *Application_List_Call {
	_c.Call.Return(run)
	return _c
}

// Patch provides a mock function with given fields: ctx, name, namespace, patch
func (_m *Application) Patch(ctx context.Context, name string, namespace string, patch []byte) (*v1alpha1.Application, error) {
	ret := _m.Called(ctx, name, namespace, patch)

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

	var r0 *v1alpha1.Application
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, []byte) (*v1alpha1.Application, error)); ok {
		return rf(ctx, name, namespace, patch)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, []byte) *v1alpha1.Application); ok {
		r0 = rf(ctx, name, namespace, patch)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.Application)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, []byte) error); ok {
		r1 = rf(ctx, name, namespace, patch)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Patch is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
//   - namespace string
//   - patch []byte
func (_e *Application_Expecter) Patch(ctx interface{}, name interface{}, namespace interface{}, patch interface{}) *Application_Patch_Call {
	return &Application_Patch_Call{Call: _e.mock.On("Patch", ctx, name, namespace, patch)}
}

func (_c *Application_Patch_Call) Run(run func(ctx context.Context, name string, namespace string, patch []byte)) *Application_Patch_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]byte))
	})
	return _c
}

func (_c *Application_Patch_Call) Return(_a0 *v1alpha1.Application, _a1 error) *Application_Patch_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Application_Patch_Call) RunAndReturn(run func(context.Context, string, string, []byte) (*v1alpha1.Application, error)) *Application_Patch_Call {
	_c.Call.Return(run)
	return _c
}

// StartInformer provides a mock function with given fields: ctx
func (_m *Application) StartInformer(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

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

// StartInformer is a helper method to define mock.On call
//   - ctx context.Context
func (_e *Application_Expecter) StartInformer(ctx interface{}) *Application_StartInformer_Call {
	return &Application_StartInformer_Call{Call: _e.mock.On("StartInformer", ctx)}
}

func (_c *Application_StartInformer_Call) Run(run func(ctx context.Context)) *Application_StartInformer_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

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

func (_c *Application_StartInformer_Call) RunAndReturn(run func(context.Context) error) *Application_StartInformer_Call {
	_c.Call.Return(run)
	return _c
}

// SupportsPatch provides a mock function with given fields:
func (_m *Application) SupportsPatch() bool {
	ret := _m.Called()

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

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

	return r0
}

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

// SupportsPatch is a helper method to define mock.On call
func (_e *Application_Expecter) SupportsPatch() *Application_SupportsPatch_Call {
	return &Application_SupportsPatch_Call{Call: _e.mock.On("SupportsPatch")}
}

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

func (_c *Application_SupportsPatch_Call) Return(_a0 bool) *Application_SupportsPatch_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Application_SupportsPatch_Call) RunAndReturn(run func() bool) *Application_SupportsPatch_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function with given fields: ctx, app
func (_m *Application) Update(ctx context.Context, app *v1alpha1.Application) (*v1alpha1.Application, error) {
	ret := _m.Called(ctx, app)

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

	var r0 *v1alpha1.Application
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) (*v1alpha1.Application, error)); ok {
		return rf(ctx, app)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) *v1alpha1.Application); ok {
		r0 = rf(ctx, app)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.Application)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.Application) error); ok {
		r1 = rf(ctx, app)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - app *v1alpha1.Application
func (_e *Application_Expecter) Update(ctx interface{}, app interface{}) *Application_Update_Call {
	return &Application_Update_Call{Call: _e.mock.On("Update", ctx, app)}
}

func (_c *Application_Update_Call) Run(run func(ctx context.Context, app *v1alpha1.Application)) *Application_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*v1alpha1.Application))
	})
	return _c
}

func (_c *Application_Update_Call) Return(_a0 *v1alpha1.Application, _a1 error) *Application_Update_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Application_Update_Call) RunAndReturn(run func(context.Context, *v1alpha1.Application) (*v1alpha1.Application, error)) *Application_Update_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
