// Copyright (c) Abstract Machines

// SPDX-License-Identifier: Apache-2.0

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

package mocks

import (
	"context"
	"time"

	"github.com/absmach/magistrala/auth"
	"github.com/absmach/magistrala/pkg/policies"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Service_Expecter struct {
	mock *mock.Mock
}

func (_m *Service) EXPECT() *Service_Expecter {
	return &Service_Expecter{mock: &_m.Mock}
}

// AddScope provides a mock function for the type Service
func (_mock *Service) AddScope(ctx context.Context, token string, patID string, scopes []auth.Scope) error {
	ret := _mock.Called(ctx, token, patID, scopes)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []auth.Scope) error); ok {
		r0 = returnFunc(ctx, token, patID, scopes)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// AddScope is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - patID string
//   - scopes []auth.Scope
func (_e *Service_Expecter) AddScope(ctx interface{}, token interface{}, patID interface{}, scopes interface{}) *Service_AddScope_Call {
	return &Service_AddScope_Call{Call: _e.mock.On("AddScope", ctx, token, patID, scopes)}
}

func (_c *Service_AddScope_Call) Run(run func(ctx context.Context, token string, patID string, scopes []auth.Scope)) *Service_AddScope_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 []auth.Scope
		if args[3] != nil {
			arg3 = args[3].([]auth.Scope)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

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

func (_c *Service_AddScope_Call) RunAndReturn(run func(ctx context.Context, token string, patID string, scopes []auth.Scope) error) *Service_AddScope_Call {
	_c.Call.Return(run)
	return _c
}

// Authorize provides a mock function for the type Service
func (_mock *Service) Authorize(ctx context.Context, pr policies.Policy, patAuthz *auth.PATAuthz) error {
	ret := _mock.Called(ctx, pr, patAuthz)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, policies.Policy, *auth.PATAuthz) error); ok {
		r0 = returnFunc(ctx, pr, patAuthz)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Authorize is a helper method to define mock.On call
//   - ctx context.Context
//   - pr policies.Policy
//   - patAuthz *auth.PATAuthz
func (_e *Service_Expecter) Authorize(ctx interface{}, pr interface{}, patAuthz interface{}) *Service_Authorize_Call {
	return &Service_Authorize_Call{Call: _e.mock.On("Authorize", ctx, pr, patAuthz)}
}

func (_c *Service_Authorize_Call) Run(run func(ctx context.Context, pr policies.Policy, patAuthz *auth.PATAuthz)) *Service_Authorize_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 policies.Policy
		if args[1] != nil {
			arg1 = args[1].(policies.Policy)
		}
		var arg2 *auth.PATAuthz
		if args[2] != nil {
			arg2 = args[2].(*auth.PATAuthz)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Service_Authorize_Call) RunAndReturn(run func(ctx context.Context, pr policies.Policy, patAuthz *auth.PATAuthz) error) *Service_Authorize_Call {
	_c.Call.Return(run)
	return _c
}

// AuthorizePAT provides a mock function for the type Service
func (_mock *Service) AuthorizePAT(ctx context.Context, userID string, patID string, entityType auth.EntityType, domainID string, operation string, entityID string) error {
	ret := _mock.Called(ctx, userID, patID, entityType, domainID, operation, entityID)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, auth.EntityType, string, string, string) error); ok {
		r0 = returnFunc(ctx, userID, patID, entityType, domainID, operation, entityID)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// AuthorizePAT is a helper method to define mock.On call
//   - ctx context.Context
//   - userID string
//   - patID string
//   - entityType auth.EntityType
//   - domainID string
//   - operation string
//   - entityID string
func (_e *Service_Expecter) AuthorizePAT(ctx interface{}, userID interface{}, patID interface{}, entityType interface{}, domainID interface{}, operation interface{}, entityID interface{}) *Service_AuthorizePAT_Call {
	return &Service_AuthorizePAT_Call{Call: _e.mock.On("AuthorizePAT", ctx, userID, patID, entityType, domainID, operation, entityID)}
}

func (_c *Service_AuthorizePAT_Call) Run(run func(ctx context.Context, userID string, patID string, entityType auth.EntityType, domainID string, operation string, entityID string)) *Service_AuthorizePAT_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 auth.EntityType
		if args[3] != nil {
			arg3 = args[3].(auth.EntityType)
		}
		var arg4 string
		if args[4] != nil {
			arg4 = args[4].(string)
		}
		var arg5 string
		if args[5] != nil {
			arg5 = args[5].(string)
		}
		var arg6 string
		if args[6] != nil {
			arg6 = args[6].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
			arg5,
			arg6,
		)
	})
	return _c
}

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

