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

import (
	"sync"

	"github.com/cloudfoundry/bosh-cli/v7/crypto"
	"github.com/cloudfoundry/bosh-cli/v7/release/resource"
	cryptoa "github.com/cloudfoundry/bosh-utils/crypto"
)

type FakeResource struct {
	ArchiveDigestStub        func() string
	archiveDigestMutex       sync.RWMutex
	archiveDigestArgsForCall []struct {
	}
	archiveDigestReturns struct {
		result1 string
	}
	archiveDigestReturnsOnCall map[int]struct {
		result1 string
	}
	ArchivePathStub        func() string
	archivePathMutex       sync.RWMutex
	archivePathArgsForCall []struct {
	}
	archivePathReturns struct {
		result1 string
	}
	archivePathReturnsOnCall map[int]struct {
		result1 string
	}
	BuildStub        func(resource.ArchiveIndex, resource.ArchiveIndex) error
	buildMutex       sync.RWMutex
	buildArgsForCall []struct {
		arg1 resource.ArchiveIndex
		arg2 resource.ArchiveIndex
	}
	buildReturns struct {
		result1 error
	}
	buildReturnsOnCall map[int]struct {
		result1 error
	}
	FinalizeStub        func(resource.ArchiveIndex) error
	finalizeMutex       sync.RWMutex
	finalizeArgsForCall []struct {
		arg1 resource.ArchiveIndex
	}
	finalizeReturns struct {
		result1 error
	}
	finalizeReturnsOnCall map[int]struct {
		result1 error
	}
	FingerprintStub        func() string
	fingerprintMutex       sync.RWMutex
	fingerprintArgsForCall []struct {
	}
	fingerprintReturns struct {
		result1 string
	}
	fingerprintReturnsOnCall map[int]struct {
		result1 string
	}
	NameStub        func() string
	nameMutex       sync.RWMutex
	nameArgsForCall []struct {
	}
	nameReturns struct {
		result1 string
	}
	nameReturnsOnCall map[int]struct {
		result1 string
	}
	PrefixStub        func(string)
	prefixMutex       sync.RWMutex
	prefixArgsForCall []struct {
		arg1 string
	}
	RehashWithCalculatorStub        func(crypto.DigestCalculator, cryptoa.ArchiveDigestFilePathReader) (resource.Resource, error)
	rehashWithCalculatorMutex       sync.RWMutex
	rehashWithCalculatorArgsForCall []struct {
		arg1 crypto.DigestCalculator
		arg2 cryptoa.ArchiveDigestFilePathReader
	}
	rehashWithCalculatorReturns struct {
		result1 resource.Resource
		result2 error
	}
	rehashWithCalculatorReturnsOnCall map[int]struct {
		result1 resource.Resource
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeResource) ArchiveDigest() string {
	fake.archiveDigestMutex.Lock()
	ret, specificReturn := fake.archiveDigestReturnsOnCall[len(fake.archiveDigestArgsForCall)]
	fake.archiveDigestArgsForCall = append(fake.archiveDigestArgsForCall, struct {
	}{})
	stub := fake.ArchiveDigestStub
	fakeReturns := fake.archiveDigestReturns
	fake.recordInvocation("ArchiveDigest", []interface{}{})
	fake.archiveDigestMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeResource) ArchiveDigestCallCount() int {
	fake.archiveDigestMutex.RLock()
	defer fake.archiveDigestMutex.RUnlock()
	return len(fake.archiveDigestArgsForCall)
}

func (fake *FakeResource) ArchiveDigestCalls(stub func() string) {
	fake.archiveDigestMutex.Lock()
	defer fake.archiveDigestMutex.Unlock()
	fake.ArchiveDigestStub = stub
}

func (fake *FakeResource) ArchiveDigestReturns(result1 string) {
	fake.archiveDigestMutex.Lock()
	defer fake.archiveDigestMutex.Unlock()
	fake.ArchiveDigestStub = nil
	fake.archiveDigestReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeResource) ArchiveDigestReturnsOnCall(i int, result1 string) {
	fake.archiveDigestMutex.Lock()
	defer fake.archiveDigestMutex.Unlock()
	fake.ArchiveDigestStub = nil
	if fake.archiveDigestReturnsOnCall == nil {
		fake.archiveDigestReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.archiveDigestReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *FakeResource) ArchivePath() string {
	fake.archivePathMutex.Lock()
	ret, specificReturn := fake.archivePathReturnsOnCall[len(fake.archivePathArgsForCall)]
	fake.archivePathArgsForCall = append(fake.archivePathArgsForCall, struct {
	}{})
	stub := fake.ArchivePathStub
	fakeReturns := fake.archivePathReturns
	fake.recordInvocation("ArchivePath", []interface{}{})
	fake.archivePathMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeResource) ArchivePathCallCount() int {
	fake.archivePathMutex.RLock()
	defer fake.archivePathMutex.RUnlock()
	return len(fake.archivePathArgsForCall)
}

func (fake *FakeResource) ArchivePathCalls(stub func() string) {
	fake.archivePathMutex.Lock()
	defer fake.archivePathMutex.Unlock()
	fake.ArchivePathStub = stub
}

func (fake *FakeResource) ArchivePathReturns(result1 string) {
	fake.archivePathMutex.Lock()
	defer fake.archivePathMutex.Unlock()
	fake.ArchivePathStub = nil
	fake.archivePathReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeResource) ArchivePathReturnsOnCall(i int, result1 string) {
	fake.archivePathMutex.Lock()
	defer fake.archivePathMutex.Unlock()
	fake.ArchivePathStub = nil
	if fake.archivePathReturnsOnCall == nil {
		fake.archivePathReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.archivePathReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *FakeResource) Build(arg1 resource.ArchiveIndex, arg2 resource.ArchiveIndex) error {
	fake.buildMutex.Lock()
	ret, specificReturn := fake.buildReturnsOnCall[len(fake.buildArgsForCall)]
	fake.buildArgsForCall = append(fake.buildArgsForCall, struct {
		arg1 resource.ArchiveIndex
		arg2 resource.ArchiveIndex
	}{arg1, arg2})
	stub := fake.BuildStub
	fakeReturns := fake.buildReturns
	fake.recordInvocation("Build", []interface{}{arg1, arg2})
	fake.buildMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeResource) BuildCallCount() int {
	fake.buildMutex.RLock()
	defer fake.buildMutex.RUnlock()
	return len(fake.buildArgsForCall)
}

func (fake *FakeResource) BuildCalls(stub func(resource.ArchiveIndex, resource.ArchiveIndex) error) {
	fake.buildMutex.Lock()
	defer fake.buildMutex.Unlock()
	fake.BuildStub = stub
}

func (fake *FakeResource) BuildArgsForCall(i int) (resource.ArchiveIndex, resource.ArchiveIndex) {
	fake.buildMutex.RLock()
	defer fake.buildMutex.RUnlock()
	argsForCall := fake.buildArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeResource) BuildReturns(result1 error) {
	fake.buildMutex.Lock()
	defer fake.buildMutex.Unlock()
	fake.BuildStub = nil
	fake.buildReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeResource) BuildReturnsOnCall(i int, result1 error) {
	fake.buildMutex.Lock()
	defer fake.buildMutex.Unlock()
	fake.BuildStub = nil
	if fake.buildReturnsOnCall == nil {
		fake.buildReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.buildReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeResource) Finalize(arg1 resource.ArchiveIndex) error {
	fake.finalizeMutex.Lock()
	ret, specificReturn := fake.finalizeReturnsOnCall[len(fake.finalizeArgsForCall)]
	fake.finalizeArgsForCall = append(fake.finalizeArgsForCall, struct {
		arg1 resource.ArchiveIndex
	}{arg1})
	stub := fake.FinalizeStub
	fakeReturns := fake.finalizeReturns
	fake.recordInvocation("Finalize", []interface{}{arg1})
	fake.finalizeMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeResource) FinalizeCallCount() int {
	fake.finalizeMutex.RLock()
	defer fake.finalizeMutex.RUnlock()
	return len(fake.finalizeArgsForCall)
}

func (fake *FakeResource) FinalizeCalls(stub func(resource.ArchiveIndex) error) {
	fake.finalizeMutex.Lock()
	defer fake.finalizeMutex.Unlock()
	fake.FinalizeStub = stub
}

func (fake *FakeResource) FinalizeArgsForCall(i int) resource.ArchiveIndex {
	fake.finalizeMutex.RLock()
	defer fake.finalizeMutex.RUnlock()
	argsForCall := fake.finalizeArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeResource) FinalizeReturns(result1 error) {
	fake.finalizeMutex.Lock()
	defer fake.finalizeMutex.Unlock()
	fake.FinalizeStub = nil
	fake.finalizeReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeResource) FinalizeReturnsOnCall(i int, result1 error) {
	fake.finalizeMutex.Lock()
	defer fake.finalizeMutex.Unlock()
	fake.FinalizeStub = nil
	if fake.finalizeReturnsOnCall == nil {
		fake.finalizeReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.finalizeReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeResource) Fingerprint() string {
	fake.fingerprintMutex.Lock()
	ret, specificReturn := fake.fingerprintReturnsOnCall[len(fake.fingerprintArgsForCall)]
	fake.fingerprintArgsForCall = append(fake.fingerprintArgsForCall, struct {
	}{})
	stub := fake.FingerprintStub
	fakeReturns := fake.fingerprintReturns
	fake.recordInvocation("Fingerprint", []interface{}{})
	fake.fingerprintMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeResource) FingerprintCallCount() int {
	fake.fingerprintMutex.RLock()
	defer fake.fingerprintMutex.RUnlock()
	return len(fake.fingerprintArgsForCall)
}

func (fake *FakeResource) FingerprintCalls(stub func() string) {
	fake.fingerprintMutex.Lock()
	defer fake.fingerprintMutex.Unlock()
	fake.FingerprintStub = stub
}

func (fake *FakeResource) FingerprintReturns(result1 string) {
	fake.fingerprintMutex.Lock()
	defer fake.fingerprintMutex.Unlock()
	fake.FingerprintStub = nil
	fake.fingerprintReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeResource) FingerprintReturnsOnCall(i int, result1 string) {
	fake.fingerprintMutex.Lock()
	defer fake.fingerprintMutex.Unlock()
	fake.FingerprintStub = nil
	if fake.fingerprintReturnsOnCall == nil {
		fake.fingerprintReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.fingerprintReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *FakeResource) Name() string {
	fake.nameMutex.Lock()
	ret, specificReturn := fake.nameReturnsOnCall[len(fake.nameArgsForCall)]
	fake.nameArgsForCall = append(fake.nameArgsForCall, struct {
	}{})
	stub := fake.NameStub
	fakeReturns := fake.nameReturns
	fake.recordInvocation("Name", []interface{}{})
	fake.nameMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeResource) NameCallCount() int {
	fake.nameMutex.RLock()
	defer fake.nameMutex.RUnlock()
	return len(fake.nameArgsForCall)
}

func (fake *FakeResource) NameCalls(stub func() string) {
	fake.nameMutex.Lock()
	defer fake.nameMutex.Unlock()
	fake.NameStub = stub
}

func (fake *FakeResource) NameReturns(result1 string) {
	fake.nameMutex.Lock()
	defer fake.nameMutex.Unlock()
	fake.NameStub = nil
	fake.nameReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeResource) NameReturnsOnCall(i int, result1 string) {
	fake.nameMutex.Lock()
	defer fake.nameMutex.Unlock()
	fake.NameStub = nil
	if fake.nameReturnsOnCall == nil {
		fake.nameReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.nameReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

func (fake *FakeResource) Prefix(arg1 string) {
	fake.prefixMutex.Lock()
	fake.prefixArgsForCall = append(fake.prefixArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.PrefixStub
	fake.recordInvocation("Prefix", []interface{}{arg1})
	fake.prefixMutex.Unlock()
	if stub != nil {
		fake.PrefixStub(arg1)
	}
}

func (fake *FakeResource) PrefixCallCount() int {
	fake.prefixMutex.RLock()
	defer fake.prefixMutex.RUnlock()
	return len(fake.prefixArgsForCall)
}

func (fake *FakeResource) PrefixCalls(stub func(string)) {
	fake.prefixMutex.Lock()
	defer fake.prefixMutex.Unlock()
	fake.PrefixStub = stub
}

func (fake *FakeResource) PrefixArgsForCall(i int) string {
	fake.prefixMutex.RLock()
	defer fake.prefixMutex.RUnlock()
	argsForCall := fake.prefixArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeResource) RehashWithCalculator(arg1 crypto.DigestCalculator, arg2 cryptoa.ArchiveDigestFilePathReader) (resource.Resource, error) {
	fake.rehashWithCalculatorMutex.Lock()
	ret, specificReturn := fake.rehashWithCalculatorReturnsOnCall[len(fake.rehashWithCalculatorArgsForCall)]
	fake.rehashWithCalculatorArgsForCall = append(fake.rehashWithCalculatorArgsForCall, struct {
		arg1 crypto.DigestCalculator
		arg2 cryptoa.ArchiveDigestFilePathReader
	}{arg1, arg2})
	stub := fake.RehashWithCalculatorStub
	fakeReturns := fake.rehashWithCalculatorReturns
	fake.recordInvocation("RehashWithCalculator", []interface{}{arg1, arg2})
	fake.rehashWithCalculatorMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeResource) RehashWithCalculatorCallCount() int {
	fake.rehashWithCalculatorMutex.RLock()
	defer fake.rehashWithCalculatorMutex.RUnlock()
	return len(fake.rehashWithCalculatorArgsForCall)
}

func (fake *FakeResource) RehashWithCalculatorCalls(stub func(crypto.DigestCalculator, cryptoa.ArchiveDigestFilePathReader) (resource.Resource, error)) {
	fake.rehashWithCalculatorMutex.Lock()
	defer fake.rehashWithCalculatorMutex.Unlock()
	fake.RehashWithCalculatorStub = stub
}

func (fake *FakeResource) RehashWithCalculatorArgsForCall(i int) (crypto.DigestCalculator, cryptoa.ArchiveDigestFilePathReader) {
	fake.rehashWithCalculatorMutex.RLock()
	defer fake.rehashWithCalculatorMutex.RUnlock()
	argsForCall := fake.rehashWithCalculatorArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeResource) RehashWithCalculatorReturns(result1 resource.Resource, result2 error) {
	fake.rehashWithCalculatorMutex.Lock()
	defer fake.rehashWithCalculatorMutex.Unlock()
	fake.RehashWithCalculatorStub = nil
	fake.rehashWithCalculatorReturns = struct {
		result1 resource.Resource
		result2 error
	}{result1, result2}
}

func (fake *FakeResource) RehashWithCalculatorReturnsOnCall(i int, result1 resource.Resource, result2 error) {
	fake.rehashWithCalculatorMutex.Lock()
	defer fake.rehashWithCalculatorMutex.Unlock()
	fake.RehashWithCalculatorStub = nil
	if fake.rehashWithCalculatorReturnsOnCall == nil {
		fake.rehashWithCalculatorReturnsOnCall = make(map[int]struct {
			result1 resource.Resource
			result2 error
		})
	}
	fake.rehashWithCalculatorReturnsOnCall[i] = struct {
		result1 resource.Resource
		result2 error
	}{result1, result2}
}

func (fake *FakeResource) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.archiveDigestMutex.RLock()
	defer fake.archiveDigestMutex.RUnlock()
	fake.archivePathMutex.RLock()
	defer fake.archivePathMutex.RUnlock()
	fake.buildMutex.RLock()
	defer fake.buildMutex.RUnlock()
	fake.finalizeMutex.RLock()
	defer fake.finalizeMutex.RUnlock()
	fake.fingerprintMutex.RLock()
	defer fake.fingerprintMutex.RUnlock()
	fake.nameMutex.RLock()
	defer fake.nameMutex.RUnlock()
	fake.prefixMutex.RLock()
	defer fake.prefixMutex.RUnlock()
	fake.rehashWithCalculatorMutex.RLock()
	defer fake.rehashWithCalculatorMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeResource) 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 _ resource.Resource = new(FakeResource)
