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

import (
	sync "sync"

	v1alpha2 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/listers/operators/v1alpha2"
	operatorlister "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorlister"
)

type FakeOperatorsV1alpha2Lister struct {
	OperatorGroupListerStub        func() v1alpha2.OperatorGroupLister
	operatorGroupListerMutex       sync.RWMutex
	operatorGroupListerArgsForCall []struct {
	}
	operatorGroupListerReturns struct {
		result1 v1alpha2.OperatorGroupLister
	}
	operatorGroupListerReturnsOnCall map[int]struct {
		result1 v1alpha2.OperatorGroupLister
	}
	RegisterOperatorGroupListerStub        func(string, v1alpha2.OperatorGroupLister)
	registerOperatorGroupListerMutex       sync.RWMutex
	registerOperatorGroupListerArgsForCall []struct {
		arg1 string
		arg2 v1alpha2.OperatorGroupLister
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeOperatorsV1alpha2Lister) OperatorGroupLister() v1alpha2.OperatorGroupLister {
	fake.operatorGroupListerMutex.Lock()
	ret, specificReturn := fake.operatorGroupListerReturnsOnCall[len(fake.operatorGroupListerArgsForCall)]
	fake.operatorGroupListerArgsForCall = append(fake.operatorGroupListerArgsForCall, struct {
	}{})
	fake.recordInvocation("OperatorGroupLister", []interface{}{})
	fake.operatorGroupListerMutex.Unlock()
	if fake.OperatorGroupListerStub != nil {
		return fake.OperatorGroupListerStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.operatorGroupListerReturns
	return fakeReturns.result1
}

func (fake *FakeOperatorsV1alpha2Lister) OperatorGroupListerCallCount() int {
	fake.operatorGroupListerMutex.RLock()
	defer fake.operatorGroupListerMutex.RUnlock()
	return len(fake.operatorGroupListerArgsForCall)
}

func (fake *FakeOperatorsV1alpha2Lister) OperatorGroupListerCalls(stub func() v1alpha2.OperatorGroupLister) {
	fake.operatorGroupListerMutex.Lock()
	defer fake.operatorGroupListerMutex.Unlock()
	fake.OperatorGroupListerStub = stub
}

func (fake *FakeOperatorsV1alpha2Lister) OperatorGroupListerReturns(result1 v1alpha2.OperatorGroupLister) {
	fake.operatorGroupListerMutex.Lock()
	defer fake.operatorGroupListerMutex.Unlock()
	fake.OperatorGroupListerStub = nil
	fake.operatorGroupListerReturns = struct {
		result1 v1alpha2.OperatorGroupLister
	}{result1}
}

func (fake *FakeOperatorsV1alpha2Lister) OperatorGroupListerReturnsOnCall(i int, result1 v1alpha2.OperatorGroupLister) {
	fake.operatorGroupListerMutex.Lock()
	defer fake.operatorGroupListerMutex.Unlock()
	fake.OperatorGroupListerStub = nil
	if fake.operatorGroupListerReturnsOnCall == nil {
		fake.operatorGroupListerReturnsOnCall = make(map[int]struct {
			result1 v1alpha2.OperatorGroupLister
		})
	}
	fake.operatorGroupListerReturnsOnCall[i] = struct {
		result1 v1alpha2.OperatorGroupLister
	}{result1}
}

func (fake *FakeOperatorsV1alpha2Lister) RegisterOperatorGroupLister(arg1 string, arg2 v1alpha2.OperatorGroupLister) {
	fake.registerOperatorGroupListerMutex.Lock()
	fake.registerOperatorGroupListerArgsForCall = append(fake.registerOperatorGroupListerArgsForCall, struct {
		arg1 string
		arg2 v1alpha2.OperatorGroupLister
	}{arg1, arg2})
	fake.recordInvocation("RegisterOperatorGroupLister", []interface{}{arg1, arg2})
	fake.registerOperatorGroupListerMutex.Unlock()
	if fake.RegisterOperatorGroupListerStub != nil {
		fake.RegisterOperatorGroupListerStub(arg1, arg2)
	}
}

func (fake *FakeOperatorsV1alpha2Lister) RegisterOperatorGroupListerCallCount() int {
	fake.registerOperatorGroupListerMutex.RLock()
	defer fake.registerOperatorGroupListerMutex.RUnlock()
	return len(fake.registerOperatorGroupListerArgsForCall)
}

func (fake *FakeOperatorsV1alpha2Lister) RegisterOperatorGroupListerCalls(stub func(string, v1alpha2.OperatorGroupLister)) {
	fake.registerOperatorGroupListerMutex.Lock()
	defer fake.registerOperatorGroupListerMutex.Unlock()
	fake.RegisterOperatorGroupListerStub = stub
}

func (fake *FakeOperatorsV1alpha2Lister) RegisterOperatorGroupListerArgsForCall(i int) (string, v1alpha2.OperatorGroupLister) {
	fake.registerOperatorGroupListerMutex.RLock()
	defer fake.registerOperatorGroupListerMutex.RUnlock()
	argsForCall := fake.registerOperatorGroupListerArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

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

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