func (_c *Service_AuthorizePAT_Call) RunAndReturn(run func(ctx context.Context, userID string, patID string, entityType auth.EntityType, domainID string, operation string, entityID string) error) *Service_AuthorizePAT_Call {
	_c.Call.Return(run)
	return _c
}

// CreatePAT provides a mock function for the type Service
func (_mock *Service) CreatePAT(ctx context.Context, token string, name string, description string, duration time.Duration) (auth.PAT, error) {
	ret := _mock.Called(ctx, token, name, description, duration)

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

	var r0 auth.PAT
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, time.Duration) (auth.PAT, error)); ok {
		return returnFunc(ctx, token, name, description, duration)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, time.Duration) auth.PAT); ok {
		r0 = returnFunc(ctx, token, name, description, duration)
	} else {
		r0 = ret.Get(0).(auth.PAT)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, time.Duration) error); ok {
		r1 = returnFunc(ctx, token, name, description, duration)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// CreatePAT is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - name string
//   - description string
//   - duration time.Duration
func (_e *Service_Expecter) CreatePAT(ctx interface{}, token interface{}, name interface{}, description interface{}, duration interface{}) *Service_CreatePAT_Call {
	return &Service_CreatePAT_Call{Call: _e.mock.On("CreatePAT", ctx, token, name, description, duration)}
}

func (_c *Service_CreatePAT_Call) Run(run func(ctx context.Context, token string, name string, description string, duration time.Duration)) *Service_CreatePAT_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 time.Duration
		if args[4] != nil {
			arg4 = args[4].(time.Duration)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

func (_c *Service_CreatePAT_Call) Return(pAT auth.PAT, err error) *Service_CreatePAT_Call {
	_c.Call.Return(pAT, err)
	return _c
}

func (_c *Service_CreatePAT_Call) RunAndReturn(run func(ctx context.Context, token string, name string, description string, duration time.Duration) (auth.PAT, error)) *Service_CreatePAT_Call {
	_c.Call.Return(run)
	return _c
}

// DeletePAT provides a mock function for the type Service
func (_mock *Service) DeletePAT(ctx context.Context, token string, patID string) error {
	ret := _mock.Called(ctx, token, patID)

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

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

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

// DeletePAT is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - patID string
func (_e *Service_Expecter) DeletePAT(ctx interface{}, token interface{}, patID interface{}) *Service_DeletePAT_Call {
	return &Service_DeletePAT_Call{Call: _e.mock.On("DeletePAT", ctx, token, patID)}
}

func (_c *Service_DeletePAT_Call) Run(run func(ctx context.Context, token string, patID string)) *Service_DeletePAT_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 *Service_DeletePAT_Call) Return(err error) *Service_DeletePAT_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Service_DeletePAT_Call) RunAndReturn(run func(ctx context.Context, token string, patID string) error) *Service_DeletePAT_Call {
	_c.Call.Return(run)
	return _c
}

// Identify provides a mock function for the type Service
func (_mock *Service) Identify(ctx context.Context, token string) (auth.Key, error) {
	ret := _mock.Called(ctx, token)

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

	var r0 auth.Key
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (auth.Key, error)); ok {
		return returnFunc(ctx, token)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) auth.Key); ok {
		r0 = returnFunc(ctx, token)
	} else {
		r0 = ret.Get(0).(auth.Key)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, token)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Identify is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
