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

import (
	"context"
	"sync"

	"github.com/ehsaniara/joblet/internal/joblet/adapters"
	"github.com/ehsaniara/joblet/internal/joblet/domain"
	"github.com/ehsaniara/joblet/internal/joblet/interfaces"
	"github.com/ehsaniara/joblet/internal/joblet/pubsub"
)

type FakeJobStorer struct {
	CloseStub        func() error
	closeMutex       sync.RWMutex
	closeArgsForCall []struct {
	}
	closeReturns struct {
		result1 error
	}
	closeReturnsOnCall map[int]struct {
		result1 error
	}
	CreateNewJobStub        func(*domain.Job)
	createNewJobMutex       sync.RWMutex
	createNewJobArgsForCall []struct {
		arg1 *domain.Job
	}
	DeleteJobStub        func(string) error
	deleteJobMutex       sync.RWMutex
	deleteJobArgsForCall []struct {
		arg1 string
	}
	deleteJobReturns struct {
		result1 error
	}
	deleteJobReturnsOnCall map[int]struct {
		result1 error
	}
	DeleteJobLogsStub        func(string) error
	deleteJobLogsMutex       sync.RWMutex
	deleteJobLogsArgsForCall []struct {
		arg1 string
	}
	deleteJobLogsReturns struct {
		result1 error
	}
	deleteJobLogsReturnsOnCall map[int]struct {
		result1 error
	}
	HealthCheckServicesStub        func(context.Context) error
	healthCheckServicesMutex       sync.RWMutex
	healthCheckServicesArgsForCall []struct {
		arg1 context.Context
	}
	healthCheckServicesReturns struct {
		result1 error
	}
	healthCheckServicesReturnsOnCall map[int]struct {
		result1 error
	}
	JobStub        func(string) (*domain.Job, bool)
	jobMutex       sync.RWMutex
	jobArgsForCall []struct {
		arg1 string
	}
	jobReturns struct {
		result1 *domain.Job
		result2 bool
	}
	jobReturnsOnCall map[int]struct {
		result1 *domain.Job
		result2 bool
	}
	JobByPrefixStub        func(string) (*domain.Job, bool)
	jobByPrefixMutex       sync.RWMutex
	jobByPrefixArgsForCall []struct {
		arg1 string
	}
	jobByPrefixReturns struct {
		result1 *domain.Job
		result2 bool
	}
	jobByPrefixReturnsOnCall map[int]struct {
		result1 *domain.Job
		result2 bool
	}
	ListJobsStub        func() []*domain.Job
	listJobsMutex       sync.RWMutex
	listJobsArgsForCall []struct {
	}
	listJobsReturns struct {
		result1 []*domain.Job
	}
	listJobsReturnsOnCall map[int]struct {
		result1 []*domain.Job
	}
	OutputStub        func(string) ([]byte, bool, error)
	outputMutex       sync.RWMutex
	outputArgsForCall []struct {
		arg1 string
	}
	outputReturns struct {
		result1 []byte
		result2 bool
		result3 error
	}
	outputReturnsOnCall map[int]struct {
		result1 []byte
		result2 bool
		result3 error
	}
	PubSubStub        func() pubsub.PubSub[adapters.JobEvent]
	pubSubMutex       sync.RWMutex
	pubSubArgsForCall []struct {
	}
	pubSubReturns struct {
		result1 pubsub.PubSub[adapters.JobEvent]
	}
	pubSubReturnsOnCall map[int]struct {
		result1 pubsub.PubSub[adapters.JobEvent]
	}
	ResolveJobUUIDStub        func(string) (string, error)
	resolveJobUUIDMutex       sync.RWMutex
	resolveJobUUIDArgsForCall []struct {
		arg1 string
	}
	resolveJobUUIDReturns struct {
		result1 string
		result2 error
	}
	resolveJobUUIDReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	SendUpdatesToClientStub        func(context.Context, string, interfaces.DomainStreamer) error
	sendUpdatesToClientMutex       sync.RWMutex
	sendUpdatesToClientArgsForCall []struct {
		arg1 context.Context
		arg2 string
		arg3 interfaces.DomainStreamer
	}
	sendUpdatesToClientReturns struct {
		result1 error
	}
	sendUpdatesToClientReturnsOnCall map[int]struct {
		result1 error
	}
	SendUpdatesToClientWithSkipStub        func(context.Context, string, interfaces.DomainStreamer, int) error
	sendUpdatesToClientWithSkipMutex       sync.RWMutex
	sendUpdatesToClientWithSkipArgsForCall []struct {
		arg1 context.Context
		arg2 string
		arg3 interfaces.DomainStreamer
		arg4 int
	}
	sendUpdatesToClientWithSkipReturns struct {
		result1 error
	}
	sendUpdatesToClientWithSkipReturnsOnCall map[int]struct {
		result1 error
	}
	SyncFromPersistentStateStub        func(context.Context) error
	syncFromPersistentStateMutex       sync.RWMutex
	syncFromPersistentStateArgsForCall []struct {
		arg1 context.Context
	}
	syncFromPersistentStateReturns struct {
		result1 error
	}
	syncFromPersistentStateReturnsOnCall map[int]struct {
		result1 error
	}
	UpdateJobStub        func(*domain.Job)
	updateJobMutex       sync.RWMutex
	updateJobArgsForCall []struct {
		arg1 *domain.Job
	}
	WriteToBufferStub        func(string, []byte)
	writeToBufferMutex       sync.RWMutex
	writeToBufferArgsForCall []struct {
		arg1 string
		arg2 []byte
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeJobStorer) Close() error {
	fake.closeMutex.Lock()
	ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)]
	fake.closeArgsForCall = append(fake.closeArgsForCall, struct {
	}{})
	stub := fake.CloseStub
	fakeReturns := fake.closeReturns
	fake.recordInvocation("Close", []interface{}{})
	fake.closeMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJobStorer) CloseCallCount() int {
	fake.closeMutex.RLock()
	defer fake.closeMutex.RUnlock()
	return len(fake.closeArgsForCall)
}

