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

import (
	"sync"

	"code.cloudfoundry.org/service-discovery-controller/routes"
)

type AddressTable struct {
	GetAllAddressesStub        func() map[string][]string
	getAllAddressesMutex       sync.RWMutex
	getAllAddressesArgsForCall []struct {
	}
	getAllAddressesReturns struct {
		result1 map[string][]string
	}
	getAllAddressesReturnsOnCall map[int]struct {
		result1 map[string][]string
	}
	IsWarmStub        func() bool
	isWarmMutex       sync.RWMutex
	isWarmArgsForCall []struct {
	}
	isWarmReturns struct {
		result1 bool
	}
	isWarmReturnsOnCall map[int]struct {
		result1 bool
	}
	LookupStub        func(string) []string
	lookupMutex       sync.RWMutex
	lookupArgsForCall []struct {
		arg1 string
	}
	lookupReturns struct {
		result1 []string
	}
	lookupReturnsOnCall map[int]struct {
		result1 []string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *AddressTable) GetAllAddresses() map[string][]string {
	fake.getAllAddressesMutex.Lock()
	ret, specificReturn := fake.getAllAddressesReturnsOnCall[len(fake.getAllAddressesArgsForCall)]
	fake.getAllAddressesArgsForCall = append(fake.getAllAddressesArgsForCall, struct {
	}{})
	stub := fake.GetAllAddressesStub
	fakeReturns := fake.getAllAddressesReturns
	fake.recordInvocation("GetAllAddresses", []interface{}{})
	fake.getAllAddressesMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *AddressTable) GetAllAddressesCallCount() int {
	fake.getAllAddressesMutex.RLock()
	defer fake.getAllAddressesMutex.RUnlock()
	return len(fake.getAllAddressesArgsForCall)
}

func (fake *AddressTable) GetAllAddressesCalls(stub func() map[string][]string) {
	fake.getAllAddressesMutex.Lock()
	defer fake.getAllAddressesMutex.Unlock()
	fake.GetAllAddressesStub = stub
}

func (fake *AddressTable) GetAllAddressesReturns(result1 map[string][]string) {
	fake.getAllAddressesMutex.Lock()
	defer fake.getAllAddressesMutex.Unlock()
	fake.GetAllAddressesStub = nil
	fake.getAllAddressesReturns = struct {
		result1 map[string][]string
	}{result1}
}

func (fake *AddressTable) GetAllAddressesReturnsOnCall(i int, result1 map[string][]string) {
	fake.getAllAddressesMutex.Lock()
	defer fake.getAllAddressesMutex.Unlock()
	fake.GetAllAddressesStub = nil
	if fake.getAllAddressesReturnsOnCall == nil {
		fake.getAllAddressesReturnsOnCall = make(map[int]struct {
			result1 map[string][]string
		})
	}
	fake.getAllAddressesReturnsOnCall[i] = struct {
		result1 map[string][]string
	}{result1}
}

func (fake *AddressTable) IsWarm() bool {
	fake.isWarmMutex.Lock()
	ret, specificReturn := fake.isWarmReturnsOnCall[len(fake.isWarmArgsForCall)]
	fake.isWarmArgsForCall = append(fake.isWarmArgsForCall, struct {
	}{})
	stub := fake.IsWarmStub
	fakeReturns := fake.isWarmReturns
	fake.recordInvocation("IsWarm", []interface{}{})
	fake.isWarmMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *AddressTable) IsWarmCallCount() int {
	fake.isWarmMutex.RLock()
	defer fake.isWarmMutex.RUnlock()
	return len(fake.isWarmArgsForCall)
}

func (fake *AddressTable) IsWarmCalls(stub func() bool) {
	fake.isWarmMutex.Lock()
	defer fake.isWarmMutex.Unlock()
	fake.IsWarmStub = stub
}

func (fake *AddressTable) IsWarmReturns(result1 bool) {
	fake.isWarmMutex.Lock()
	defer fake.isWarmMutex.Unlock()
	fake.IsWarmStub = nil
	fake.isWarmReturns = struct {
		result1 bool
	}{result1}
}

func (fake *AddressTable) IsWarmReturnsOnCall(i int, result1 bool) {
	fake.isWarmMutex.Lock()
	defer fake.isWarmMutex.Unlock()
	fake.IsWarmStub = nil
	if fake.isWarmReturnsOnCall == nil {
		fake.isWarmReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isWarmReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *AddressTable) Lookup(arg1 string) []string {
	fake.lookupMutex.Lock()
	ret, specificReturn := fake.lookupReturnsOnCall[len(fake.lookupArgsForCall)]
	fake.lookupArgsForCall = append(fake.lookupArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.LookupStub
	fakeReturns := fake.lookupReturns
	fake.recordInvocation("Lookup", []interface{}{arg1})
	fake.lookupMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *AddressTable) LookupCallCount() int {
	fake.lookupMutex.RLock()
	defer fake.lookupMutex.RUnlock()
	return len(fake.lookupArgsForCall)
}

func (fake *AddressTable) LookupCalls(stub func(string) []string) {
	fake.lookupMutex.Lock()
	defer fake.lookupMutex.Unlock()
	fake.LookupStub = stub
}

func (fake *AddressTable) LookupArgsForCall(i int) string {
	fake.lookupMutex.RLock()
	defer fake.lookupMutex.RUnlock()
	argsForCall := fake.lookupArgsForCall[i]
	return argsForCall.arg1
}

func (fake *AddressTable) LookupReturns(result1 []string) {
	fake.lookupMutex.Lock()
	defer fake.lookupMutex.Unlock()
	fake.LookupStub = nil
	fake.lookupReturns = struct {
		result1 []string
	}{result1}
}

func (fake *AddressTable) LookupReturnsOnCall(i int, result1 []string) {
	fake.lookupMutex.Lock()
	defer fake.lookupMutex.Unlock()
	fake.LookupStub = nil
	if fake.lookupReturnsOnCall == nil {
		fake.lookupReturnsOnCall = make(map[int]struct {
			result1 []string
		})
	}
	fake.lookupReturnsOnCall[i] = struct {
		result1 []string
	}{result1}
}

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

func (fake *AddressTable) 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 _ routes.AddressTable = new(AddressTable)
