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

import (
	"context"
	"sync"

	"github.com/ehsaniara/joblet/internal/joblet/core/interfaces"
	"github.com/ehsaniara/joblet/internal/joblet/domain"
)

type FakeJoblet struct {
	DeleteAllJobsStub        func(context.Context, interfaces.DeleteAllJobsRequest) (*interfaces.DeleteAllJobsResponse, error)
	deleteAllJobsMutex       sync.RWMutex
	deleteAllJobsArgsForCall []struct {
		arg1 context.Context
		arg2 interfaces.DeleteAllJobsRequest
	}
	deleteAllJobsReturns struct {
		result1 *interfaces.DeleteAllJobsResponse
		result2 error
	}
	deleteAllJobsReturnsOnCall map[int]struct {
		result1 *interfaces.DeleteAllJobsResponse
		result2 error
	}
	DeleteJobStub        func(context.Context, interfaces.DeleteJobRequest) error
	deleteJobMutex       sync.RWMutex
	deleteJobArgsForCall []struct {
		arg1 context.Context
		arg2 interfaces.DeleteJobRequest
	}
	deleteJobReturns struct {
		result1 error
	}
	deleteJobReturnsOnCall map[int]struct {
		result1 error
	}
	ExecuteScheduledJobStub        func(context.Context, interfaces.ExecuteScheduledJobRequest) error
	executeScheduledJobMutex       sync.RWMutex
	executeScheduledJobArgsForCall []struct {
		arg1 context.Context
		arg2 interfaces.ExecuteScheduledJobRequest
	}
	executeScheduledJobReturns struct {
		result1 error
	}
	executeScheduledJobReturnsOnCall map[int]struct {
		result1 error
	}
	RecoverScheduledJobsStub        func([]*domain.Job) (int, int)
	recoverScheduledJobsMutex       sync.RWMutex
	recoverScheduledJobsArgsForCall []struct {
		arg1 []*domain.Job
	}
	recoverScheduledJobsReturns struct {
		result1 int
		result2 int
	}
	recoverScheduledJobsReturnsOnCall map[int]struct {
		result1 int
		result2 int
	}
	SetTelematicsMonitorStub        func(interfaces.TelematicsMonitor)
	setTelematicsMonitorMutex       sync.RWMutex
	setTelematicsMonitorArgsForCall []struct {
		arg1 interfaces.TelematicsMonitor
	}
	StartJobStub        func(context.Context, interfaces.StartJobRequest) (*domain.Job, error)
	startJobMutex       sync.RWMutex
	startJobArgsForCall []struct {
		arg1 context.Context
		arg2 interfaces.StartJobRequest
	}
	startJobReturns struct {
		result1 *domain.Job
		result2 error
	}
	startJobReturnsOnCall map[int]struct {
		result1 *domain.Job
		result2 error
	}
	StopJobStub        func(context.Context, interfaces.StopJobRequest) error
	stopJobMutex       sync.RWMutex
	stopJobArgsForCall []struct {
		arg1 context.Context
		arg2 interfaces.StopJobRequest
	}
	stopJobReturns struct {
		result1 error
	}
	stopJobReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeJoblet) DeleteAllJobs(arg1 context.Context, arg2 interfaces.DeleteAllJobsRequest) (*interfaces.DeleteAllJobsResponse, error) {
	fake.deleteAllJobsMutex.Lock()
	ret, specificReturn := fake.deleteAllJobsReturnsOnCall[len(fake.deleteAllJobsArgsForCall)]
	fake.deleteAllJobsArgsForCall = append(fake.deleteAllJobsArgsForCall, struct {
		arg1 context.Context
		arg2 interfaces.DeleteAllJobsRequest
	}{arg1, arg2})
	stub := fake.DeleteAllJobsStub
	fakeReturns := fake.deleteAllJobsReturns
	fake.recordInvocation("DeleteAllJobs", []interface{}{arg1, arg2})
	fake.deleteAllJobsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeJoblet) DeleteAllJobsCallCount() int {
	fake.deleteAllJobsMutex.RLock()
	defer fake.deleteAllJobsMutex.RUnlock()
	return len(fake.deleteAllJobsArgsForCall)
}

func (fake *FakeJoblet) DeleteAllJobsCalls(stub func(context.Context, interfaces.DeleteAllJobsRequest) (*interfaces.DeleteAllJobsResponse, error)) {
	fake.deleteAllJobsMutex.Lock()
	defer fake.deleteAllJobsMutex.Unlock()
	fake.DeleteAllJobsStub = stub
}

