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

import (
	"sync"

	"github.com/operator-framework/operator-registry/pkg/containertools"
)

type FakeDockerfileGenerator struct {
	GenerateIndexDockerfileStub        func(string, string) string
	generateIndexDockerfileMutex       sync.RWMutex
	generateIndexDockerfileArgsForCall []struct {
		arg1 string
		arg2 string
	}
	generateIndexDockerfileReturns struct {
		result1 string
	}
	generateIndexDockerfileReturnsOnCall map[int]struct {
		result1 string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDockerfileGenerator) GenerateIndexDockerfile(arg1 string, arg2 string) string {
	fake.generateIndexDockerfileMutex.Lock()
	ret, specificReturn := fake.generateIndexDockerfileReturnsOnCall[len(fake.generateIndexDockerfileArgsForCall)]
	fake.generateIndexDockerfileArgsForCall = append(fake.generateIndexDockerfileArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	stub := fake.GenerateIndexDockerfileStub
	fakeReturns := fake.generateIndexDockerfileReturns
	fake.recordInvocation("GenerateIndexDockerfile", []interface{}{arg1, arg2})
	fake.generateIndexDockerfileMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDockerfileGenerator) GenerateIndexDockerfileCallCount() int {
	fake.generateIndexDockerfileMutex.RLock()
	defer fake.generateIndexDockerfileMutex.RUnlock()
	return len(fake.generateIndexDockerfileArgsForCall)
}

func (fake *FakeDockerfileGenerator) GenerateIndexDockerfileCalls(stub func(string, string) string) {
	fake.generateIndexDockerfileMutex.Lock()
	defer fake.generateIndexDockerfileMutex.Unlock()
	fake.GenerateIndexDockerfileStub = stub
}

func (fake *FakeDockerfileGenerator) GenerateIndexDockerfileArgsForCall(i int) (string, string) {
	fake.generateIndexDockerfileMutex.RLock()
	defer fake.generateIndexDockerfileMutex.RUnlock()
	argsForCall := fake.generateIndexDockerfileArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeDockerfileGenerator) GenerateIndexDockerfileReturns(result1 string) {
	fake.generateIndexDockerfileMutex.Lock()
	defer fake.generateIndexDockerfileMutex.Unlock()
	fake.GenerateIndexDockerfileStub = nil
	fake.generateIndexDockerfileReturns = struct {
		result1 string
	}{result1}
}

func (fake *FakeDockerfileGenerator) GenerateIndexDockerfileReturnsOnCall(i int, result1 string) {
	fake.generateIndexDockerfileMutex.Lock()
	defer fake.generateIndexDockerfileMutex.Unlock()
	fake.GenerateIndexDockerfileStub = nil
	if fake.generateIndexDockerfileReturnsOnCall == nil {
		fake.generateIndexDockerfileReturnsOnCall = make(map[int]struct {
			result1 string
		})
	}
	fake.generateIndexDockerfileReturnsOnCall[i] = struct {
		result1 string
	}{result1}
}

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

func (fake *FakeDockerfileGenerator) 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 _ containertools.DockerfileGenerator = new(FakeDockerfileGenerator)
