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

import (
	"context"
	"sync"

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

type FakeDomainStreamer struct {
	ContextStub        func() context.Context
	contextMutex       sync.RWMutex
	contextArgsForCall []struct {
	}
	contextReturns struct {
		result1 context.Context
	}
	contextReturnsOnCall map[int]struct {
		result1 context.Context
	}
	SendDataStub        func([]byte) error
	sendDataMutex       sync.RWMutex
	sendDataArgsForCall []struct {
		arg1 []byte
	}
	sendDataReturns struct {
		result1 error
	}
	sendDataReturnsOnCall map[int]struct {
		result1 error
	}
	SendKeepaliveStub        func() error
	sendKeepaliveMutex       sync.RWMutex
	sendKeepaliveArgsForCall []struct {
	}
	sendKeepaliveReturns struct {
		result1 error
	}
	sendKeepaliveReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDomainStreamer) Context() context.Context {
	fake.contextMutex.Lock()
	ret, specificReturn := fake.contextReturnsOnCall[len(fake.contextArgsForCall)]
	fake.contextArgsForCall = append(fake.contextArgsForCall, struct {
	}{})
	stub := fake.ContextStub
	fakeReturns := fake.contextReturns
	fake.recordInvocation("Context", []interface{}{})
	fake.contextMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDomainStreamer) ContextCallCount() int {
	fake.contextMutex.RLock()
	defer fake.contextMutex.RUnlock()
	return len(fake.contextArgsForCall)
}

func (fake *FakeDomainStreamer) ContextCalls(stub func() context.Context) {
	fake.contextMutex.Lock()
	defer fake.contextMutex.Unlock()
	fake.ContextStub = stub
}

func (fake *FakeDomainStreamer) ContextReturns(result1 context.Context) {
	fake.contextMutex.Lock()
	defer fake.contextMutex.Unlock()
	fake.ContextStub = nil
	fake.contextReturns = struct {
		result1 context.Context
	}{result1}
}

func (fake *FakeDomainStreamer) ContextReturnsOnCall(i int, result1 context.Context) {
	fake.contextMutex.Lock()
	defer fake.contextMutex.Unlock()
	fake.ContextStub = nil
	if fake.contextReturnsOnCall == nil {
		fake.contextReturnsOnCall = make(map[int]struct {
			result1 context.Context
		})
	}
	fake.contextReturnsOnCall[i] = struct {
		result1 context.Context
	}{result1}
}

func (fake *FakeDomainStreamer) SendData(arg1 []byte) error {
	var arg1Copy []byte
	if arg1 != nil {
		arg1Copy = make([]byte, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.sendDataMutex.Lock()
	ret, specificReturn := fake.sendDataReturnsOnCall[len(fake.sendDataArgsForCall)]
	fake.sendDataArgsForCall = append(fake.sendDataArgsForCall, struct {
		arg1 []byte
	}{arg1Copy})
	stub := fake.SendDataStub
	fakeReturns := fake.sendDataReturns
	fake.recordInvocation("SendData", []interface{}{arg1Copy})
	fake.sendDataMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDomainStreamer) SendDataCallCount() int {
	fake.sendDataMutex.RLock()
	defer fake.sendDataMutex.RUnlock()
	return len(fake.sendDataArgsForCall)
}

func (fake *FakeDomainStreamer) SendDataCalls(stub func([]byte) error) {
	fake.sendDataMutex.Lock()
	defer fake.sendDataMutex.Unlock()
	fake.SendDataStub = stub
}

func (fake *FakeDomainStreamer) SendDataArgsForCall(i int) []byte {
	fake.sendDataMutex.RLock()
	defer fake.sendDataMutex.RUnlock()
	argsForCall := fake.sendDataArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDomainStreamer) SendDataReturns(result1 error) {
	fake.sendDataMutex.Lock()
	defer fake.sendDataMutex.Unlock()
	fake.SendDataStub = nil
	fake.sendDataReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeDomainStreamer) SendDataReturnsOnCall(i int, result1 error) {
	fake.sendDataMutex.Lock()
	defer fake.sendDataMutex.Unlock()
	fake.SendDataStub = nil
	if fake.sendDataReturnsOnCall == nil {
		fake.sendDataReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.sendDataReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeDomainStreamer) SendKeepalive() error {
	fake.sendKeepaliveMutex.Lock()
	ret, specificReturn := fake.sendKeepaliveReturnsOnCall[len(fake.sendKeepaliveArgsForCall)]
	fake.sendKeepaliveArgsForCall = append(fake.sendKeepaliveArgsForCall, struct {
	}{})
	stub := fake.SendKeepaliveStub
	fakeReturns := fake.sendKeepaliveReturns
	fake.recordInvocation("SendKeepalive", []interface{}{})
	fake.sendKeepaliveMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDomainStreamer) SendKeepaliveCallCount() int {
	fake.sendKeepaliveMutex.RLock()
	defer fake.sendKeepaliveMutex.RUnlock()
	return len(fake.sendKeepaliveArgsForCall)
}

func (fake *FakeDomainStreamer) SendKeepaliveCalls(stub func() error) {
	fake.sendKeepaliveMutex.Lock()
	defer fake.sendKeepaliveMutex.Unlock()
	fake.SendKeepaliveStub = stub
}

func (fake *FakeDomainStreamer) SendKeepaliveReturns(result1 error) {
	fake.sendKeepaliveMutex.Lock()
	defer fake.sendKeepaliveMutex.Unlock()
	fake.SendKeepaliveStub = nil
	fake.sendKeepaliveReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeDomainStreamer) SendKeepaliveReturnsOnCall(i int, result1 error) {
	fake.sendKeepaliveMutex.Lock()
	defer fake.sendKeepaliveMutex.Unlock()
	fake.SendKeepaliveStub = nil
	if fake.sendKeepaliveReturnsOnCall == nil {
		fake.sendKeepaliveReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.sendKeepaliveReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeDomainStreamer) 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 *FakeDomainStreamer) 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.DomainStreamer = new(FakeDomainStreamer)