func (fake *FakeJoblet) DeleteAllJobsArgsForCall(i int) (context.Context, interfaces.DeleteAllJobsRequest) {
	fake.deleteAllJobsMutex.RLock()
	defer fake.deleteAllJobsMutex.RUnlock()
	argsForCall := fake.deleteAllJobsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeJoblet) DeleteAllJobsReturns(result1 *interfaces.DeleteAllJobsResponse, result2 error) {
	fake.deleteAllJobsMutex.Lock()
	defer fake.deleteAllJobsMutex.Unlock()
	fake.DeleteAllJobsStub = nil
	fake.deleteAllJobsReturns = struct {
		result1 *interfaces.DeleteAllJobsResponse
		result2 error
	}{result1, result2}
}

func (fake *FakeJoblet) DeleteAllJobsReturnsOnCall(i int, result1 *interfaces.DeleteAllJobsResponse, result2 error) {
	fake.deleteAllJobsMutex.Lock()
	defer fake.deleteAllJobsMutex.Unlock()
	fake.DeleteAllJobsStub = nil
	if fake.deleteAllJobsReturnsOnCall == nil {
		fake.deleteAllJobsReturnsOnCall = make(map[int]struct {
			result1 *interfaces.DeleteAllJobsResponse
			result2 error
		})
	}
	fake.deleteAllJobsReturnsOnCall[i] = struct {
		result1 *interfaces.DeleteAllJobsResponse
		result2 error
	}{result1, result2}
}

func (fake *FakeJoblet) DeleteJob(arg1 context.Context, arg2 interfaces.DeleteJobRequest) error {
	fake.deleteJobMutex.Lock()
	ret, specificReturn := fake.deleteJobReturnsOnCall[len(fake.deleteJobArgsForCall)]
	fake.deleteJobArgsForCall = append(fake.deleteJobArgsForCall, struct {
		arg1 context.Context
		arg2 interfaces.DeleteJobRequest
	}{arg1, arg2})
	stub := fake.DeleteJobStub
	fakeReturns := fake.deleteJobReturns
	fake.recordInvocation("DeleteJob", []interface{}{arg1, arg2})
	fake.deleteJobMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJoblet) DeleteJobCallCount() int {
	fake.deleteJobMutex.RLock()
	defer fake.deleteJobMutex.RUnlock()
	return len(fake.deleteJobArgsForCall)
}

func (fake *FakeJoblet) DeleteJobCalls(stub func(context.Context, interfaces.DeleteJobRequest) error) {
	fake.deleteJobMutex.Lock()
	defer fake.deleteJobMutex.Unlock()
	fake.DeleteJobStub = stub
}

