// Code generated by mockery v2.53.4. 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"

	v1 "k8s.io/api/core/v1"
)

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

type Repository_Expecter struct {
	mock *mock.Mock
}

func (_m *Repository) EXPECT() *Repository_Expecter {
	return &Repository_Expecter{mock: &_m.Mock}
}

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

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

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

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

	return r0, r1
}

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - app *v1.Secret
func (_e *Repository_Expecter) Create(ctx interface{}, app interface{}) *Repository_Create_Call {
	return &Repository_Create_Call{Call: _e.mock.On("Create", ctx, app)}
}

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

func (_c *Repository_Create_Call) Return(_a0 *v1.Secret, _a1 error) *Repository_Create_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Repository_Create_Call) RunAndReturn(run func(context.Context, *v1.Secret) (*v1.Secret, error)) *Repository_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function with given fields: ctx, name, namespace, deletionPropagation
func (_m *Repository) 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
}

// Repository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type Repository_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 *Repository_Expecter) Delete(ctx interface{}, name interface{}, namespace interface{}, deletionPropagation interface{}) *Repository_Delete_Call {
	return &Repository_Delete_Call{Call: _e.mock.On("Delete", ctx, name, namespace, deletionPropagation)}
}

func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, name string, namespace string, deletionPropagation *backend.DeletionPropagation)) *Repository_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 *Repository_Delete_Call) Return(_a0 error) *Repository_Delete_Call {
	_c.Call.Return(_a0)
	return _c
}

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

// EnsureSynced provides a mock function with given fields: duration
func (_m *Repository) 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
}

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

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

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

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

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

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

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

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

	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
}

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

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

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

func (_c *Repository_Get_Call) Return(_a0 *v1.Secret, _a1 error) *Repository_Get_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Repository_Get_Call) RunAndReturn(run func(context.Context, string, string) (*v1.Secret, error)) *Repository_Get_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

	return r0, r1
}

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

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

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

func (_c *Repository_List_Call) Return(_a0 []v1.Secret, _a1 error) *Repository_List_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, backend.RepositorySelector) ([]v1.Secret, error)) *Repository_List_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

	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
}

// Repository_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch'
type Repository_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 *Repository_Expecter) Patch(ctx interface{}, name interface{}, namespace interface{}, patch interface{}) *Repository_Patch_Call {
	return &Repository_Patch_Call{Call: _e.mock.On("Patch", ctx, name, namespace, patch)}
}

func (_c *Repository_Patch_Call) Run(run func(ctx context.Context, name string, namespace string, patch []byte)) *Repository_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 *Repository_Patch_Call) Return(_a0 *v1.Secret, _a1 error) *Repository_Patch_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Repository_Patch_Call) RunAndReturn(run func(context.Context, string, string, []byte) (*v1.Secret, error)) *Repository_Patch_Call {
	_c.Call.Return(run)
	return _c
}

// StartInformer provides a mock function with given fields: ctx
func (_m *Repository) 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
}

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

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

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

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

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

// SupportsPatch provides a mock function with no fields
func (_m *Repository) 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
}

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

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

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

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

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

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

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

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

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

	return r0, r1
}

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - app *v1.Secret
func (_e *Repository_Expecter) Update(ctx interface{}, app interface{}) *Repository_Update_Call {
	return &Repository_Update_Call{Call: _e.mock.On("Update", ctx, app)}
}

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

func (_c *Repository_Update_Call) Return(_a0 *v1.Secret, _a1 error) *Repository_Update_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Repository_Update_Call) RunAndReturn(run func(context.Context, *v1.Secret) (*v1.Secret, error)) *Repository_Update_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
