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

import (
	"sync"

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

type FakeImageReader struct {
	GetImageDataStub        func(string, string, ...containertools.GetImageDataOption) error
	getImageDataMutex       sync.RWMutex
	getImageDataArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 []containertools.GetImageDataOption
	}
	getImageDataReturns struct {
		result1 error
	}
	getImageDataReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeImageReader) GetImageData(arg1 string, arg2 string, arg3 ...containertools.GetImageDataOption) error {
	fake.getImageDataMutex.Lock()
	ret, specificReturn := fake.getImageDataReturnsOnCall[len(fake.getImageDataArgsForCall)]
	fake.getImageDataArgsForCall = append(fake.getImageDataArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 []containertools.GetImageDataOption
	}{arg1, arg2, arg3})
	fake.recordInvocation("GetImageData", []interface{}{arg1, arg2, arg3})
	fake.getImageDataMutex.Unlock()
	if fake.GetImageDataStub != nil {
		return fake.GetImageDataStub(arg1, arg2, arg3...)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.getImageDataReturns
	return fakeReturns.result1
}

func (fake *FakeImageReader) GetImageDataCallCount() int {
	fake.getImageDataMutex.RLock()
	defer fake.getImageDataMutex.RUnlock()
	return len(fake.getImageDataArgsForCall)
}

func (fake *FakeImageReader) GetImageDataCalls(stub func(string, string, ...containertools.GetImageDataOption) error) {
	fake.getImageDataMutex.Lock()
	defer fake.getImageDataMutex.Unlock()
	fake.GetImageDataStub = stub
}

func (fake *FakeImageReader) GetImageDataArgsForCall(i int) (string, string, []containertools.GetImageDataOption) {
	fake.getImageDataMutex.RLock()
	defer fake.getImageDataMutex.RUnlock()
	argsForCall := fake.getImageDataArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeImageReader) GetImageDataReturns(result1 error) {
	fake.getImageDataMutex.Lock()
	defer fake.getImageDataMutex.Unlock()
	fake.GetImageDataStub = nil
	fake.getImageDataReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeImageReader) GetImageDataReturnsOnCall(i int, result1 error) {
	fake.getImageDataMutex.Lock()
	defer fake.getImageDataMutex.Unlock()
	fake.GetImageDataStub = nil
	if fake.getImageDataReturnsOnCall == nil {
		fake.getImageDataReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.getImageDataReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

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