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

import (
	"sync"

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

type FakeOrganizationRequirement struct {
	ExecuteStub        func() error
	executeMutex       sync.RWMutex
	executeArgsForCall []struct {
	}
	executeReturns struct {
		result1 error
	}
	executeReturnsOnCall map[int]struct {
		result1 error
	}
	GetOrganizationStub        func() models.Organization
	getOrganizationMutex       sync.RWMutex
	getOrganizationArgsForCall []struct {
	}
	getOrganizationReturns struct {
		result1 models.Organization
	}
	getOrganizationReturnsOnCall map[int]struct {
		result1 models.Organization
	}
	SetOrganizationNameStub        func(string)
	setOrganizationNameMutex       sync.RWMutex
	setOrganizationNameArgsForCall []struct {
		arg1 string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

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

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

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

func (fake *FakeOrganizationRequirement) 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 *FakeOrganizationRequirement) GetOrganization() models.Organization {
	fake.getOrganizationMutex.Lock()
	ret, specificReturn := fake.getOrganizationReturnsOnCall[len(fake.getOrganizationArgsForCall)]
	fake.getOrganizationArgsForCall = append(fake.getOrganizationArgsForCall, struct {
	}{})
	fake.recordInvocation("GetOrganization", []interface{}{})
	fake.getOrganizationMutex.Unlock()
	if fake.GetOrganizationStub != nil {
		return fake.GetOrganizationStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.getOrganizationReturns
	return fakeReturns.result1
}

func (fake *FakeOrganizationRequirement) GetOrganizationCallCount() int {
	fake.getOrganizationMutex.RLock()
	defer fake.getOrganizationMutex.RUnlock()
	return len(fake.getOrganizationArgsForCall)
}

func (fake *FakeOrganizationRequirement) GetOrganizationCalls(stub func() models.Organization) {
	fake.getOrganizationMutex.Lock()
	defer fake.getOrganizationMutex.Unlock()
	fake.GetOrganizationStub = stub
}

func (fake *FakeOrganizationRequirement) GetOrganizationReturns(result1 models.Organization) {
	fake.getOrganizationMutex.Lock()
	defer fake.getOrganizationMutex.Unlock()
	fake.GetOrganizationStub = nil
	fake.getOrganizationReturns = struct {
		result1 models.Organization
	}{result1}
}

func (fake *FakeOrganizationRequirement) GetOrganizationReturnsOnCall(i int, result1 models.Organization) {
	fake.getOrganizationMutex.Lock()
	defer fake.getOrganizationMutex.Unlock()
	fake.GetOrganizationStub = nil
	if fake.getOrganizationReturnsOnCall == nil {
		fake.getOrganizationReturnsOnCall = make(map[int]struct {
			result1 models.Organization
		})
	}
	fake.getOrganizationReturnsOnCall[i] = struct {
		result1 models.Organization
	}{result1}
}

func (fake *FakeOrganizationRequirement) SetOrganizationName(arg1 string) {
	fake.setOrganizationNameMutex.Lock()
	fake.setOrganizationNameArgsForCall = append(fake.setOrganizationNameArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("SetOrganizationName", []interface{}{arg1})
	fake.setOrganizationNameMutex.Unlock()
	if fake.SetOrganizationNameStub != nil {
		fake.SetOrganizationNameStub(arg1)
	}
}

func (fake *FakeOrganizationRequirement) SetOrganizationNameCallCount() int {
	fake.setOrganizationNameMutex.RLock()
	defer fake.setOrganizationNameMutex.RUnlock()
	return len(fake.setOrganizationNameArgsForCall)
}

func (fake *FakeOrganizationRequirement) SetOrganizationNameCalls(stub func(string)) {
	fake.setOrganizationNameMutex.Lock()
	defer fake.setOrganizationNameMutex.Unlock()
	fake.SetOrganizationNameStub = stub
}

func (fake *FakeOrganizationRequirement) SetOrganizationNameArgsForCall(i int) string {
	fake.setOrganizationNameMutex.RLock()
	defer fake.setOrganizationNameMutex.RUnlock()
	argsForCall := fake.setOrganizationNameArgsForCall[i]
	return argsForCall.arg1
}

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

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