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

import (
	"sync"

	"code.cloudfoundry.org/cli/cf/commandregistry"
	"code.cloudfoundry.org/cli/cf/commands/application"
	"code.cloudfoundry.org/cli/cf/flags"
	"code.cloudfoundry.org/cli/cf/models"
	"code.cloudfoundry.org/cli/cf/requirements"
)

type FakeStarter struct {
	ApplicationStartStub        func(models.Application, string, string) (models.Application, error)
	applicationStartMutex       sync.RWMutex
	applicationStartArgsForCall []struct {
		arg1 models.Application
		arg2 string
		arg3 string
	}
	applicationStartReturns struct {
		result1 models.Application
		result2 error
	}
	applicationStartReturnsOnCall map[int]struct {
		result1 models.Application
		result2 error
	}
	ExecuteStub        func(flags.FlagContext) error
	executeMutex       sync.RWMutex
	executeArgsForCall []struct {
		arg1 flags.FlagContext
	}
	executeReturns struct {
		result1 error
	}
	executeReturnsOnCall map[int]struct {
		result1 error
	}
	MetaDataStub        func() commandregistry.CommandMetadata
	metaDataMutex       sync.RWMutex
	metaDataArgsForCall []struct {
	}
	metaDataReturns struct {
		result1 commandregistry.CommandMetadata
	}
	metaDataReturnsOnCall map[int]struct {
		result1 commandregistry.CommandMetadata
	}
	RequirementsStub        func(requirements.Factory, flags.FlagContext) ([]requirements.Requirement, error)
	requirementsMutex       sync.RWMutex
	requirementsArgsForCall []struct {
		arg1 requirements.Factory
		arg2 flags.FlagContext
	}
	requirementsReturns struct {
		result1 []requirements.Requirement
		result2 error
	}
	requirementsReturnsOnCall map[int]struct {
		result1 []requirements.Requirement
		result2 error
	}
	SetDependencyStub        func(commandregistry.Dependency, bool) commandregistry.Command
	setDependencyMutex       sync.RWMutex
	setDependencyArgsForCall []struct {
		arg1 commandregistry.Dependency
		arg2 bool
	}
	setDependencyReturns struct {
		result1 commandregistry.Command
	}
	setDependencyReturnsOnCall map[int]struct {
		result1 commandregistry.Command
	}
	SetStartTimeoutInSecondsStub        func(int)
	setStartTimeoutInSecondsMutex       sync.RWMutex
	setStartTimeoutInSecondsArgsForCall []struct {
		arg1 int
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeStarter) ApplicationStart(arg1 models.Application, arg2 string, arg3 string) (models.Application, error) {
	fake.applicationStartMutex.Lock()
	ret, specificReturn := fake.applicationStartReturnsOnCall[len(fake.applicationStartArgsForCall)]
	fake.applicationStartArgsForCall = append(fake.applicationStartArgsForCall, struct {
		arg1 models.Application
		arg2 string
		arg3 string
	}{arg1, arg2, arg3})
	fake.recordInvocation("ApplicationStart", []interface{}{arg1, arg2, arg3})
	fake.applicationStartMutex.Unlock()
	if fake.ApplicationStartStub != nil {
		return fake.ApplicationStartStub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.applicationStartReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeStarter) ApplicationStartCallCount() int {
	fake.applicationStartMutex.RLock()
	defer fake.applicationStartMutex.RUnlock()
	return len(fake.applicationStartArgsForCall)
}

func (fake *FakeStarter) ApplicationStartCalls(stub func(models.Application, string, string) (models.Application, error)) {
	fake.applicationStartMutex.Lock()
	defer fake.applicationStartMutex.Unlock()
	fake.ApplicationStartStub = stub
}

func (fake *FakeStarter) ApplicationStartArgsForCall(i int) (models.Application, string, string) {
	fake.applicationStartMutex.RLock()
	defer fake.applicationStartMutex.RUnlock()
	argsForCall := fake.applicationStartArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeStarter) ApplicationStartReturns(result1 models.Application, result2 error) {
	fake.applicationStartMutex.Lock()
	defer fake.applicationStartMutex.Unlock()
	fake.ApplicationStartStub = nil
	fake.applicationStartReturns = struct {
		result1 models.Application
		result2 error
	}{result1, result2}
}

func (fake *FakeStarter) ApplicationStartReturnsOnCall(i int, result1 models.Application, result2 error) {
	fake.applicationStartMutex.Lock()
	defer fake.applicationStartMutex.Unlock()
	fake.ApplicationStartStub = nil
	if fake.applicationStartReturnsOnCall == nil {
		fake.applicationStartReturnsOnCall = make(map[int]struct {
			result1 models.Application
			result2 error
		})
	}
	fake.applicationStartReturnsOnCall[i] = struct {
		result1 models.Application
		result2 error
	}{result1, result2}
}

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

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

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

func (fake *FakeStarter) ExecuteArgsForCall(i int) flags.FlagContext {
	fake.executeMutex.RLock()
	defer fake.executeMutex.RUnlock()
	argsForCall := fake.executeArgsForCall[i]
	return argsForCall.arg1
}

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

func (fake *FakeStarter) 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 *FakeStarter) MetaData() commandregistry.CommandMetadata {
	fake.metaDataMutex.Lock()
	ret, specificReturn := fake.metaDataReturnsOnCall[len(fake.metaDataArgsForCall)]
	fake.metaDataArgsForCall = append(fake.metaDataArgsForCall, struct {
	}{})
	fake.recordInvocation("MetaData", []interface{}{})
	fake.metaDataMutex.Unlock()
	if fake.MetaDataStub != nil {
		return fake.MetaDataStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.metaDataReturns
	return fakeReturns.result1
}

func (fake *FakeStarter) MetaDataCallCount() int {
	fake.metaDataMutex.RLock()
	defer fake.metaDataMutex.RUnlock()
	return len(fake.metaDataArgsForCall)
}

func (fake *FakeStarter) MetaDataCalls(stub func() commandregistry.CommandMetadata) {
	fake.metaDataMutex.Lock()
	defer fake.metaDataMutex.Unlock()
	fake.MetaDataStub = stub
}

func (fake *FakeStarter) MetaDataReturns(result1 commandregistry.CommandMetadata) {
	fake.metaDataMutex.Lock()
	defer fake.metaDataMutex.Unlock()
	fake.MetaDataStub = nil
	fake.metaDataReturns = struct {
		result1 commandregistry.CommandMetadata
	}{result1}
}

func (fake *FakeStarter) MetaDataReturnsOnCall(i int, result1 commandregistry.CommandMetadata) {
	fake.metaDataMutex.Lock()
	defer fake.metaDataMutex.Unlock()
	fake.MetaDataStub = nil
	if fake.metaDataReturnsOnCall == nil {
		fake.metaDataReturnsOnCall = make(map[int]struct {
			result1 commandregistry.CommandMetadata
		})
	}
	fake.metaDataReturnsOnCall[i] = struct {
		result1 commandregistry.CommandMetadata
	}{result1}
}

func (fake *FakeStarter) Requirements(arg1 requirements.Factory, arg2 flags.FlagContext) ([]requirements.Requirement, error) {
	fake.requirementsMutex.Lock()
	ret, specificReturn := fake.requirementsReturnsOnCall[len(fake.requirementsArgsForCall)]
	fake.requirementsArgsForCall = append(fake.requirementsArgsForCall, struct {
		arg1 requirements.Factory
		arg2 flags.FlagContext
	}{arg1, arg2})
	fake.recordInvocation("Requirements", []interface{}{arg1, arg2})
	fake.requirementsMutex.Unlock()
	if fake.RequirementsStub != nil {
		return fake.RequirementsStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.requirementsReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeStarter) RequirementsCallCount() int {
	fake.requirementsMutex.RLock()
	defer fake.requirementsMutex.RUnlock()
	return len(fake.requirementsArgsForCall)
}

func (fake *FakeStarter) RequirementsCalls(stub func(requirements.Factory, flags.FlagContext) ([]requirements.Requirement, error)) {
	fake.requirementsMutex.Lock()
	defer fake.requirementsMutex.Unlock()
	fake.RequirementsStub = stub
}

func (fake *FakeStarter) RequirementsArgsForCall(i int) (requirements.Factory, flags.FlagContext) {
	fake.requirementsMutex.RLock()
	defer fake.requirementsMutex.RUnlock()
	argsForCall := fake.requirementsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeStarter) RequirementsReturns(result1 []requirements.Requirement, result2 error) {
	fake.requirementsMutex.Lock()
	defer fake.requirementsMutex.Unlock()
	fake.RequirementsStub = nil
	fake.requirementsReturns = struct {
		result1 []requirements.Requirement
		result2 error
	}{result1, result2}
}

func (fake *FakeStarter) RequirementsReturnsOnCall(i int, result1 []requirements.Requirement, result2 error) {
	fake.requirementsMutex.Lock()
	defer fake.requirementsMutex.Unlock()
	fake.RequirementsStub = nil
	if fake.requirementsReturnsOnCall == nil {
		fake.requirementsReturnsOnCall = make(map[int]struct {
			result1 []requirements.Requirement
			result2 error
		})
	}
	fake.requirementsReturnsOnCall[i] = struct {
		result1 []requirements.Requirement
		result2 error
	}{result1, result2}
}

func (fake *FakeStarter) SetDependency(arg1 commandregistry.Dependency, arg2 bool) commandregistry.Command {
	fake.setDependencyMutex.Lock()
	ret, specificReturn := fake.setDependencyReturnsOnCall[len(fake.setDependencyArgsForCall)]
	fake.setDependencyArgsForCall = append(fake.setDependencyArgsForCall, struct {
		arg1 commandregistry.Dependency
		arg2 bool
	}{arg1, arg2})
	fake.recordInvocation("SetDependency", []interface{}{arg1, arg2})
	fake.setDependencyMutex.Unlock()
	if fake.SetDependencyStub != nil {
		return fake.SetDependencyStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.setDependencyReturns
	return fakeReturns.result1
}

func (fake *FakeStarter) SetDependencyCallCount() int {
	fake.setDependencyMutex.RLock()
	defer fake.setDependencyMutex.RUnlock()
	return len(fake.setDependencyArgsForCall)
}

func (fake *FakeStarter) SetDependencyCalls(stub func(commandregistry.Dependency, bool) commandregistry.Command) {
	fake.setDependencyMutex.Lock()
	defer fake.setDependencyMutex.Unlock()
	fake.SetDependencyStub = stub
}

func (fake *FakeStarter) SetDependencyArgsForCall(i int) (commandregistry.Dependency, bool) {
	fake.setDependencyMutex.RLock()
	defer fake.setDependencyMutex.RUnlock()
	argsForCall := fake.setDependencyArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeStarter) SetDependencyReturns(result1 commandregistry.Command) {
	fake.setDependencyMutex.Lock()
	defer fake.setDependencyMutex.Unlock()
	fake.SetDependencyStub = nil
	fake.setDependencyReturns = struct {
		result1 commandregistry.Command
	}{result1}
}

func (fake *FakeStarter) SetDependencyReturnsOnCall(i int, result1 commandregistry.Command) {
	fake.setDependencyMutex.Lock()
	defer fake.setDependencyMutex.Unlock()
	fake.SetDependencyStub = nil
	if fake.setDependencyReturnsOnCall == nil {
		fake.setDependencyReturnsOnCall = make(map[int]struct {
			result1 commandregistry.Command
		})
	}
	fake.setDependencyReturnsOnCall[i] = struct {
		result1 commandregistry.Command
	}{result1}
}

func (fake *FakeStarter) SetStartTimeoutInSeconds(arg1 int) {
	fake.setStartTimeoutInSecondsMutex.Lock()
	fake.setStartTimeoutInSecondsArgsForCall = append(fake.setStartTimeoutInSecondsArgsForCall, struct {
		arg1 int
	}{arg1})
	fake.recordInvocation("SetStartTimeoutInSeconds", []interface{}{arg1})
	fake.setStartTimeoutInSecondsMutex.Unlock()
	if fake.SetStartTimeoutInSecondsStub != nil {
		fake.SetStartTimeoutInSecondsStub(arg1)
	}
}

func (fake *FakeStarter) SetStartTimeoutInSecondsCallCount() int {
	fake.setStartTimeoutInSecondsMutex.RLock()
	defer fake.setStartTimeoutInSecondsMutex.RUnlock()
	return len(fake.setStartTimeoutInSecondsArgsForCall)
}

func (fake *FakeStarter) SetStartTimeoutInSecondsCalls(stub func(int)) {
	fake.setStartTimeoutInSecondsMutex.Lock()
	defer fake.setStartTimeoutInSecondsMutex.Unlock()
	fake.SetStartTimeoutInSecondsStub = stub
}

func (fake *FakeStarter) SetStartTimeoutInSecondsArgsForCall(i int) int {
	fake.setStartTimeoutInSecondsMutex.RLock()
	defer fake.setStartTimeoutInSecondsMutex.RUnlock()
	argsForCall := fake.setStartTimeoutInSecondsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeStarter) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.applicationStartMutex.RLock()
	defer fake.applicationStartMutex.RUnlock()
	fake.executeMutex.RLock()
	defer fake.executeMutex.RUnlock()
	fake.metaDataMutex.RLock()
	defer fake.metaDataMutex.RUnlock()
	fake.requirementsMutex.RLock()
	defer fake.requirementsMutex.RUnlock()
	fake.setDependencyMutex.RLock()
	defer fake.setDependencyMutex.RUnlock()
	fake.setStartTimeoutInSecondsMutex.RLock()
	defer fake.setStartTimeoutInSecondsMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeStarter) 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 _ application.Starter = new(FakeStarter)