func (_e *Service_Expecter) Identify(ctx interface{}, token interface{}) *Service_Identify_Call {
	return &Service_Identify_Call{Call: _e.mock.On("Identify", ctx, token)}
}

func (_c *Service_Identify_Call) Run(run func(ctx context.Context, token string)) *Service_Identify_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 *Service_Identify_Call) Return(key auth.Key, err error) *Service_Identify_Call {
	_c.Call.Return(key, err)
	return _c
}

func (_c *Service_Identify_Call) RunAndReturn(run func(ctx context.Context, token string) (auth.Key, error)) *Service_Identify_Call {
	_c.Call.Return(run)
	return _c
}

// IdentifyPAT provides a mock function for the type Service
func (_mock *Service) IdentifyPAT(ctx context.Context, paToken string) (auth.PAT, error) {
	ret := _mock.Called(ctx, paToken)

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

	var r0 auth.PAT
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (auth.PAT, error)); ok {
		return returnFunc(ctx, paToken)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) auth.PAT); ok {
		r0 = returnFunc(ctx, paToken)
	} else {
		r0 = ret.Get(0).(auth.PAT)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, paToken)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// IdentifyPAT is a helper method to define mock.On call
//   - ctx context.Context
//   - paToken string
func (_e *Service_Expecter) IdentifyPAT(ctx interface{}, paToken interface{}) *Service_IdentifyPAT_Call {
	return &Service_IdentifyPAT_Call{Call: _e.mock.On("IdentifyPAT", ctx, paToken)}
}

func (_c *Service_IdentifyPAT_Call) Run(run func(ctx context.Context, paToken string)) *Service_IdentifyPAT_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 *Service_IdentifyPAT_Call) Return(pAT auth.PAT, err error) *Service_IdentifyPAT_Call {
	_c.Call.Return(pAT, err)
	return _c
}

func (_c *Service_IdentifyPAT_Call) RunAndReturn(run func(ctx context.Context, paToken string) (auth.PAT, error)) *Service_IdentifyPAT_Call {
	_c.Call.Return(run)
	return _c
}

