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

import (
	"sync"

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

type FakeServiceLister struct {
	ListStub        func(labels.Selector) ([]*v1a.Service, error)
	listMutex       sync.RWMutex
	listArgsForCall []struct {
		arg1 labels.Selector
	}
	listReturns struct {
		result1 []*v1a.Service
		result2 error
	}
	listReturnsOnCall map[int]struct {
		result1 []*v1a.Service
		result2 error
	}
	ServicesStub        func(string) v1.ServiceNamespaceLister
	servicesMutex       sync.RWMutex
	servicesArgsForCall []struct {
		arg1 string
	}
	servicesReturns struct {
		result1 v1.ServiceNamespaceLister
	}
	servicesReturnsOnCall map[int]struct {
		result1 v1.ServiceNamespaceLister
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeServiceLister) List(arg1 labels.Selector) ([]*v1a.Service, 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 *FakeServiceLister) ListCallCount() int {
	fake.listMutex.RLock()
	defer fake.listMutex.RUnlock()
	return len(fake.listArgsForCall)
}

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

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

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

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

func (fake *FakeServiceLister) Services(arg1 string) v1.ServiceNamespaceLister {
	fake.servicesMutex.Lock()
	ret, specificReturn := fake.servicesReturnsOnCall[len(fake.servicesArgsForCall)]
	fake.servicesArgsForCall = append(fake.servicesArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("Services", []interface{}{arg1})
	fake.servicesMutex.Unlock()
	if fake.ServicesStub != nil {
		return fake.ServicesStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.servicesReturns
	return fakeReturns.result1
}

func (fake *FakeServiceLister) ServicesCallCount() int {
	fake.servicesMutex.RLock()
	defer fake.servicesMutex.RUnlock()
	return len(fake.servicesArgsForCall)
}

func (fake *FakeServiceLister) ServicesCalls(stub func(string) v1.ServiceNamespaceLister) {
	fake.servicesMutex.Lock()
	defer fake.servicesMutex.Unlock()
	fake.ServicesStub = stub
}

func (fake *FakeServiceLister) ServicesArgsForCall(i int) string {
	fake.servicesMutex.RLock()
	defer fake.servicesMutex.RUnlock()
	argsForCall := fake.servicesArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeServiceLister) ServicesReturns(result1 v1.ServiceNamespaceLister) {
	fake.servicesMutex.Lock()
	defer fake.servicesMutex.Unlock()
	fake.ServicesStub = nil
	fake.servicesReturns = struct {
		result1 v1.ServiceNamespaceLister
	}{result1}
}

func (fake *FakeServiceLister) ServicesReturnsOnCall(i int, result1 v1.ServiceNamespaceLister) {
	fake.servicesMutex.Lock()
	defer fake.servicesMutex.Unlock()
	fake.ServicesStub = nil
	if fake.servicesReturnsOnCall == nil {
		fake.servicesReturnsOnCall = make(map[int]struct {
			result1 v1.ServiceNamespaceLister
		})
	}
	fake.servicesReturnsOnCall[i] = struct {
		result1 v1.ServiceNamespaceLister
	}{result1}
}

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

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