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

import (
	"lib/policy_client"
	"policy-server/api"
	"policy-server/api/api_v0"
	"sync"
)

type ExternalPolicyClient struct {
	GetPoliciesStub        func(token string) ([]api.Policy, error)
	getPoliciesMutex       sync.RWMutex
	getPoliciesArgsForCall []struct {
		token string
	}
	getPoliciesReturns struct {
		result1 []api.Policy
		result2 error
	}
	getPoliciesReturnsOnCall map[int]struct {
		result1 []api.Policy
		result2 error
	}
	GetPoliciesByIDStub        func(token string, ids ...string) ([]api.Policy, error)
	getPoliciesByIDMutex       sync.RWMutex
	getPoliciesByIDArgsForCall []struct {
		token string
		ids   []string
	}
	getPoliciesByIDReturns struct {
		result1 []api.Policy
		result2 error
	}
	getPoliciesByIDReturnsOnCall map[int]struct {
		result1 []api.Policy
		result2 error
	}
	GetPoliciesV0Stub        func(token string) ([]api_v0.Policy, error)
	getPoliciesV0Mutex       sync.RWMutex
	getPoliciesV0ArgsForCall []struct {
		token string
	}
	getPoliciesV0Returns struct {
		result1 []api_v0.Policy
		result2 error
	}
	getPoliciesV0ReturnsOnCall map[int]struct {
		result1 []api_v0.Policy
		result2 error
	}
	GetPoliciesV0ByIDStub        func(token string, ids ...string) ([]api_v0.Policy, error)
	getPoliciesV0ByIDMutex       sync.RWMutex
	getPoliciesV0ByIDArgsForCall []struct {
		token string
		ids   []string
	}
	getPoliciesV0ByIDReturns struct {
		result1 []api_v0.Policy
		result2 error
	}
	getPoliciesV0ByIDReturnsOnCall map[int]struct {
		result1 []api_v0.Policy
		result2 error
	}
	DeletePoliciesStub        func(token string, policies []api.Policy) error
	deletePoliciesMutex       sync.RWMutex
	deletePoliciesArgsForCall []struct {
		token    string
		policies []api.Policy
	}
	deletePoliciesReturns struct {
		result1 error
	}
	deletePoliciesReturnsOnCall map[int]struct {
		result1 error
	}
	DeletePoliciesV0Stub        func(token string, policies []api_v0.Policy) error
	deletePoliciesV0Mutex       sync.RWMutex
	deletePoliciesV0ArgsForCall []struct {
		token    string
		policies []api_v0.Policy
	}
	deletePoliciesV0Returns struct {
		result1 error
	}
	deletePoliciesV0ReturnsOnCall map[int]struct {
		result1 error
	}
	AddPoliciesStub        func(token string, policies []api.Policy) error
	addPoliciesMutex       sync.RWMutex
	addPoliciesArgsForCall []struct {
		token    string
		policies []api.Policy
	}
	addPoliciesReturns struct {
		result1 error
	}
	addPoliciesReturnsOnCall map[int]struct {
		result1 error
	}
	AddPoliciesV0Stub        func(token string, policies []api_v0.Policy) error
	addPoliciesV0Mutex       sync.RWMutex
	addPoliciesV0ArgsForCall []struct {
		token    string
		policies []api_v0.Policy
	}
	addPoliciesV0Returns struct {
		result1 error
	}
	addPoliciesV0ReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *ExternalPolicyClient) GetPolicies(token string) ([]api.Policy, error) {
	fake.getPoliciesMutex.Lock()
	ret, specificReturn := fake.getPoliciesReturnsOnCall[len(fake.getPoliciesArgsForCall)]
	fake.getPoliciesArgsForCall = append(fake.getPoliciesArgsForCall, struct {
		token string
	}{token})
	fake.recordInvocation("GetPolicies", []interface{}{token})
	fake.getPoliciesMutex.Unlock()
	if fake.GetPoliciesStub != nil {
		return fake.GetPoliciesStub(token)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.getPoliciesReturns.result1, fake.getPoliciesReturns.result2
}

func (fake *ExternalPolicyClient) GetPoliciesCallCount() int {
	fake.getPoliciesMutex.RLock()
	defer fake.getPoliciesMutex.RUnlock()
	return len(fake.getPoliciesArgsForCall)
}

func (fake *ExternalPolicyClient) GetPoliciesArgsForCall(i int) string {
	fake.getPoliciesMutex.RLock()
	defer fake.getPoliciesMutex.RUnlock()
	return fake.getPoliciesArgsForCall[i].token
}

func (fake *ExternalPolicyClient) GetPoliciesReturns(result1 []api.Policy, result2 error) {
	fake.GetPoliciesStub = nil
	fake.getPoliciesReturns = struct {
		result1 []api.Policy
		result2 error
	}{result1, result2}
}

func (fake *ExternalPolicyClient) GetPoliciesReturnsOnCall(i int, result1 []api.Policy, result2 error) {
	fake.GetPoliciesStub = nil
	if fake.getPoliciesReturnsOnCall == nil {
		fake.getPoliciesReturnsOnCall = make(map[int]struct {
			result1 []api.Policy
			result2 error
		})
	}
	fake.getPoliciesReturnsOnCall[i] = struct {
		result1 []api.Policy
		result2 error
	}{result1, result2}
}

func (fake *ExternalPolicyClient) GetPoliciesByID(token string, ids ...string) ([]api.Policy, error) {
	fake.getPoliciesByIDMutex.Lock()
	ret, specificReturn := fake.getPoliciesByIDReturnsOnCall[len(fake.getPoliciesByIDArgsForCall)]
	fake.getPoliciesByIDArgsForCall = append(fake.getPoliciesByIDArgsForCall, struct {
		token string
		ids   []string
	}{token, ids})
	fake.recordInvocation("GetPoliciesByID", []interface{}{token, ids})
	fake.getPoliciesByIDMutex.Unlock()
	if fake.GetPoliciesByIDStub != nil {
		return fake.GetPoliciesByIDStub(token, ids...)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.getPoliciesByIDReturns.result1, fake.getPoliciesByIDReturns.result2
}

func (fake *ExternalPolicyClient) GetPoliciesByIDCallCount() int {
	fake.getPoliciesByIDMutex.RLock()
	defer fake.getPoliciesByIDMutex.RUnlock()
	return len(fake.getPoliciesByIDArgsForCall)
}

func (fake *ExternalPolicyClient) GetPoliciesByIDArgsForCall(i int) (string, []string) {
	fake.getPoliciesByIDMutex.RLock()
	defer fake.getPoliciesByIDMutex.RUnlock()
	return fake.getPoliciesByIDArgsForCall[i].token, fake.getPoliciesByIDArgsForCall[i].ids
}

func (fake *ExternalPolicyClient) GetPoliciesByIDReturns(result1 []api.Policy, result2 error) {
	fake.GetPoliciesByIDStub = nil
	fake.getPoliciesByIDReturns = struct {
		result1 []api.Policy
		result2 error
	}{result1, result2}
}

func (fake *ExternalPolicyClient) GetPoliciesByIDReturnsOnCall(i int, result1 []api.Policy, result2 error) {
	fake.GetPoliciesByIDStub = nil
	if fake.getPoliciesByIDReturnsOnCall == nil {
		fake.getPoliciesByIDReturnsOnCall = make(map[int]struct {
			result1 []api.Policy
			result2 error
		})
	}
	fake.getPoliciesByIDReturnsOnCall[i] = struct {
		result1 []api.Policy
		result2 error
	}{result1, result2}
}

func (fake *ExternalPolicyClient) GetPoliciesV0(token string) ([]api_v0.Policy, error) {
	fake.getPoliciesV0Mutex.Lock()
	ret, specificReturn := fake.getPoliciesV0ReturnsOnCall[len(fake.getPoliciesV0ArgsForCall)]
	fake.getPoliciesV0ArgsForCall = append(fake.getPoliciesV0ArgsForCall, struct {
		token string
	}{token})
	fake.recordInvocation("GetPoliciesV0", []interface{}{token})
	fake.getPoliciesV0Mutex.Unlock()
	if fake.GetPoliciesV0Stub != nil {
		return fake.GetPoliciesV0Stub(token)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.getPoliciesV0Returns.result1, fake.getPoliciesV0Returns.result2
}

func (fake *ExternalPolicyClient) GetPoliciesV0CallCount() int {
	fake.getPoliciesV0Mutex.RLock()
	defer fake.getPoliciesV0Mutex.RUnlock()
	return len(fake.getPoliciesV0ArgsForCall)
}

func (fake *ExternalPolicyClient) GetPoliciesV0ArgsForCall(i int) string {
	fake.getPoliciesV0Mutex.RLock()
	defer fake.getPoliciesV0Mutex.RUnlock()
	return fake.getPoliciesV0ArgsForCall[i].token
}

func (fake *ExternalPolicyClient) GetPoliciesV0Returns(result1 []api_v0.Policy, result2 error) {
	fake.GetPoliciesV0Stub = nil
	fake.getPoliciesV0Returns = struct {
		result1 []api_v0.Policy
		result2 error
	}{result1, result2}
}

func (fake *ExternalPolicyClient) GetPoliciesV0ReturnsOnCall(i int, result1 []api_v0.Policy, result2 error) {
	fake.GetPoliciesV0Stub = nil
	if fake.getPoliciesV0ReturnsOnCall == nil {
		fake.getPoliciesV0ReturnsOnCall = make(map[int]struct {
			result1 []api_v0.Policy
			result2 error
		})
	}
	fake.getPoliciesV0ReturnsOnCall[i] = struct {
		result1 []api_v0.Policy
		result2 error
	}{result1, result2}
}

func (fake *ExternalPolicyClient) GetPoliciesV0ByID(token string, ids ...string) ([]api_v0.Policy, error) {
	fake.getPoliciesV0ByIDMutex.Lock()
	ret, specificReturn := fake.getPoliciesV0ByIDReturnsOnCall[len(fake.getPoliciesV0ByIDArgsForCall)]
	fake.getPoliciesV0ByIDArgsForCall = append(fake.getPoliciesV0ByIDArgsForCall, struct {
		token string
		ids   []string
	}{token, ids})
	fake.recordInvocation("GetPoliciesV0ByID", []interface{}{token, ids})
	fake.getPoliciesV0ByIDMutex.Unlock()
	if fake.GetPoliciesV0ByIDStub != nil {
		return fake.GetPoliciesV0ByIDStub(token, ids...)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.getPoliciesV0ByIDReturns.result1, fake.getPoliciesV0ByIDReturns.result2
}

func (fake *ExternalPolicyClient) GetPoliciesV0ByIDCallCount() int {
	fake.getPoliciesV0ByIDMutex.RLock()
	defer fake.getPoliciesV0ByIDMutex.RUnlock()
	return len(fake.getPoliciesV0ByIDArgsForCall)
}

func (fake *ExternalPolicyClient) GetPoliciesV0ByIDArgsForCall(i int) (string, []string) {
	fake.getPoliciesV0ByIDMutex.RLock()
	defer fake.getPoliciesV0ByIDMutex.RUnlock()
	return fake.getPoliciesV0ByIDArgsForCall[i].token, fake.getPoliciesV0ByIDArgsForCall[i].ids
}

func (fake *ExternalPolicyClient) GetPoliciesV0ByIDReturns(result1 []api_v0.Policy, result2 error) {
	fake.GetPoliciesV0ByIDStub = nil
	fake.getPoliciesV0ByIDReturns = struct {
		result1 []api_v0.Policy
		result2 error
	}{result1, result2}
}

func (fake *ExternalPolicyClient) GetPoliciesV0ByIDReturnsOnCall(i int, result1 []api_v0.Policy, result2 error) {
	fake.GetPoliciesV0ByIDStub = nil
	if fake.getPoliciesV0ByIDReturnsOnCall == nil {
		fake.getPoliciesV0ByIDReturnsOnCall = make(map[int]struct {
			result1 []api_v0.Policy
			result2 error
		})
	}
	fake.getPoliciesV0ByIDReturnsOnCall[i] = struct {
		result1 []api_v0.Policy
		result2 error
	}{result1, result2}
}

func (fake *ExternalPolicyClient) DeletePolicies(token string, policies []api.Policy) error {
	var policiesCopy []api.Policy
	if policies != nil {
		policiesCopy = make([]api.Policy, len(policies))
		copy(policiesCopy, policies)
	}
	fake.deletePoliciesMutex.Lock()
	ret, specificReturn := fake.deletePoliciesReturnsOnCall[len(fake.deletePoliciesArgsForCall)]
	fake.deletePoliciesArgsForCall = append(fake.deletePoliciesArgsForCall, struct {
		token    string
		policies []api.Policy
	}{token, policiesCopy})
	fake.recordInvocation("DeletePolicies", []interface{}{token, policiesCopy})
	fake.deletePoliciesMutex.Unlock()
	if fake.DeletePoliciesStub != nil {
		return fake.DeletePoliciesStub(token, policies)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.deletePoliciesReturns.result1
}

func (fake *ExternalPolicyClient) DeletePoliciesCallCount() int {
	fake.deletePoliciesMutex.RLock()
	defer fake.deletePoliciesMutex.RUnlock()
	return len(fake.deletePoliciesArgsForCall)
}

func (fake *ExternalPolicyClient) DeletePoliciesArgsForCall(i int) (string, []api.Policy) {
	fake.deletePoliciesMutex.RLock()
	defer fake.deletePoliciesMutex.RUnlock()
	return fake.deletePoliciesArgsForCall[i].token, fake.deletePoliciesArgsForCall[i].policies
}

func (fake *ExternalPolicyClient) DeletePoliciesReturns(result1 error) {
	fake.DeletePoliciesStub = nil
	fake.deletePoliciesReturns = struct {
		result1 error
	}{result1}
}

func (fake *ExternalPolicyClient) DeletePoliciesReturnsOnCall(i int, result1 error) {
	fake.DeletePoliciesStub = nil
	if fake.deletePoliciesReturnsOnCall == nil {
		fake.deletePoliciesReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.deletePoliciesReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *ExternalPolicyClient) DeletePoliciesV0(token string, policies []api_v0.Policy) error {
	var policiesCopy []api_v0.Policy
	if policies != nil {
		policiesCopy = make([]api_v0.Policy, len(policies))
		copy(policiesCopy, policies)
	}
	fake.deletePoliciesV0Mutex.Lock()
	ret, specificReturn := fake.deletePoliciesV0ReturnsOnCall[len(fake.deletePoliciesV0ArgsForCall)]
	fake.deletePoliciesV0ArgsForCall = append(fake.deletePoliciesV0ArgsForCall, struct {
		token    string
		policies []api_v0.Policy
	}{token, policiesCopy})
	fake.recordInvocation("DeletePoliciesV0", []interface{}{token, policiesCopy})
	fake.deletePoliciesV0Mutex.Unlock()
	if fake.DeletePoliciesV0Stub != nil {
		return fake.DeletePoliciesV0Stub(token, policies)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.deletePoliciesV0Returns.result1
}

func (fake *ExternalPolicyClient) DeletePoliciesV0CallCount() int {
	fake.deletePoliciesV0Mutex.RLock()
	defer fake.deletePoliciesV0Mutex.RUnlock()
	return len(fake.deletePoliciesV0ArgsForCall)
}

func (fake *ExternalPolicyClient) DeletePoliciesV0ArgsForCall(i int) (string, []api_v0.Policy) {
	fake.deletePoliciesV0Mutex.RLock()
	defer fake.deletePoliciesV0Mutex.RUnlock()
	return fake.deletePoliciesV0ArgsForCall[i].token, fake.deletePoliciesV0ArgsForCall[i].policies
}

func (fake *ExternalPolicyClient) DeletePoliciesV0Returns(result1 error) {
	fake.DeletePoliciesV0Stub = nil
	fake.deletePoliciesV0Returns = struct {
		result1 error
	}{result1}
}

func (fake *ExternalPolicyClient) DeletePoliciesV0ReturnsOnCall(i int, result1 error) {
	fake.DeletePoliciesV0Stub = nil
	if fake.deletePoliciesV0ReturnsOnCall == nil {
		fake.deletePoliciesV0ReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.deletePoliciesV0ReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *ExternalPolicyClient) AddPolicies(token string, policies []api.Policy) error {
	var policiesCopy []api.Policy
	if policies != nil {
		policiesCopy = make([]api.Policy, len(policies))
		copy(policiesCopy, policies)
	}
	fake.addPoliciesMutex.Lock()
	ret, specificReturn := fake.addPoliciesReturnsOnCall[len(fake.addPoliciesArgsForCall)]
	fake.addPoliciesArgsForCall = append(fake.addPoliciesArgsForCall, struct {
		token    string
		policies []api.Policy
	}{token, policiesCopy})
	fake.recordInvocation("AddPolicies", []interface{}{token, policiesCopy})
	fake.addPoliciesMutex.Unlock()
	if fake.AddPoliciesStub != nil {
		return fake.AddPoliciesStub(token, policies)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.addPoliciesReturns.result1
}

func (fake *ExternalPolicyClient) AddPoliciesCallCount() int {
	fake.addPoliciesMutex.RLock()
	defer fake.addPoliciesMutex.RUnlock()
	return len(fake.addPoliciesArgsForCall)
}

func (fake *ExternalPolicyClient) AddPoliciesArgsForCall(i int) (string, []api.Policy) {
	fake.addPoliciesMutex.RLock()
	defer fake.addPoliciesMutex.RUnlock()
	return fake.addPoliciesArgsForCall[i].token, fake.addPoliciesArgsForCall[i].policies
}

func (fake *ExternalPolicyClient) AddPoliciesReturns(result1 error) {
	fake.AddPoliciesStub = nil
	fake.addPoliciesReturns = struct {
		result1 error
	}{result1}
}

func (fake *ExternalPolicyClient) AddPoliciesReturnsOnCall(i int, result1 error) {
	fake.AddPoliciesStub = nil
	if fake.addPoliciesReturnsOnCall == nil {
		fake.addPoliciesReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.addPoliciesReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *ExternalPolicyClient) AddPoliciesV0(token string, policies []api_v0.Policy) error {
	var policiesCopy []api_v0.Policy
	if policies != nil {
		policiesCopy = make([]api_v0.Policy, len(policies))
		copy(policiesCopy, policies)
	}
	fake.addPoliciesV0Mutex.Lock()
	ret, specificReturn := fake.addPoliciesV0ReturnsOnCall[len(fake.addPoliciesV0ArgsForCall)]
	fake.addPoliciesV0ArgsForCall = append(fake.addPoliciesV0ArgsForCall, struct {
		token    string
		policies []api_v0.Policy
	}{token, policiesCopy})
	fake.recordInvocation("AddPoliciesV0", []interface{}{token, policiesCopy})
	fake.addPoliciesV0Mutex.Unlock()
	if fake.AddPoliciesV0Stub != nil {
		return fake.AddPoliciesV0Stub(token, policies)
	}
	if specificReturn {
		return ret.result1
	}
	return fake.addPoliciesV0Returns.result1
}

func (fake *ExternalPolicyClient) AddPoliciesV0CallCount() int {
	fake.addPoliciesV0Mutex.RLock()
	defer fake.addPoliciesV0Mutex.RUnlock()
	return len(fake.addPoliciesV0ArgsForCall)
}

func (fake *ExternalPolicyClient) AddPoliciesV0ArgsForCall(i int) (string, []api_v0.Policy) {
	fake.addPoliciesV0Mutex.RLock()
	defer fake.addPoliciesV0Mutex.RUnlock()
	return fake.addPoliciesV0ArgsForCall[i].token, fake.addPoliciesV0ArgsForCall[i].policies
}

func (fake *ExternalPolicyClient) AddPoliciesV0Returns(result1 error) {
	fake.AddPoliciesV0Stub = nil
	fake.addPoliciesV0Returns = struct {
		result1 error
	}{result1}
}

func (fake *ExternalPolicyClient) AddPoliciesV0ReturnsOnCall(i int, result1 error) {
	fake.AddPoliciesV0Stub = nil
	if fake.addPoliciesV0ReturnsOnCall == nil {
		fake.addPoliciesV0ReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.addPoliciesV0ReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *ExternalPolicyClient) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.getPoliciesMutex.RLock()
	defer fake.getPoliciesMutex.RUnlock()
	fake.getPoliciesByIDMutex.RLock()
	defer fake.getPoliciesByIDMutex.RUnlock()
	fake.getPoliciesV0Mutex.RLock()
	defer fake.getPoliciesV0Mutex.RUnlock()
	fake.getPoliciesV0ByIDMutex.RLock()
	defer fake.getPoliciesV0ByIDMutex.RUnlock()
	fake.deletePoliciesMutex.RLock()
	defer fake.deletePoliciesMutex.RUnlock()
	fake.deletePoliciesV0Mutex.RLock()
	defer fake.deletePoliciesV0Mutex.RUnlock()
	fake.addPoliciesMutex.RLock()
	defer fake.addPoliciesMutex.RUnlock()
	fake.addPoliciesV0Mutex.RLock()
	defer fake.addPoliciesV0Mutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *ExternalPolicyClient) 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)
}

var _ policy_client.ExternalPolicyClient = new(ExternalPolicyClient)
