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

import (
	"sync"

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

type FakeOperatorsV2Lister struct {
	OperatorConditionListerStub        func() v2.OperatorConditionLister
	operatorConditionListerMutex       sync.RWMutex
	operatorConditionListerArgsForCall []struct {
	}
	operatorConditionListerReturns struct {
		result1 v2.OperatorConditionLister
	}
	operatorConditionListerReturnsOnCall map[int]struct {
		result1 v2.OperatorConditionLister
	}
	RegisterOperatorConditionListerStub        func(string, v2.OperatorConditionLister)
	registerOperatorConditionListerMutex       sync.RWMutex
	registerOperatorConditionListerArgsForCall []struct {
		arg1 string
		arg2 v2.OperatorConditionLister
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeOperatorsV2Lister) OperatorConditionLister() v2.OperatorConditionLister {
	fake.operatorConditionListerMutex.Lock()
	ret, specificReturn := fake.operatorConditionListerReturnsOnCall[len(fake.operatorConditionListerArgsForCall)]
	fake.operatorConditionListerArgsForCall = append(fake.operatorConditionListerArgsForCall, struct {
	}{})
	fake.recordInvocation("OperatorConditionLister", []interface{}{})
	fake.operatorConditionListerMutex.Unlock()
	if fake.OperatorConditionListerStub != nil {
		return fake.OperatorConditionListerStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.operatorConditionListerReturns
	return fakeReturns.result1
}

func (fake *FakeOperatorsV2Lister) OperatorConditionListerCallCount() int {
	fake.operatorConditionListerMutex.RLock()
	defer fake.operatorConditionListerMutex.RUnlock()
	return len(fake.operatorConditionListerArgsForCall)
}

func (fake *FakeOperatorsV2Lister) OperatorConditionListerCalls(stub func() v2.OperatorConditionLister) {
	fake.operatorConditionListerMutex.Lock()
	defer fake.operatorConditionListerMutex.Unlock()
	fake.OperatorConditionListerStub = stub
}

func (fake *FakeOperatorsV2Lister) OperatorConditionListerReturns(result1 v2.OperatorConditionLister) {
	fake.operatorConditionListerMutex.Lock()
	defer fake.operatorConditionListerMutex.Unlock()
	fake.OperatorConditionListerStub = nil
	fake.operatorConditionListerReturns = struct {
		result1 v2.OperatorConditionLister
	}{result1}
}

func (fake *FakeOperatorsV2Lister) OperatorConditionListerReturnsOnCall(i int, result1 v2.OperatorConditionLister) {
	fake.operatorConditionListerMutex.Lock()
	defer fake.operatorConditionListerMutex.Unlock()
	fake.OperatorConditionListerStub = nil
	if fake.operatorConditionListerReturnsOnCall == nil {
		fake.operatorConditionListerReturnsOnCall = make(map[int]struct {
			result1 v2.OperatorConditionLister
		})
	}
	fake.operatorConditionListerReturnsOnCall[i] = struct {
		result1 v2.OperatorConditionLister
	}{result1}
}

func (fake *FakeOperatorsV2Lister) RegisterOperatorConditionLister(arg1 string, arg2 v2.OperatorConditionLister) {
	fake.registerOperatorConditionListerMutex.Lock()
	fake.registerOperatorConditionListerArgsForCall = append(fake.registerOperatorConditionListerArgsForCall, struct {
		arg1 string
		arg2 v2.OperatorConditionLister
	}{arg1, arg2})
	fake.recordInvocation("RegisterOperatorConditionLister", []interface{}{arg1, arg2})
	fake.registerOperatorConditionListerMutex.Unlock()
	if fake.RegisterOperatorConditionListerStub != nil {
		fake.RegisterOperatorConditionListerStub(arg1, arg2)
	}
}

func (fake *FakeOperatorsV2Lister) RegisterOperatorConditionListerCallCount() int {
	fake.registerOperatorConditionListerMutex.RLock()
	defer fake.registerOperatorConditionListerMutex.RUnlock()
	return len(fake.registerOperatorConditionListerArgsForCall)
}

func (fake *FakeOperatorsV2Lister) RegisterOperatorConditionListerCalls(stub func(string, v2.OperatorConditionLister)) {
	fake.registerOperatorConditionListerMutex.Lock()
	defer fake.registerOperatorConditionListerMutex.Unlock()
	fake.RegisterOperatorConditionListerStub = stub
}

func (fake *FakeOperatorsV2Lister) RegisterOperatorConditionListerArgsForCall(i int) (string, v2.OperatorConditionLister) {
	fake.registerOperatorConditionListerMutex.RLock()
	defer fake.registerOperatorConditionListerMutex.RUnlock()
	argsForCall := fake.registerOperatorConditionListerArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

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

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