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

import (
	"sync"

	"github.com/cloudfoundry/bosh-cli/v7/releasedir"
)

type FakeReleaseIndexReporter struct {
	ReleaseIndexAddedStub        func(string, string, error)
	releaseIndexAddedMutex       sync.RWMutex
	releaseIndexAddedArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeReleaseIndexReporter) ReleaseIndexAdded(arg1 string, arg2 string, arg3 error) {
	fake.releaseIndexAddedMutex.Lock()
	fake.releaseIndexAddedArgsForCall = append(fake.releaseIndexAddedArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 error
	}{arg1, arg2, arg3})
	stub := fake.ReleaseIndexAddedStub
	fake.recordInvocation("ReleaseIndexAdded", []interface{}{arg1, arg2, arg3})
	fake.releaseIndexAddedMutex.Unlock()
	if stub != nil {
		fake.ReleaseIndexAddedStub(arg1, arg2, arg3)
	}
}

func (fake *FakeReleaseIndexReporter) ReleaseIndexAddedCallCount() int {
	fake.releaseIndexAddedMutex.RLock()
	defer fake.releaseIndexAddedMutex.RUnlock()
	return len(fake.releaseIndexAddedArgsForCall)
}

func (fake *FakeReleaseIndexReporter) ReleaseIndexAddedCalls(stub func(string, string, error)) {
	fake.releaseIndexAddedMutex.Lock()
	defer fake.releaseIndexAddedMutex.Unlock()
	fake.ReleaseIndexAddedStub = stub
}

func (fake *FakeReleaseIndexReporter) ReleaseIndexAddedArgsForCall(i int) (string, string, error) {
	fake.releaseIndexAddedMutex.RLock()
	defer fake.releaseIndexAddedMutex.RUnlock()
	argsForCall := fake.releaseIndexAddedArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

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

func (fake *FakeReleaseIndexReporter) 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 _ releasedir.ReleaseIndexReporter = new(FakeReleaseIndexReporter)