// Issue provides a mock function for the type Service
func (_mock *Service) Issue(ctx context.Context, token string, key auth.Key) (auth.Token, error) {
	ret := _mock.Called(ctx, token, key)

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

	var r0 auth.Token
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, auth.Key) (auth.Token, error)); ok {
		return returnFunc(ctx, token, key)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, auth.Key) auth.Token); ok {
		r0 = returnFunc(ctx, token, key)
	} else {
		r0 = ret.Get(0).(auth.Token)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, auth.Key) error); ok {
		r1 = returnFunc(ctx, token, key)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Issue is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - key auth.Key
func (_e *Service_Expecter) Issue(ctx interface{}, token interface{}, key interface{}) *Service_Issue_Call {
	return &Service_Issue_Call{Call: _e.mock.On("Issue", ctx, token, key)}
}

func (_c *Service_Issue_Call) Run(run func(ctx context.Context, token string, key auth.Key)) *Service_Issue_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 auth.Key
		if args[2] != nil {
			arg2 = args[2].(auth.Key)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Service_Issue_Call) Return(token1 auth.Token, err error) *Service_Issue_Call {
	_c.Call.Return(token1, err)
	return _c
}

func (_c *Service_Issue_Call) RunAndReturn(run func(ctx context.Context, token string, key auth.Key) (auth.Token, error)) *Service_Issue_Call {
	_c.Call.Return(run)
	return _c
}

// ListPATS provides a mock function for the type Service
func (_mock *Service) ListPATS(ctx context.Context, token string, pm auth.PATSPageMeta) (auth.PATSPage, error) {
	ret := _mock.Called(ctx, token, pm)

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

	var r0 auth.PATSPage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, auth.PATSPageMeta) (auth.PATSPage, error)); ok {
		return returnFunc(ctx, token, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, auth.PATSPageMeta) auth.PATSPage); ok {
		r0 = returnFunc(ctx, token, pm)
	} else {
		r0 = ret.Get(0).(auth.PATSPage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, auth.PATSPageMeta) error); ok {
		r1 = returnFunc(ctx, token, pm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListPATS is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - pm auth.PATSPageMeta
func (_e *Service_Expecter) ListPATS(ctx interface{}, token interface{}, pm interface{}) *Service_ListPATS_Call {
	return &Service_ListPATS_Call{Call: _e.mock.On("ListPATS", ctx, token, pm)}
}

func (_c *Service_ListPATS_Call) Run(run func(ctx context.Context, token string, pm auth.PATSPageMeta)) *Service_ListPATS_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 auth.PATSPageMeta
		if args[2] != nil {
			arg2 = args[2].(auth.PATSPageMeta)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Service_ListPATS_Call) Return(pATSPage auth.PATSPage, err error) *Service_ListPATS_Call {
	_c.Call.Return(pATSPage, err)
	return _c
}

func (_c *Service_ListPATS_Call) RunAndReturn(run func(ctx context.Context, token string, pm auth.PATSPageMeta) (auth.PATSPage, error)) *Service_ListPATS_Call {
	_c.Call.Return(run)
	return _c
}

// ListScopes provides a mock function for the type Service
func (_mock *Service) ListScopes(ctx context.Context, token string, pm auth.ScopesPageMeta) (auth.ScopesPage, error) {
	ret := _mock.Called(ctx, token, pm)

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

	var r0 auth.ScopesPage
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, auth.ScopesPageMeta) (auth.ScopesPage, error)); ok {
		return returnFunc(ctx, token, pm)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, auth.ScopesPageMeta) auth.ScopesPage); ok {
		r0 = returnFunc(ctx, token, pm)
	} else {
		r0 = ret.Get(0).(auth.ScopesPage)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, auth.ScopesPageMeta) error); ok {
		r1 = returnFunc(ctx, token, pm)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListScopes is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - pm auth.ScopesPageMeta
func (_e *Service_Expecter) ListScopes(ctx interface{}, token interface{}, pm interface{}) *Service_ListScopes_Call {
	return &Service_ListScopes_Call{Call: _e.mock.On("ListScopes", ctx, token, pm)}
}

func (_c *Service_ListScopes_Call) Run(run func(ctx context.Context, token string, pm auth.ScopesPageMeta)) *Service_ListScopes_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 auth.ScopesPageMeta
		if args[2] != nil {
			arg2 = args[2].(auth.ScopesPageMeta)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *Service_ListScopes_Call) Return(scopesPage auth.ScopesPage, err error) *Service_ListScopes_Call {
	_c.Call.Return(scopesPage, err)
	return _c
}

func (_c *Service_ListScopes_Call) RunAndReturn(run func(ctx context.Context, token string, pm auth.ScopesPageMeta) (auth.ScopesPage, error)) *Service_ListScopes_Call {
	_c.Call.Return(run)
	return _c
}

// ListUserRefreshTokens provides a mock function for the type Service
func (_mock *Service) ListUserRefreshTokens(ctx context.Context, userID string) ([]auth.TokenInfo, error) {
	ret := _mock.Called(ctx, userID)

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

	var r0 []auth.TokenInfo
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]auth.TokenInfo, error)); ok {
		return returnFunc(ctx, userID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) []auth.TokenInfo); ok {
		r0 = returnFunc(ctx, userID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]auth.TokenInfo)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, userID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListUserRefreshTokens is a helper method to define mock.On call
