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

import (
	"sync"

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

type FakeFingerprinter struct {
	CalculateStub        func([]resource.File, []string) (string, error)
	calculateMutex       sync.RWMutex
	calculateArgsForCall []struct {
		arg1 []resource.File
		arg2 []string
	}
	calculateReturns struct {
		result1 string
		result2 error
	}
	calculateReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeFingerprinter) Calculate(arg1 []resource.File, arg2 []string) (string, error) {
	var arg1Copy []resource.File
	if arg1 != nil {
		arg1Copy = make([]resource.File, len(arg1))
		copy(arg1Copy, arg1)
	}
	var arg2Copy []string
	if arg2 != nil {
		arg2Copy = make([]string, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.calculateMutex.Lock()
	ret, specificReturn := fake.calculateReturnsOnCall[len(fake.calculateArgsForCall)]
	fake.calculateArgsForCall = append(fake.calculateArgsForCall, struct {
		arg1 []resource.File
		arg2 []string
	}{arg1Copy, arg2Copy})
	stub := fake.CalculateStub
	fakeReturns := fake.calculateReturns
	fake.recordInvocation("Calculate", []interface{}{arg1Copy, arg2Copy})
	fake.calculateMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeFingerprinter) CalculateCallCount() int {
	fake.calculateMutex.RLock()
	defer fake.calculateMutex.RUnlock()
	return len(fake.calculateArgsForCall)
}

func (fake *FakeFingerprinter) CalculateCalls(stub func([]resource.File, []string) (string, error)) {
	fake.calculateMutex.Lock()
	defer fake.calculateMutex.Unlock()
	fake.CalculateStub = stub
}

func (fake *FakeFingerprinter) CalculateArgsForCall(i int) ([]resource.File, []string) {
	fake.calculateMutex.RLock()
	defer fake.calculateMutex.RUnlock()
	argsForCall := fake.calculateArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeFingerprinter) CalculateReturns(result1 string, result2 error) {
	fake.calculateMutex.Lock()
	defer fake.calculateMutex.Unlock()
	fake.CalculateStub = nil
	fake.calculateReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeFingerprinter) CalculateReturnsOnCall(i int, result1 string, result2 error) {
	fake.calculateMutex.Lock()
	defer fake.calculateMutex.Unlock()
	fake.CalculateStub = nil
	if fake.calculateReturnsOnCall == nil {
		fake.calculateReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.calculateReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

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

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