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

import (
	"sync"

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

type FakeBuildpackRequirement struct {
	ExecuteStub        func() error
	executeMutex       sync.RWMutex
	executeArgsForCall []struct {
	}
	executeReturns struct {
		result1 error
	}
	executeReturnsOnCall map[int]struct {
		result1 error
	}
	GetBuildpackStub        func() models.Buildpack
	getBuildpackMutex       sync.RWMutex
	getBuildpackArgsForCall []struct {
	}
	getBuildpackReturns struct {
		result1 models.Buildpack
	}
	getBuildpackReturnsOnCall map[int]struct {
		result1 models.Buildpack
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

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

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

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

func (fake *FakeBuildpackRequirement) 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 *FakeBuildpackRequirement) GetBuildpack() models.Buildpack {
	fake.getBuildpackMutex.Lock()
	ret, specificReturn := fake.getBuildpackReturnsOnCall[len(fake.getBuildpackArgsForCall)]
	fake.getBuildpackArgsForCall = append(fake.getBuildpackArgsForCall, struct {
	}{})
	fake.recordInvocation("GetBuildpack", []interface{}{})
	fake.getBuildpackMutex.Unlock()
	if fake.GetBuildpackStub != nil {
		return fake.GetBuildpackStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.getBuildpackReturns
	return fakeReturns.result1
}

func (fake *FakeBuildpackRequirement) GetBuildpackCallCount() int {
	fake.getBuildpackMutex.RLock()
	defer fake.getBuildpackMutex.RUnlock()
	return len(fake.getBuildpackArgsForCall)
}

func (fake *FakeBuildpackRequirement) GetBuildpackCalls(stub func() models.Buildpack) {
	fake.getBuildpackMutex.Lock()
	defer fake.getBuildpackMutex.Unlock()
	fake.GetBuildpackStub = stub
}

func (fake *FakeBuildpackRequirement) GetBuildpackReturns(result1 models.Buildpack) {
	fake.getBuildpackMutex.Lock()
	defer fake.getBuildpackMutex.Unlock()
	fake.GetBuildpackStub = nil
	fake.getBuildpackReturns = struct {
		result1 models.Buildpack
	}{result1}
}

func (fake *FakeBuildpackRequirement) GetBuildpackReturnsOnCall(i int, result1 models.Buildpack) {
	fake.getBuildpackMutex.Lock()
	defer fake.getBuildpackMutex.Unlock()
	fake.GetBuildpackStub = nil
	if fake.getBuildpackReturnsOnCall == nil {
		fake.getBuildpackReturnsOnCall = make(map[int]struct {
			result1 models.Buildpack
		})
	}
	fake.getBuildpackReturnsOnCall[i] = struct {
		result1 models.Buildpack
	}{result1}
}

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

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