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

package mocks

import (
	"context"

	"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
	mock "github.com/stretchr/testify/mock"
	"k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/apimachinery/pkg/watch"
)

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

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

	return mock
}

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

type AppProjectInterface_Expecter struct {
	mock *mock.Mock
}

func (_m *AppProjectInterface) EXPECT() *AppProjectInterface_Expecter {
	return &AppProjectInterface_Expecter{mock: &_m.Mock}
}

// Create provides a mock function for the type AppProjectInterface
func (_mock *AppProjectInterface) Create(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.CreateOptions) (*v1alpha1.AppProject, error) {
	ret := _mock.Called(ctx, appProject, opts)

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

	var r0 *v1alpha1.AppProject
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) (*v1alpha1.AppProject, error)); ok {
		return returnFunc(ctx, appProject, opts)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) *v1alpha1.AppProject); ok {
		r0 = returnFunc(ctx, appProject, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.AppProject)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.AppProject, v1.CreateOptions) error); ok {
		r1 = returnFunc(ctx, appProject, opts)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - appProject *v1alpha1.AppProject
//   - opts v1.CreateOptions
func (_e *AppProjectInterface_Expecter) Create(ctx any, appProject any, opts any) *AppProjectInterface_Create_Call {
	return &AppProjectInterface_Create_Call{Call: _e.mock.On("Create", ctx, appProject, opts)}
}

func (_c *AppProjectInterface_Create_Call) Run(run func(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.CreateOptions)) *AppProjectInterface_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *v1alpha1.AppProject
		if args[1] != nil {
			arg1 = args[1].(*v1alpha1.AppProject)
		}
		var arg2 v1.CreateOptions
		if args[2] != nil {
			arg2 = args[2].(v1.CreateOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *AppProjectInterface_Create_Call) Return(appProject1 *v1alpha1.AppProject, err error) *AppProjectInterface_Create_Call {
	_c.Call.Return(appProject1, err)
	return _c
}

func (_c *AppProjectInterface_Create_Call) RunAndReturn(run func(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.CreateOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function for the type AppProjectInterface
func (_mock *AppProjectInterface) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
	ret := _mock.Called(ctx, name, opts)

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

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

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

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
//   - opts v1.DeleteOptions
func (_e *AppProjectInterface_Expecter) Delete(ctx any, name any, opts any) *AppProjectInterface_Delete_Call {
	return &AppProjectInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, name, opts)}
}

func (_c *AppProjectInterface_Delete_Call) Run(run func(ctx context.Context, name string, opts v1.DeleteOptions)) *AppProjectInterface_Delete_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 v1.DeleteOptions
		if args[2] != nil {
			arg2 = args[2].(v1.DeleteOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *AppProjectInterface_Delete_Call) RunAndReturn(run func(ctx context.Context, name string, opts v1.DeleteOptions) error) *AppProjectInterface_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteCollection provides a mock function for the type AppProjectInterface
func (_mock *AppProjectInterface) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
	ret := _mock.Called(ctx, opts, listOpts)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, v1.DeleteOptions, v1.ListOptions) error); ok {
		r0 = returnFunc(ctx, opts, listOpts)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// DeleteCollection is a helper method to define mock.On call
//   - ctx context.Context
//   - opts v1.DeleteOptions
//   - listOpts v1.ListOptions
func (_e *AppProjectInterface_Expecter) DeleteCollection(ctx any, opts any, listOpts any) *AppProjectInterface_DeleteCollection_Call {
	return &AppProjectInterface_DeleteCollection_Call{Call: _e.mock.On("DeleteCollection", ctx, opts, listOpts)}
}

func (_c *AppProjectInterface_DeleteCollection_Call) Run(run func(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions)) *AppProjectInterface_DeleteCollection_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 v1.DeleteOptions
		if args[1] != nil {
			arg1 = args[1].(v1.DeleteOptions)
		}
		var arg2 v1.ListOptions
		if args[2] != nil {
			arg2 = args[2].(v1.ListOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *AppProjectInterface_DeleteCollection_Call) RunAndReturn(run func(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error) *AppProjectInterface_DeleteCollection_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function for the type AppProjectInterface
func (_mock *AppProjectInterface) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AppProject, error) {
	ret := _mock.Called(ctx, name, opts)

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

	var r0 *v1alpha1.AppProject
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions) (*v1alpha1.AppProject, error)); ok {
		return returnFunc(ctx, name, opts)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, v1.GetOptions) *v1alpha1.AppProject); ok {
		r0 = returnFunc(ctx, name, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.AppProject)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, v1.GetOptions) error); ok {
		r1 = returnFunc(ctx, name, opts)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
//   - opts v1.GetOptions
func (_e *AppProjectInterface_Expecter) Get(ctx any, name any, opts any) *AppProjectInterface_Get_Call {
	return &AppProjectInterface_Get_Call{Call: _e.mock.On("Get", ctx, name, opts)}
}

func (_c *AppProjectInterface_Get_Call) Run(run func(ctx context.Context, name string, opts v1.GetOptions)) *AppProjectInterface_Get_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 v1.GetOptions
		if args[2] != nil {
			arg2 = args[2].(v1.GetOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *AppProjectInterface_Get_Call) Return(appProject *v1alpha1.AppProject, err error) *AppProjectInterface_Get_Call {
	_c.Call.Return(appProject, err)
	return _c
}

func (_c *AppProjectInterface_Get_Call) RunAndReturn(run func(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Get_Call {
	_c.Call.Return(run)
	return _c
}

// List provides a mock function for the type AppProjectInterface
func (_mock *AppProjectInterface) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AppProjectList, error) {
	ret := _mock.Called(ctx, opts)

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

	var r0 *v1alpha1.AppProjectList
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ListOptions) (*v1alpha1.AppProjectList, error)); ok {
		return returnFunc(ctx, opts)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ListOptions) *v1alpha1.AppProjectList); ok {
		r0 = returnFunc(ctx, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.AppProjectList)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok {
		r1 = returnFunc(ctx, opts)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// List is a helper method to define mock.On call
//   - ctx context.Context
//   - opts v1.ListOptions
func (_e *AppProjectInterface_Expecter) List(ctx any, opts any) *AppProjectInterface_List_Call {
	return &AppProjectInterface_List_Call{Call: _e.mock.On("List", ctx, opts)}
}

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

func (_c *AppProjectInterface_List_Call) Return(appProjectList *v1alpha1.AppProjectList, err error) *AppProjectInterface_List_Call {
	_c.Call.Return(appProjectList, err)
	return _c
}

func (_c *AppProjectInterface_List_Call) RunAndReturn(run func(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AppProjectList, error)) *AppProjectInterface_List_Call {
	_c.Call.Return(run)
	return _c
}

// Patch provides a mock function for the type AppProjectInterface
func (_mock *AppProjectInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (*v1alpha1.AppProject, error) {
	// string
	_va := make([]any, len(subresources))
	for _i := range subresources {
		_va[_i] = subresources[_i]
	}
	var _ca []any
	_ca = append(_ca, ctx, name, pt, data, opts)
	_ca = append(_ca, _va...)
	ret := _mock.Called(_ca...)

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

	var r0 *v1alpha1.AppProject
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) (*v1alpha1.AppProject, error)); ok {
		return returnFunc(ctx, name, pt, data, opts, subresources...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) *v1alpha1.AppProject); ok {
		r0 = returnFunc(ctx, name, pt, data, opts, subresources...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.AppProject)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, v1.PatchOptions, ...string) error); ok {
		r1 = returnFunc(ctx, name, pt, data, opts, subresources...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Patch is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
//   - pt types.PatchType
//   - data []byte
//   - opts v1.PatchOptions
//   - subresources ...string
func (_e *AppProjectInterface_Expecter) Patch(ctx any, name any, pt any, data any, opts any, subresources ...any) *AppProjectInterface_Patch_Call {
	return &AppProjectInterface_Patch_Call{Call: _e.mock.On("Patch",
		append([]any{ctx, name, pt, data, opts}, subresources...)...)}
}

func (_c *AppProjectInterface_Patch_Call) Run(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string)) *AppProjectInterface_Patch_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 types.PatchType
		if args[2] != nil {
			arg2 = args[2].(types.PatchType)
		}
		var arg3 []byte
		if args[3] != nil {
			arg3 = args[3].([]byte)
		}
		var arg4 v1.PatchOptions
		if args[4] != nil {
			arg4 = args[4].(v1.PatchOptions)
		}
		var arg5 []string
		variadicArgs := make([]string, len(args)-5)
		for i, a := range args[5:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		arg5 = variadicArgs
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
			arg5...,
		)
	})
	return _c
}

