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

import (
	"sync"

	"code.cloudfoundry.org/cli/actor/pluginaction"
	"code.cloudfoundry.org/cli/util/configv3"
)

type FakeConfig struct {
	AddPluginStub        func(configv3.Plugin)
	addPluginMutex       sync.RWMutex
	addPluginArgsForCall []struct {
		arg1 configv3.Plugin
	}
	AddPluginRepositoryStub        func(string, string)
	addPluginRepositoryMutex       sync.RWMutex
	addPluginRepositoryArgsForCall []struct {
		arg1 string
		arg2 string
	}
	BinaryVersionStub        func() string
	binaryVersionMutex       sync.RWMutex
	binaryVersionArgsForCall []struct {
	}
	binaryVersionReturns struct {
		result1 string
	}
	binaryVersionReturnsOnCall map[int]struct {
		result1 string
	}
	GetPluginStub        func(string) (configv3.Plugin, bool)
	getPluginMutex       sync.RWMutex
	getPluginArgsForCall []struct {
		arg1 string
	}
	getPluginReturns struct {
		result1 configv3.Plugin
		result2 bool
	}
	getPluginReturnsOnCall map[int]struct {
		result1 configv3.Plugin
		result2 bool
	}
	PluginHomeStub        func() string
	pluginHomeMutex       sync.RWMutex
	pluginHomeArgsForCall []struct {
	}
	pluginHomeReturns struct {
		result1 string
	}
	pluginHomeReturnsOnCall map[int]struct {
		result1 string
	}
	PluginRepositoriesStub        func() []configv3.PluginRepository
	pluginRepositoriesMutex       sync.RWMutex
	pluginRepositoriesArgsForCall []struct {
	}
	pluginRepositoriesReturns struct {
		result1 []configv3.PluginRepository
	}
	pluginRepositoriesReturnsOnCall map[int]struct {
		result1 []configv3.PluginRepository
	}
	PluginsStub        func() []configv3.Plugin
	pluginsMutex       sync.RWMutex
	pluginsArgsForCall []struct {
	}
	pluginsReturns struct {
		result1 []configv3.Plugin
	}
	pluginsReturnsOnCall map[int]struct {
		result1 []configv3.Plugin
	}
	RemovePluginStub        func(string)
	removePluginMutex       sync.RWMutex
	removePluginArgsForCall []struct {
		arg1 string
	}
	WritePluginConfigStub        func() error
	writePluginConfigMutex       sync.RWMutex
	writePluginConfigArgsForCall []struct {
	}
	writePluginConfigReturns struct {
		result1 error
	}
	writePluginConfigReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeConfig) AddPlugin(arg1 configv3.Plugin) {
	fake.addPluginMutex.Lock()
	fake.addPluginArgsForCall = append(fake.addPluginArgsForCall, struct {
		arg1 configv3.Plugin
	}{arg1})
	fake.recordInvocation("AddPlugin", []interface{}{arg1})
	fake.addPluginMutex.Unlock()
	if fake.AddPluginStub != nil {
		fake.AddPluginStub(arg1)
	}
}

func (fake *FakeConfig) AddPluginCallCount() int {
	fake.addPluginMutex.RLock()
	defer fake.addPluginMutex.RUnlock()
	return len(fake.addPluginArgsForCall)
}

func (fake *FakeConfig) AddPluginCalls(stub func(configv3.Plugin)) {
	fake.addPluginMutex.Lock()
	defer fake.addPluginMutex.Unlock()
	fake.AddPluginStub = stub
}

