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

import (
	"context"
	"sync"

	"github.com/weaveworks/eksctl/pkg/ctl/cmdutils/filter"
)

type FakeAccessEntryLister struct {
	ListAccessEntryStackNamesStub        func(context.Context, string) ([]string, error)
	listAccessEntryStackNamesMutex       sync.RWMutex
	listAccessEntryStackNamesArgsForCall []struct {
		arg1 context.Context
		arg2 string
	}
	listAccessEntryStackNamesReturns struct {
		result1 []string
		result2 error
	}
	listAccessEntryStackNamesReturnsOnCall map[int]struct {
		result1 []string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeAccessEntryLister) ListAccessEntryStackNames(arg1 context.Context, arg2 string) ([]string, error) {
	fake.listAccessEntryStackNamesMutex.Lock()
	ret, specificReturn := fake.listAccessEntryStackNamesReturnsOnCall[len(fake.listAccessEntryStackNamesArgsForCall)]
	fake.listAccessEntryStackNamesArgsForCall = append(fake.listAccessEntryStackNamesArgsForCall, struct {
		arg1 context.Context
		arg2 string
	}{arg1, arg2})
	stub := fake.ListAccessEntryStackNamesStub
	fakeReturns := fake.listAccessEntryStackNamesReturns
	fake.recordInvocation("ListAccessEntryStackNames", []interface{}{arg1, arg2})
	fake.listAccessEntryStackNamesMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeAccessEntryLister) ListAccessEntryStackNamesCallCount() int {
	fake.listAccessEntryStackNamesMutex.RLock()
	defer fake.listAccessEntryStackNamesMutex.RUnlock()
	return len(fake.listAccessEntryStackNamesArgsForCall)
}

func (fake *FakeAccessEntryLister) ListAccessEntryStackNamesCalls(stub func(context.Context, string) ([]string, error)) {
	fake.listAccessEntryStackNamesMutex.Lock()
	defer fake.listAccessEntryStackNamesMutex.Unlock()
	fake.ListAccessEntryStackNamesStub = stub
}

func (fake *FakeAccessEntryLister) ListAccessEntryStackNamesArgsForCall(i int) (context.Context, string) {
	fake.listAccessEntryStackNamesMutex.RLock()
	defer fake.listAccessEntryStackNamesMutex.RUnlock()
	argsForCall := fake.listAccessEntryStackNamesArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeAccessEntryLister) ListAccessEntryStackNamesReturns(result1 []string, result2 error) {
	fake.listAccessEntryStackNamesMutex.Lock()
	defer fake.listAccessEntryStackNamesMutex.Unlock()
	fake.ListAccessEntryStackNamesStub = nil
	fake.listAccessEntryStackNamesReturns = struct {
		result1 []string
		result2 error
	}{result1, result2}
}

func (fake *FakeAccessEntryLister) ListAccessEntryStackNamesReturnsOnCall(i int, result1 []string, result2 error) {
	fake.listAccessEntryStackNamesMutex.Lock()
	defer fake.listAccessEntryStackNamesMutex.Unlock()
	fake.ListAccessEntryStackNamesStub = nil
	if fake.listAccessEntryStackNamesReturnsOnCall == nil {
		fake.listAccessEntryStackNamesReturnsOnCall = make(map[int]struct {
			result1 []string
			result2 error
		})
	}
	fake.listAccessEntryStackNamesReturnsOnCall[i] = struct {
		result1 []string
		result2 error
	}{result1, result2}
}

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

func (fake *FakeAccessEntryLister) 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 _ filter.AccessEntryLister = new(FakeAccessEntryLister)
