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

import (
	"context"
	"sync"

	"code.cloudfoundry.org/korifi/job-task-runner/controllers"
	v1a "k8s.io/api/batch/v1"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type TaskStatusGetter struct {
	GetStatusConditionsStub        func(context.Context, *v1a.Job) ([]v1.Condition, error)
	getStatusConditionsMutex       sync.RWMutex
	getStatusConditionsArgsForCall []struct {
		arg1 context.Context
		arg2 *v1a.Job
	}
	getStatusConditionsReturns struct {
		result1 []v1.Condition
		result2 error
	}
	getStatusConditionsReturnsOnCall map[int]struct {
		result1 []v1.Condition
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *TaskStatusGetter) GetStatusConditions(arg1 context.Context, arg2 *v1a.Job) ([]v1.Condition, error) {
	fake.getStatusConditionsMutex.Lock()
	ret, specificReturn := fake.getStatusConditionsReturnsOnCall[len(fake.getStatusConditionsArgsForCall)]
	fake.getStatusConditionsArgsForCall = append(fake.getStatusConditionsArgsForCall, struct {
		arg1 context.Context
		arg2 *v1a.Job
	}{arg1, arg2})
	stub := fake.GetStatusConditionsStub
	fakeReturns := fake.getStatusConditionsReturns
	fake.recordInvocation("GetStatusConditions", []interface{}{arg1, arg2})
	fake.getStatusConditionsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *TaskStatusGetter) GetStatusConditionsCallCount() int {
	fake.getStatusConditionsMutex.RLock()
	defer fake.getStatusConditionsMutex.RUnlock()
	return len(fake.getStatusConditionsArgsForCall)
}

func (fake *TaskStatusGetter) GetStatusConditionsCalls(stub func(context.Context, *v1a.Job) ([]v1.Condition, error)) {
	fake.getStatusConditionsMutex.Lock()
	defer fake.getStatusConditionsMutex.Unlock()
	fake.GetStatusConditionsStub = stub
}

func (fake *TaskStatusGetter) GetStatusConditionsArgsForCall(i int) (context.Context, *v1a.Job) {
	fake.getStatusConditionsMutex.RLock()
	defer fake.getStatusConditionsMutex.RUnlock()
	argsForCall := fake.getStatusConditionsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *TaskStatusGetter) GetStatusConditionsReturns(result1 []v1.Condition, result2 error) {
	fake.getStatusConditionsMutex.Lock()
	defer fake.getStatusConditionsMutex.Unlock()
	fake.GetStatusConditionsStub = nil
	fake.getStatusConditionsReturns = struct {
		result1 []v1.Condition
		result2 error
	}{result1, result2}
}

func (fake *TaskStatusGetter) GetStatusConditionsReturnsOnCall(i int, result1 []v1.Condition, result2 error) {
	fake.getStatusConditionsMutex.Lock()
	defer fake.getStatusConditionsMutex.Unlock()
	fake.GetStatusConditionsStub = nil
	if fake.getStatusConditionsReturnsOnCall == nil {
		fake.getStatusConditionsReturnsOnCall = make(map[int]struct {
			result1 []v1.Condition
			result2 error
		})
	}
	fake.getStatusConditionsReturnsOnCall[i] = struct {
		result1 []v1.Condition
		result2 error
	}{result1, result2}
}

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

func (fake *TaskStatusGetter) 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 _ controllers.TaskStatusGetter = new(TaskStatusGetter)