func (fake *FakeConfig) AddPluginArgsForCall(i int) configv3.Plugin {
	fake.addPluginMutex.RLock()
	defer fake.addPluginMutex.RUnlock()
	argsForCall := fake.addPluginArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeConfig) AddPluginRepository(arg1 string, arg2 string) {
	fake.addPluginRepositoryMutex.Lock()
	fake.addPluginRepositoryArgsForCall = append(fake.addPluginRepositoryArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("AddPluginRepository", []interface{}{arg1, arg2})
	fake.addPluginRepositoryMutex.Unlock()
	if fake.AddPluginRepositoryStub != nil {
		fake.AddPluginRepositoryStub(arg1, arg2)
	}
}

func (fake *FakeConfig) AddPluginRepositoryCallCount() int {
	fake.addPluginRepositoryMutex.RLock()
	defer fake.addPluginRepositoryMutex.RUnlock()
	return len(fake.addPluginRepositoryArgsForCall)
}

func (fake *FakeConfig) AddPluginRepositoryCalls(stub func(string, string)) {
	fake.addPluginRepositoryMutex.Lock()
	defer fake.addPluginRepositoryMutex.Unlock()
	fake.AddPluginRepositoryStub = stub
}

func (fake *FakeConfig) AddPluginRepositoryArgsForCall(i int) (string, string) {
	fake.addPluginRepositoryMutex.RLock()
	defer fake.addPluginRepositoryMutex.RUnlock()
	argsForCall := fake.addPluginRepositoryArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeConfig) BinaryVersion() string {
	fake.binaryVersionMutex.Lock()
	ret, specificReturn := fake.binaryVersionReturnsOnCall[len(fake.binaryVersionArgsForCall)]
	fake.binaryVersionArgsForCall = append(fake.binaryVersionArgsForCall, struct {
	}{})
	fake.recordInvocation("BinaryVersion", []interface{}{})
	fake.binaryVersionMutex.Unlock()
	if fake.BinaryVersionStub != nil {
		return fake.BinaryVersionStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.binaryVersionReturns
	return fakeReturns.result1
}

func (fake *FakeConfig) BinaryVersionCallCount() int {
	fake.binaryVersionMutex.RLock()
	defer fake.binaryVersionMutex.RUnlock()
	return len(fake.binaryVersionArgsForCall)
}

func (fake *FakeConfig) BinaryVersionCalls(stub func() string) {
	fake.binaryVersionMutex.Lock()
	defer fake.binaryVersionMutex.Unlock()
	fake.BinaryVersionStub = stub
}

func (fake *FakeConfig) BinaryVersionReturns(result1 string) {
	fake.binaryVersionMutex.Lock()
	defer fake.binaryVersionMutex.Unlock()
	fake.BinaryVersionStub = nil
	fake.binaryVersionReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeConfig) BinaryVersionReturnsOnCall(i int, result1 string) {
	fake.binaryVersionMutex.Lock()
	defer fake.binaryVersionMutex.Unlock()
	fake.BinaryVersionStub = nil
	if fake.binaryVersionReturnsOnCall == nil {
		fake.binaryVersionReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.binaryVersionReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *FakeConfig) GetPlugin(arg1 string) (configv3.Plugin, bool) {
	fake.getPluginMutex.Lock()
	ret, specificReturn := fake.getPluginReturnsOnCall[len(fake.getPluginArgsForCall)]
	fake.getPluginArgsForCall = append(fake.getPluginArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("GetPlugin", []interface{}{arg1})
	fake.getPluginMutex.Unlock()
	if fake.GetPluginStub != nil {
		return fake.GetPluginStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.getPluginReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeConfig) GetPluginCallCount() int {
	fake.getPluginMutex.RLock()
	defer fake.getPluginMutex.RUnlock()
	return len(fake.getPluginArgsForCall)
}

func (fake *FakeConfig) GetPluginCalls(stub func(string) (configv3.Plugin, bool)) {
	fake.getPluginMutex.Lock()
	defer fake.getPluginMutex.Unlock()
	fake.GetPluginStub = stub
}

func (fake *FakeConfig) GetPluginArgsForCall(i int) string {
	fake.getPluginMutex.RLock()
	defer fake.getPluginMutex.RUnlock()
	argsForCall := fake.getPluginArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeConfig) GetPluginReturns(result1 configv3.Plugin, result2 bool) {
	fake.getPluginMutex.Lock()
	defer fake.getPluginMutex.Unlock()
	fake.GetPluginStub = nil
	fake.getPluginReturns = struct {
		result1 configv3.Plugin
		result2 bool
	}{result1, result2}
}

func (fake *FakeConfig) GetPluginReturnsOnCall(i int, result1 configv3.Plugin, result2 bool) {
	fake.getPluginMutex.Lock()
	defer fake.getPluginMutex.Unlock()
	fake.GetPluginStub = nil
	if fake.getPluginReturnsOnCall == nil {
		fake.getPluginReturnsOnCall = make(map[int]struct {
			result1 configv3.Plugin
			result2 bool
		})
	}
	fake.getPluginReturnsOnCall[i] = struct {
		result1 configv3.Plugin
		result2 bool
	}{result1, result2}
}

func (fake *FakeConfig) PluginHome() string {
	fake.pluginHomeMutex.Lock()
	ret, specificReturn := fake.pluginHomeReturnsOnCall[len(fake.pluginHomeArgsForCall)]
	fake.pluginHomeArgsForCall = append(fake.pluginHomeArgsForCall, struct {
	}{})
	fake.recordInvocation("PluginHome", []interface{}{})
	fake.pluginHomeMutex.Unlock()
	if fake.PluginHomeStub != nil {
		return fake.PluginHomeStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.pluginHomeReturns
	return fakeReturns.result1
}

func (fake *FakeConfig) PluginHomeCallCount() int {
	fake.pluginHomeMutex.RLock()
	defer fake.pluginHomeMutex.RUnlock()
	return len(fake.pluginHomeArgsForCall)
}

func (fake *FakeConfig) PluginHomeCalls(stub func() string) {
	fake.pluginHomeMutex.Lock()
	defer fake.pluginHomeMutex.Unlock()
	fake.PluginHomeStub = stub
}

func (fake *FakeConfig) PluginHomeReturns(result1 string) {
	fake.pluginHomeMutex.Lock()
	defer fake.pluginHomeMutex.Unlock()
	fake.PluginHomeStub = nil
	fake.pluginHomeReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeConfig) PluginHomeReturnsOnCall(i int, result1 string) {
	fake.pluginHomeMutex.Lock()
	defer fake.pluginHomeMutex.Unlock()
	fake.PluginHomeStub = nil
	if fake.pluginHomeReturnsOnCall == nil {
		fake.pluginHomeReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.pluginHomeReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *FakeConfig) PluginRepositories() []configv3.PluginRepository {
	fake.pluginRepositoriesMutex.Lock()
	ret, specificReturn := fake.pluginRepositoriesReturnsOnCall[len(fake.pluginRepositoriesArgsForCall)]
	fake.pluginRepositoriesArgsForCall = append(fake.pluginRepositoriesArgsForCall, struct {
	}{})
	fake.recordInvocation("PluginRepositories", []interface{}{})
	fake.pluginRepositoriesMutex.Unlock()
	if fake.PluginRepositoriesStub != nil {
		return fake.PluginRepositoriesStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.pluginRepositoriesReturns
	return fakeReturns.result1
}

func (fake *FakeConfig) PluginRepositoriesCallCount() int {
	fake.pluginRepositoriesMutex.RLock()
	defer fake.pluginRepositoriesMutex.RUnlock()
	return len(fake.pluginRepositoriesArgsForCall)
}

func (fake *FakeConfig) PluginRepositoriesCalls(stub func() []configv3.PluginRepository) {
	fake.pluginRepositoriesMutex.Lock()
	defer fake.pluginRepositoriesMutex.Unlock()
	fake.PluginRepositoriesStub = stub
}

func (fake *FakeConfig) PluginRepositoriesReturns(result1 []configv3.PluginRepository) {
	fake.pluginRepositoriesMutex.Lock()
	defer fake.pluginRepositoriesMutex.Unlock()
	fake.PluginRepositoriesStub = nil
	fake.pluginRepositoriesReturns = struct {
		result1 []configv3.PluginRepository
	}{result1}
}

func (fake *FakeConfig) PluginRepositoriesReturnsOnCall(i int, result1 []configv3.PluginRepository) {
	fake.pluginRepositoriesMutex.Lock()
	defer fake.pluginRepositoriesMutex.Unlock()
	fake.PluginRepositoriesStub = nil
	if fake.pluginRepositoriesReturnsOnCall == nil {
		fake.pluginRepositoriesReturnsOnCall = make(map[int]struct {
			result1 []configv3.PluginRepository
		})
	}
	fake.pluginRepositoriesReturnsOnCall[i] = struct {
		result1 []configv3.PluginRepository
	}{result1}
}

func (fake *FakeConfig) Plugins() []configv3.Plugin {
	fake.pluginsMutex.Lock()
	ret, specificReturn := fake.pluginsReturnsOnCall[len(fake.pluginsArgsForCall)]
	fake.pluginsArgsForCall = append(fake.pluginsArgsForCall, struct {
	}{})
	fake.recordInvocation("Plugins", []interface{}{})
	fake.pluginsMutex.Unlock()
	if fake.PluginsStub != nil {
		return fake.PluginsStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.pluginsReturns
	return fakeReturns.result1
}

func (fake *FakeConfig) PluginsCallCount() int {
	fake.pluginsMutex.RLock()
	defer fake.pluginsMutex.RUnlock()
	return len(fake.pluginsArgsForCall)
}

func (fake *FakeConfig) PluginsCalls(stub func() []configv3.Plugin) {
	fake.pluginsMutex.Lock()
	defer fake.pluginsMutex.Unlock()
	fake.PluginsStub = stub
}

func (fake *FakeConfig) PluginsReturns(result1 []configv3.Plugin) {
	fake.pluginsMutex.Lock()
	defer fake.pluginsMutex.Unlock()
	fake.PluginsStub = nil
	fake.pluginsReturns = struct {
		result1 []configv3.Plugin
	}{result1}
}

func (fake *FakeConfig) PluginsReturnsOnCall(i int, result1 []configv3.Plugin) {
	fake.pluginsMutex.Lock()
	defer fake.pluginsMutex.Unlock()
	fake.PluginsStub = nil
	if fake.pluginsReturnsOnCall == nil {
		fake.pluginsReturnsOnCall = make(map[int]struct {
			result1 []configv3.Plugin
		})
	}
	fake.pluginsReturnsOnCall[i] = struct {
		result1 []configv3.Plugin
	}{result1}
}

func (fake *FakeConfig) RemovePlugin(arg1 string) {
	fake.removePluginMutex.Lock()
	fake.removePluginArgsForCall = append(fake.removePluginArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("RemovePlugin", []interface{}{arg1})
	fake.removePluginMutex.Unlock()
	if fake.RemovePluginStub != nil {
		fake.RemovePluginStub(arg1)
	}
}

func (fake *FakeConfig) RemovePluginCallCount() int {
	fake.removePluginMutex.RLock()
	defer fake.removePluginMutex.RUnlock()
	return len(fake.removePluginArgsForCall)
}

func (fake *FakeConfig) RemovePluginCalls(stub func(string)) {
	fake.removePluginMutex.Lock()
	defer fake.removePluginMutex.Unlock()
	fake.RemovePluginStub = stub
}

func (fake *FakeConfig) RemovePluginArgsForCall(i int) string {
	fake.removePluginMutex.RLock()
	defer fake.removePluginMutex.RUnlock()
	argsForCall := fake.removePluginArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeConfig) WritePluginConfig() error {
	fake.writePluginConfigMutex.Lock()
	ret, specificReturn := fake.writePluginConfigReturnsOnCall[len(fake.writePluginConfigArgsForCall)]
	fake.writePluginConfigArgsForCall = append(fake.writePluginConfigArgsForCall, struct {
	}{})
	fake.recordInvocation("WritePluginConfig", []interface{}{})
	fake.writePluginConfigMutex.Unlock()
	if fake.WritePluginConfigStub != nil {
		return fake.WritePluginConfigStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.writePluginConfigReturns
	return fakeReturns.result1
}

func (fake *FakeConfig) WritePluginConfigCallCount() int {
	fake.writePluginConfigMutex.RLock()
	defer fake.writePluginConfigMutex.RUnlock()
	return len(fake.writePluginConfigArgsForCall)
}

func (fake *FakeConfig) WritePluginConfigCalls(stub func() error) {
	fake.writePluginConfigMutex.Lock()
	defer fake.writePluginConfigMutex.Unlock()
	fake.WritePluginConfigStub = stub
}

func (fake *FakeConfig) WritePluginConfigReturns(result1 error) {
	fake.writePluginConfigMutex.Lock()
	defer fake.writePluginConfigMutex.Unlock()
	fake.WritePluginConfigStub = nil
	fake.writePluginConfigReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeConfig) WritePluginConfigReturnsOnCall(i int, result1 error) {
	fake.writePluginConfigMutex.Lock()
	defer fake.writePluginConfigMutex.Unlock()
	fake.WritePluginConfigStub = nil
	if fake.writePluginConfigReturnsOnCall == nil {
		fake.writePluginConfigReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writePluginConfigReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeConfig) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.addPluginMutex.RLock()
	defer fake.addPluginMutex.RUnlock()
	fake.addPluginRepositoryMutex.RLock()
	defer fake.addPluginRepositoryMutex.RUnlock()
	fake.binaryVersionMutex.RLock()
	defer fake.binaryVersionMutex.RUnlock()
	fake.getPluginMutex.RLock()
	defer fake.getPluginMutex.RUnlock()
	fake.pluginHomeMutex.RLock()
	defer fake.pluginHomeMutex.RUnlock()
	fake.pluginRepositoriesMutex.RLock()
	defer fake.pluginRepositoriesMutex.RUnlock()
	fake.pluginsMutex.RLock()
	defer fake.pluginsMutex.RUnlock()
	fake.removePluginMutex.RLock()
	defer fake.removePluginMutex.RUnlock()
	fake.writePluginConfigMutex.RLock()
	defer fake.writePluginConfigMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeConfig) 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 _ pluginaction.Config = new(FakeConfig)