func (fake *FakeJobStorer) CloseCalls(stub func() error) {
	fake.closeMutex.Lock()
	defer fake.closeMutex.Unlock()
	fake.CloseStub = stub
}

func (fake *FakeJobStorer) CloseReturns(result1 error) {
	fake.closeMutex.Lock()
	defer fake.closeMutex.Unlock()
	fake.CloseStub = nil
	fake.closeReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) CloseReturnsOnCall(i int, result1 error) {
	fake.closeMutex.Lock()
	defer fake.closeMutex.Unlock()
	fake.CloseStub = nil
	if fake.closeReturnsOnCall == nil {
		fake.closeReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.closeReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) CreateNewJob(arg1 *domain.Job) {
	fake.createNewJobMutex.Lock()
	fake.createNewJobArgsForCall = append(fake.createNewJobArgsForCall, struct {
		arg1 *domain.Job
	}{arg1})
	stub := fake.CreateNewJobStub
	fake.recordInvocation("CreateNewJob", []interface{}{arg1})
	fake.createNewJobMutex.Unlock()
	if stub != nil {
		fake.CreateNewJobStub(arg1)
	}
}

func (fake *FakeJobStorer) CreateNewJobCallCount() int {
	fake.createNewJobMutex.RLock()
	defer fake.createNewJobMutex.RUnlock()
	return len(fake.createNewJobArgsForCall)
}

func (fake *FakeJobStorer) CreateNewJobCalls(stub func(*domain.Job)) {
	fake.createNewJobMutex.Lock()
	defer fake.createNewJobMutex.Unlock()
	fake.CreateNewJobStub = stub
}

func (fake *FakeJobStorer) CreateNewJobArgsForCall(i int) *domain.Job {
	fake.createNewJobMutex.RLock()
	defer fake.createNewJobMutex.RUnlock()
	argsForCall := fake.createNewJobArgsForCall[i]
	return argsForCall.arg1
}

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

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

func (fake *FakeJobStorer) DeleteJobCalls(stub func(string) error) {
	fake.deleteJobMutex.Lock()
	defer fake.deleteJobMutex.Unlock()
	fake.DeleteJobStub = stub
}

func (fake *FakeJobStorer) DeleteJobArgsForCall(i int) string {
	fake.deleteJobMutex.RLock()
	defer fake.deleteJobMutex.RUnlock()
	argsForCall := fake.deleteJobArgsForCall[i]
	return argsForCall.arg1
}

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

func (fake *FakeJobStorer) 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 *FakeJobStorer) DeleteJobLogs(arg1 string) error {
	fake.deleteJobLogsMutex.Lock()
	ret, specificReturn := fake.deleteJobLogsReturnsOnCall[len(fake.deleteJobLogsArgsForCall)]
	fake.deleteJobLogsArgsForCall = append(fake.deleteJobLogsArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.DeleteJobLogsStub
	fakeReturns := fake.deleteJobLogsReturns
	fake.recordInvocation("DeleteJobLogs", []interface{}{arg1})
	fake.deleteJobLogsMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJobStorer) DeleteJobLogsCallCount() int {
	fake.deleteJobLogsMutex.RLock()
	defer fake.deleteJobLogsMutex.RUnlock()
	return len(fake.deleteJobLogsArgsForCall)
}

func (fake *FakeJobStorer) DeleteJobLogsCalls(stub func(string) error) {
	fake.deleteJobLogsMutex.Lock()
	defer fake.deleteJobLogsMutex.Unlock()
	fake.DeleteJobLogsStub = stub
}

func (fake *FakeJobStorer) DeleteJobLogsArgsForCall(i int) string {
	fake.deleteJobLogsMutex.RLock()
	defer fake.deleteJobLogsMutex.RUnlock()
	argsForCall := fake.deleteJobLogsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJobStorer) DeleteJobLogsReturns(result1 error) {
	fake.deleteJobLogsMutex.Lock()
	defer fake.deleteJobLogsMutex.Unlock()
	fake.DeleteJobLogsStub = nil
	fake.deleteJobLogsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) DeleteJobLogsReturnsOnCall(i int, result1 error) {
	fake.deleteJobLogsMutex.Lock()
	defer fake.deleteJobLogsMutex.Unlock()
	fake.DeleteJobLogsStub = nil
	if fake.deleteJobLogsReturnsOnCall == nil {
		fake.deleteJobLogsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.deleteJobLogsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) HealthCheckServices(arg1 context.Context) error {
	fake.healthCheckServicesMutex.Lock()
	ret, specificReturn := fake.healthCheckServicesReturnsOnCall[len(fake.healthCheckServicesArgsForCall)]
	fake.healthCheckServicesArgsForCall = append(fake.healthCheckServicesArgsForCall, struct {
		arg1 context.Context
	}{arg1})
	stub := fake.HealthCheckServicesStub
	fakeReturns := fake.healthCheckServicesReturns
	fake.recordInvocation("HealthCheckServices", []interface{}{arg1})
	fake.healthCheckServicesMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJobStorer) HealthCheckServicesCallCount() int {
	fake.healthCheckServicesMutex.RLock()
	defer fake.healthCheckServicesMutex.RUnlock()
	return len(fake.healthCheckServicesArgsForCall)
}

func (fake *FakeJobStorer) HealthCheckServicesCalls(stub func(context.Context) error) {
	fake.healthCheckServicesMutex.Lock()
	defer fake.healthCheckServicesMutex.Unlock()
	fake.HealthCheckServicesStub = stub
}

func (fake *FakeJobStorer) HealthCheckServicesArgsForCall(i int) context.Context {
	fake.healthCheckServicesMutex.RLock()
	defer fake.healthCheckServicesMutex.RUnlock()
	argsForCall := fake.healthCheckServicesArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJobStorer) HealthCheckServicesReturns(result1 error) {
	fake.healthCheckServicesMutex.Lock()
	defer fake.healthCheckServicesMutex.Unlock()
	fake.HealthCheckServicesStub = nil
	fake.healthCheckServicesReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) HealthCheckServicesReturnsOnCall(i int, result1 error) {
	fake.healthCheckServicesMutex.Lock()
	defer fake.healthCheckServicesMutex.Unlock()
	fake.HealthCheckServicesStub = nil
	if fake.healthCheckServicesReturnsOnCall == nil {
		fake.healthCheckServicesReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.healthCheckServicesReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) Job(arg1 string) (*domain.Job, bool) {
	fake.jobMutex.Lock()
	ret, specificReturn := fake.jobReturnsOnCall[len(fake.jobArgsForCall)]
	fake.jobArgsForCall = append(fake.jobArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.JobStub
	fakeReturns := fake.jobReturns
	fake.recordInvocation("Job", []interface{}{arg1})
	fake.jobMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeJobStorer) JobCallCount() int {
	fake.jobMutex.RLock()
	defer fake.jobMutex.RUnlock()
	return len(fake.jobArgsForCall)
}

func (fake *FakeJobStorer) JobCalls(stub func(string) (*domain.Job, bool)) {
	fake.jobMutex.Lock()
	defer fake.jobMutex.Unlock()
	fake.JobStub = stub
}

func (fake *FakeJobStorer) JobArgsForCall(i int) string {
	fake.jobMutex.RLock()
	defer fake.jobMutex.RUnlock()
	argsForCall := fake.jobArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJobStorer) JobReturns(result1 *domain.Job, result2 bool) {
	fake.jobMutex.Lock()
	defer fake.jobMutex.Unlock()
	fake.JobStub = nil
	fake.jobReturns = struct {
		result1 *domain.Job
		result2 bool
	}{result1, result2}
}

func (fake *FakeJobStorer) JobReturnsOnCall(i int, result1 *domain.Job, result2 bool) {
	fake.jobMutex.Lock()
	defer fake.jobMutex.Unlock()
	fake.JobStub = nil
	if fake.jobReturnsOnCall == nil {
		fake.jobReturnsOnCall = make(map[int]struct {
			result1 *domain.Job
			result2 bool
		})
	}
	fake.jobReturnsOnCall[i] = struct {
		result1 *domain.Job
		result2 bool
	}{result1, result2}
}

func (fake *FakeJobStorer) JobByPrefix(arg1 string) (*domain.Job, bool) {
	fake.jobByPrefixMutex.Lock()
	ret, specificReturn := fake.jobByPrefixReturnsOnCall[len(fake.jobByPrefixArgsForCall)]
	fake.jobByPrefixArgsForCall = append(fake.jobByPrefixArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.JobByPrefixStub
	fakeReturns := fake.jobByPrefixReturns
	fake.recordInvocation("JobByPrefix", []interface{}{arg1})
	fake.jobByPrefixMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeJobStorer) JobByPrefixCallCount() int {
	fake.jobByPrefixMutex.RLock()
	defer fake.jobByPrefixMutex.RUnlock()
	return len(fake.jobByPrefixArgsForCall)
}

func (fake *FakeJobStorer) JobByPrefixCalls(stub func(string) (*domain.Job, bool)) {
	fake.jobByPrefixMutex.Lock()
	defer fake.jobByPrefixMutex.Unlock()
	fake.JobByPrefixStub = stub
}

func (fake *FakeJobStorer) JobByPrefixArgsForCall(i int) string {
	fake.jobByPrefixMutex.RLock()
	defer fake.jobByPrefixMutex.RUnlock()
	argsForCall := fake.jobByPrefixArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJobStorer) JobByPrefixReturns(result1 *domain.Job, result2 bool) {
	fake.jobByPrefixMutex.Lock()
	defer fake.jobByPrefixMutex.Unlock()
	fake.JobByPrefixStub = nil
	fake.jobByPrefixReturns = struct {
		result1 *domain.Job
		result2 bool
	}{result1, result2}
}

func (fake *FakeJobStorer) JobByPrefixReturnsOnCall(i int, result1 *domain.Job, result2 bool) {
	fake.jobByPrefixMutex.Lock()
	defer fake.jobByPrefixMutex.Unlock()
	fake.JobByPrefixStub = nil
	if fake.jobByPrefixReturnsOnCall == nil {
		fake.jobByPrefixReturnsOnCall = make(map[int]struct {
			result1 *domain.Job
			result2 bool
		})
	}
	fake.jobByPrefixReturnsOnCall[i] = struct {
		result1 *domain.Job
		result2 bool
	}{result1, result2}
}

func (fake *FakeJobStorer) ListJobs() []*domain.Job {
	fake.listJobsMutex.Lock()
	ret, specificReturn := fake.listJobsReturnsOnCall[len(fake.listJobsArgsForCall)]
	fake.listJobsArgsForCall = append(fake.listJobsArgsForCall, struct {
	}{})
	stub := fake.ListJobsStub
	fakeReturns := fake.listJobsReturns
	fake.recordInvocation("ListJobs", []interface{}{})
	fake.listJobsMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJobStorer) ListJobsCallCount() int {
	fake.listJobsMutex.RLock()
	defer fake.listJobsMutex.RUnlock()
	return len(fake.listJobsArgsForCall)
}

func (fake *FakeJobStorer) ListJobsCalls(stub func() []*domain.Job) {
	fake.listJobsMutex.Lock()
	defer fake.listJobsMutex.Unlock()
	fake.ListJobsStub = stub
}

func (fake *FakeJobStorer) ListJobsReturns(result1 []*domain.Job) {
	fake.listJobsMutex.Lock()
	defer fake.listJobsMutex.Unlock()
	fake.ListJobsStub = nil
	fake.listJobsReturns = struct {
		result1 []*domain.Job
	}{result1}
}

func (fake *FakeJobStorer) ListJobsReturnsOnCall(i int, result1 []*domain.Job) {
	fake.listJobsMutex.Lock()
	defer fake.listJobsMutex.Unlock()
	fake.ListJobsStub = nil
	if fake.listJobsReturnsOnCall == nil {
		fake.listJobsReturnsOnCall = make(map[int]struct {
			result1 []*domain.Job
		})
	}
	fake.listJobsReturnsOnCall[i] = struct {
		result1 []*domain.Job
	}{result1}
}

func (fake *FakeJobStorer) Output(arg1 string) ([]byte, bool, error) {
	fake.outputMutex.Lock()
	ret, specificReturn := fake.outputReturnsOnCall[len(fake.outputArgsForCall)]
	fake.outputArgsForCall = append(fake.outputArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.OutputStub
	fakeReturns := fake.outputReturns
	fake.recordInvocation("Output", []interface{}{arg1})
	fake.outputMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2, ret.result3
	}
	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
}

func (fake *FakeJobStorer) OutputCallCount() int {
	fake.outputMutex.RLock()
	defer fake.outputMutex.RUnlock()
	return len(fake.outputArgsForCall)
}

func (fake *FakeJobStorer) OutputCalls(stub func(string) ([]byte, bool, error)) {
	fake.outputMutex.Lock()
	defer fake.outputMutex.Unlock()
	fake.OutputStub = stub
}

func (fake *FakeJobStorer) OutputArgsForCall(i int) string {
	fake.outputMutex.RLock()
	defer fake.outputMutex.RUnlock()
	argsForCall := fake.outputArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJobStorer) OutputReturns(result1 []byte, result2 bool, result3 error) {
	fake.outputMutex.Lock()
	defer fake.outputMutex.Unlock()
	fake.OutputStub = nil
	fake.outputReturns = struct {
		result1 []byte
		result2 bool
		result3 error
	}{result1, result2, result3}
}

func (fake *FakeJobStorer) OutputReturnsOnCall(i int, result1 []byte, result2 bool, result3 error) {
	fake.outputMutex.Lock()
	defer fake.outputMutex.Unlock()
	fake.OutputStub = nil
	if fake.outputReturnsOnCall == nil {
		fake.outputReturnsOnCall = make(map[int]struct {
			result1 []byte
			result2 bool
			result3 error
		})
	}
	fake.outputReturnsOnCall[i] = struct {
		result1 []byte
		result2 bool
		result3 error
	}{result1, result2, result3}
}

func (fake *FakeJobStorer) PubSub() pubsub.PubSub[adapters.JobEvent] {
	fake.pubSubMutex.Lock()
	ret, specificReturn := fake.pubSubReturnsOnCall[len(fake.pubSubArgsForCall)]
	fake.pubSubArgsForCall = append(fake.pubSubArgsForCall, struct {
	}{})
	stub := fake.PubSubStub
	fakeReturns := fake.pubSubReturns
	fake.recordInvocation("PubSub", []interface{}{})
	fake.pubSubMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJobStorer) PubSubCallCount() int {
	fake.pubSubMutex.RLock()
	defer fake.pubSubMutex.RUnlock()
	return len(fake.pubSubArgsForCall)
}

func (fake *FakeJobStorer) PubSubCalls(stub func() pubsub.PubSub[adapters.JobEvent]) {
	fake.pubSubMutex.Lock()
	defer fake.pubSubMutex.Unlock()
	fake.PubSubStub = stub
}

func (fake *FakeJobStorer) PubSubReturns(result1 pubsub.PubSub[adapters.JobEvent]) {
	fake.pubSubMutex.Lock()
	defer fake.pubSubMutex.Unlock()
	fake.PubSubStub = nil
	fake.pubSubReturns = struct {
		result1 pubsub.PubSub[adapters.JobEvent]
	}{result1}
}

func (fake *FakeJobStorer) PubSubReturnsOnCall(i int, result1 pubsub.PubSub[adapters.JobEvent]) {
	fake.pubSubMutex.Lock()
	defer fake.pubSubMutex.Unlock()
	fake.PubSubStub = nil
	if fake.pubSubReturnsOnCall == nil {
		fake.pubSubReturnsOnCall = make(map[int]struct {
			result1 pubsub.PubSub[adapters.JobEvent]
		})
	}
	fake.pubSubReturnsOnCall[i] = struct {
		result1 pubsub.PubSub[adapters.JobEvent]
	}{result1}
}

func (fake *FakeJobStorer) ResolveJobUUID(arg1 string) (string, error) {
	fake.resolveJobUUIDMutex.Lock()
	ret, specificReturn := fake.resolveJobUUIDReturnsOnCall[len(fake.resolveJobUUIDArgsForCall)]
	fake.resolveJobUUIDArgsForCall = append(fake.resolveJobUUIDArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.ResolveJobUUIDStub
	fakeReturns := fake.resolveJobUUIDReturns
	fake.recordInvocation("ResolveJobUUID", []interface{}{arg1})
	fake.resolveJobUUIDMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeJobStorer) ResolveJobUUIDCallCount() int {
	fake.resolveJobUUIDMutex.RLock()
	defer fake.resolveJobUUIDMutex.RUnlock()
	return len(fake.resolveJobUUIDArgsForCall)
}

func (fake *FakeJobStorer) ResolveJobUUIDCalls(stub func(string) (string, error)) {
	fake.resolveJobUUIDMutex.Lock()
	defer fake.resolveJobUUIDMutex.Unlock()
	fake.ResolveJobUUIDStub = stub
}

func (fake *FakeJobStorer) ResolveJobUUIDArgsForCall(i int) string {
	fake.resolveJobUUIDMutex.RLock()
	defer fake.resolveJobUUIDMutex.RUnlock()
	argsForCall := fake.resolveJobUUIDArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJobStorer) ResolveJobUUIDReturns(result1 string, result2 error) {
	fake.resolveJobUUIDMutex.Lock()
	defer fake.resolveJobUUIDMutex.Unlock()
	fake.ResolveJobUUIDStub = nil
	fake.resolveJobUUIDReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeJobStorer) ResolveJobUUIDReturnsOnCall(i int, result1 string, result2 error) {
	fake.resolveJobUUIDMutex.Lock()
	defer fake.resolveJobUUIDMutex.Unlock()
	fake.ResolveJobUUIDStub = nil
	if fake.resolveJobUUIDReturnsOnCall == nil {
		fake.resolveJobUUIDReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.resolveJobUUIDReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeJobStorer) SendUpdatesToClient(arg1 context.Context, arg2 string, arg3 interfaces.DomainStreamer) error {
	fake.sendUpdatesToClientMutex.Lock()
	ret, specificReturn := fake.sendUpdatesToClientReturnsOnCall[len(fake.sendUpdatesToClientArgsForCall)]
	fake.sendUpdatesToClientArgsForCall = append(fake.sendUpdatesToClientArgsForCall, struct {
		arg1 context.Context
		arg2 string
		arg3 interfaces.DomainStreamer
	}{arg1, arg2, arg3})
	stub := fake.SendUpdatesToClientStub
	fakeReturns := fake.sendUpdatesToClientReturns
	fake.recordInvocation("SendUpdatesToClient", []interface{}{arg1, arg2, arg3})
	fake.sendUpdatesToClientMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJobStorer) SendUpdatesToClientCallCount() int {
	fake.sendUpdatesToClientMutex.RLock()
	defer fake.sendUpdatesToClientMutex.RUnlock()
	return len(fake.sendUpdatesToClientArgsForCall)
}

func (fake *FakeJobStorer) SendUpdatesToClientCalls(stub func(context.Context, string, interfaces.DomainStreamer) error) {
	fake.sendUpdatesToClientMutex.Lock()
	defer fake.sendUpdatesToClientMutex.Unlock()
	fake.SendUpdatesToClientStub = stub
}

func (fake *FakeJobStorer) SendUpdatesToClientArgsForCall(i int) (context.Context, string, interfaces.DomainStreamer) {
	fake.sendUpdatesToClientMutex.RLock()
	defer fake.sendUpdatesToClientMutex.RUnlock()
	argsForCall := fake.sendUpdatesToClientArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeJobStorer) SendUpdatesToClientReturns(result1 error) {
	fake.sendUpdatesToClientMutex.Lock()
	defer fake.sendUpdatesToClientMutex.Unlock()
	fake.SendUpdatesToClientStub = nil
	fake.sendUpdatesToClientReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) SendUpdatesToClientReturnsOnCall(i int, result1 error) {
	fake.sendUpdatesToClientMutex.Lock()
	defer fake.sendUpdatesToClientMutex.Unlock()
	fake.SendUpdatesToClientStub = nil
	if fake.sendUpdatesToClientReturnsOnCall == nil {
		fake.sendUpdatesToClientReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.sendUpdatesToClientReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) SendUpdatesToClientWithSkip(arg1 context.Context, arg2 string, arg3 interfaces.DomainStreamer, arg4 int) error {
	fake.sendUpdatesToClientWithSkipMutex.Lock()
	ret, specificReturn := fake.sendUpdatesToClientWithSkipReturnsOnCall[len(fake.sendUpdatesToClientWithSkipArgsForCall)]
	fake.sendUpdatesToClientWithSkipArgsForCall = append(fake.sendUpdatesToClientWithSkipArgsForCall, struct {
		arg1 context.Context
		arg2 string
		arg3 interfaces.DomainStreamer
		arg4 int
	}{arg1, arg2, arg3, arg4})
	stub := fake.SendUpdatesToClientWithSkipStub
	fakeReturns := fake.sendUpdatesToClientWithSkipReturns
	fake.recordInvocation("SendUpdatesToClientWithSkip", []interface{}{arg1, arg2, arg3, arg4})
	fake.sendUpdatesToClientWithSkipMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3, arg4)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJobStorer) SendUpdatesToClientWithSkipCallCount() int {
	fake.sendUpdatesToClientWithSkipMutex.RLock()
	defer fake.sendUpdatesToClientWithSkipMutex.RUnlock()
	return len(fake.sendUpdatesToClientWithSkipArgsForCall)
}

func (fake *FakeJobStorer) SendUpdatesToClientWithSkipCalls(stub func(context.Context, string, interfaces.DomainStreamer, int) error) {
	fake.sendUpdatesToClientWithSkipMutex.Lock()
	defer fake.sendUpdatesToClientWithSkipMutex.Unlock()
	fake.SendUpdatesToClientWithSkipStub = stub
}

func (fake *FakeJobStorer) SendUpdatesToClientWithSkipArgsForCall(i int) (context.Context, string, interfaces.DomainStreamer, int) {
	fake.sendUpdatesToClientWithSkipMutex.RLock()
	defer fake.sendUpdatesToClientWithSkipMutex.RUnlock()
	argsForCall := fake.sendUpdatesToClientWithSkipArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
}

func (fake *FakeJobStorer) SendUpdatesToClientWithSkipReturns(result1 error) {
	fake.sendUpdatesToClientWithSkipMutex.Lock()
	defer fake.sendUpdatesToClientWithSkipMutex.Unlock()
	fake.SendUpdatesToClientWithSkipStub = nil
	fake.sendUpdatesToClientWithSkipReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) SendUpdatesToClientWithSkipReturnsOnCall(i int, result1 error) {
	fake.sendUpdatesToClientWithSkipMutex.Lock()
	defer fake.sendUpdatesToClientWithSkipMutex.Unlock()
	fake.SendUpdatesToClientWithSkipStub = nil
	if fake.sendUpdatesToClientWithSkipReturnsOnCall == nil {
		fake.sendUpdatesToClientWithSkipReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.sendUpdatesToClientWithSkipReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) SyncFromPersistentState(arg1 context.Context) error {
	fake.syncFromPersistentStateMutex.Lock()
	ret, specificReturn := fake.syncFromPersistentStateReturnsOnCall[len(fake.syncFromPersistentStateArgsForCall)]
	fake.syncFromPersistentStateArgsForCall = append(fake.syncFromPersistentStateArgsForCall, struct {
		arg1 context.Context
	}{arg1})
	stub := fake.SyncFromPersistentStateStub
	fakeReturns := fake.syncFromPersistentStateReturns
	fake.recordInvocation("SyncFromPersistentState", []interface{}{arg1})
	fake.syncFromPersistentStateMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeJobStorer) SyncFromPersistentStateCallCount() int {
	fake.syncFromPersistentStateMutex.RLock()
	defer fake.syncFromPersistentStateMutex.RUnlock()
	return len(fake.syncFromPersistentStateArgsForCall)
}

func (fake *FakeJobStorer) SyncFromPersistentStateCalls(stub func(context.Context) error) {
	fake.syncFromPersistentStateMutex.Lock()
	defer fake.syncFromPersistentStateMutex.Unlock()
	fake.SyncFromPersistentStateStub = stub
}

func (fake *FakeJobStorer) SyncFromPersistentStateArgsForCall(i int) context.Context {
	fake.syncFromPersistentStateMutex.RLock()
	defer fake.syncFromPersistentStateMutex.RUnlock()
	argsForCall := fake.syncFromPersistentStateArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJobStorer) SyncFromPersistentStateReturns(result1 error) {
	fake.syncFromPersistentStateMutex.Lock()
	defer fake.syncFromPersistentStateMutex.Unlock()
	fake.SyncFromPersistentStateStub = nil
	fake.syncFromPersistentStateReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) SyncFromPersistentStateReturnsOnCall(i int, result1 error) {
	fake.syncFromPersistentStateMutex.Lock()
	defer fake.syncFromPersistentStateMutex.Unlock()
	fake.SyncFromPersistentStateStub = nil
	if fake.syncFromPersistentStateReturnsOnCall == nil {
		fake.syncFromPersistentStateReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.syncFromPersistentStateReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeJobStorer) UpdateJob(arg1 *domain.Job) {
	fake.updateJobMutex.Lock()
	fake.updateJobArgsForCall = append(fake.updateJobArgsForCall, struct {
		arg1 *domain.Job
	}{arg1})
	stub := fake.UpdateJobStub
	fake.recordInvocation("UpdateJob", []interface{}{arg1})
	fake.updateJobMutex.Unlock()
	if stub != nil {
		fake.UpdateJobStub(arg1)
	}
}

func (fake *FakeJobStorer) UpdateJobCallCount() int {
	fake.updateJobMutex.RLock()
	defer fake.updateJobMutex.RUnlock()
	return len(fake.updateJobArgsForCall)
}

func (fake *FakeJobStorer) UpdateJobCalls(stub func(*domain.Job)) {
	fake.updateJobMutex.Lock()
	defer fake.updateJobMutex.Unlock()
	fake.UpdateJobStub = stub
}

func (fake *FakeJobStorer) UpdateJobArgsForCall(i int) *domain.Job {
	fake.updateJobMutex.RLock()
	defer fake.updateJobMutex.RUnlock()
	argsForCall := fake.updateJobArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeJobStorer) WriteToBuffer(arg1 string, arg2 []byte) {
	var arg2Copy []byte
	if arg2 != nil {
		arg2Copy = make([]byte, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeToBufferMutex.Lock()
	fake.writeToBufferArgsForCall = append(fake.writeToBufferArgsForCall, struct {
		arg1 string
		arg2 []byte
	}{arg1, arg2Copy})
	stub := fake.WriteToBufferStub
	fake.recordInvocation("WriteToBuffer", []interface{}{arg1, arg2Copy})
	fake.writeToBufferMutex.Unlock()
	if stub != nil {
		fake.WriteToBufferStub(arg1, arg2)
	}
}

func (fake *FakeJobStorer) WriteToBufferCallCount() int {
	fake.writeToBufferMutex.RLock()
	defer fake.writeToBufferMutex.RUnlock()
	return len(fake.writeToBufferArgsForCall)
}

func (fake *FakeJobStorer) WriteToBufferCalls(stub func(string, []byte)) {
	fake.writeToBufferMutex.Lock()
	defer fake.writeToBufferMutex.Unlock()
	fake.WriteToBufferStub = stub
}

func (fake *FakeJobStorer) WriteToBufferArgsForCall(i int) (string, []byte) {
	fake.writeToBufferMutex.RLock()
	defer fake.writeToBufferMutex.RUnlock()
	argsForCall := fake.writeToBufferArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeJobStorer) 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 *FakeJobStorer) 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 _ adapters.JobStorer = new(FakeJobStorer)
