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

import (
	"sync"
	"time"

	"github.com/authzed/controller-idioms/queue"
)

type FakeInterface struct {
	DoneStub        func()
	doneMutex       sync.RWMutex
	doneArgsForCall []struct {
	}
	ErrorStub        func() error
	errorMutex       sync.RWMutex
	errorArgsForCall []struct {
	}
	errorReturns struct {
		result1 error
	}
	errorReturnsOnCall map[int]struct {
		result1 error
	}
	RequeueStub        func()
	requeueMutex       sync.RWMutex
	requeueArgsForCall []struct {
	}
	RequeueAPIErrStub        func(error)
	requeueAPIErrMutex       sync.RWMutex
	requeueAPIErrArgsForCall []struct {
		arg1 error
	}
	RequeueAfterStub        func(time.Duration)
	requeueAfterMutex       sync.RWMutex
	requeueAfterArgsForCall []struct {
		arg1 time.Duration
	}
	RequeueErrStub        func(error)
	requeueErrMutex       sync.RWMutex
	requeueErrArgsForCall []struct {
		arg1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeInterface) Done() {
	fake.doneMutex.Lock()
	fake.doneArgsForCall = append(fake.doneArgsForCall, struct {
	}{})
	stub := fake.DoneStub
	fake.recordInvocation("Done", []interface{}{})
	fake.doneMutex.Unlock()
	if stub != nil {
		fake.DoneStub()
	}
}

func (fake *FakeInterface) DoneCallCount() int {
	fake.doneMutex.RLock()
	defer fake.doneMutex.RUnlock()
	return len(fake.doneArgsForCall)
}

func (fake *FakeInterface) DoneCalls(stub func()) {
	fake.doneMutex.Lock()
	defer fake.doneMutex.Unlock()
	fake.DoneStub = stub
}

func (fake *FakeInterface) Error() error {
	fake.errorMutex.Lock()
	ret, specificReturn := fake.errorReturnsOnCall[len(fake.errorArgsForCall)]
	fake.errorArgsForCall = append(fake.errorArgsForCall, struct {
	}{})
	stub := fake.ErrorStub
	fakeReturns := fake.errorReturns
	fake.recordInvocation("Error", []interface{}{})
	fake.errorMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeInterface) ErrorCallCount() int {
	fake.errorMutex.RLock()
	defer fake.errorMutex.RUnlock()
	return len(fake.errorArgsForCall)
}

func (fake *FakeInterface) ErrorCalls(stub func() error) {
	fake.errorMutex.Lock()
	defer fake.errorMutex.Unlock()
	fake.ErrorStub = stub
}

func (fake *FakeInterface) ErrorReturns(result1 error) {
	fake.errorMutex.Lock()
	defer fake.errorMutex.Unlock()
	fake.ErrorStub = nil
	fake.errorReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeInterface) ErrorReturnsOnCall(i int, result1 error) {
	fake.errorMutex.Lock()
	defer fake.errorMutex.Unlock()
	fake.ErrorStub = nil
	if fake.errorReturnsOnCall == nil {
		fake.errorReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.errorReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeInterface) Requeue() {
	fake.requeueMutex.Lock()
	fake.requeueArgsForCall = append(fake.requeueArgsForCall, struct {
	}{})
	stub := fake.RequeueStub
	fake.recordInvocation("Requeue", []interface{}{})
	fake.requeueMutex.Unlock()
	if stub != nil {
		fake.RequeueStub()
	}
}

func (fake *FakeInterface) RequeueCallCount() int {
	fake.requeueMutex.RLock()
	defer fake.requeueMutex.RUnlock()
	return len(fake.requeueArgsForCall)
}

func (fake *FakeInterface) RequeueCalls(stub func()) {
	fake.requeueMutex.Lock()
	defer fake.requeueMutex.Unlock()
	fake.RequeueStub = stub
}

func (fake *FakeInterface) RequeueAPIErr(arg1 error) {
	fake.requeueAPIErrMutex.Lock()
	fake.requeueAPIErrArgsForCall = append(fake.requeueAPIErrArgsForCall, struct {
		arg1 error
	}{arg1})
	stub := fake.RequeueAPIErrStub
	fake.recordInvocation("RequeueAPIErr", []interface{}{arg1})
	fake.requeueAPIErrMutex.Unlock()
	if stub != nil {
		fake.RequeueAPIErrStub(arg1)
	}
}

func (fake *FakeInterface) RequeueAPIErrCallCount() int {
	fake.requeueAPIErrMutex.RLock()
	defer fake.requeueAPIErrMutex.RUnlock()
	return len(fake.requeueAPIErrArgsForCall)
}

func (fake *FakeInterface) RequeueAPIErrCalls(stub func(error)) {
	fake.requeueAPIErrMutex.Lock()
	defer fake.requeueAPIErrMutex.Unlock()
	fake.RequeueAPIErrStub = stub
}

func (fake *FakeInterface) RequeueAPIErrArgsForCall(i int) error {
	fake.requeueAPIErrMutex.RLock()
	defer fake.requeueAPIErrMutex.RUnlock()
	argsForCall := fake.requeueAPIErrArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeInterface) RequeueAfter(arg1 time.Duration) {
	fake.requeueAfterMutex.Lock()
	fake.requeueAfterArgsForCall = append(fake.requeueAfterArgsForCall, struct {
		arg1 time.Duration
	}{arg1})
	stub := fake.RequeueAfterStub
	fake.recordInvocation("RequeueAfter", []interface{}{arg1})
	fake.requeueAfterMutex.Unlock()
	if stub != nil {
		fake.RequeueAfterStub(arg1)
	}
}

func (fake *FakeInterface) RequeueAfterCallCount() int {
	fake.requeueAfterMutex.RLock()
	defer fake.requeueAfterMutex.RUnlock()
	return len(fake.requeueAfterArgsForCall)
}

func (fake *FakeInterface) RequeueAfterCalls(stub func(time.Duration)) {
	fake.requeueAfterMutex.Lock()
	defer fake.requeueAfterMutex.Unlock()
	fake.RequeueAfterStub = stub
}

func (fake *FakeInterface) RequeueAfterArgsForCall(i int) time.Duration {
	fake.requeueAfterMutex.RLock()
	defer fake.requeueAfterMutex.RUnlock()
	argsForCall := fake.requeueAfterArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeInterface) RequeueErr(arg1 error) {
	fake.requeueErrMutex.Lock()
	fake.requeueErrArgsForCall = append(fake.requeueErrArgsForCall, struct {
		arg1 error
	}{arg1})
	stub := fake.RequeueErrStub
	fake.recordInvocation("RequeueErr", []interface{}{arg1})
	fake.requeueErrMutex.Unlock()
	if stub != nil {
		fake.RequeueErrStub(arg1)
	}
}

func (fake *FakeInterface) RequeueErrCallCount() int {
	fake.requeueErrMutex.RLock()
	defer fake.requeueErrMutex.RUnlock()
	return len(fake.requeueErrArgsForCall)
}

func (fake *FakeInterface) RequeueErrCalls(stub func(error)) {
	fake.requeueErrMutex.Lock()
	defer fake.requeueErrMutex.Unlock()
	fake.RequeueErrStub = stub
}

func (fake *FakeInterface) RequeueErrArgsForCall(i int) error {
	fake.requeueErrMutex.RLock()
	defer fake.requeueErrMutex.RUnlock()
	argsForCall := fake.requeueErrArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeInterface) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.doneMutex.RLock()
	defer fake.doneMutex.RUnlock()
	fake.errorMutex.RLock()
	defer fake.errorMutex.RUnlock()
	fake.requeueMutex.RLock()
	defer fake.requeueMutex.RUnlock()
	fake.requeueAPIErrMutex.RLock()
	defer fake.requeueAPIErrMutex.RUnlock()
	fake.requeueAfterMutex.RLock()
	defer fake.requeueAfterMutex.RUnlock()
	fake.requeueErrMutex.RLock()
	defer fake.requeueErrMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeInterface) 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 _ queue.Interface = new(FakeInterface)
