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

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/actors"
)

type FakeServicePlanActor struct {
	FindServiceAccessStub        func(string, string) (actors.ServiceAccess, error)
	findServiceAccessMutex       sync.RWMutex
	findServiceAccessArgsForCall []struct {
		arg1 string
		arg2 string
	}
	findServiceAccessReturns struct {
		result1 actors.ServiceAccess
		result2 error
	}
	findServiceAccessReturnsOnCall map[int]struct {
		result1 actors.ServiceAccess
		result2 error
	}
	UpdateAllPlansForServiceStub        func(string, bool) error
	updateAllPlansForServiceMutex       sync.RWMutex
	updateAllPlansForServiceArgsForCall []struct {
		arg1 string
		arg2 bool
	}
	updateAllPlansForServiceReturns struct {
		result1 error
	}
	updateAllPlansForServiceReturnsOnCall map[int]struct {
		result1 error
	}
	UpdateOrgForServiceStub        func(string, string, bool) error
	updateOrgForServiceMutex       sync.RWMutex
	updateOrgForServiceArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 bool
	}
	updateOrgForServiceReturns struct {
		result1 error
	}
	updateOrgForServiceReturnsOnCall map[int]struct {
		result1 error
	}
	UpdatePlanAndOrgForServiceStub        func(string, string, string, bool) error
	updatePlanAndOrgForServiceMutex       sync.RWMutex
	updatePlanAndOrgForServiceArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 string
		arg4 bool
	}
	updatePlanAndOrgForServiceReturns struct {
		result1 error
	}
	updatePlanAndOrgForServiceReturnsOnCall map[int]struct {
		result1 error
	}
	UpdateSinglePlanForServiceStub        func(string, string, bool) error
	updateSinglePlanForServiceMutex       sync.RWMutex
	updateSinglePlanForServiceArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 bool
	}
	updateSinglePlanForServiceReturns struct {
		result1 error
	}
	updateSinglePlanForServiceReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeServicePlanActor) FindServiceAccess(arg1 string, arg2 string) (actors.ServiceAccess, error) {
	fake.findServiceAccessMutex.Lock()
	ret, specificReturn := fake.findServiceAccessReturnsOnCall[len(fake.findServiceAccessArgsForCall)]
	fake.findServiceAccessArgsForCall = append(fake.findServiceAccessArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("FindServiceAccess", []interface{}{arg1, arg2})
	fake.findServiceAccessMutex.Unlock()
	if fake.FindServiceAccessStub != nil {
		return fake.FindServiceAccessStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.findServiceAccessReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeServicePlanActor) FindServiceAccessCallCount() int {
	fake.findServiceAccessMutex.RLock()
	defer fake.findServiceAccessMutex.RUnlock()
	return len(fake.findServiceAccessArgsForCall)
}

func (fake *FakeServicePlanActor) FindServiceAccessCalls(stub func(string, string) (actors.ServiceAccess, error)) {
	fake.findServiceAccessMutex.Lock()
	defer fake.findServiceAccessMutex.Unlock()
	fake.FindServiceAccessStub = stub
}

func (fake *FakeServicePlanActor) FindServiceAccessArgsForCall(i int) (string, string) {
	fake.findServiceAccessMutex.RLock()
	defer fake.findServiceAccessMutex.RUnlock()
	argsForCall := fake.findServiceAccessArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeServicePlanActor) FindServiceAccessReturns(result1 actors.ServiceAccess, result2 error) {
	fake.findServiceAccessMutex.Lock()
	defer fake.findServiceAccessMutex.Unlock()
	fake.FindServiceAccessStub = nil
	fake.findServiceAccessReturns = struct {
		result1 actors.ServiceAccess
		result2 error
	}{result1, result2}
}

func (fake *FakeServicePlanActor) FindServiceAccessReturnsOnCall(i int, result1 actors.ServiceAccess, result2 error) {
	fake.findServiceAccessMutex.Lock()
	defer fake.findServiceAccessMutex.Unlock()
	fake.FindServiceAccessStub = nil
	if fake.findServiceAccessReturnsOnCall == nil {
		fake.findServiceAccessReturnsOnCall = make(map[int]struct {
			result1 actors.ServiceAccess
			result2 error
		})
	}
	fake.findServiceAccessReturnsOnCall[i] = struct {
		result1 actors.ServiceAccess
		result2 error
	}{result1, result2}
}

func (fake *FakeServicePlanActor) UpdateAllPlansForService(arg1 string, arg2 bool) error {
	fake.updateAllPlansForServiceMutex.Lock()
	ret, specificReturn := fake.updateAllPlansForServiceReturnsOnCall[len(fake.updateAllPlansForServiceArgsForCall)]
	fake.updateAllPlansForServiceArgsForCall = append(fake.updateAllPlansForServiceArgsForCall, struct {
		arg1 string
		arg2 bool
	}{arg1, arg2})
	fake.recordInvocation("UpdateAllPlansForService", []interface{}{arg1, arg2})
	fake.updateAllPlansForServiceMutex.Unlock()
	if fake.UpdateAllPlansForServiceStub != nil {
		return fake.UpdateAllPlansForServiceStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.updateAllPlansForServiceReturns
	return fakeReturns.result1
}

func (fake *FakeServicePlanActor) UpdateAllPlansForServiceCallCount() int {
	fake.updateAllPlansForServiceMutex.RLock()
	defer fake.updateAllPlansForServiceMutex.RUnlock()
	return len(fake.updateAllPlansForServiceArgsForCall)
}

func (fake *FakeServicePlanActor) UpdateAllPlansForServiceCalls(stub func(string, bool) error) {
	fake.updateAllPlansForServiceMutex.Lock()
	defer fake.updateAllPlansForServiceMutex.Unlock()
	fake.UpdateAllPlansForServiceStub = stub
}

func (fake *FakeServicePlanActor) UpdateAllPlansForServiceArgsForCall(i int) (string, bool) {
	fake.updateAllPlansForServiceMutex.RLock()
	defer fake.updateAllPlansForServiceMutex.RUnlock()
	argsForCall := fake.updateAllPlansForServiceArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeServicePlanActor) UpdateAllPlansForServiceReturns(result1 error) {
	fake.updateAllPlansForServiceMutex.Lock()
	defer fake.updateAllPlansForServiceMutex.Unlock()
	fake.UpdateAllPlansForServiceStub = nil
	fake.updateAllPlansForServiceReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeServicePlanActor) UpdateAllPlansForServiceReturnsOnCall(i int, result1 error) {
	fake.updateAllPlansForServiceMutex.Lock()
	defer fake.updateAllPlansForServiceMutex.Unlock()
	fake.UpdateAllPlansForServiceStub = nil
	if fake.updateAllPlansForServiceReturnsOnCall == nil {
		fake.updateAllPlansForServiceReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.updateAllPlansForServiceReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeServicePlanActor) UpdateOrgForService(arg1 string, arg2 string, arg3 bool) error {
	fake.updateOrgForServiceMutex.Lock()
	ret, specificReturn := fake.updateOrgForServiceReturnsOnCall[len(fake.updateOrgForServiceArgsForCall)]
	fake.updateOrgForServiceArgsForCall = append(fake.updateOrgForServiceArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 bool
	}{arg1, arg2, arg3})
	fake.recordInvocation("UpdateOrgForService", []interface{}{arg1, arg2, arg3})
	fake.updateOrgForServiceMutex.Unlock()
	if fake.UpdateOrgForServiceStub != nil {
		return fake.UpdateOrgForServiceStub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.updateOrgForServiceReturns
	return fakeReturns.result1
}

func (fake *FakeServicePlanActor) UpdateOrgForServiceCallCount() int {
	fake.updateOrgForServiceMutex.RLock()
	defer fake.updateOrgForServiceMutex.RUnlock()
	return len(fake.updateOrgForServiceArgsForCall)
}

func (fake *FakeServicePlanActor) UpdateOrgForServiceCalls(stub func(string, string, bool) error) {
	fake.updateOrgForServiceMutex.Lock()
	defer fake.updateOrgForServiceMutex.Unlock()
	fake.UpdateOrgForServiceStub = stub
}

func (fake *FakeServicePlanActor) UpdateOrgForServiceArgsForCall(i int) (string, string, bool) {
	fake.updateOrgForServiceMutex.RLock()
	defer fake.updateOrgForServiceMutex.RUnlock()
	argsForCall := fake.updateOrgForServiceArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeServicePlanActor) UpdateOrgForServiceReturns(result1 error) {
	fake.updateOrgForServiceMutex.Lock()
	defer fake.updateOrgForServiceMutex.Unlock()
	fake.UpdateOrgForServiceStub = nil
	fake.updateOrgForServiceReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeServicePlanActor) UpdateOrgForServiceReturnsOnCall(i int, result1 error) {
	fake.updateOrgForServiceMutex.Lock()
	defer fake.updateOrgForServiceMutex.Unlock()
	fake.UpdateOrgForServiceStub = nil
	if fake.updateOrgForServiceReturnsOnCall == nil {
		fake.updateOrgForServiceReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.updateOrgForServiceReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeServicePlanActor) UpdatePlanAndOrgForService(arg1 string, arg2 string, arg3 string, arg4 bool) error {
	fake.updatePlanAndOrgForServiceMutex.Lock()
	ret, specificReturn := fake.updatePlanAndOrgForServiceReturnsOnCall[len(fake.updatePlanAndOrgForServiceArgsForCall)]
	fake.updatePlanAndOrgForServiceArgsForCall = append(fake.updatePlanAndOrgForServiceArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 string
		arg4 bool
	}{arg1, arg2, arg3, arg4})
	fake.recordInvocation("UpdatePlanAndOrgForService", []interface{}{arg1, arg2, arg3, arg4})
	fake.updatePlanAndOrgForServiceMutex.Unlock()
	if fake.UpdatePlanAndOrgForServiceStub != nil {
		return fake.UpdatePlanAndOrgForServiceStub(arg1, arg2, arg3, arg4)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.updatePlanAndOrgForServiceReturns
	return fakeReturns.result1
}

func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceCallCount() int {
	fake.updatePlanAndOrgForServiceMutex.RLock()
	defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
	return len(fake.updatePlanAndOrgForServiceArgsForCall)
}

func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceCalls(stub func(string, string, string, bool) error) {
	fake.updatePlanAndOrgForServiceMutex.Lock()
	defer fake.updatePlanAndOrgForServiceMutex.Unlock()
	fake.UpdatePlanAndOrgForServiceStub = stub
}

func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceArgsForCall(i int) (string, string, string, bool) {
	fake.updatePlanAndOrgForServiceMutex.RLock()
	defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
	argsForCall := fake.updatePlanAndOrgForServiceArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
}

func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceReturns(result1 error) {
	fake.updatePlanAndOrgForServiceMutex.Lock()
	defer fake.updatePlanAndOrgForServiceMutex.Unlock()
	fake.UpdatePlanAndOrgForServiceStub = nil
	fake.updatePlanAndOrgForServiceReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeServicePlanActor) UpdatePlanAndOrgForServiceReturnsOnCall(i int, result1 error) {
	fake.updatePlanAndOrgForServiceMutex.Lock()
	defer fake.updatePlanAndOrgForServiceMutex.Unlock()
	fake.UpdatePlanAndOrgForServiceStub = nil
	if fake.updatePlanAndOrgForServiceReturnsOnCall == nil {
		fake.updatePlanAndOrgForServiceReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.updatePlanAndOrgForServiceReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeServicePlanActor) UpdateSinglePlanForService(arg1 string, arg2 string, arg3 bool) error {
	fake.updateSinglePlanForServiceMutex.Lock()
	ret, specificReturn := fake.updateSinglePlanForServiceReturnsOnCall[len(fake.updateSinglePlanForServiceArgsForCall)]
	fake.updateSinglePlanForServiceArgsForCall = append(fake.updateSinglePlanForServiceArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 bool
	}{arg1, arg2, arg3})
	fake.recordInvocation("UpdateSinglePlanForService", []interface{}{arg1, arg2, arg3})
	fake.updateSinglePlanForServiceMutex.Unlock()
	if fake.UpdateSinglePlanForServiceStub != nil {
		return fake.UpdateSinglePlanForServiceStub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.updateSinglePlanForServiceReturns
	return fakeReturns.result1
}

func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceCallCount() int {
	fake.updateSinglePlanForServiceMutex.RLock()
	defer fake.updateSinglePlanForServiceMutex.RUnlock()
	return len(fake.updateSinglePlanForServiceArgsForCall)
}

func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceCalls(stub func(string, string, bool) error) {
	fake.updateSinglePlanForServiceMutex.Lock()
	defer fake.updateSinglePlanForServiceMutex.Unlock()
	fake.UpdateSinglePlanForServiceStub = stub
}

func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceArgsForCall(i int) (string, string, bool) {
	fake.updateSinglePlanForServiceMutex.RLock()
	defer fake.updateSinglePlanForServiceMutex.RUnlock()
	argsForCall := fake.updateSinglePlanForServiceArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceReturns(result1 error) {
	fake.updateSinglePlanForServiceMutex.Lock()
	defer fake.updateSinglePlanForServiceMutex.Unlock()
	fake.UpdateSinglePlanForServiceStub = nil
	fake.updateSinglePlanForServiceReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeServicePlanActor) UpdateSinglePlanForServiceReturnsOnCall(i int, result1 error) {
	fake.updateSinglePlanForServiceMutex.Lock()
	defer fake.updateSinglePlanForServiceMutex.Unlock()
	fake.UpdateSinglePlanForServiceStub = nil
	if fake.updateSinglePlanForServiceReturnsOnCall == nil {
		fake.updateSinglePlanForServiceReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.updateSinglePlanForServiceReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeServicePlanActor) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.findServiceAccessMutex.RLock()
	defer fake.findServiceAccessMutex.RUnlock()
	fake.updateAllPlansForServiceMutex.RLock()
	defer fake.updateAllPlansForServiceMutex.RUnlock()
	fake.updateOrgForServiceMutex.RLock()
	defer fake.updateOrgForServiceMutex.RUnlock()
	fake.updatePlanAndOrgForServiceMutex.RLock()
	defer fake.updatePlanAndOrgForServiceMutex.RUnlock()
	fake.updateSinglePlanForServiceMutex.RLock()
	defer fake.updateSinglePlanForServiceMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeServicePlanActor) 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 _ actors.ServicePlanActor = new(FakeServicePlanActor)
