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

import (
	"sync"

	"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorlister"
	v1 "k8s.io/client-go/listers/apps/v1"
)

type FakeAppsV1Lister struct {
	DeploymentListerStub        func() v1.DeploymentLister
	deploymentListerMutex       sync.RWMutex
	deploymentListerArgsForCall []struct {
	}
	deploymentListerReturns struct {
		result1 v1.DeploymentLister
	}
	deploymentListerReturnsOnCall map[int]struct {
		result1 v1.DeploymentLister
	}
	RegisterDeploymentListerStub        func(string, v1.DeploymentLister)
	registerDeploymentListerMutex       sync.RWMutex
	registerDeploymentListerArgsForCall []struct {
		arg1 string
		arg2 v1.DeploymentLister
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeAppsV1Lister) DeploymentLister() v1.DeploymentLister {
	fake.deploymentListerMutex.Lock()
	ret, specificReturn := fake.deploymentListerReturnsOnCall[len(fake.deploymentListerArgsForCall)]
	fake.deploymentListerArgsForCall = append(fake.deploymentListerArgsForCall, struct {
	}{})
	fake.recordInvocation("DeploymentLister", []interface{}{})
	fake.deploymentListerMutex.Unlock()
	if fake.DeploymentListerStub != nil {
		return fake.DeploymentListerStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.deploymentListerReturns
	return fakeReturns.result1
}

func (fake *FakeAppsV1Lister) DeploymentListerCallCount() int {
	fake.deploymentListerMutex.RLock()
	defer fake.deploymentListerMutex.RUnlock()
	return len(fake.deploymentListerArgsForCall)
}

func (fake *FakeAppsV1Lister) DeploymentListerCalls(stub func() v1.DeploymentLister) {
	fake.deploymentListerMutex.Lock()
	defer fake.deploymentListerMutex.Unlock()
	fake.DeploymentListerStub = stub
}

func (fake *FakeAppsV1Lister) DeploymentListerReturns(result1 v1.DeploymentLister) {
	fake.deploymentListerMutex.Lock()
	defer fake.deploymentListerMutex.Unlock()
	fake.DeploymentListerStub = nil
	fake.deploymentListerReturns = struct {
		result1 v1.DeploymentLister
	}{result1}
}

func (fake *FakeAppsV1Lister) DeploymentListerReturnsOnCall(i int, result1 v1.DeploymentLister) {
	fake.deploymentListerMutex.Lock()
	defer fake.deploymentListerMutex.Unlock()
	fake.DeploymentListerStub = nil
	if fake.deploymentListerReturnsOnCall == nil {
		fake.deploymentListerReturnsOnCall = make(map[int]struct {
			result1 v1.DeploymentLister
		})
	}
	fake.deploymentListerReturnsOnCall[i] = struct {
		result1 v1.DeploymentLister
	}{result1}
}

func (fake *FakeAppsV1Lister) RegisterDeploymentLister(arg1 string, arg2 v1.DeploymentLister) {
	fake.registerDeploymentListerMutex.Lock()
	fake.registerDeploymentListerArgsForCall = append(fake.registerDeploymentListerArgsForCall, struct {
		arg1 string
		arg2 v1.DeploymentLister
	}{arg1, arg2})
	fake.recordInvocation("RegisterDeploymentLister", []interface{}{arg1, arg2})
	fake.registerDeploymentListerMutex.Unlock()
	if fake.RegisterDeploymentListerStub != nil {
		fake.RegisterDeploymentListerStub(arg1, arg2)
	}
}

func (fake *FakeAppsV1Lister) RegisterDeploymentListerCallCount() int {
	fake.registerDeploymentListerMutex.RLock()
	defer fake.registerDeploymentListerMutex.RUnlock()
	return len(fake.registerDeploymentListerArgsForCall)
}

func (fake *FakeAppsV1Lister) RegisterDeploymentListerCalls(stub func(string, v1.DeploymentLister)) {
	fake.registerDeploymentListerMutex.Lock()
	defer fake.registerDeploymentListerMutex.Unlock()
	fake.RegisterDeploymentListerStub = stub
}

func (fake *FakeAppsV1Lister) RegisterDeploymentListerArgsForCall(i int) (string, v1.DeploymentLister) {
	fake.registerDeploymentListerMutex.RLock()
	defer fake.registerDeploymentListerMutex.RUnlock()
	argsForCall := fake.registerDeploymentListerArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

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

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