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

import (
	"sync"

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

type FakeDomainRequirement struct {
	ExecuteStub        func() error
	executeMutex       sync.RWMutex
	executeArgsForCall []struct {
	}
	executeReturns struct {
		result1 error
	}
	executeReturnsOnCall map[int]struct {
		result1 error
	}
	GetDomainStub        func() models.DomainFields
	getDomainMutex       sync.RWMutex
	getDomainArgsForCall []struct {
	}
	getDomainReturns struct {
		result1 models.DomainFields
	}
	getDomainReturnsOnCall map[int]struct {
		result1 models.DomainFields
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

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

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

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

func (fake *FakeDomainRequirement) 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 *FakeDomainRequirement) GetDomain() models.DomainFields {
	fake.getDomainMutex.Lock()
	ret, specificReturn := fake.getDomainReturnsOnCall[len(fake.getDomainArgsForCall)]
	fake.getDomainArgsForCall = append(fake.getDomainArgsForCall, struct {
	}{})
	fake.recordInvocation("GetDomain", []interface{}{})
	fake.getDomainMutex.Unlock()
	if fake.GetDomainStub != nil {
		return fake.GetDomainStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.getDomainReturns
	return fakeReturns.result1
}

func (fake *FakeDomainRequirement) GetDomainCallCount() int {
	fake.getDomainMutex.RLock()
	defer fake.getDomainMutex.RUnlock()
	return len(fake.getDomainArgsForCall)
}

func (fake *FakeDomainRequirement) GetDomainCalls(stub func() models.DomainFields) {
	fake.getDomainMutex.Lock()
	defer fake.getDomainMutex.Unlock()
	fake.GetDomainStub = stub
}

func (fake *FakeDomainRequirement) GetDomainReturns(result1 models.DomainFields) {
	fake.getDomainMutex.Lock()
	defer fake.getDomainMutex.Unlock()
	fake.GetDomainStub = nil
	fake.getDomainReturns = struct {
		result1 models.DomainFields
	}{result1}
}

func (fake *FakeDomainRequirement) GetDomainReturnsOnCall(i int, result1 models.DomainFields) {
	fake.getDomainMutex.Lock()
	defer fake.getDomainMutex.Unlock()
	fake.GetDomainStub = nil
	if fake.getDomainReturnsOnCall == nil {
		fake.getDomainReturnsOnCall = make(map[int]struct {
			result1 models.DomainFields
		})
	}
	fake.getDomainReturnsOnCall[i] = struct {
		result1 models.DomainFields
	}{result1}
}

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

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