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

import (
	"sync"

	"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorlister"
	"k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1"
)

type FakeAPIExtensionsV1beta1Lister struct {
	CustomResourceDefinitionListerStub        func() v1beta1.CustomResourceDefinitionLister
	customResourceDefinitionListerMutex       sync.RWMutex
	customResourceDefinitionListerArgsForCall []struct {
	}
	customResourceDefinitionListerReturns struct {
		result1 v1beta1.CustomResourceDefinitionLister
	}
	customResourceDefinitionListerReturnsOnCall map[int]struct {
		result1 v1beta1.CustomResourceDefinitionLister
	}
	RegisterCustomResourceDefinitionListerStub        func(v1beta1.CustomResourceDefinitionLister)
	registerCustomResourceDefinitionListerMutex       sync.RWMutex
	registerCustomResourceDefinitionListerArgsForCall []struct {
		arg1 v1beta1.CustomResourceDefinitionLister
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeAPIExtensionsV1beta1Lister) CustomResourceDefinitionLister() v1beta1.CustomResourceDefinitionLister {
	fake.customResourceDefinitionListerMutex.Lock()
	ret, specificReturn := fake.customResourceDefinitionListerReturnsOnCall[len(fake.customResourceDefinitionListerArgsForCall)]
	fake.customResourceDefinitionListerArgsForCall = append(fake.customResourceDefinitionListerArgsForCall, struct {
	}{})
	fake.recordInvocation("CustomResourceDefinitionLister", []interface{}{})
	fake.customResourceDefinitionListerMutex.Unlock()
	if fake.CustomResourceDefinitionListerStub != nil {
		return fake.CustomResourceDefinitionListerStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.customResourceDefinitionListerReturns
	return fakeReturns.result1
}

func (fake *FakeAPIExtensionsV1beta1Lister) CustomResourceDefinitionListerCallCount() int {
	fake.customResourceDefinitionListerMutex.RLock()
	defer fake.customResourceDefinitionListerMutex.RUnlock()
	return len(fake.customResourceDefinitionListerArgsForCall)
}

func (fake *FakeAPIExtensionsV1beta1Lister) CustomResourceDefinitionListerCalls(stub func() v1beta1.CustomResourceDefinitionLister) {
	fake.customResourceDefinitionListerMutex.Lock()
	defer fake.customResourceDefinitionListerMutex.Unlock()
	fake.CustomResourceDefinitionListerStub = stub
}

func (fake *FakeAPIExtensionsV1beta1Lister) CustomResourceDefinitionListerReturns(result1 v1beta1.CustomResourceDefinitionLister) {
	fake.customResourceDefinitionListerMutex.Lock()
	defer fake.customResourceDefinitionListerMutex.Unlock()
	fake.CustomResourceDefinitionListerStub = nil
	fake.customResourceDefinitionListerReturns = struct {
		result1 v1beta1.CustomResourceDefinitionLister
	}{result1}
}

func (fake *FakeAPIExtensionsV1beta1Lister) CustomResourceDefinitionListerReturnsOnCall(i int, result1 v1beta1.CustomResourceDefinitionLister) {
	fake.customResourceDefinitionListerMutex.Lock()
	defer fake.customResourceDefinitionListerMutex.Unlock()
	fake.CustomResourceDefinitionListerStub = nil
	if fake.customResourceDefinitionListerReturnsOnCall == nil {
		fake.customResourceDefinitionListerReturnsOnCall = make(map[int]struct {
			result1 v1beta1.CustomResourceDefinitionLister
		})
	}
	fake.customResourceDefinitionListerReturnsOnCall[i] = struct {
		result1 v1beta1.CustomResourceDefinitionLister
	}{result1}
}

func (fake *FakeAPIExtensionsV1beta1Lister) RegisterCustomResourceDefinitionLister(arg1 v1beta1.CustomResourceDefinitionLister) {
	fake.registerCustomResourceDefinitionListerMutex.Lock()
	fake.registerCustomResourceDefinitionListerArgsForCall = append(fake.registerCustomResourceDefinitionListerArgsForCall, struct {
		arg1 v1beta1.CustomResourceDefinitionLister
	}{arg1})
	fake.recordInvocation("RegisterCustomResourceDefinitionLister", []interface{}{arg1})
	fake.registerCustomResourceDefinitionListerMutex.Unlock()
	if fake.RegisterCustomResourceDefinitionListerStub != nil {
		fake.RegisterCustomResourceDefinitionListerStub(arg1)
	}
}

func (fake *FakeAPIExtensionsV1beta1Lister) RegisterCustomResourceDefinitionListerCallCount() int {
	fake.registerCustomResourceDefinitionListerMutex.RLock()
	defer fake.registerCustomResourceDefinitionListerMutex.RUnlock()
	return len(fake.registerCustomResourceDefinitionListerArgsForCall)
}

func (fake *FakeAPIExtensionsV1beta1Lister) RegisterCustomResourceDefinitionListerCalls(stub func(v1beta1.CustomResourceDefinitionLister)) {
	fake.registerCustomResourceDefinitionListerMutex.Lock()
	defer fake.registerCustomResourceDefinitionListerMutex.Unlock()
	fake.RegisterCustomResourceDefinitionListerStub = stub
}

func (fake *FakeAPIExtensionsV1beta1Lister) RegisterCustomResourceDefinitionListerArgsForCall(i int) v1beta1.CustomResourceDefinitionLister {
	fake.registerCustomResourceDefinitionListerMutex.RLock()
	defer fake.registerCustomResourceDefinitionListerMutex.RUnlock()
	argsForCall := fake.registerCustomResourceDefinitionListerArgsForCall[i]
	return argsForCall.arg1
}

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

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