func (fake *FakeJoblet) DeleteJobArgsForCall(i int) (context.Context, interfaces.DeleteJobRequest) {
	fake.deleteJobMutex.RLock()
	defer fake.deleteJobMutex.RUnlock()
	argsForCall := fake.deleteJobArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeJoblet) DeleteJobReturns(result1 error) {
	fake.deleteJobMutex.Lock()
	defer fake.deleteJobMutex.Unlock()
	fake.DeleteJobStub = nil
	fake.deleteJobReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJoblet) DeleteJobReturnsOnCall(i int, result1 error) {
	fake.deleteJobMutex.Lock()
	defer fake.deleteJobMutex.Unlock()
	fake.DeleteJobStub = nil
	if fake.deleteJobReturnsOnCall == nil {
		fake.deleteJobReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.deleteJobReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJoblet) ExecuteScheduledJob(arg1 context.Context, arg2 interfaces.ExecuteScheduledJobRequest) error {
	fake.executeScheduledJobMutex.Lock()
	ret, specificReturn := fake.executeScheduledJobReturnsOnCall[len(fake.executeScheduledJobArgsForCall)]
	fake.executeScheduledJobArgsForCall = append(fake.executeScheduledJobArgsForCall, struct {
		arg1 context.Context
		arg2 interfaces.ExecuteScheduledJobRequest
	}{arg1, arg2})
	stub := fake.ExecuteScheduledJobStub
	fakeReturns := fake.executeScheduledJobReturns
	fake.recordInvocation("ExecuteScheduledJob", []interface{}{arg1, arg2})
	fake.executeScheduledJobMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJoblet) ExecuteScheduledJobCallCount() int {
	fake.executeScheduledJobMutex.RLock()
	defer fake.executeScheduledJobMutex.RUnlock()
	return len(fake.executeScheduledJobArgsForCall)
}

func (fake *FakeJoblet) ExecuteScheduledJobCalls(stub func(context.Context, interfaces.ExecuteScheduledJobRequest) error) {
	fake.executeScheduledJobMutex.Lock()
	defer fake.executeScheduledJobMutex.Unlock()
	fake.ExecuteScheduledJobStub = stub
}

func (fake *FakeJoblet) ExecuteScheduledJobArgsForCall(i int) (context.Context, interfaces.ExecuteScheduledJobRequest) {
	fake.executeScheduledJobMutex.RLock()
	defer fake.executeScheduledJobMutex.RUnlock()
	argsForCall := fake.executeScheduledJobArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeJoblet) ExecuteScheduledJobReturns(result1 error) {
	fake.executeScheduledJobMutex.Lock()
	defer fake.executeScheduledJobMutex.Unlock()
	fake.ExecuteScheduledJobStub = nil
	fake.executeScheduledJobReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJoblet) ExecuteScheduledJobReturnsOnCall(i int, result1 error) {
	fake.executeScheduledJobMutex.Lock()
	defer fake.executeScheduledJobMutex.Unlock()
	fake.ExecuteScheduledJobStub = nil
	if fake.executeScheduledJobReturnsOnCall == nil {
		fake.executeScheduledJobReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.executeScheduledJobReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJoblet) RecoverScheduledJobs(arg1 []*domain.Job) (int, int) {
	var arg1Copy []*domain.Job
	if arg1 != nil {
		arg1Copy = make([]*domain.Job, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.recoverScheduledJobsMutex.Lock()
	ret, specificReturn := fake.recoverScheduledJobsReturnsOnCall[len(fake.recoverScheduledJobsArgsForCall)]
	fake.recoverScheduledJobsArgsForCall = append(fake.recoverScheduledJobsArgsForCall, struct {
		arg1 []*domain.Job
	}{arg1Copy})
	stub := fake.RecoverScheduledJobsStub
	fakeReturns := fake.recoverScheduledJobsReturns
	fake.recordInvocation("RecoverScheduledJobs", []interface{}{arg1Copy})
	fake.recoverScheduledJobsMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeJoblet) RecoverScheduledJobsCallCount() int {
	fake.recoverScheduledJobsMutex.RLock()
	defer fake.recoverScheduledJobsMutex.RUnlock()
	return len(fake.recoverScheduledJobsArgsForCall)
}

func (fake *FakeJoblet) RecoverScheduledJobsCalls(stub func([]*domain.Job) (int, int)) {
	fake.recoverScheduledJobsMutex.Lock()
	defer fake.recoverScheduledJobsMutex.Unlock()
	fake.RecoverScheduledJobsStub = stub
}

func (fake *FakeJoblet) RecoverScheduledJobsArgsForCall(i int) []*domain.Job {
	fake.recoverScheduledJobsMutex.RLock()
	defer fake.recoverScheduledJobsMutex.RUnlock()
	argsForCall := fake.recoverScheduledJobsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJoblet) RecoverScheduledJobsReturns(result1 int, result2 int) {
	fake.recoverScheduledJobsMutex.Lock()
	defer fake.recoverScheduledJobsMutex.Unlock()
	fake.RecoverScheduledJobsStub = nil
	fake.recoverScheduledJobsReturns = struct {
		result1 int
		result2 int
	}{result1, result2}
}

func (fake *FakeJoblet) RecoverScheduledJobsReturnsOnCall(i int, result1 int, result2 int) {
	fake.recoverScheduledJobsMutex.Lock()
	defer fake.recoverScheduledJobsMutex.Unlock()
	fake.RecoverScheduledJobsStub = nil
	if fake.recoverScheduledJobsReturnsOnCall == nil {
		fake.recoverScheduledJobsReturnsOnCall = make(map[int]struct {
			result1 int
			result2 int
		})
	}
	fake.recoverScheduledJobsReturnsOnCall[i] = struct {
		result1 int
		result2 int
	}{result1, result2}
}

func (fake *FakeJoblet) SetTelematicsMonitor(arg1 interfaces.TelematicsMonitor) {
	fake.setTelematicsMonitorMutex.Lock()
	fake.setTelematicsMonitorArgsForCall = append(fake.setTelematicsMonitorArgsForCall, struct {
		arg1 interfaces.TelematicsMonitor
	}{arg1})
	stub := fake.SetTelematicsMonitorStub
	fake.recordInvocation("SetTelematicsMonitor", []interface{}{arg1})
	fake.setTelematicsMonitorMutex.Unlock()
	if stub != nil {
		fake.SetTelematicsMonitorStub(arg1)
	}
}

func (fake *FakeJoblet) SetTelematicsMonitorCallCount() int {
	fake.setTelematicsMonitorMutex.RLock()
	defer fake.setTelematicsMonitorMutex.RUnlock()
	return len(fake.setTelematicsMonitorArgsForCall)
}

func (fake *FakeJoblet) SetTelematicsMonitorCalls(stub func(interfaces.TelematicsMonitor)) {
	fake.setTelematicsMonitorMutex.Lock()
	defer fake.setTelematicsMonitorMutex.Unlock()
	fake.SetTelematicsMonitorStub = stub
}

func (fake *FakeJoblet) SetTelematicsMonitorArgsForCall(i int) interfaces.TelematicsMonitor {
	fake.setTelematicsMonitorMutex.RLock()
	defer fake.setTelematicsMonitorMutex.RUnlock()
	argsForCall := fake.setTelematicsMonitorArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJoblet) StartJob(arg1 context.Context, arg2 interfaces.StartJobRequest) (*domain.Job, error) {
	fake.startJobMutex.Lock()
	ret, specificReturn := fake.startJobReturnsOnCall[len(fake.startJobArgsForCall)]
	fake.startJobArgsForCall = append(fake.startJobArgsForCall, struct {
		arg1 context.Context
		arg2 interfaces.StartJobRequest
	}{arg1, arg2})
	stub := fake.StartJobStub
	fakeReturns := fake.startJobReturns
	fake.recordInvocation("StartJob", []interface{}{arg1, arg2})
	fake.startJobMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeJoblet) StartJobCallCount() int {
	fake.startJobMutex.RLock()
	defer fake.startJobMutex.RUnlock()
	return len(fake.startJobArgsForCall)
}

func (fake *FakeJoblet) StartJobCalls(stub func(context.Context, interfaces.StartJobRequest) (*domain.Job, error)) {
	fake.startJobMutex.Lock()
	defer fake.startJobMutex.Unlock()
	fake.StartJobStub = stub
}

func (fake *FakeJoblet) StartJobArgsForCall(i int) (context.Context, interfaces.StartJobRequest) {
	fake.startJobMutex.RLock()
	defer fake.startJobMutex.RUnlock()
	argsForCall := fake.startJobArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeJoblet) StartJobReturns(result1 *domain.Job, result2 error) {
	fake.startJobMutex.Lock()
	defer fake.startJobMutex.Unlock()
	fake.StartJobStub = nil
	fake.startJobReturns = struct {
		result1 *domain.Job
		result2 error
	}{result1, result2}
}

func (fake *FakeJoblet) StartJobReturnsOnCall(i int, result1 *domain.Job, result2 error) {
	fake.startJobMutex.Lock()
	defer fake.startJobMutex.Unlock()
	fake.StartJobStub = nil
	if fake.startJobReturnsOnCall == nil {
		fake.startJobReturnsOnCall = make(map[int]struct {
			result1 *domain.Job
			result2 error
		})
	}
	fake.startJobReturnsOnCall[i] = struct {
		result1 *domain.Job
		result2 error
	}{result1, result2}
}

func (fake *FakeJoblet) StopJob(arg1 context.Context, arg2 interfaces.StopJobRequest) error {
	fake.stopJobMutex.Lock()
	ret, specificReturn := fake.stopJobReturnsOnCall[len(fake.stopJobArgsForCall)]
	fake.stopJobArgsForCall = append(fake.stopJobArgsForCall, struct {
		arg1 context.Context
		arg2 interfaces.StopJobRequest
	}{arg1, arg2})
	stub := fake.StopJobStub
	fakeReturns := fake.stopJobReturns
	fake.recordInvocation("StopJob", []interface{}{arg1, arg2})
	fake.stopJobMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJoblet) StopJobCallCount() int {
	fake.stopJobMutex.RLock()
	defer fake.stopJobMutex.RUnlock()
	return len(fake.stopJobArgsForCall)
}

func (fake *FakeJoblet) StopJobCalls(stub func(context.Context, interfaces.StopJobRequest) error) {
	fake.stopJobMutex.Lock()
	defer fake.stopJobMutex.Unlock()
	fake.StopJobStub = stub
}

func (fake *FakeJoblet) StopJobArgsForCall(i int) (context.Context, interfaces.StopJobRequest) {
	fake.stopJobMutex.RLock()
	defer fake.stopJobMutex.RUnlock()
	argsForCall := fake.stopJobArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeJoblet) StopJobReturns(result1 error) {
	fake.stopJobMutex.Lock()
	defer fake.stopJobMutex.Unlock()
	fake.StopJobStub = nil
	fake.stopJobReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJoblet) StopJobReturnsOnCall(i int, result1 error) {
	fake.stopJobMutex.Lock()
	defer fake.stopJobMutex.Unlock()
	fake.StopJobStub = nil
	if fake.stopJobReturnsOnCall == nil {
		fake.stopJobReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.stopJobReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJoblet) 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 *FakeJoblet) 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 _ interfaces.Joblet = new(FakeJoblet)
