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

package mocks

import (
	"net/http"

	"github.com/argoproj/argo-workflows/v3/server/auth/types"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Interface_Expecter struct {
	mock *mock.Mock
}

func (_m *Interface) EXPECT() *Interface_Expecter {
	return &Interface_Expecter{mock: &_m.Mock}
}

// Authorize provides a mock function for the type Interface
func (_mock *Interface) Authorize(authorization string) (*types.Claims, error) {
	ret := _mock.Called(authorization)

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

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

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

// Authorize is a helper method to define mock.On call
//   - authorization string
func (_e *Interface_Expecter) Authorize(authorization interface{}) *Interface_Authorize_Call {
	return &Interface_Authorize_Call{Call: _e.mock.On("Authorize", authorization)}
}

func (_c *Interface_Authorize_Call) Run(run func(authorization string)) *Interface_Authorize_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *Interface_Authorize_Call) Return(claims *types.Claims, err error) *Interface_Authorize_Call {
	_c.Call.Return(claims, err)
	return _c
}

func (_c *Interface_Authorize_Call) RunAndReturn(run func(authorization string) (*types.Claims, error)) *Interface_Authorize_Call {
	_c.Call.Return(run)
	return _c
}

// HandleCallback provides a mock function for the type Interface
func (_mock *Interface) HandleCallback(writer http.ResponseWriter, request *http.Request) {
	_mock.Called(writer, request)
	return
}

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

// HandleCallback is a helper method to define mock.On call
//   - writer http.ResponseWriter
//   - request *http.Request
func (_e *Interface_Expecter) HandleCallback(writer interface{}, request interface{}) *Interface_HandleCallback_Call {
	return &Interface_HandleCallback_Call{Call: _e.mock.On("HandleCallback", writer, request)}
}

func (_c *Interface_HandleCallback_Call) Run(run func(writer http.ResponseWriter, request *http.Request)) *Interface_HandleCallback_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 http.ResponseWriter
		if args[0] != nil {
			arg0 = args[0].(http.ResponseWriter)
		}
		var arg1 *http.Request
		if args[1] != nil {
			arg1 = args[1].(*http.Request)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Interface_HandleCallback_Call) Return() *Interface_HandleCallback_Call {
	_c.Call.Return()
	return _c
}

func (_c *Interface_HandleCallback_Call) RunAndReturn(run func(writer http.ResponseWriter, request *http.Request)) *Interface_HandleCallback_Call {
	_c.Run(run)
	return _c
}

// HandleRedirect provides a mock function for the type Interface
func (_mock *Interface) HandleRedirect(writer http.ResponseWriter, request *http.Request) {
	_mock.Called(writer, request)
	return
}

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

// HandleRedirect is a helper method to define mock.On call
//   - writer http.ResponseWriter
//   - request *http.Request
func (_e *Interface_Expecter) HandleRedirect(writer interface{}, request interface{}) *Interface_HandleRedirect_Call {
	return &Interface_HandleRedirect_Call{Call: _e.mock.On("HandleRedirect", writer, request)}
}

func (_c *Interface_HandleRedirect_Call) Run(run func(writer http.ResponseWriter, request *http.Request)) *Interface_HandleRedirect_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 http.ResponseWriter
		if args[0] != nil {
			arg0 = args[0].(http.ResponseWriter)
		}
		var arg1 *http.Request
		if args[1] != nil {
			arg1 = args[1].(*http.Request)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Interface_HandleRedirect_Call) Return() *Interface_HandleRedirect_Call {
	_c.Call.Return()
	return _c
}

func (_c *Interface_HandleRedirect_Call) RunAndReturn(run func(writer http.ResponseWriter, request *http.Request)) *Interface_HandleRedirect_Call {
	_c.Run(run)
	return _c
}

// IsRBACEnabled provides a mock function for the type Interface
func (_mock *Interface) IsRBACEnabled() bool {
	ret := _mock.Called()

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

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

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

// IsRBACEnabled is a helper method to define mock.On call
func (_e *Interface_Expecter) IsRBACEnabled() *Interface_IsRBACEnabled_Call {
	return &Interface_IsRBACEnabled_Call{Call: _e.mock.On("IsRBACEnabled")}
}

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

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

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