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

import (
	"context"
	"sync"

	"code.cloudfoundry.org/eirini/k8s/informers/task"
	v1 "k8s.io/api/core/v1"
)

type FakeReporter struct {
	ReportStub        func(context.Context, *v1.Pod) error
	reportMutex       sync.RWMutex
	reportArgsForCall []struct {
		arg1 context.Context
		arg2 *v1.Pod
	}
	reportReturns struct {
		result1 error
	}
	reportReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeReporter) Report(arg1 context.Context, arg2 *v1.Pod) error {
	fake.reportMutex.Lock()
	ret, specificReturn := fake.reportReturnsOnCall[len(fake.reportArgsForCall)]
	fake.reportArgsForCall = append(fake.reportArgsForCall, struct {
		arg1 context.Context
		arg2 *v1.Pod
	}{arg1, arg2})
	stub := fake.ReportStub
	fakeReturns := fake.reportReturns
	fake.recordInvocation("Report", []interface{}{arg1, arg2})
	fake.reportMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeReporter) ReportCallCount() int {
	fake.reportMutex.RLock()
	defer fake.reportMutex.RUnlock()
	return len(fake.reportArgsForCall)
}

func (fake *FakeReporter) ReportCalls(stub func(context.Context, *v1.Pod) error) {
	fake.reportMutex.Lock()
	defer fake.reportMutex.Unlock()
	fake.ReportStub = stub
}

func (fake *FakeReporter) ReportArgsForCall(i int) (context.Context, *v1.Pod) {
	fake.reportMutex.RLock()
	defer fake.reportMutex.RUnlock()
	argsForCall := fake.reportArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeReporter) ReportReturns(result1 error) {
	fake.reportMutex.Lock()
	defer fake.reportMutex.Unlock()
	fake.ReportStub = nil
	fake.reportReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeReporter) ReportReturnsOnCall(i int, result1 error) {
	fake.reportMutex.Lock()
	defer fake.reportMutex.Unlock()
	fake.ReportStub = nil
	if fake.reportReturnsOnCall == nil {
		fake.reportReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.reportReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeReporter) 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 _ task.Reporter = new(FakeReporter)
