// Code generated by counterfeiter. DO NOT EDIT.
package fakes

import (
	"policy-server/uaa_client"
	"sync"
)

type UAAClient struct {
	GetTokenStub        func() (string, error)
	getTokenMutex       sync.RWMutex
	getTokenArgsForCall []struct{}
	getTokenReturns     struct {
		result1 string
		result2 error
	}
	getTokenReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	CheckTokenStub        func(string) (uaa_client.CheckTokenResponse, error)
	checkTokenMutex       sync.RWMutex
	checkTokenArgsForCall []struct {
		arg1 string
	}
	checkTokenReturns struct {
		result1 uaa_client.CheckTokenResponse
		result2 error
	}
	checkTokenReturnsOnCall map[int]struct {
		result1 uaa_client.CheckTokenResponse
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *UAAClient) GetToken() (string, error) {
	fake.getTokenMutex.Lock()
	ret, specificReturn := fake.getTokenReturnsOnCall[len(fake.getTokenArgsForCall)]
	fake.getTokenArgsForCall = append(fake.getTokenArgsForCall, struct{}{})
	fake.recordInvocation("GetToken", []interface{}{})
	fake.getTokenMutex.Unlock()
	if fake.GetTokenStub != nil {
		return fake.GetTokenStub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.getTokenReturns.result1, fake.getTokenReturns.result2
}

func (fake *UAAClient) GetTokenCallCount() int {
	fake.getTokenMutex.RLock()
	defer fake.getTokenMutex.RUnlock()
	return len(fake.getTokenArgsForCall)
}

func (fake *UAAClient) GetTokenReturns(result1 string, result2 error) {
	fake.GetTokenStub = nil
	fake.getTokenReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *UAAClient) GetTokenReturnsOnCall(i int, result1 string, result2 error) {
	fake.GetTokenStub = nil
	if fake.getTokenReturnsOnCall == nil {
		fake.getTokenReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.getTokenReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *UAAClient) CheckToken(arg1 string) (uaa_client.CheckTokenResponse, error) {
	fake.checkTokenMutex.Lock()
	ret, specificReturn := fake.checkTokenReturnsOnCall[len(fake.checkTokenArgsForCall)]
	fake.checkTokenArgsForCall = append(fake.checkTokenArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("CheckToken", []interface{}{arg1})
	fake.checkTokenMutex.Unlock()
	if fake.CheckTokenStub != nil {
		return fake.CheckTokenStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.checkTokenReturns.result1, fake.checkTokenReturns.result2
}

func (fake *UAAClient) CheckTokenCallCount() int {
	fake.checkTokenMutex.RLock()
	defer fake.checkTokenMutex.RUnlock()
	return len(fake.checkTokenArgsForCall)
}

func (fake *UAAClient) CheckTokenArgsForCall(i int) string {
	fake.checkTokenMutex.RLock()
	defer fake.checkTokenMutex.RUnlock()
	return fake.checkTokenArgsForCall[i].arg1
}

func (fake *UAAClient) CheckTokenReturns(result1 uaa_client.CheckTokenResponse, result2 error) {
	fake.CheckTokenStub = nil
	fake.checkTokenReturns = struct {
		result1 uaa_client.CheckTokenResponse
		result2 error
	}{result1, result2}
}

func (fake *UAAClient) CheckTokenReturnsOnCall(i int, result1 uaa_client.CheckTokenResponse, result2 error) {
	fake.CheckTokenStub = nil
	if fake.checkTokenReturnsOnCall == nil {
		fake.checkTokenReturnsOnCall = make(map[int]struct {
			result1 uaa_client.CheckTokenResponse
			result2 error
		})
	}
	fake.checkTokenReturnsOnCall[i] = struct {
		result1 uaa_client.CheckTokenResponse
		result2 error
	}{result1, result2}
}

func (fake *UAAClient) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.getTokenMutex.RLock()
	defer fake.getTokenMutex.RUnlock()
	fake.checkTokenMutex.RLock()
	defer fake.checkTokenMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *UAAClient) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}