func (_c *AppProjectInterface_Patch_Call) Return(result *v1alpha1.AppProject, err error) *AppProjectInterface_Patch_Call {
	_c.Call.Return(result, err)
	return _c
}

func (_c *AppProjectInterface_Patch_Call) RunAndReturn(run func(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (*v1alpha1.AppProject, error)) *AppProjectInterface_Patch_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function for the type AppProjectInterface
func (_mock *AppProjectInterface) Update(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.UpdateOptions) (*v1alpha1.AppProject, error) {
	ret := _mock.Called(ctx, appProject, opts)

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

	var r0 *v1alpha1.AppProject
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) (*v1alpha1.AppProject, error)); ok {
		return returnFunc(ctx, appProject, opts)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) *v1alpha1.AppProject); ok {
		r0 = returnFunc(ctx, appProject, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.AppProject)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.AppProject, v1.UpdateOptions) error); ok {
		r1 = returnFunc(ctx, appProject, opts)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - appProject *v1alpha1.AppProject
//   - opts v1.UpdateOptions
func (_e *AppProjectInterface_Expecter) Update(ctx any, appProject any, opts any) *AppProjectInterface_Update_Call {
	return &AppProjectInterface_Update_Call{Call: _e.mock.On("Update", ctx, appProject, opts)}
}

func (_c *AppProjectInterface_Update_Call) Run(run func(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.UpdateOptions)) *AppProjectInterface_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *v1alpha1.AppProject
		if args[1] != nil {
			arg1 = args[1].(*v1alpha1.AppProject)
		}
		var arg2 v1.UpdateOptions
		if args[2] != nil {
			arg2 = args[2].(v1.UpdateOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *AppProjectInterface_Update_Call) Return(appProject1 *v1alpha1.AppProject, err error) *AppProjectInterface_Update_Call {
	_c.Call.Return(appProject1, err)
	return _c
}

func (_c *AppProjectInterface_Update_Call) RunAndReturn(run func(ctx context.Context, appProject *v1alpha1.AppProject, opts v1.UpdateOptions) (*v1alpha1.AppProject, error)) *AppProjectInterface_Update_Call {
	_c.Call.Return(run)
	return _c
}

// Watch provides a mock function for the type AppProjectInterface
func (_mock *AppProjectInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
	ret := _mock.Called(ctx, opts)

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

	var r0 watch.Interface
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ListOptions) (watch.Interface, error)); ok {
		return returnFunc(ctx, opts)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, v1.ListOptions) watch.Interface); ok {
		r0 = returnFunc(ctx, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(watch.Interface)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, v1.ListOptions) error); ok {
		r1 = returnFunc(ctx, opts)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Watch is a helper method to define mock.On call
//   - ctx context.Context
//   - opts v1.ListOptions
func (_e *AppProjectInterface_Expecter) Watch(ctx any, opts any) *AppProjectInterface_Watch_Call {
	return &AppProjectInterface_Watch_Call{Call: _e.mock.On("Watch", ctx, opts)}
}

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

func (_c *AppProjectInterface_Watch_Call) Return(interfaceParam watch.Interface, err error) *AppProjectInterface_Watch_Call {
	_c.Call.Return(interfaceParam, err)
	return _c
}

func (_c *AppProjectInterface_Watch_Call) RunAndReturn(run func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)) *AppProjectInterface_Watch_Call {
	_c.Call.Return(run)
	return _c
}