//   - ctx context.Context
//   - userID string
func (_e *Service_Expecter) ListUserRefreshTokens(ctx interface{}, userID interface{}) *Service_ListUserRefreshTokens_Call {
	return &Service_ListUserRefreshTokens_Call{Call: _e.mock.On("ListUserRefreshTokens", ctx, userID)}
}

func (_c *Service_ListUserRefreshTokens_Call) Run(run func(ctx context.Context, userID string)) *Service_ListUserRefreshTokens_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 *Service_ListUserRefreshTokens_Call) Return(tokenInfos []auth.TokenInfo, err error) *Service_ListUserRefreshTokens_Call {
	_c.Call.Return(tokenInfos, err)
	return _c
}

func (_c *Service_ListUserRefreshTokens_Call) RunAndReturn(run func(ctx context.Context, userID string) ([]auth.TokenInfo, error)) *Service_ListUserRefreshTokens_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveAllPAT provides a mock function for the type Service
func (_mock *Service) RemoveAllPAT(ctx context.Context, token string) error {
	ret := _mock.Called(ctx, token)

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

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

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

// RemoveAllPAT is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
func (_e *Service_Expecter) RemoveAllPAT(ctx interface{}, token interface{}) *Service_RemoveAllPAT_Call {
	return &Service_RemoveAllPAT_Call{Call: _e.mock.On("RemoveAllPAT", ctx, token)}
}

func (_c *Service_RemoveAllPAT_Call) Run(run func(ctx context.Context, token string)) *Service_RemoveAllPAT_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 *Service_RemoveAllPAT_Call) Return(err error) *Service_RemoveAllPAT_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Service_RemoveAllPAT_Call) RunAndReturn(run func(ctx context.Context, token string) error) *Service_RemoveAllPAT_Call {
	_c.Call.Return(run)
	return _c
}

// RemovePATAllScope provides a mock function for the type Service
func (_mock *Service) RemovePATAllScope(ctx context.Context, token string, patID string) error {
	ret := _mock.Called(ctx, token, patID)

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

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

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

// RemovePATAllScope is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - patID string
func (_e *Service_Expecter) RemovePATAllScope(ctx interface{}, token interface{}, patID interface{}) *Service_RemovePATAllScope_Call {
	return &Service_RemovePATAllScope_Call{Call: _e.mock.On("RemovePATAllScope", ctx, token, patID)}
}

func (_c *Service_RemovePATAllScope_Call) Run(run func(ctx context.Context, token string, patID string)) *Service_RemovePATAllScope_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 *Service_RemovePATAllScope_Call) Return(err error) *Service_RemovePATAllScope_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Service_RemovePATAllScope_Call) RunAndReturn(run func(ctx context.Context, token string, patID string) error) *Service_RemovePATAllScope_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveScope provides a mock function for the type Service
func (_mock *Service) RemoveScope(ctx context.Context, token string, patID string, scopeIDs ...string) error {
	var tmpRet mock.Arguments
	if len(scopeIDs) > 0 {
		tmpRet = _mock.Called(ctx, token, patID, scopeIDs)
	} else {
		tmpRet = _mock.Called(ctx, token, patID)
	}
	ret := tmpRet

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

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

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

// RemoveScope is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - patID string
//   - scopeIDs ...string
func (_e *Service_Expecter) RemoveScope(ctx interface{}, token interface{}, patID interface{}, scopeIDs ...interface{}) *Service_RemoveScope_Call {
	return &Service_RemoveScope_Call{Call: _e.mock.On("RemoveScope",
		append([]interface{}{ctx, token, patID}, scopeIDs...)...)}
}

func (_c *Service_RemoveScope_Call) Run(run func(ctx context.Context, token string, patID string, scopeIDs ...string)) *Service_RemoveScope_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
		var variadicArgs []string
		if len(args) > 3 {
			variadicArgs = args[3].([]string)
		}
		arg3 = variadicArgs
		run(
			arg0,
			arg1,
			arg2,
			arg3...,
		)
	})
	return _c
}

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

