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

package mocks

import (
	"context"

	"github.com/agntcy/identity-service/internal/core/auth/types/int"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type AuthService_Expecter struct {
	mock *mock.Mock
}

func (_m *AuthService) EXPECT() *AuthService_Expecter {
	return &AuthService_Expecter{mock: &_m.Mock}
}

// ApproveToken provides a mock function for the type AuthService
func (_mock *AuthService) ApproveToken(ctx context.Context, deviceID string, sessionID string, otpValue string, approve bool) error {
	ret := _mock.Called(ctx, deviceID, sessionID, otpValue, approve)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool) error); ok {
		r0 = returnFunc(ctx, deviceID, sessionID, otpValue, approve)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// ApproveToken is a helper method to define mock.On call
//   - ctx context.Context
//   - deviceID string
//   - sessionID string
//   - otpValue string
//   - approve bool
func (_e *AuthService_Expecter) ApproveToken(ctx interface{}, deviceID interface{}, sessionID interface{}, otpValue interface{}, approve interface{}) *AuthService_ApproveToken_Call {
	return &AuthService_ApproveToken_Call{Call: _e.mock.On("ApproveToken", ctx, deviceID, sessionID, otpValue, approve)}
}

func (_c *AuthService_ApproveToken_Call) Run(run func(ctx context.Context, deviceID string, sessionID string, otpValue string, approve bool)) *AuthService_ApproveToken_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 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 bool
		if args[4] != nil {
			arg4 = args[4].(bool)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

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

func (_c *AuthService_ApproveToken_Call) RunAndReturn(run func(ctx context.Context, deviceID string, sessionID string, otpValue string, approve bool) error) *AuthService_ApproveToken_Call {
	_c.Call.Return(run)
	return _c
}

// Authorize provides a mock function for the type AuthService
func (_mock *AuthService) Authorize(ctx context.Context, resolverMetadataID *string, toolName *string, userToken *string) (*types.Session, error) {
	ret := _mock.Called(ctx, resolverMetadataID, toolName, userToken)

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

	var r0 *types.Session
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *string, *string, *string) (*types.Session, error)); ok {
		return returnFunc(ctx, resolverMetadataID, toolName, userToken)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *string, *string, *string) *types.Session); ok {
		r0 = returnFunc(ctx, resolverMetadataID, toolName, userToken)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.Session)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *string, *string, *string) error); ok {
		r1 = returnFunc(ctx, resolverMetadataID, toolName, userToken)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Authorize is a helper method to define mock.On call
//   - ctx context.Context
//   - resolverMetadataID *string
//   - toolName *string
//   - userToken *string
func (_e *AuthService_Expecter) Authorize(ctx interface{}, resolverMetadataID interface{}, toolName interface{}, userToken interface{}) *AuthService_Authorize_Call {
	return &AuthService_Authorize_Call{Call: _e.mock.On("Authorize", ctx, resolverMetadataID, toolName, userToken)}
}

func (_c *AuthService_Authorize_Call) Run(run func(ctx context.Context, resolverMetadataID *string, toolName *string, userToken *string)) *AuthService_Authorize_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 *string
		if args[2] != nil {
			arg2 = args[2].(*string)
		}
		var arg3 *string
		if args[3] != nil {
			arg3 = args[3].(*string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *AuthService_Authorize_Call) Return(session *types.Session, err error) *AuthService_Authorize_Call {
	_c.Call.Return(session, err)
	return _c
}

func (_c *AuthService_Authorize_Call) RunAndReturn(run func(ctx context.Context, resolverMetadataID *string, toolName *string, userToken *string) (*types.Session, error)) *AuthService_Authorize_Call {
	_c.Call.Return(run)
	return _c
}

// ExtAuthZ provides a mock function for the type AuthService
func (_mock *AuthService) ExtAuthZ(ctx context.Context, accessToken string, toolName string) error {
	ret := _mock.Called(ctx, accessToken, toolName)

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

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

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

// ExtAuthZ is a helper method to define mock.On call
//   - ctx context.Context
//   - accessToken string
//   - toolName string
func (_e *AuthService_Expecter) ExtAuthZ(ctx interface{}, accessToken interface{}, toolName interface{}) *AuthService_ExtAuthZ_Call {
	return &AuthService_ExtAuthZ_Call{Call: _e.mock.On("ExtAuthZ", ctx, accessToken, toolName)}
}

func (_c *AuthService_ExtAuthZ_Call) Run(run func(ctx context.Context, accessToken string, toolName string)) *AuthService_ExtAuthZ_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 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *AuthService_ExtAuthZ_Call) RunAndReturn(run func(ctx context.Context, accessToken string, toolName string) error) *AuthService_ExtAuthZ_Call {
	_c.Call.Return(run)
	return _c
}

// Token provides a mock function for the type AuthService
func (_mock *AuthService) Token(ctx context.Context, authorizationCode string) (*types.Session, error) {
	ret := _mock.Called(ctx, authorizationCode)

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

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

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

// Token is a helper method to define mock.On call
//   - ctx context.Context
//   - authorizationCode string
func (_e *AuthService_Expecter) Token(ctx interface{}, authorizationCode interface{}) *AuthService_Token_Call {
	return &AuthService_Token_Call{Call: _e.mock.On("Token", ctx, authorizationCode)}
}

func (_c *AuthService_Token_Call) Run(run func(ctx context.Context, authorizationCode string)) *AuthService_Token_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)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *AuthService_Token_Call) Return(session *types.Session, err error) *AuthService_Token_Call {
	_c.Call.Return(session, err)
	return _c
}

func (_c *AuthService_Token_Call) RunAndReturn(run func(ctx context.Context, authorizationCode string) (*types.Session, error)) *AuthService_Token_Call {
	_c.Call.Return(run)
	return _c
}
