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

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/models"
	"code.cloudfoundry.org/cli/cf/requirements"
)

type FakeTargetedOrgRequirement struct {
	ExecuteStub        func() error
	executeMutex       sync.RWMutex
	executeArgsForCall []struct {
	}
	executeReturns struct {
		result1 error
	}
	executeReturnsOnCall map[int]struct {
		result1 error
	}
	GetOrganizationFieldsStub        func() models.OrganizationFields
	getOrganizationFieldsMutex       sync.RWMutex
	getOrganizationFieldsArgsForCall []struct {
	}
	getOrganizationFieldsReturns struct {
		result1 models.OrganizationFields
	}
	getOrganizationFieldsReturnsOnCall map[int]struct {
		result1 models.OrganizationFields
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeTargetedOrgRequirement) Execute() error {
	fake.executeMutex.Lock()
	ret, specificReturn := fake.executeReturnsOnCall[len(fake.executeArgsForCall)]
	fake.executeArgsForCall = append(fake.executeArgsForCall, struct {
	}{})
	fake.recordInvocation("Execute", []interface{}{})
	fake.executeMutex.Unlock()
	if fake.ExecuteStub != nil {
		return fake.ExecuteStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.executeReturns
	return fakeReturns.result1
}

func (fake *FakeTargetedOrgRequirement) ExecuteCallCount() int {
	fake.executeMutex.RLock()
	defer fake.executeMutex.RUnlock()
	return len(fake.executeArgsForCall)
}

func (fake *FakeTargetedOrgRequirement) ExecuteCalls(stub func() error) {
	fake.executeMutex.Lock()
	defer fake.executeMutex.Unlock()
	fake.ExecuteStub = stub
}

func (fake *FakeTargetedOrgRequirement) ExecuteReturns(result1 error) {
	fake.executeMutex.Lock()
	defer fake.executeMutex.Unlock()
	fake.ExecuteStub = nil
	fake.executeReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeTargetedOrgRequirement) ExecuteReturnsOnCall(i int, result1 error) {
	fake.executeMutex.Lock()
	defer fake.executeMutex.Unlock()
	fake.ExecuteStub = nil
	if fake.executeReturnsOnCall == nil {
		fake.executeReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.executeReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeTargetedOrgRequirement) GetOrganizationFields() models.OrganizationFields {
	fake.getOrganizationFieldsMutex.Lock()
	ret, specificReturn := fake.getOrganizationFieldsReturnsOnCall[len(fake.getOrganizationFieldsArgsForCall)]
	fake.getOrganizationFieldsArgsForCall = append(fake.getOrganizationFieldsArgsForCall, struct {
	}{})
	fake.recordInvocation("GetOrganizationFields", []interface{}{})
	fake.getOrganizationFieldsMutex.Unlock()
	if fake.GetOrganizationFieldsStub != nil {
		return fake.GetOrganizationFieldsStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.getOrganizationFieldsReturns
	return fakeReturns.result1
}

func (fake *FakeTargetedOrgRequirement) GetOrganizationFieldsCallCount() int {
	fake.getOrganizationFieldsMutex.RLock()
	defer fake.getOrganizationFieldsMutex.RUnlock()
	return len(fake.getOrganizationFieldsArgsForCall)
}

func (fake *FakeTargetedOrgRequirement) GetOrganizationFieldsCalls(stub func() models.OrganizationFields) {
	fake.getOrganizationFieldsMutex.Lock()
	defer fake.getOrganizationFieldsMutex.Unlock()
	fake.GetOrganizationFieldsStub = stub
}

func (fake *FakeTargetedOrgRequirement) GetOrganizationFieldsReturns(result1 models.OrganizationFields) {
	fake.getOrganizationFieldsMutex.Lock()
	defer fake.getOrganizationFieldsMutex.Unlock()
	fake.GetOrganizationFieldsStub = nil
	fake.getOrganizationFieldsReturns = struct {
		result1 models.OrganizationFields
	}{result1}
}

func (fake *FakeTargetedOrgRequirement) GetOrganizationFieldsReturnsOnCall(i int, result1 models.OrganizationFields) {
	fake.getOrganizationFieldsMutex.Lock()
	defer fake.getOrganizationFieldsMutex.Unlock()
	fake.GetOrganizationFieldsStub = nil
	if fake.getOrganizationFieldsReturnsOnCall == nil {
		fake.getOrganizationFieldsReturnsOnCall = make(map[int]struct {
			result1 models.OrganizationFields
		})
	}
	fake.getOrganizationFieldsReturnsOnCall[i] = struct {
		result1 models.OrganizationFields
	}{result1}
}

func (fake *FakeTargetedOrgRequirement) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.executeMutex.RLock()
	defer fake.executeMutex.RUnlock()
	fake.getOrganizationFieldsMutex.RLock()
	defer fake.getOrganizationFieldsMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeTargetedOrgRequirement) 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 _ requirements.TargetedOrgRequirement = new(FakeTargetedOrgRequirement)
