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

import (
	"sync"

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

type AddressTable struct {
	AddStub        func([]string, string)
	addMutex       sync.RWMutex
	addArgsForCall []struct {
		arg1 []string
		arg2 string
	}
	PausePruningStub        func()
	pausePruningMutex       sync.RWMutex
	pausePruningArgsForCall []struct {
	}
	RemoveStub        func([]string, string)
	removeMutex       sync.RWMutex
	removeArgsForCall []struct {
		arg1 []string
		arg2 string
	}
	ResumePruningStub        func()
	resumePruningMutex       sync.RWMutex
	resumePruningArgsForCall []struct {
	}
	SetWarmStub        func()
	setWarmMutex       sync.RWMutex
	setWarmArgsForCall []struct {
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *AddressTable) Add(arg1 []string, arg2 string) {
	var arg1Copy []string
	if arg1 != nil {
		arg1Copy = make([]string, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.addMutex.Lock()
	fake.addArgsForCall = append(fake.addArgsForCall, struct {
		arg1 []string
		arg2 string
	}{arg1Copy, arg2})
	stub := fake.AddStub
	fake.recordInvocation("Add", []interface{}{arg1Copy, arg2})
	fake.addMutex.Unlock()
	if stub != nil {
		fake.AddStub(arg1, arg2)
	}
}

func (fake *AddressTable) AddCallCount() int {
	fake.addMutex.RLock()
	defer fake.addMutex.RUnlock()
	return len(fake.addArgsForCall)
}

func (fake *AddressTable) AddCalls(stub func([]string, string)) {
	fake.addMutex.Lock()
	defer fake.addMutex.Unlock()
	fake.AddStub = stub
}

func (fake *AddressTable) AddArgsForCall(i int) ([]string, string) {
	fake.addMutex.RLock()
	defer fake.addMutex.RUnlock()
	argsForCall := fake.addArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *AddressTable) PausePruning() {
	fake.pausePruningMutex.Lock()
	fake.pausePruningArgsForCall = append(fake.pausePruningArgsForCall, struct {
	}{})
	stub := fake.PausePruningStub
	fake.recordInvocation("PausePruning", []interface{}{})
	fake.pausePruningMutex.Unlock()
	if stub != nil {
		fake.PausePruningStub()
	}
}

func (fake *AddressTable) PausePruningCallCount() int {
	fake.pausePruningMutex.RLock()
	defer fake.pausePruningMutex.RUnlock()
	return len(fake.pausePruningArgsForCall)
}

func (fake *AddressTable) PausePruningCalls(stub func()) {
	fake.pausePruningMutex.Lock()
	defer fake.pausePruningMutex.Unlock()
	fake.PausePruningStub = stub
}

func (fake *AddressTable) Remove(arg1 []string, arg2 string) {
	var arg1Copy []string
	if arg1 != nil {
		arg1Copy = make([]string, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.removeMutex.Lock()
	fake.removeArgsForCall = append(fake.removeArgsForCall, struct {
		arg1 []string
		arg2 string
	}{arg1Copy, arg2})
	stub := fake.RemoveStub
	fake.recordInvocation("Remove", []interface{}{arg1Copy, arg2})
	fake.removeMutex.Unlock()
	if stub != nil {
		fake.RemoveStub(arg1, arg2)
	}
}

func (fake *AddressTable) RemoveCallCount() int {
	fake.removeMutex.RLock()
	defer fake.removeMutex.RUnlock()
	return len(fake.removeArgsForCall)
}

func (fake *AddressTable) RemoveCalls(stub func([]string, string)) {
	fake.removeMutex.Lock()
	defer fake.removeMutex.Unlock()
	fake.RemoveStub = stub
}

func (fake *AddressTable) RemoveArgsForCall(i int) ([]string, string) {
	fake.removeMutex.RLock()
	defer fake.removeMutex.RUnlock()
	argsForCall := fake.removeArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *AddressTable) ResumePruning() {
	fake.resumePruningMutex.Lock()
	fake.resumePruningArgsForCall = append(fake.resumePruningArgsForCall, struct {
	}{})
	stub := fake.ResumePruningStub
	fake.recordInvocation("ResumePruning", []interface{}{})
	fake.resumePruningMutex.Unlock()
	if stub != nil {
		fake.ResumePruningStub()
	}
}

func (fake *AddressTable) ResumePruningCallCount() int {
	fake.resumePruningMutex.RLock()
	defer fake.resumePruningMutex.RUnlock()
	return len(fake.resumePruningArgsForCall)
}

func (fake *AddressTable) ResumePruningCalls(stub func()) {
	fake.resumePruningMutex.Lock()
	defer fake.resumePruningMutex.Unlock()
	fake.ResumePruningStub = stub
}

func (fake *AddressTable) SetWarm() {
	fake.setWarmMutex.Lock()
	fake.setWarmArgsForCall = append(fake.setWarmArgsForCall, struct {
	}{})
	stub := fake.SetWarmStub
	fake.recordInvocation("SetWarm", []interface{}{})
	fake.setWarmMutex.Unlock()
	if stub != nil {
		fake.SetWarmStub()
	}
}

func (fake *AddressTable) SetWarmCallCount() int {
	fake.setWarmMutex.RLock()
	defer fake.setWarmMutex.RUnlock()
	return len(fake.setWarmArgsForCall)
}

func (fake *AddressTable) SetWarmCalls(stub func()) {
	fake.setWarmMutex.Lock()
	defer fake.setWarmMutex.Unlock()
	fake.SetWarmStub = stub
}

func (fake *AddressTable) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.addMutex.RLock()
	defer fake.addMutex.RUnlock()
	fake.pausePruningMutex.RLock()
	defer fake.pausePruningMutex.RUnlock()
	fake.removeMutex.RLock()
	defer fake.removeMutex.RUnlock()
	fake.resumePruningMutex.RLock()
	defer fake.resumePruningMutex.RUnlock()
	fake.setWarmMutex.RLock()
	defer fake.setWarmMutex.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 _ mbus.AddressTable = new(AddressTable)
