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

import (
	"sync"

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

type FakeSpaceRequirement struct {
	ExecuteStub        func() error
	executeMutex       sync.RWMutex
	executeArgsForCall []struct {
	}
	executeReturns struct {
		result1 error
	}
	executeReturnsOnCall map[int]struct {
		result1 error
	}
	GetSpaceStub        func() models.Space
	getSpaceMutex       sync.RWMutex
	getSpaceArgsForCall []struct {
	}
	getSpaceReturns struct {
		result1 models.Space
	}
	getSpaceReturnsOnCall map[int]struct {
		result1 models.Space
	}
	SetSpaceNameStub        func(string)
	setSpaceNameMutex       sync.RWMutex
	setSpaceNameArgsForCall []struct {
		arg1 string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeSpaceRequirement) 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 *FakeSpaceRequirement) ExecuteCallCount() int {
	fake.executeMutex.RLock()
	defer fake.executeMutex.RUnlock()
	return len(fake.executeArgsForCall)
}

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

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

func (fake *FakeSpaceRequirement) 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 *FakeSpaceRequirement) GetSpace() models.Space {
	fake.getSpaceMutex.Lock()
	ret, specificReturn := fake.getSpaceReturnsOnCall[len(fake.getSpaceArgsForCall)]
	fake.getSpaceArgsForCall = append(fake.getSpaceArgsForCall, struct {
	}{})
	fake.recordInvocation("GetSpace", []interface{}{})
	fake.getSpaceMutex.Unlock()
	if fake.GetSpaceStub != nil {
		return fake.GetSpaceStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.getSpaceReturns
	return fakeReturns.result1
}

func (fake *FakeSpaceRequirement) GetSpaceCallCount() int {
	fake.getSpaceMutex.RLock()
	defer fake.getSpaceMutex.RUnlock()
	return len(fake.getSpaceArgsForCall)
}

func (fake *FakeSpaceRequirement) GetSpaceCalls(stub func() models.Space) {
	fake.getSpaceMutex.Lock()
	defer fake.getSpaceMutex.Unlock()
	fake.GetSpaceStub = stub
}

func (fake *FakeSpaceRequirement) GetSpaceReturns(result1 models.Space) {
	fake.getSpaceMutex.Lock()
	defer fake.getSpaceMutex.Unlock()
	fake.GetSpaceStub = nil
	fake.getSpaceReturns = struct {
		result1 models.Space
	}{result1}
}

func (fake *FakeSpaceRequirement) GetSpaceReturnsOnCall(i int, result1 models.Space) {
	fake.getSpaceMutex.Lock()
	defer fake.getSpaceMutex.Unlock()
	fake.GetSpaceStub = nil
	if fake.getSpaceReturnsOnCall == nil {
		fake.getSpaceReturnsOnCall = make(map[int]struct {
			result1 models.Space
		})
	}
	fake.getSpaceReturnsOnCall[i] = struct {
		result1 models.Space
	}{result1}
}

func (fake *FakeSpaceRequirement) SetSpaceName(arg1 string) {
	fake.setSpaceNameMutex.Lock()
	fake.setSpaceNameArgsForCall = append(fake.setSpaceNameArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("SetSpaceName", []interface{}{arg1})
	fake.setSpaceNameMutex.Unlock()
	if fake.SetSpaceNameStub != nil {
		fake.SetSpaceNameStub(arg1)
	}
}

func (fake *FakeSpaceRequirement) SetSpaceNameCallCount() int {
	fake.setSpaceNameMutex.RLock()
	defer fake.setSpaceNameMutex.RUnlock()
	return len(fake.setSpaceNameArgsForCall)
}

func (fake *FakeSpaceRequirement) SetSpaceNameCalls(stub func(string)) {
	fake.setSpaceNameMutex.Lock()
	defer fake.setSpaceNameMutex.Unlock()
	fake.SetSpaceNameStub = stub
}

func (fake *FakeSpaceRequirement) SetSpaceNameArgsForCall(i int) string {
	fake.setSpaceNameMutex.RLock()
	defer fake.setSpaceNameMutex.RUnlock()
	argsForCall := fake.setSpaceNameArgsForCall[i]
	return argsForCall.arg1
}

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

func (fake *FakeSpaceRequirement) 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.SpaceRequirement = new(FakeSpaceRequirement)
