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

import (
	"sync"

	"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorlister"
	v1 "k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1"
)

type FakeAPIRegistrationV1Lister struct {
	APIServiceListerStub        func() v1.APIServiceLister
	aPIServiceListerMutex       sync.RWMutex
	aPIServiceListerArgsForCall []struct {
	}
	aPIServiceListerReturns struct {
		result1 v1.APIServiceLister
	}
	aPIServiceListerReturnsOnCall map[int]struct {
		result1 v1.APIServiceLister
	}
	RegisterAPIServiceListerStub        func(v1.APIServiceLister)
	registerAPIServiceListerMutex       sync.RWMutex
	registerAPIServiceListerArgsForCall []struct {
		arg1 v1.APIServiceLister
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeAPIRegistrationV1Lister) APIServiceLister() v1.APIServiceLister {
	fake.aPIServiceListerMutex.Lock()
	ret, specificReturn := fake.aPIServiceListerReturnsOnCall[len(fake.aPIServiceListerArgsForCall)]
	fake.aPIServiceListerArgsForCall = append(fake.aPIServiceListerArgsForCall, struct {
	}{})
	fake.recordInvocation("APIServiceLister", []interface{}{})
	fake.aPIServiceListerMutex.Unlock()
	if fake.APIServiceListerStub != nil {
		return fake.APIServiceListerStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.aPIServiceListerReturns
	return fakeReturns.result1
}

func (fake *FakeAPIRegistrationV1Lister) APIServiceListerCallCount() int {
	fake.aPIServiceListerMutex.RLock()
	defer fake.aPIServiceListerMutex.RUnlock()
	return len(fake.aPIServiceListerArgsForCall)
}

func (fake *FakeAPIRegistrationV1Lister) APIServiceListerCalls(stub func() v1.APIServiceLister) {
	fake.aPIServiceListerMutex.Lock()
	defer fake.aPIServiceListerMutex.Unlock()
	fake.APIServiceListerStub = stub
}

func (fake *FakeAPIRegistrationV1Lister) APIServiceListerReturns(result1 v1.APIServiceLister) {
	fake.aPIServiceListerMutex.Lock()
	defer fake.aPIServiceListerMutex.Unlock()
	fake.APIServiceListerStub = nil
	fake.aPIServiceListerReturns = struct {
		result1 v1.APIServiceLister
	}{result1}
}

func (fake *FakeAPIRegistrationV1Lister) APIServiceListerReturnsOnCall(i int, result1 v1.APIServiceLister) {
	fake.aPIServiceListerMutex.Lock()
	defer fake.aPIServiceListerMutex.Unlock()
	fake.APIServiceListerStub = nil
	if fake.aPIServiceListerReturnsOnCall == nil {
		fake.aPIServiceListerReturnsOnCall = make(map[int]struct {
			result1 v1.APIServiceLister
		})
	}
	fake.aPIServiceListerReturnsOnCall[i] = struct {
		result1 v1.APIServiceLister
	}{result1}
}

func (fake *FakeAPIRegistrationV1Lister) RegisterAPIServiceLister(arg1 v1.APIServiceLister) {
	fake.registerAPIServiceListerMutex.Lock()
	fake.registerAPIServiceListerArgsForCall = append(fake.registerAPIServiceListerArgsForCall, struct {
		arg1 v1.APIServiceLister
	}{arg1})
	fake.recordInvocation("RegisterAPIServiceLister", []interface{}{arg1})
	fake.registerAPIServiceListerMutex.Unlock()
	if fake.RegisterAPIServiceListerStub != nil {
		fake.RegisterAPIServiceListerStub(arg1)
	}
}

func (fake *FakeAPIRegistrationV1Lister) RegisterAPIServiceListerCallCount() int {
	fake.registerAPIServiceListerMutex.RLock()
	defer fake.registerAPIServiceListerMutex.RUnlock()
	return len(fake.registerAPIServiceListerArgsForCall)
}

func (fake *FakeAPIRegistrationV1Lister) RegisterAPIServiceListerCalls(stub func(v1.APIServiceLister)) {
	fake.registerAPIServiceListerMutex.Lock()
	defer fake.registerAPIServiceListerMutex.Unlock()
	fake.RegisterAPIServiceListerStub = stub
}

func (fake *FakeAPIRegistrationV1Lister) RegisterAPIServiceListerArgsForCall(i int) v1.APIServiceLister {
	fake.registerAPIServiceListerMutex.RLock()
	defer fake.registerAPIServiceListerMutex.RUnlock()
	argsForCall := fake.registerAPIServiceListerArgsForCall[i]
	return argsForCall.arg1
}

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

func (fake *FakeAPIRegistrationV1Lister) 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 _ operatorlister.APIRegistrationV1Lister = new(FakeAPIRegistrationV1Lister)
