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

package mocks

import (
	v1alpha10 "github.com/argoproj-labs/argocd-ephemeral-access/api/argoproj/v1alpha1"
	"github.com/argoproj-labs/argocd-ephemeral-access/api/ephemeral-access/v1alpha1"
	"github.com/argoproj-labs/argocd-ephemeral-access/pkg/plugin"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type MockAccessRequester_Expecter struct {
	mock *mock.Mock
}

func (_m *MockAccessRequester) EXPECT() *MockAccessRequester_Expecter {
	return &MockAccessRequester_Expecter{mock: &_m.Mock}
}

// GrantAccess provides a mock function for the type MockAccessRequester
func (_mock *MockAccessRequester) GrantAccess(ar *v1alpha1.AccessRequest, app *v1alpha10.Application) (*plugin.GrantResponse, error) {
	ret := _mock.Called(ar, app)

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

	var r0 *plugin.GrantResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*v1alpha1.AccessRequest, *v1alpha10.Application) (*plugin.GrantResponse, error)); ok {
		return returnFunc(ar, app)
	}
	if returnFunc, ok := ret.Get(0).(func(*v1alpha1.AccessRequest, *v1alpha10.Application) *plugin.GrantResponse); ok {
		r0 = returnFunc(ar, app)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*plugin.GrantResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*v1alpha1.AccessRequest, *v1alpha10.Application) error); ok {
		r1 = returnFunc(ar, app)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GrantAccess is a helper method to define mock.On call
//   - ar *v1alpha1.AccessRequest
//   - app *v1alpha10.Application
func (_e *MockAccessRequester_Expecter) GrantAccess(ar interface{}, app interface{}) *MockAccessRequester_GrantAccess_Call {
	return &MockAccessRequester_GrantAccess_Call{Call: _e.mock.On("GrantAccess", ar, app)}
}

func (_c *MockAccessRequester_GrantAccess_Call) Run(run func(ar *v1alpha1.AccessRequest, app *v1alpha10.Application)) *MockAccessRequester_GrantAccess_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *v1alpha1.AccessRequest
		if args[0] != nil {
			arg0 = args[0].(*v1alpha1.AccessRequest)
		}
		var arg1 *v1alpha10.Application
		if args[1] != nil {
			arg1 = args[1].(*v1alpha10.Application)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockAccessRequester_GrantAccess_Call) Return(grantResponse *plugin.GrantResponse, err error) *MockAccessRequester_GrantAccess_Call {
	_c.Call.Return(grantResponse, err)
	return _c
}

func (_c *MockAccessRequester_GrantAccess_Call) RunAndReturn(run func(ar *v1alpha1.AccessRequest, app *v1alpha10.Application) (*plugin.GrantResponse, error)) *MockAccessRequester_GrantAccess_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

// Init is a helper method to define mock.On call
func (_e *MockAccessRequester_Expecter) Init() *MockAccessRequester_Init_Call {
	return &MockAccessRequester_Init_Call{Call: _e.mock.On("Init")}
}

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

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

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

// RevokeAccess provides a mock function for the type MockAccessRequester
func (_mock *MockAccessRequester) RevokeAccess(ar *v1alpha1.AccessRequest, app *v1alpha10.Application) (*plugin.RevokeResponse, error) {
	ret := _mock.Called(ar, app)

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

	var r0 *plugin.RevokeResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*v1alpha1.AccessRequest, *v1alpha10.Application) (*plugin.RevokeResponse, error)); ok {
		return returnFunc(ar, app)
	}
	if returnFunc, ok := ret.Get(0).(func(*v1alpha1.AccessRequest, *v1alpha10.Application) *plugin.RevokeResponse); ok {
		r0 = returnFunc(ar, app)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*plugin.RevokeResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*v1alpha1.AccessRequest, *v1alpha10.Application) error); ok {
		r1 = returnFunc(ar, app)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RevokeAccess is a helper method to define mock.On call
//   - ar *v1alpha1.AccessRequest
//   - app *v1alpha10.Application
func (_e *MockAccessRequester_Expecter) RevokeAccess(ar interface{}, app interface{}) *MockAccessRequester_RevokeAccess_Call {
	return &MockAccessRequester_RevokeAccess_Call{Call: _e.mock.On("RevokeAccess", ar, app)}
}

func (_c *MockAccessRequester_RevokeAccess_Call) Run(run func(ar *v1alpha1.AccessRequest, app *v1alpha10.Application)) *MockAccessRequester_RevokeAccess_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *v1alpha1.AccessRequest
		if args[0] != nil {
			arg0 = args[0].(*v1alpha1.AccessRequest)
		}
		var arg1 *v1alpha10.Application
		if args[1] != nil {
			arg1 = args[1].(*v1alpha10.Application)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockAccessRequester_RevokeAccess_Call) Return(revokeResponse *plugin.RevokeResponse, err error) *MockAccessRequester_RevokeAccess_Call {
	_c.Call.Return(revokeResponse, err)
	return _c
}

func (_c *MockAccessRequester_RevokeAccess_Call) RunAndReturn(run func(ar *v1alpha1.AccessRequest, app *v1alpha10.Application) (*plugin.RevokeResponse, error)) *MockAccessRequester_RevokeAccess_Call {
	_c.Call.Return(run)
	return _c
}
