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

import (
	"sync"

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

type FakePlanBuilder struct {
	AttachOrgToPlansStub        func([]models.ServicePlanFields, string) ([]models.ServicePlanFields, error)
	attachOrgToPlansMutex       sync.RWMutex
	attachOrgToPlansArgsForCall []struct {
		arg1 []models.ServicePlanFields
		arg2 string
	}
	attachOrgToPlansReturns struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	attachOrgToPlansReturnsOnCall map[int]struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	AttachOrgsToPlansStub        func([]models.ServicePlanFields) ([]models.ServicePlanFields, error)
	attachOrgsToPlansMutex       sync.RWMutex
	attachOrgsToPlansArgsForCall []struct {
		arg1 []models.ServicePlanFields
	}
	attachOrgsToPlansReturns struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	attachOrgsToPlansReturnsOnCall map[int]struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	GetPlansForManyServicesWithOrgsStub        func([]string) ([]models.ServicePlanFields, error)
	getPlansForManyServicesWithOrgsMutex       sync.RWMutex
	getPlansForManyServicesWithOrgsArgsForCall []struct {
		arg1 []string
	}
	getPlansForManyServicesWithOrgsReturns struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	getPlansForManyServicesWithOrgsReturnsOnCall map[int]struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	GetPlansForServiceStub        func(string) ([]models.ServicePlanFields, error)
	getPlansForServiceMutex       sync.RWMutex
	getPlansForServiceArgsForCall []struct {
		arg1 string
	}
	getPlansForServiceReturns struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	getPlansForServiceReturnsOnCall map[int]struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	GetPlansForServiceForOrgStub        func(string, string) ([]models.ServicePlanFields, error)
	getPlansForServiceForOrgMutex       sync.RWMutex
	getPlansForServiceForOrgArgsForCall []struct {
		arg1 string
		arg2 string
	}
	getPlansForServiceForOrgReturns struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	getPlansForServiceForOrgReturnsOnCall map[int]struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	GetPlansForServiceWithOrgsStub        func(string) ([]models.ServicePlanFields, error)
	getPlansForServiceWithOrgsMutex       sync.RWMutex
	getPlansForServiceWithOrgsArgsForCall []struct {
		arg1 string
	}
	getPlansForServiceWithOrgsReturns struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	getPlansForServiceWithOrgsReturnsOnCall map[int]struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	GetPlansVisibleToOrgStub        func(string) ([]models.ServicePlanFields, error)
	getPlansVisibleToOrgMutex       sync.RWMutex
	getPlansVisibleToOrgArgsForCall []struct {
		arg1 string
	}
	getPlansVisibleToOrgReturns struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	getPlansVisibleToOrgReturnsOnCall map[int]struct {
		result1 []models.ServicePlanFields
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakePlanBuilder) AttachOrgToPlans(arg1 []models.ServicePlanFields, arg2 string) ([]models.ServicePlanFields, error) {
	var arg1Copy []models.ServicePlanFields
	if arg1 != nil {
		arg1Copy = make([]models.ServicePlanFields, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.attachOrgToPlansMutex.Lock()
	ret, specificReturn := fake.attachOrgToPlansReturnsOnCall[len(fake.attachOrgToPlansArgsForCall)]
	fake.attachOrgToPlansArgsForCall = append(fake.attachOrgToPlansArgsForCall, struct {
		arg1 []models.ServicePlanFields
		arg2 string
	}{arg1Copy, arg2})
	fake.recordInvocation("AttachOrgToPlans", []interface{}{arg1Copy, arg2})
	fake.attachOrgToPlansMutex.Unlock()
	if fake.AttachOrgToPlansStub != nil {
		return fake.AttachOrgToPlansStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.attachOrgToPlansReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakePlanBuilder) AttachOrgToPlansCallCount() int {
	fake.attachOrgToPlansMutex.RLock()
	defer fake.attachOrgToPlansMutex.RUnlock()
	return len(fake.attachOrgToPlansArgsForCall)
}

func (fake *FakePlanBuilder) AttachOrgToPlansCalls(stub func([]models.ServicePlanFields, string) ([]models.ServicePlanFields, error)) {
	fake.attachOrgToPlansMutex.Lock()
	defer fake.attachOrgToPlansMutex.Unlock()
	fake.AttachOrgToPlansStub = stub
}

func (fake *FakePlanBuilder) AttachOrgToPlansArgsForCall(i int) ([]models.ServicePlanFields, string) {
	fake.attachOrgToPlansMutex.RLock()
	defer fake.attachOrgToPlansMutex.RUnlock()
	argsForCall := fake.attachOrgToPlansArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakePlanBuilder) AttachOrgToPlansReturns(result1 []models.ServicePlanFields, result2 error) {
	fake.attachOrgToPlansMutex.Lock()
	defer fake.attachOrgToPlansMutex.Unlock()
	fake.AttachOrgToPlansStub = nil
	fake.attachOrgToPlansReturns = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) AttachOrgToPlansReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
	fake.attachOrgToPlansMutex.Lock()
	defer fake.attachOrgToPlansMutex.Unlock()
	fake.AttachOrgToPlansStub = nil
	if fake.attachOrgToPlansReturnsOnCall == nil {
		fake.attachOrgToPlansReturnsOnCall = make(map[int]struct {
			result1 []models.ServicePlanFields
			result2 error
		})
	}
	fake.attachOrgToPlansReturnsOnCall[i] = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) AttachOrgsToPlans(arg1 []models.ServicePlanFields) ([]models.ServicePlanFields, error) {
	var arg1Copy []models.ServicePlanFields
	if arg1 != nil {
		arg1Copy = make([]models.ServicePlanFields, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.attachOrgsToPlansMutex.Lock()
	ret, specificReturn := fake.attachOrgsToPlansReturnsOnCall[len(fake.attachOrgsToPlansArgsForCall)]
	fake.attachOrgsToPlansArgsForCall = append(fake.attachOrgsToPlansArgsForCall, struct {
		arg1 []models.ServicePlanFields
	}{arg1Copy})
	fake.recordInvocation("AttachOrgsToPlans", []interface{}{arg1Copy})
	fake.attachOrgsToPlansMutex.Unlock()
	if fake.AttachOrgsToPlansStub != nil {
		return fake.AttachOrgsToPlansStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.attachOrgsToPlansReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakePlanBuilder) AttachOrgsToPlansCallCount() int {
	fake.attachOrgsToPlansMutex.RLock()
	defer fake.attachOrgsToPlansMutex.RUnlock()
	return len(fake.attachOrgsToPlansArgsForCall)
}

func (fake *FakePlanBuilder) AttachOrgsToPlansCalls(stub func([]models.ServicePlanFields) ([]models.ServicePlanFields, error)) {
	fake.attachOrgsToPlansMutex.Lock()
	defer fake.attachOrgsToPlansMutex.Unlock()
	fake.AttachOrgsToPlansStub = stub
}

func (fake *FakePlanBuilder) AttachOrgsToPlansArgsForCall(i int) []models.ServicePlanFields {
	fake.attachOrgsToPlansMutex.RLock()
	defer fake.attachOrgsToPlansMutex.RUnlock()
	argsForCall := fake.attachOrgsToPlansArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakePlanBuilder) AttachOrgsToPlansReturns(result1 []models.ServicePlanFields, result2 error) {
	fake.attachOrgsToPlansMutex.Lock()
	defer fake.attachOrgsToPlansMutex.Unlock()
	fake.AttachOrgsToPlansStub = nil
	fake.attachOrgsToPlansReturns = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) AttachOrgsToPlansReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
	fake.attachOrgsToPlansMutex.Lock()
	defer fake.attachOrgsToPlansMutex.Unlock()
	fake.AttachOrgsToPlansStub = nil
	if fake.attachOrgsToPlansReturnsOnCall == nil {
		fake.attachOrgsToPlansReturnsOnCall = make(map[int]struct {
			result1 []models.ServicePlanFields
			result2 error
		})
	}
	fake.attachOrgsToPlansReturnsOnCall[i] = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgs(arg1 []string) ([]models.ServicePlanFields, error) {
	var arg1Copy []string
	if arg1 != nil {
		arg1Copy = make([]string, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.getPlansForManyServicesWithOrgsMutex.Lock()
	ret, specificReturn := fake.getPlansForManyServicesWithOrgsReturnsOnCall[len(fake.getPlansForManyServicesWithOrgsArgsForCall)]
	fake.getPlansForManyServicesWithOrgsArgsForCall = append(fake.getPlansForManyServicesWithOrgsArgsForCall, struct {
		arg1 []string
	}{arg1Copy})
	fake.recordInvocation("GetPlansForManyServicesWithOrgs", []interface{}{arg1Copy})
	fake.getPlansForManyServicesWithOrgsMutex.Unlock()
	if fake.GetPlansForManyServicesWithOrgsStub != nil {
		return fake.GetPlansForManyServicesWithOrgsStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.getPlansForManyServicesWithOrgsReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsCallCount() int {
	fake.getPlansForManyServicesWithOrgsMutex.RLock()
	defer fake.getPlansForManyServicesWithOrgsMutex.RUnlock()
	return len(fake.getPlansForManyServicesWithOrgsArgsForCall)
}

func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsCalls(stub func([]string) ([]models.ServicePlanFields, error)) {
	fake.getPlansForManyServicesWithOrgsMutex.Lock()
	defer fake.getPlansForManyServicesWithOrgsMutex.Unlock()
	fake.GetPlansForManyServicesWithOrgsStub = stub
}

func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsArgsForCall(i int) []string {
	fake.getPlansForManyServicesWithOrgsMutex.RLock()
	defer fake.getPlansForManyServicesWithOrgsMutex.RUnlock()
	argsForCall := fake.getPlansForManyServicesWithOrgsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsReturns(result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansForManyServicesWithOrgsMutex.Lock()
	defer fake.getPlansForManyServicesWithOrgsMutex.Unlock()
	fake.GetPlansForManyServicesWithOrgsStub = nil
	fake.getPlansForManyServicesWithOrgsReturns = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansForManyServicesWithOrgsReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansForManyServicesWithOrgsMutex.Lock()
	defer fake.getPlansForManyServicesWithOrgsMutex.Unlock()
	fake.GetPlansForManyServicesWithOrgsStub = nil
	if fake.getPlansForManyServicesWithOrgsReturnsOnCall == nil {
		fake.getPlansForManyServicesWithOrgsReturnsOnCall = make(map[int]struct {
			result1 []models.ServicePlanFields
			result2 error
		})
	}
	fake.getPlansForManyServicesWithOrgsReturnsOnCall[i] = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansForService(arg1 string) ([]models.ServicePlanFields, error) {
	fake.getPlansForServiceMutex.Lock()
	ret, specificReturn := fake.getPlansForServiceReturnsOnCall[len(fake.getPlansForServiceArgsForCall)]
	fake.getPlansForServiceArgsForCall = append(fake.getPlansForServiceArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("GetPlansForService", []interface{}{arg1})
	fake.getPlansForServiceMutex.Unlock()
	if fake.GetPlansForServiceStub != nil {
		return fake.GetPlansForServiceStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.getPlansForServiceReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakePlanBuilder) GetPlansForServiceCallCount() int {
	fake.getPlansForServiceMutex.RLock()
	defer fake.getPlansForServiceMutex.RUnlock()
	return len(fake.getPlansForServiceArgsForCall)
}

func (fake *FakePlanBuilder) GetPlansForServiceCalls(stub func(string) ([]models.ServicePlanFields, error)) {
	fake.getPlansForServiceMutex.Lock()
	defer fake.getPlansForServiceMutex.Unlock()
	fake.GetPlansForServiceStub = stub
}

func (fake *FakePlanBuilder) GetPlansForServiceArgsForCall(i int) string {
	fake.getPlansForServiceMutex.RLock()
	defer fake.getPlansForServiceMutex.RUnlock()
	argsForCall := fake.getPlansForServiceArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakePlanBuilder) GetPlansForServiceReturns(result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansForServiceMutex.Lock()
	defer fake.getPlansForServiceMutex.Unlock()
	fake.GetPlansForServiceStub = nil
	fake.getPlansForServiceReturns = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansForServiceReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansForServiceMutex.Lock()
	defer fake.getPlansForServiceMutex.Unlock()
	fake.GetPlansForServiceStub = nil
	if fake.getPlansForServiceReturnsOnCall == nil {
		fake.getPlansForServiceReturnsOnCall = make(map[int]struct {
			result1 []models.ServicePlanFields
			result2 error
		})
	}
	fake.getPlansForServiceReturnsOnCall[i] = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansForServiceForOrg(arg1 string, arg2 string) ([]models.ServicePlanFields, error) {
	fake.getPlansForServiceForOrgMutex.Lock()
	ret, specificReturn := fake.getPlansForServiceForOrgReturnsOnCall[len(fake.getPlansForServiceForOrgArgsForCall)]
	fake.getPlansForServiceForOrgArgsForCall = append(fake.getPlansForServiceForOrgArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("GetPlansForServiceForOrg", []interface{}{arg1, arg2})
	fake.getPlansForServiceForOrgMutex.Unlock()
	if fake.GetPlansForServiceForOrgStub != nil {
		return fake.GetPlansForServiceForOrgStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.getPlansForServiceForOrgReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakePlanBuilder) GetPlansForServiceForOrgCallCount() int {
	fake.getPlansForServiceForOrgMutex.RLock()
	defer fake.getPlansForServiceForOrgMutex.RUnlock()
	return len(fake.getPlansForServiceForOrgArgsForCall)
}

func (fake *FakePlanBuilder) GetPlansForServiceForOrgCalls(stub func(string, string) ([]models.ServicePlanFields, error)) {
	fake.getPlansForServiceForOrgMutex.Lock()
	defer fake.getPlansForServiceForOrgMutex.Unlock()
	fake.GetPlansForServiceForOrgStub = stub
}

func (fake *FakePlanBuilder) GetPlansForServiceForOrgArgsForCall(i int) (string, string) {
	fake.getPlansForServiceForOrgMutex.RLock()
	defer fake.getPlansForServiceForOrgMutex.RUnlock()
	argsForCall := fake.getPlansForServiceForOrgArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakePlanBuilder) GetPlansForServiceForOrgReturns(result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansForServiceForOrgMutex.Lock()
	defer fake.getPlansForServiceForOrgMutex.Unlock()
	fake.GetPlansForServiceForOrgStub = nil
	fake.getPlansForServiceForOrgReturns = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansForServiceForOrgReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansForServiceForOrgMutex.Lock()
	defer fake.getPlansForServiceForOrgMutex.Unlock()
	fake.GetPlansForServiceForOrgStub = nil
	if fake.getPlansForServiceForOrgReturnsOnCall == nil {
		fake.getPlansForServiceForOrgReturnsOnCall = make(map[int]struct {
			result1 []models.ServicePlanFields
			result2 error
		})
	}
	fake.getPlansForServiceForOrgReturnsOnCall[i] = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansForServiceWithOrgs(arg1 string) ([]models.ServicePlanFields, error) {
	fake.getPlansForServiceWithOrgsMutex.Lock()
	ret, specificReturn := fake.getPlansForServiceWithOrgsReturnsOnCall[len(fake.getPlansForServiceWithOrgsArgsForCall)]
	fake.getPlansForServiceWithOrgsArgsForCall = append(fake.getPlansForServiceWithOrgsArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("GetPlansForServiceWithOrgs", []interface{}{arg1})
	fake.getPlansForServiceWithOrgsMutex.Unlock()
	if fake.GetPlansForServiceWithOrgsStub != nil {
		return fake.GetPlansForServiceWithOrgsStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.getPlansForServiceWithOrgsReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsCallCount() int {
	fake.getPlansForServiceWithOrgsMutex.RLock()
	defer fake.getPlansForServiceWithOrgsMutex.RUnlock()
	return len(fake.getPlansForServiceWithOrgsArgsForCall)
}

func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsCalls(stub func(string) ([]models.ServicePlanFields, error)) {
	fake.getPlansForServiceWithOrgsMutex.Lock()
	defer fake.getPlansForServiceWithOrgsMutex.Unlock()
	fake.GetPlansForServiceWithOrgsStub = stub
}

func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsArgsForCall(i int) string {
	fake.getPlansForServiceWithOrgsMutex.RLock()
	defer fake.getPlansForServiceWithOrgsMutex.RUnlock()
	argsForCall := fake.getPlansForServiceWithOrgsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsReturns(result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansForServiceWithOrgsMutex.Lock()
	defer fake.getPlansForServiceWithOrgsMutex.Unlock()
	fake.GetPlansForServiceWithOrgsStub = nil
	fake.getPlansForServiceWithOrgsReturns = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansForServiceWithOrgsReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansForServiceWithOrgsMutex.Lock()
	defer fake.getPlansForServiceWithOrgsMutex.Unlock()
	fake.GetPlansForServiceWithOrgsStub = nil
	if fake.getPlansForServiceWithOrgsReturnsOnCall == nil {
		fake.getPlansForServiceWithOrgsReturnsOnCall = make(map[int]struct {
			result1 []models.ServicePlanFields
			result2 error
		})
	}
	fake.getPlansForServiceWithOrgsReturnsOnCall[i] = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansVisibleToOrg(arg1 string) ([]models.ServicePlanFields, error) {
	fake.getPlansVisibleToOrgMutex.Lock()
	ret, specificReturn := fake.getPlansVisibleToOrgReturnsOnCall[len(fake.getPlansVisibleToOrgArgsForCall)]
	fake.getPlansVisibleToOrgArgsForCall = append(fake.getPlansVisibleToOrgArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("GetPlansVisibleToOrg", []interface{}{arg1})
	fake.getPlansVisibleToOrgMutex.Unlock()
	if fake.GetPlansVisibleToOrgStub != nil {
		return fake.GetPlansVisibleToOrgStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.getPlansVisibleToOrgReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakePlanBuilder) GetPlansVisibleToOrgCallCount() int {
	fake.getPlansVisibleToOrgMutex.RLock()
	defer fake.getPlansVisibleToOrgMutex.RUnlock()
	return len(fake.getPlansVisibleToOrgArgsForCall)
}

func (fake *FakePlanBuilder) GetPlansVisibleToOrgCalls(stub func(string) ([]models.ServicePlanFields, error)) {
	fake.getPlansVisibleToOrgMutex.Lock()
	defer fake.getPlansVisibleToOrgMutex.Unlock()
	fake.GetPlansVisibleToOrgStub = stub
}

func (fake *FakePlanBuilder) GetPlansVisibleToOrgArgsForCall(i int) string {
	fake.getPlansVisibleToOrgMutex.RLock()
	defer fake.getPlansVisibleToOrgMutex.RUnlock()
	argsForCall := fake.getPlansVisibleToOrgArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakePlanBuilder) GetPlansVisibleToOrgReturns(result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansVisibleToOrgMutex.Lock()
	defer fake.getPlansVisibleToOrgMutex.Unlock()
	fake.GetPlansVisibleToOrgStub = nil
	fake.getPlansVisibleToOrgReturns = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) GetPlansVisibleToOrgReturnsOnCall(i int, result1 []models.ServicePlanFields, result2 error) {
	fake.getPlansVisibleToOrgMutex.Lock()
	defer fake.getPlansVisibleToOrgMutex.Unlock()
	fake.GetPlansVisibleToOrgStub = nil
	if fake.getPlansVisibleToOrgReturnsOnCall == nil {
		fake.getPlansVisibleToOrgReturnsOnCall = make(map[int]struct {
			result1 []models.ServicePlanFields
			result2 error
		})
	}
	fake.getPlansVisibleToOrgReturnsOnCall[i] = struct {
		result1 []models.ServicePlanFields
		result2 error
	}{result1, result2}
}

func (fake *FakePlanBuilder) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.attachOrgToPlansMutex.RLock()
	defer fake.attachOrgToPlansMutex.RUnlock()
	fake.attachOrgsToPlansMutex.RLock()
	defer fake.attachOrgsToPlansMutex.RUnlock()
	fake.getPlansForManyServicesWithOrgsMutex.RLock()
	defer fake.getPlansForManyServicesWithOrgsMutex.RUnlock()
	fake.getPlansForServiceMutex.RLock()
	defer fake.getPlansForServiceMutex.RUnlock()
	fake.getPlansForServiceForOrgMutex.RLock()
	defer fake.getPlansForServiceForOrgMutex.RUnlock()
	fake.getPlansForServiceWithOrgsMutex.RLock()
	defer fake.getPlansForServiceWithOrgsMutex.RUnlock()
	fake.getPlansVisibleToOrgMutex.RLock()
	defer fake.getPlansVisibleToOrgMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakePlanBuilder) 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 _ planbuilder.PlanBuilder = new(FakePlanBuilder)
