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

import (
	"sync"

	"github.com/cloudfoundry/cloud-service-broker/v2/internal/storage"
	"github.com/cloudfoundry/cloud-service-broker/v2/pkg/broker"
)

type FakeServiceProviderStorage struct {
	DeleteTerraformDeploymentStub        func(string) error
	deleteTerraformDeploymentMutex       sync.RWMutex
	deleteTerraformDeploymentArgsForCall []struct {
		arg1 string
	}
	deleteTerraformDeploymentReturns struct {
		result1 error
	}
	deleteTerraformDeploymentReturnsOnCall map[int]struct {
		result1 error
	}
	ExistsTerraformDeploymentStub        func(string) (bool, error)
	existsTerraformDeploymentMutex       sync.RWMutex
	existsTerraformDeploymentArgsForCall []struct {
		arg1 string
	}
	existsTerraformDeploymentReturns struct {
		result1 bool
		result2 error
	}
	existsTerraformDeploymentReturnsOnCall map[int]struct {
		result1 bool
		result2 error
	}
	GetServiceBindingIDsForServiceInstanceStub        func(string) ([]string, error)
	getServiceBindingIDsForServiceInstanceMutex       sync.RWMutex
	getServiceBindingIDsForServiceInstanceArgsForCall []struct {
		arg1 string
	}
	getServiceBindingIDsForServiceInstanceReturns struct {
		result1 []string
		result2 error
	}
	getServiceBindingIDsForServiceInstanceReturnsOnCall map[int]struct {
		result1 []string
		result2 error
	}
	GetTerraformDeploymentStub        func(string) (storage.TerraformDeployment, error)
	getTerraformDeploymentMutex       sync.RWMutex
	getTerraformDeploymentArgsForCall []struct {
		arg1 string
	}
	getTerraformDeploymentReturns struct {
		result1 storage.TerraformDeployment
		result2 error
	}
	getTerraformDeploymentReturnsOnCall map[int]struct {
		result1 storage.TerraformDeployment
		result2 error
	}
	RemoveLockFileStub        func(string) error
	removeLockFileMutex       sync.RWMutex
	removeLockFileArgsForCall []struct {
		arg1 string
	}
	removeLockFileReturns struct {
		result1 error
	}
	removeLockFileReturnsOnCall map[int]struct {
		result1 error
	}
	StoreTerraformDeploymentStub        func(storage.TerraformDeployment) error
	storeTerraformDeploymentMutex       sync.RWMutex
	storeTerraformDeploymentArgsForCall []struct {
		arg1 storage.TerraformDeployment
	}
	storeTerraformDeploymentReturns struct {
		result1 error
	}
	storeTerraformDeploymentReturnsOnCall map[int]struct {
		result1 error
	}
	WriteLockFileStub        func(string) error
	writeLockFileMutex       sync.RWMutex
	writeLockFileArgsForCall []struct {
		arg1 string
	}
	writeLockFileReturns struct {
		result1 error
	}
	writeLockFileReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeServiceProviderStorage) DeleteTerraformDeployment(arg1 string) error {
	fake.deleteTerraformDeploymentMutex.Lock()
	ret, specificReturn := fake.deleteTerraformDeploymentReturnsOnCall[len(fake.deleteTerraformDeploymentArgsForCall)]
	fake.deleteTerraformDeploymentArgsForCall = append(fake.deleteTerraformDeploymentArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.DeleteTerraformDeploymentStub
	fakeReturns := fake.deleteTerraformDeploymentReturns
	fake.recordInvocation("DeleteTerraformDeployment", []interface{}{arg1})
	fake.deleteTerraformDeploymentMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeServiceProviderStorage) DeleteTerraformDeploymentCallCount() int {
	fake.deleteTerraformDeploymentMutex.RLock()
	defer fake.deleteTerraformDeploymentMutex.RUnlock()
	return len(fake.deleteTerraformDeploymentArgsForCall)
}

func (fake *FakeServiceProviderStorage) DeleteTerraformDeploymentCalls(stub func(string) error) {
	fake.deleteTerraformDeploymentMutex.Lock()
	defer fake.deleteTerraformDeploymentMutex.Unlock()
	fake.DeleteTerraformDeploymentStub = stub
}

func (fake *FakeServiceProviderStorage) DeleteTerraformDeploymentArgsForCall(i int) string {
	fake.deleteTerraformDeploymentMutex.RLock()
	defer fake.deleteTerraformDeploymentMutex.RUnlock()
	argsForCall := fake.deleteTerraformDeploymentArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeServiceProviderStorage) DeleteTerraformDeploymentReturns(result1 error) {
	fake.deleteTerraformDeploymentMutex.Lock()
	defer fake.deleteTerraformDeploymentMutex.Unlock()
	fake.DeleteTerraformDeploymentStub = nil
	fake.deleteTerraformDeploymentReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeServiceProviderStorage) DeleteTerraformDeploymentReturnsOnCall(i int, result1 error) {
	fake.deleteTerraformDeploymentMutex.Lock()
	defer fake.deleteTerraformDeploymentMutex.Unlock()
	fake.DeleteTerraformDeploymentStub = nil
	if fake.deleteTerraformDeploymentReturnsOnCall == nil {
		fake.deleteTerraformDeploymentReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.deleteTerraformDeploymentReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeServiceProviderStorage) ExistsTerraformDeployment(arg1 string) (bool, error) {
	fake.existsTerraformDeploymentMutex.Lock()
	ret, specificReturn := fake.existsTerraformDeploymentReturnsOnCall[len(fake.existsTerraformDeploymentArgsForCall)]
	fake.existsTerraformDeploymentArgsForCall = append(fake.existsTerraformDeploymentArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.ExistsTerraformDeploymentStub
	fakeReturns := fake.existsTerraformDeploymentReturns
	fake.recordInvocation("ExistsTerraformDeployment", []interface{}{arg1})
	fake.existsTerraformDeploymentMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeServiceProviderStorage) ExistsTerraformDeploymentCallCount() int {
	fake.existsTerraformDeploymentMutex.RLock()
	defer fake.existsTerraformDeploymentMutex.RUnlock()
	return len(fake.existsTerraformDeploymentArgsForCall)
}

func (fake *FakeServiceProviderStorage) ExistsTerraformDeploymentCalls(stub func(string) (bool, error)) {
	fake.existsTerraformDeploymentMutex.Lock()
	defer fake.existsTerraformDeploymentMutex.Unlock()
	fake.ExistsTerraformDeploymentStub = stub
}

func (fake *FakeServiceProviderStorage) ExistsTerraformDeploymentArgsForCall(i int) string {
	fake.existsTerraformDeploymentMutex.RLock()
	defer fake.existsTerraformDeploymentMutex.RUnlock()
	argsForCall := fake.existsTerraformDeploymentArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeServiceProviderStorage) ExistsTerraformDeploymentReturns(result1 bool, result2 error) {
	fake.existsTerraformDeploymentMutex.Lock()
	defer fake.existsTerraformDeploymentMutex.Unlock()
	fake.ExistsTerraformDeploymentStub = nil
	fake.existsTerraformDeploymentReturns = struct {
		result1 bool
		result2 error
	}{result1, result2}
}

func (fake *FakeServiceProviderStorage) ExistsTerraformDeploymentReturnsOnCall(i int, result1 bool, result2 error) {
	fake.existsTerraformDeploymentMutex.Lock()
	defer fake.existsTerraformDeploymentMutex.Unlock()
	fake.ExistsTerraformDeploymentStub = nil
	if fake.existsTerraformDeploymentReturnsOnCall == nil {
		fake.existsTerraformDeploymentReturnsOnCall = make(map[int]struct {
			result1 bool
			result2 error
		})
	}
	fake.existsTerraformDeploymentReturnsOnCall[i] = struct {
		result1 bool
		result2 error
	}{result1, result2}
}

func (fake *FakeServiceProviderStorage) GetServiceBindingIDsForServiceInstance(arg1 string) ([]string, error) {
	fake.getServiceBindingIDsForServiceInstanceMutex.Lock()
	ret, specificReturn := fake.getServiceBindingIDsForServiceInstanceReturnsOnCall[len(fake.getServiceBindingIDsForServiceInstanceArgsForCall)]
	fake.getServiceBindingIDsForServiceInstanceArgsForCall = append(fake.getServiceBindingIDsForServiceInstanceArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.GetServiceBindingIDsForServiceInstanceStub
	fakeReturns := fake.getServiceBindingIDsForServiceInstanceReturns
	fake.recordInvocation("GetServiceBindingIDsForServiceInstance", []interface{}{arg1})
	fake.getServiceBindingIDsForServiceInstanceMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeServiceProviderStorage) GetServiceBindingIDsForServiceInstanceCallCount() int {
	fake.getServiceBindingIDsForServiceInstanceMutex.RLock()
	defer fake.getServiceBindingIDsForServiceInstanceMutex.RUnlock()
	return len(fake.getServiceBindingIDsForServiceInstanceArgsForCall)
}

func (fake *FakeServiceProviderStorage) GetServiceBindingIDsForServiceInstanceCalls(stub func(string) ([]string, error)) {
	fake.getServiceBindingIDsForServiceInstanceMutex.Lock()
	defer fake.getServiceBindingIDsForServiceInstanceMutex.Unlock()
	fake.GetServiceBindingIDsForServiceInstanceStub = stub
}

func (fake *FakeServiceProviderStorage) GetServiceBindingIDsForServiceInstanceArgsForCall(i int) string {
	fake.getServiceBindingIDsForServiceInstanceMutex.RLock()
	defer fake.getServiceBindingIDsForServiceInstanceMutex.RUnlock()
	argsForCall := fake.getServiceBindingIDsForServiceInstanceArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeServiceProviderStorage) GetServiceBindingIDsForServiceInstanceReturns(result1 []string, result2 error) {
	fake.getServiceBindingIDsForServiceInstanceMutex.Lock()
	defer fake.getServiceBindingIDsForServiceInstanceMutex.Unlock()
	fake.GetServiceBindingIDsForServiceInstanceStub = nil
	fake.getServiceBindingIDsForServiceInstanceReturns = struct {
		result1 []string
		result2 error
	}{result1, result2}
}

func (fake *FakeServiceProviderStorage) GetServiceBindingIDsForServiceInstanceReturnsOnCall(i int, result1 []string, result2 error) {
	fake.getServiceBindingIDsForServiceInstanceMutex.Lock()
	defer fake.getServiceBindingIDsForServiceInstanceMutex.Unlock()
	fake.GetServiceBindingIDsForServiceInstanceStub = nil
	if fake.getServiceBindingIDsForServiceInstanceReturnsOnCall == nil {
		fake.getServiceBindingIDsForServiceInstanceReturnsOnCall = make(map[int]struct {
			result1 []string
			result2 error
		})
	}
	fake.getServiceBindingIDsForServiceInstanceReturnsOnCall[i] = struct {
		result1 []string
		result2 error
	}{result1, result2}
}

func (fake *FakeServiceProviderStorage) GetTerraformDeployment(arg1 string) (storage.TerraformDeployment, error) {
	fake.getTerraformDeploymentMutex.Lock()
	ret, specificReturn := fake.getTerraformDeploymentReturnsOnCall[len(fake.getTerraformDeploymentArgsForCall)]
	fake.getTerraformDeploymentArgsForCall = append(fake.getTerraformDeploymentArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.GetTerraformDeploymentStub
	fakeReturns := fake.getTerraformDeploymentReturns
	fake.recordInvocation("GetTerraformDeployment", []interface{}{arg1})
	fake.getTerraformDeploymentMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeServiceProviderStorage) GetTerraformDeploymentCallCount() int {
	fake.getTerraformDeploymentMutex.RLock()
	defer fake.getTerraformDeploymentMutex.RUnlock()
	return len(fake.getTerraformDeploymentArgsForCall)
}

func (fake *FakeServiceProviderStorage) GetTerraformDeploymentCalls(stub func(string) (storage.TerraformDeployment, error)) {
	fake.getTerraformDeploymentMutex.Lock()
	defer fake.getTerraformDeploymentMutex.Unlock()
	fake.GetTerraformDeploymentStub = stub
}

func (fake *FakeServiceProviderStorage) GetTerraformDeploymentArgsForCall(i int) string {
	fake.getTerraformDeploymentMutex.RLock()
	defer fake.getTerraformDeploymentMutex.RUnlock()
	argsForCall := fake.getTerraformDeploymentArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeServiceProviderStorage) GetTerraformDeploymentReturns(result1 storage.TerraformDeployment, result2 error) {
	fake.getTerraformDeploymentMutex.Lock()
	defer fake.getTerraformDeploymentMutex.Unlock()
	fake.GetTerraformDeploymentStub = nil
	fake.getTerraformDeploymentReturns = struct {
		result1 storage.TerraformDeployment
		result2 error
	}{result1, result2}
}

func (fake *FakeServiceProviderStorage) GetTerraformDeploymentReturnsOnCall(i int, result1 storage.TerraformDeployment, result2 error) {
	fake.getTerraformDeploymentMutex.Lock()
	defer fake.getTerraformDeploymentMutex.Unlock()
	fake.GetTerraformDeploymentStub = nil
	if fake.getTerraformDeploymentReturnsOnCall == nil {
		fake.getTerraformDeploymentReturnsOnCall = make(map[int]struct {
			result1 storage.TerraformDeployment
			result2 error
		})
	}
	fake.getTerraformDeploymentReturnsOnCall[i] = struct {
		result1 storage.TerraformDeployment
		result2 error
	}{result1, result2}
}

func (fake *FakeServiceProviderStorage) RemoveLockFile(arg1 string) error {
	fake.removeLockFileMutex.Lock()
	ret, specificReturn := fake.removeLockFileReturnsOnCall[len(fake.removeLockFileArgsForCall)]
	fake.removeLockFileArgsForCall = append(fake.removeLockFileArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.RemoveLockFileStub
	fakeReturns := fake.removeLockFileReturns
	fake.recordInvocation("RemoveLockFile", []interface{}{arg1})
	fake.removeLockFileMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeServiceProviderStorage) RemoveLockFileCallCount() int {
	fake.removeLockFileMutex.RLock()
	defer fake.removeLockFileMutex.RUnlock()
	return len(fake.removeLockFileArgsForCall)
}

func (fake *FakeServiceProviderStorage) RemoveLockFileCalls(stub func(string) error) {
	fake.removeLockFileMutex.Lock()
	defer fake.removeLockFileMutex.Unlock()
	fake.RemoveLockFileStub = stub
}

func (fake *FakeServiceProviderStorage) RemoveLockFileArgsForCall(i int) string {
	fake.removeLockFileMutex.RLock()
	defer fake.removeLockFileMutex.RUnlock()
	argsForCall := fake.removeLockFileArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeServiceProviderStorage) RemoveLockFileReturns(result1 error) {
	fake.removeLockFileMutex.Lock()
	defer fake.removeLockFileMutex.Unlock()
	fake.RemoveLockFileStub = nil
	fake.removeLockFileReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeServiceProviderStorage) RemoveLockFileReturnsOnCall(i int, result1 error) {
	fake.removeLockFileMutex.Lock()
	defer fake.removeLockFileMutex.Unlock()
	fake.RemoveLockFileStub = nil
	if fake.removeLockFileReturnsOnCall == nil {
		fake.removeLockFileReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.removeLockFileReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeServiceProviderStorage) StoreTerraformDeployment(arg1 storage.TerraformDeployment) error {
	fake.storeTerraformDeploymentMutex.Lock()
	ret, specificReturn := fake.storeTerraformDeploymentReturnsOnCall[len(fake.storeTerraformDeploymentArgsForCall)]
	fake.storeTerraformDeploymentArgsForCall = append(fake.storeTerraformDeploymentArgsForCall, struct {
		arg1 storage.TerraformDeployment
	}{arg1})
	stub := fake.StoreTerraformDeploymentStub
	fakeReturns := fake.storeTerraformDeploymentReturns
	fake.recordInvocation("StoreTerraformDeployment", []interface{}{arg1})
	fake.storeTerraformDeploymentMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeServiceProviderStorage) StoreTerraformDeploymentCallCount() int {
	fake.storeTerraformDeploymentMutex.RLock()
	defer fake.storeTerraformDeploymentMutex.RUnlock()
	return len(fake.storeTerraformDeploymentArgsForCall)
}

func (fake *FakeServiceProviderStorage) StoreTerraformDeploymentCalls(stub func(storage.TerraformDeployment) error) {
	fake.storeTerraformDeploymentMutex.Lock()
	defer fake.storeTerraformDeploymentMutex.Unlock()
	fake.StoreTerraformDeploymentStub = stub
}

func (fake *FakeServiceProviderStorage) StoreTerraformDeploymentArgsForCall(i int) storage.TerraformDeployment {
	fake.storeTerraformDeploymentMutex.RLock()
	defer fake.storeTerraformDeploymentMutex.RUnlock()
	argsForCall := fake.storeTerraformDeploymentArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeServiceProviderStorage) StoreTerraformDeploymentReturns(result1 error) {
	fake.storeTerraformDeploymentMutex.Lock()
	defer fake.storeTerraformDeploymentMutex.Unlock()
	fake.StoreTerraformDeploymentStub = nil
	fake.storeTerraformDeploymentReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeServiceProviderStorage) StoreTerraformDeploymentReturnsOnCall(i int, result1 error) {
	fake.storeTerraformDeploymentMutex.Lock()
	defer fake.storeTerraformDeploymentMutex.Unlock()
	fake.StoreTerraformDeploymentStub = nil
	if fake.storeTerraformDeploymentReturnsOnCall == nil {
		fake.storeTerraformDeploymentReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.storeTerraformDeploymentReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeServiceProviderStorage) WriteLockFile(arg1 string) error {
	fake.writeLockFileMutex.Lock()
	ret, specificReturn := fake.writeLockFileReturnsOnCall[len(fake.writeLockFileArgsForCall)]
	fake.writeLockFileArgsForCall = append(fake.writeLockFileArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.WriteLockFileStub
	fakeReturns := fake.writeLockFileReturns
	fake.recordInvocation("WriteLockFile", []interface{}{arg1})
	fake.writeLockFileMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeServiceProviderStorage) WriteLockFileCallCount() int {
	fake.writeLockFileMutex.RLock()
	defer fake.writeLockFileMutex.RUnlock()
	return len(fake.writeLockFileArgsForCall)
}

func (fake *FakeServiceProviderStorage) WriteLockFileCalls(stub func(string) error) {
	fake.writeLockFileMutex.Lock()
	defer fake.writeLockFileMutex.Unlock()
	fake.WriteLockFileStub = stub
}

func (fake *FakeServiceProviderStorage) WriteLockFileArgsForCall(i int) string {
	fake.writeLockFileMutex.RLock()
	defer fake.writeLockFileMutex.RUnlock()
	argsForCall := fake.writeLockFileArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeServiceProviderStorage) WriteLockFileReturns(result1 error) {
	fake.writeLockFileMutex.Lock()
	defer fake.writeLockFileMutex.Unlock()
	fake.WriteLockFileStub = nil
	fake.writeLockFileReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeServiceProviderStorage) WriteLockFileReturnsOnCall(i int, result1 error) {
	fake.writeLockFileMutex.Lock()
	defer fake.writeLockFileMutex.Unlock()
	fake.WriteLockFileStub = nil
	if fake.writeLockFileReturnsOnCall == nil {
		fake.writeLockFileReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeLockFileReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeServiceProviderStorage) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.deleteTerraformDeploymentMutex.RLock()
	defer fake.deleteTerraformDeploymentMutex.RUnlock()
	fake.existsTerraformDeploymentMutex.RLock()
	defer fake.existsTerraformDeploymentMutex.RUnlock()
	fake.getServiceBindingIDsForServiceInstanceMutex.RLock()
	defer fake.getServiceBindingIDsForServiceInstanceMutex.RUnlock()
	fake.getTerraformDeploymentMutex.RLock()
	defer fake.getTerraformDeploymentMutex.RUnlock()
	fake.removeLockFileMutex.RLock()
	defer fake.removeLockFileMutex.RUnlock()
	fake.storeTerraformDeploymentMutex.RLock()
	defer fake.storeTerraformDeploymentMutex.RUnlock()
	fake.writeLockFileMutex.RLock()
	defer fake.writeLockFileMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeServiceProviderStorage) 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 _ broker.ServiceProviderStorage = new(FakeServiceProviderStorage)
