// Code generated by mockery v1.0.1. DO NOT EDIT.

package mocks

import (
	mock "github.com/stretchr/testify/mock"
	oauth2 "golang.org/x/oauth2"
)

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

type TokenCache_GetToken struct {
	*mock.Call
}

func (_m TokenCache_GetToken) Return(_a0 *oauth2.Token, _a1 error) *TokenCache_GetToken {
	return &TokenCache_GetToken{Call: _m.Call.Return(_a0, _a1)}
}

func (_m *TokenCache) OnGetToken() *TokenCache_GetToken {
	c_call := _m.On("GetToken")
	return &TokenCache_GetToken{Call: c_call}
}

func (_m *TokenCache) OnGetTokenMatch(matchers ...interface{}) *TokenCache_GetToken {
	c_call := _m.On("GetToken", matchers...)
	return &TokenCache_GetToken{Call: c_call}
}

// GetToken provides a mock function with given fields:
func (_m *TokenCache) GetToken() (*oauth2.Token, error) {
	ret := _m.Called()

	var r0 *oauth2.Token
	if rf, ok := ret.Get(0).(func() *oauth2.Token); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*oauth2.Token)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

type TokenCache_SaveToken struct {
	*mock.Call
}

func (_m TokenCache_SaveToken) Return(_a0 error) *TokenCache_SaveToken {
	return &TokenCache_SaveToken{Call: _m.Call.Return(_a0)}
}

func (_m *TokenCache) OnSaveToken(token *oauth2.Token) *TokenCache_SaveToken {
	c_call := _m.On("SaveToken", token)
	return &TokenCache_SaveToken{Call: c_call}
}

func (_m *TokenCache) OnSaveTokenMatch(matchers ...interface{}) *TokenCache_SaveToken {
	c_call := _m.On("SaveToken", matchers...)
	return &TokenCache_SaveToken{Call: c_call}
}

// SaveToken provides a mock function with given fields: token
func (_m *TokenCache) SaveToken(token *oauth2.Token) error {
	ret := _m.Called(token)

	var r0 error
	if rf, ok := ret.Get(0).(func(*oauth2.Token) error); ok {
		r0 = rf(token)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