func (_c *Service_RemoveScope_Call) RunAndReturn(run func(ctx context.Context, token string, patID string, scopeIDs ...string) error) *Service_RemoveScope_Call {
	_c.Call.Return(run)
	return _c
}

// ResetPATSecret provides a mock function for the type Service
func (_mock *Service) ResetPATSecret(ctx context.Context, token string, patID string, duration time.Duration) (auth.PAT, error) {
	ret := _mock.Called(ctx, token, patID, duration)

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

	var r0 auth.PAT
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, time.Duration) (auth.PAT, error)); ok {
		return returnFunc(ctx, token, patID, duration)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, time.Duration) auth.PAT); ok {
		r0 = returnFunc(ctx, token, patID, duration)
	} else {
		r0 = ret.Get(0).(auth.PAT)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, time.Duration) error); ok {
		r1 = returnFunc(ctx, token, patID, duration)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ResetPATSecret is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - patID string
//   - duration time.Duration
func (_e *Service_Expecter) ResetPATSecret(ctx interface{}, token interface{}, patID interface{}, duration interface{}) *Service_ResetPATSecret_Call {
	return &Service_ResetPATSecret_Call{Call: _e.mock.On("ResetPATSecret", ctx, token, patID, duration)}
}

func (_c *Service_ResetPATSecret_Call) Run(run func(ctx context.Context, token string, patID string, duration time.Duration)) *Service_ResetPATSecret_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 time.Duration
		if args[3] != nil {
			arg3 = args[3].(time.Duration)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Service_ResetPATSecret_Call) Return(pAT auth.PAT, err error) *Service_ResetPATSecret_Call {
	_c.Call.Return(pAT, err)
	return _c
}

func (_c *Service_ResetPATSecret_Call) RunAndReturn(run func(ctx context.Context, token string, patID string, duration time.Duration) (auth.PAT, error)) *Service_ResetPATSecret_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveJWKS provides a mock function for the type Service
func (_mock *Service) RetrieveJWKS() []auth.PublicKeyInfo {
	ret := _mock.Called()

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

	var r0 []auth.PublicKeyInfo
	if returnFunc, ok := ret.Get(0).(func() []auth.PublicKeyInfo); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]auth.PublicKeyInfo)
		}
	}
	return r0
}

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

// RetrieveJWKS is a helper method to define mock.On call
func (_e *Service_Expecter) RetrieveJWKS() *Service_RetrieveJWKS_Call {
	return &Service_RetrieveJWKS_Call{Call: _e.mock.On("RetrieveJWKS")}
}

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

func (_c *Service_RetrieveJWKS_Call) Return(publicKeyInfos []auth.PublicKeyInfo) *Service_RetrieveJWKS_Call {
	_c.Call.Return(publicKeyInfos)
	return _c
}

func (_c *Service_RetrieveJWKS_Call) RunAndReturn(run func() []auth.PublicKeyInfo) *Service_RetrieveJWKS_Call {
	_c.Call.Return(run)
	return _c
}

// RetrieveKey provides a mock function for the type Service
func (_mock *Service) RetrieveKey(ctx context.Context, token string, id string) (auth.Key, error) {
	ret := _mock.Called(ctx, token, id)

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

	var r0 auth.Key
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (auth.Key, error)); ok {
		return returnFunc(ctx, token, id)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) auth.Key); ok {
		r0 = returnFunc(ctx, token, id)
	} else {
		r0 = ret.Get(0).(auth.Key)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = returnFunc(ctx, token, id)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrieveKey is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - id string
func (_e *Service_Expecter) RetrieveKey(ctx interface{}, token interface{}, id interface{}) *Service_RetrieveKey_Call {
	return &Service_RetrieveKey_Call{Call: _e.mock.On("RetrieveKey", ctx, token, id)}
}

func (_c *Service_RetrieveKey_Call) Run(run func(ctx context.Context, token string, id string)) *Service_RetrieveKey_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 *Service_RetrieveKey_Call) Return(key auth.Key, err error) *Service_RetrieveKey_Call {
	_c.Call.Return(key, err)
	return _c
}

