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

import (
	"sync"

	v1a "k8s.io/api/rbac/v1"
	"k8s.io/apimachinery/pkg/labels"
	v1 "k8s.io/client-go/listers/rbac/v1"
)

type FakeRoleBindingNamespaceLister struct {
	GetStub        func(string) (*v1a.RoleBinding, error)
	getMutex       sync.RWMutex
	getArgsForCall []struct {
		arg1 string
	}
	getReturns struct {
		result1 *v1a.RoleBinding
		result2 error
	}
	getReturnsOnCall map[int]struct {
		result1 *v1a.RoleBinding
		result2 error
	}
	ListStub        func(labels.Selector) ([]*v1a.RoleBinding, error)
	listMutex       sync.RWMutex
	listArgsForCall []struct {
		arg1 labels.Selector
	}
	listReturns struct {
		result1 []*v1a.RoleBinding
		result2 error
	}
	listReturnsOnCall map[int]struct {
		result1 []*v1a.RoleBinding
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeRoleBindingNamespaceLister) Get(arg1 string) (*v1a.RoleBinding, error) {
	fake.getMutex.Lock()
	ret, specificReturn := fake.getReturnsOnCall[len(fake.getArgsForCall)]
	fake.getArgsForCall = append(fake.getArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("Get", []interface{}{arg1})
	fake.getMutex.Unlock()
	if fake.GetStub != nil {
		return fake.GetStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.getReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeRoleBindingNamespaceLister) GetCallCount() int {
	fake.getMutex.RLock()
	defer fake.getMutex.RUnlock()
	return len(fake.getArgsForCall)
}

func (fake *FakeRoleBindingNamespaceLister) GetCalls(stub func(string) (*v1a.RoleBinding, error)) {
	fake.getMutex.Lock()
	defer fake.getMutex.Unlock()
	fake.GetStub = stub
}

func (fake *FakeRoleBindingNamespaceLister) GetArgsForCall(i int) string {
	fake.getMutex.RLock()
	defer fake.getMutex.RUnlock()
	argsForCall := fake.getArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeRoleBindingNamespaceLister) GetReturns(result1 *v1a.RoleBinding, result2 error) {
	fake.getMutex.Lock()
	defer fake.getMutex.Unlock()
	fake.GetStub = nil
	fake.getReturns = struct {
		result1 *v1a.RoleBinding
		result2 error
	}{result1, result2}
}

func (fake *FakeRoleBindingNamespaceLister) GetReturnsOnCall(i int, result1 *v1a.RoleBinding, result2 error) {
	fake.getMutex.Lock()
	defer fake.getMutex.Unlock()
	fake.GetStub = nil
	if fake.getReturnsOnCall == nil {
		fake.getReturnsOnCall = make(map[int]struct {
			result1 *v1a.RoleBinding
			result2 error
		})
	}
	fake.getReturnsOnCall[i] = struct {
		result1 *v1a.RoleBinding
		result2 error
	}{result1, result2}
}

func (fake *FakeRoleBindingNamespaceLister) List(arg1 labels.Selector) ([]*v1a.RoleBinding, error) {
	fake.listMutex.Lock()
	ret, specificReturn := fake.listReturnsOnCall[len(fake.listArgsForCall)]
	fake.listArgsForCall = append(fake.listArgsForCall, struct {
		arg1 labels.Selector
	}{arg1})
	fake.recordInvocation("List", []interface{}{arg1})
	fake.listMutex.Unlock()
	if fake.ListStub != nil {
		return fake.ListStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.listReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeRoleBindingNamespaceLister) ListCallCount() int {
	fake.listMutex.RLock()
	defer fake.listMutex.RUnlock()
	return len(fake.listArgsForCall)
}

func (fake *FakeRoleBindingNamespaceLister) ListCalls(stub func(labels.Selector) ([]*v1a.RoleBinding, error)) {
	fake.listMutex.Lock()
	defer fake.listMutex.Unlock()
	fake.ListStub = stub
}

func (fake *FakeRoleBindingNamespaceLister) ListArgsForCall(i int) labels.Selector {
	fake.listMutex.RLock()
	defer fake.listMutex.RUnlock()
	argsForCall := fake.listArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeRoleBindingNamespaceLister) ListReturns(result1 []*v1a.RoleBinding, result2 error) {
	fake.listMutex.Lock()
	defer fake.listMutex.Unlock()
	fake.ListStub = nil
	fake.listReturns = struct {
		result1 []*v1a.RoleBinding
		result2 error
	}{result1, result2}
}

func (fake *FakeRoleBindingNamespaceLister) ListReturnsOnCall(i int, result1 []*v1a.RoleBinding, result2 error) {
	fake.listMutex.Lock()
	defer fake.listMutex.Unlock()
	fake.ListStub = nil
	if fake.listReturnsOnCall == nil {
		fake.listReturnsOnCall = make(map[int]struct {
			result1 []*v1a.RoleBinding
			result2 error
		})
	}
	fake.listReturnsOnCall[i] = struct {
		result1 []*v1a.RoleBinding
		result2 error
	}{result1, result2}
}

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

func (fake *FakeRoleBindingNamespaceLister) 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 _ v1.RoleBindingNamespaceLister = new(FakeRoleBindingNamespaceLister)
