// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
// Copyright (c) Abstract Machines

// SPDX-License-Identifier: Apache-2.0

package mocks

import (
	"context"

	"github.com/absmach/supermq/users"
	mock "github.com/stretchr/testify/mock"
	"golang.org/x/oauth2"
)

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

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

	return mock
}

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

type Provider_Expecter struct {
	mock *mock.Mock
}

func (_m *Provider) EXPECT() *Provider_Expecter {
	return &Provider_Expecter{mock: &_m.Mock}
}

// ErrorURL provides a mock function for the type Provider
func (_mock *Provider) ErrorURL() string {
	ret := _mock.Called()

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

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

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

// ErrorURL is a helper method to define mock.On call
func (_e *Provider_Expecter) ErrorURL() *Provider_ErrorURL_Call {
	return &Provider_ErrorURL_Call{Call: _e.mock.On("ErrorURL")}
}

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

func (_c *Provider_ErrorURL_Call) Return(s string) *Provider_ErrorURL_Call {
	_c.Call.Return(s)
	return _c
}

func (_c *Provider_ErrorURL_Call) RunAndReturn(run func() string) *Provider_ErrorURL_Call {
	_c.Call.Return(run)
	return _c
}

// Exchange provides a mock function for the type Provider
func (_mock *Provider) Exchange(ctx context.Context, code string) (oauth2.Token, error) {
	ret := _mock.Called(ctx, code)

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

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

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

// Exchange is a helper method to define mock.On call
//   - ctx context.Context
//   - code string
func (_e *Provider_Expecter) Exchange(ctx interface{}, code interface{}) *Provider_Exchange_Call {
	return &Provider_Exchange_Call{Call: _e.mock.On("Exchange", ctx, code)}
}

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

func (_c *Provider_Exchange_Call) RunAndReturn(run func(ctx context.Context, code string) (oauth2.Token, error)) *Provider_Exchange_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

// IsEnabled is a helper method to define mock.On call
func (_e *Provider_Expecter) IsEnabled() *Provider_IsEnabled_Call {
	return &Provider_IsEnabled_Call{Call: _e.mock.On("IsEnabled")}
}

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

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

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

// Name provides a mock function for the type Provider
func (_mock *Provider) Name() string {
	ret := _mock.Called()

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

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

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

// Name is a helper method to define mock.On call
func (_e *Provider_Expecter) Name() *Provider_Name_Call {
	return &Provider_Name_Call{Call: _e.mock.On("Name")}
}

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

func (_c *Provider_Name_Call) Return(s string) *Provider_Name_Call {
	_c.Call.Return(s)
	return _c
}

func (_c *Provider_Name_Call) RunAndReturn(run func() string) *Provider_Name_Call {
	_c.Call.Return(run)
	return _c
}

// RedirectURL provides a mock function for the type Provider
func (_mock *Provider) RedirectURL() string {
	ret := _mock.Called()

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

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

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

// RedirectURL is a helper method to define mock.On call
func (_e *Provider_Expecter) RedirectURL() *Provider_RedirectURL_Call {
	return &Provider_RedirectURL_Call{Call: _e.mock.On("RedirectURL")}
}

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

func (_c *Provider_RedirectURL_Call) Return(s string) *Provider_RedirectURL_Call {
	_c.Call.Return(s)
	return _c
}

func (_c *Provider_RedirectURL_Call) RunAndReturn(run func() string) *Provider_RedirectURL_Call {
	_c.Call.Return(run)
	return _c
}

// State provides a mock function for the type Provider
func (_mock *Provider) State() string {
	ret := _mock.Called()

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

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

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

// State is a helper method to define mock.On call
func (_e *Provider_Expecter) State() *Provider_State_Call {
	return &Provider_State_Call{Call: _e.mock.On("State")}
}

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

func (_c *Provider_State_Call) Return(s string) *Provider_State_Call {
	_c.Call.Return(s)
	return _c
}

func (_c *Provider_State_Call) RunAndReturn(run func() string) *Provider_State_Call {
	_c.Call.Return(run)
	return _c
}

// UserInfo provides a mock function for the type Provider
func (_mock *Provider) UserInfo(accessToken string) (users.User, error) {
	ret := _mock.Called(accessToken)

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

	var r0 users.User
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string) (users.User, error)); ok {
		return returnFunc(accessToken)
	}
	if returnFunc, ok := ret.Get(0).(func(string) users.User); ok {
		r0 = returnFunc(accessToken)
	} else {
		r0 = ret.Get(0).(users.User)
	}
	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
		r1 = returnFunc(accessToken)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// UserInfo is a helper method to define mock.On call
//   - accessToken string
func (_e *Provider_Expecter) UserInfo(accessToken interface{}) *Provider_UserInfo_Call {
	return &Provider_UserInfo_Call{Call: _e.mock.On("UserInfo", accessToken)}
}

func (_c *Provider_UserInfo_Call) Run(run func(accessToken string)) *Provider_UserInfo_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 *Provider_UserInfo_Call) Return(user users.User, err error) *Provider_UserInfo_Call {
	_c.Call.Return(user, err)
	return _c
}

func (_c *Provider_UserInfo_Call) RunAndReturn(run func(accessToken string) (users.User, error)) *Provider_UserInfo_Call {
	_c.Call.Return(run)
	return _c
}