func (_c *Service_RetrieveKey_Call) RunAndReturn(run func(ctx context.Context, token string, id string) (auth.Key, error)) *Service_RetrieveKey_Call {
	_c.Call.Return(run)
	return _c
}

// RetrievePAT provides a mock function for the type Service
func (_mock *Service) RetrievePAT(ctx context.Context, userID string, patID string) (auth.PAT, error) {
	ret := _mock.Called(ctx, userID, patID)

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

	var r0 auth.PAT
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (auth.PAT, error)); ok {
		return returnFunc(ctx, userID, patID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) auth.PAT); ok {
		r0 = returnFunc(ctx, userID, patID)
	} else {
		r0 = ret.Get(0).(auth.PAT)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = returnFunc(ctx, userID, patID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RetrievePAT is a helper method to define mock.On call
//   - ctx context.Context
//   - userID string
//   - patID string
func (_e *Service_Expecter) RetrievePAT(ctx interface{}, userID interface{}, patID interface{}) *Service_RetrievePAT_Call {
	return &Service_RetrievePAT_Call{Call: _e.mock.On("RetrievePAT", ctx, userID, patID)}
}

func (_c *Service_RetrievePAT_Call) Run(run func(ctx context.Context, userID string, patID string)) *Service_RetrievePAT_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 *Service_RetrievePAT_Call) Return(pAT auth.PAT, err error) *Service_RetrievePAT_Call {
	_c.Call.Return(pAT, err)
	return _c
}

func (_c *Service_RetrievePAT_Call) RunAndReturn(run func(ctx context.Context, userID string, patID string) (auth.PAT, error)) *Service_RetrievePAT_Call {
	_c.Call.Return(run)
	return _c
}

// Revoke provides a mock function for the type Service
func (_mock *Service) Revoke(ctx context.Context, token string, id string) error {
	ret := _mock.Called(ctx, token, id)

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

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

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

// Revoke is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - id string
func (_e *Service_Expecter) Revoke(ctx interface{}, token interface{}, id interface{}) *Service_Revoke_Call {
	return &Service_Revoke_Call{Call: _e.mock.On("Revoke", ctx, token, id)}
}

func (_c *Service_Revoke_Call) Run(run func(ctx context.Context, token string, id string)) *Service_Revoke_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 *Service_Revoke_Call) Return(err error) *Service_Revoke_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Service_Revoke_Call) RunAndReturn(run func(ctx context.Context, token string, id string) error) *Service_Revoke_Call {
	_c.Call.Return(run)
	return _c
}

// RevokePATSecret provides a mock function for the type Service
func (_mock *Service) RevokePATSecret(ctx context.Context, token string, patID string) error {
	ret := _mock.Called(ctx, token, patID)

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

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

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

// RevokePATSecret is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - patID string
func (_e *Service_Expecter) RevokePATSecret(ctx interface{}, token interface{}, patID interface{}) *Service_RevokePATSecret_Call {
	return &Service_RevokePATSecret_Call{Call: _e.mock.On("RevokePATSecret", ctx, token, patID)}
}

func (_c *Service_RevokePATSecret_Call) Run(run func(ctx context.Context, token string, patID string)) *Service_RevokePATSecret_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 *Service_RevokePATSecret_Call) Return(err error) *Service_RevokePATSecret_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Service_RevokePATSecret_Call) RunAndReturn(run func(ctx context.Context, token string, patID string) error) *Service_RevokePATSecret_Call {
	_c.Call.Return(run)
	return _c
}

// RevokeToken provides a mock function for the type Service
func (_mock *Service) RevokeToken(ctx context.Context, userID string, tokenID string) error {
	ret := _mock.Called(ctx, userID, tokenID)

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

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

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

// RevokeToken is a helper method to define mock.On call
//   - ctx context.Context
//   - userID string
//   - tokenID string
func (_e *Service_Expecter) RevokeToken(ctx interface{}, userID interface{}, tokenID interface{}) *Service_RevokeToken_Call {
	return &Service_RevokeToken_Call{Call: _e.mock.On("RevokeToken", ctx, userID, tokenID)}
}

func (_c *Service_RevokeToken_Call) Run(run func(ctx context.Context, userID string, tokenID string)) *Service_RevokeToken_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 *Service_RevokeToken_Call) Return(err error) *Service_RevokeToken_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *Service_RevokeToken_Call) RunAndReturn(run func(ctx context.Context, userID string, tokenID string) error) *Service_RevokeToken_Call {
	_c.Call.Return(run)
	return _c
}

// UpdatePATDescription provides a mock function for the type Service
func (_mock *Service) UpdatePATDescription(ctx context.Context, token string, patID string, description string) (auth.PAT, error) {
	ret := _mock.Called(ctx, token, patID, description)

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

	var r0 auth.PAT
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (auth.PAT, error)); ok {
		return returnFunc(ctx, token, patID, description)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) auth.PAT); ok {
		r0 = returnFunc(ctx, token, patID, description)
	} else {
		r0 = ret.Get(0).(auth.PAT)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = returnFunc(ctx, token, patID, description)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// UpdatePATDescription is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - patID string
//   - description string
func (_e *Service_Expecter) UpdatePATDescription(ctx interface{}, token interface{}, patID interface{}, description interface{}) *Service_UpdatePATDescription_Call {
	return &Service_UpdatePATDescription_Call{Call: _e.mock.On("UpdatePATDescription", ctx, token, patID, description)}
}

func (_c *Service_UpdatePATDescription_Call) Run(run func(ctx context.Context, token string, patID string, description string)) *Service_UpdatePATDescription_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 *Service_UpdatePATDescription_Call) Return(pAT auth.PAT, err error) *Service_UpdatePATDescription_Call {
	_c.Call.Return(pAT, err)
	return _c
}

func (_c *Service_UpdatePATDescription_Call) RunAndReturn(run func(ctx context.Context, token string, patID string, description string) (auth.PAT, error)) *Service_UpdatePATDescription_Call {
	_c.Call.Return(run)
	return _c
}

// UpdatePATName provides a mock function for the type Service
func (_mock *Service) UpdatePATName(ctx context.Context, token string, patID string, name string) (auth.PAT, error) {
	ret := _mock.Called(ctx, token, patID, name)

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

	var r0 auth.PAT
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (auth.PAT, error)); ok {
		return returnFunc(ctx, token, patID, name)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) auth.PAT); ok {
		r0 = returnFunc(ctx, token, patID, name)
	} else {
		r0 = ret.Get(0).(auth.PAT)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = returnFunc(ctx, token, patID, name)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// UpdatePATName is a helper method to define mock.On call
//   - ctx context.Context
//   - token string
//   - patID string
//   - name string
func (_e *Service_Expecter) UpdatePATName(ctx interface{}, token interface{}, patID interface{}, name interface{}) *Service_UpdatePATName_Call {
	return &Service_UpdatePATName_Call{Call: _e.mock.On("UpdatePATName", ctx, token, patID, name)}
}

func (_c *Service_UpdatePATName_Call) Run(run func(ctx context.Context, token string, patID string, name string)) *Service_UpdatePATName_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 *Service_UpdatePATName_Call) Return(pAT auth.PAT, err error) *Service_UpdatePATName_Call {
	_c.Call.Return(pAT, err)
	return _c
}

func (_c *Service_UpdatePATName_Call) RunAndReturn(run func(ctx context.Context, token string, patID string, name string) (auth.PAT, error)) *Service_UpdatePATName_Call {
	_c.Call.Return(run)
	return _c
}
