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

import (
	"sync"

	"github.com/ehsaniara/joblet/internal/joblet/core/execution"
)

type FakeNetworkStoreInterface struct {
	AllocateIPStub        func(string) (string, error)
	allocateIPMutex       sync.RWMutex
	allocateIPArgsForCall []struct {
		arg1 string
	}
	allocateIPReturns struct {
		result1 string
		result2 error
	}
	allocateIPReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	AssignJobToNetworkStub        func(string, string, *execution.JobNetworkAllocation) error
	assignJobToNetworkMutex       sync.RWMutex
	assignJobToNetworkArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 *execution.JobNetworkAllocation
	}
	assignJobToNetworkReturns struct {
		result1 error
	}
	assignJobToNetworkReturnsOnCall map[int]struct {
		result1 error
	}
	GetJobAllocationStub        func(string) (*execution.JobNetworkAllocation, error)
	getJobAllocationMutex       sync.RWMutex
	getJobAllocationArgsForCall []struct {
		arg1 string
	}
	getJobAllocationReturns struct {
		result1 *execution.JobNetworkAllocation
		result2 error
	}
	getJobAllocationReturnsOnCall map[int]struct {
		result1 *execution.JobNetworkAllocation
		result2 error
	}
	ReleaseIPStub        func(string, string) error
	releaseIPMutex       sync.RWMutex
	releaseIPArgsForCall []struct {
		arg1 string
		arg2 string
	}
	releaseIPReturns struct {
		result1 error
	}
	releaseIPReturnsOnCall map[int]struct {
		result1 error
	}
	RemoveJobFromNetworkStub        func(string) error
	removeJobFromNetworkMutex       sync.RWMutex
	removeJobFromNetworkArgsForCall []struct {
		arg1 string
	}
	removeJobFromNetworkReturns struct {
		result1 error
	}
	removeJobFromNetworkReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeNetworkStoreInterface) AllocateIP(arg1 string) (string, error) {
	fake.allocateIPMutex.Lock()
	ret, specificReturn := fake.allocateIPReturnsOnCall[len(fake.allocateIPArgsForCall)]
	fake.allocateIPArgsForCall = append(fake.allocateIPArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.AllocateIPStub
	fakeReturns := fake.allocateIPReturns
	fake.recordInvocation("AllocateIP", []interface{}{arg1})
	fake.allocateIPMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeNetworkStoreInterface) AllocateIPCallCount() int {
	fake.allocateIPMutex.RLock()
	defer fake.allocateIPMutex.RUnlock()
	return len(fake.allocateIPArgsForCall)
}

func (fake *FakeNetworkStoreInterface) AllocateIPCalls(stub func(string) (string, error)) {
	fake.allocateIPMutex.Lock()
	defer fake.allocateIPMutex.Unlock()
	fake.AllocateIPStub = stub
}

func (fake *FakeNetworkStoreInterface) AllocateIPArgsForCall(i int) string {
	fake.allocateIPMutex.RLock()
	defer fake.allocateIPMutex.RUnlock()
	argsForCall := fake.allocateIPArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeNetworkStoreInterface) AllocateIPReturns(result1 string, result2 error) {
	fake.allocateIPMutex.Lock()
	defer fake.allocateIPMutex.Unlock()
	fake.AllocateIPStub = nil
	fake.allocateIPReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeNetworkStoreInterface) AllocateIPReturnsOnCall(i int, result1 string, result2 error) {
	fake.allocateIPMutex.Lock()
	defer fake.allocateIPMutex.Unlock()
	fake.AllocateIPStub = nil
	if fake.allocateIPReturnsOnCall == nil {
		fake.allocateIPReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.allocateIPReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeNetworkStoreInterface) AssignJobToNetwork(arg1 string, arg2 string, arg3 *execution.JobNetworkAllocation) error {
	fake.assignJobToNetworkMutex.Lock()
	ret, specificReturn := fake.assignJobToNetworkReturnsOnCall[len(fake.assignJobToNetworkArgsForCall)]
	fake.assignJobToNetworkArgsForCall = append(fake.assignJobToNetworkArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 *execution.JobNetworkAllocation
	}{arg1, arg2, arg3})
	stub := fake.AssignJobToNetworkStub
	fakeReturns := fake.assignJobToNetworkReturns
	fake.recordInvocation("AssignJobToNetwork", []interface{}{arg1, arg2, arg3})
	fake.assignJobToNetworkMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeNetworkStoreInterface) AssignJobToNetworkCallCount() int {
	fake.assignJobToNetworkMutex.RLock()
	defer fake.assignJobToNetworkMutex.RUnlock()
	return len(fake.assignJobToNetworkArgsForCall)
}

func (fake *FakeNetworkStoreInterface) AssignJobToNetworkCalls(stub func(string, string, *execution.JobNetworkAllocation) error) {
	fake.assignJobToNetworkMutex.Lock()
	defer fake.assignJobToNetworkMutex.Unlock()
	fake.AssignJobToNetworkStub = stub
}

func (fake *FakeNetworkStoreInterface) AssignJobToNetworkArgsForCall(i int) (string, string, *execution.JobNetworkAllocation) {
	fake.assignJobToNetworkMutex.RLock()
	defer fake.assignJobToNetworkMutex.RUnlock()
	argsForCall := fake.assignJobToNetworkArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeNetworkStoreInterface) AssignJobToNetworkReturns(result1 error) {
	fake.assignJobToNetworkMutex.Lock()
	defer fake.assignJobToNetworkMutex.Unlock()
	fake.AssignJobToNetworkStub = nil
	fake.assignJobToNetworkReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkStoreInterface) AssignJobToNetworkReturnsOnCall(i int, result1 error) {
	fake.assignJobToNetworkMutex.Lock()
	defer fake.assignJobToNetworkMutex.Unlock()
	fake.AssignJobToNetworkStub = nil
	if fake.assignJobToNetworkReturnsOnCall == nil {
		fake.assignJobToNetworkReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.assignJobToNetworkReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkStoreInterface) GetJobAllocation(arg1 string) (*execution.JobNetworkAllocation, error) {
	fake.getJobAllocationMutex.Lock()
	ret, specificReturn := fake.getJobAllocationReturnsOnCall[len(fake.getJobAllocationArgsForCall)]
	fake.getJobAllocationArgsForCall = append(fake.getJobAllocationArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.GetJobAllocationStub
	fakeReturns := fake.getJobAllocationReturns
	fake.recordInvocation("GetJobAllocation", []interface{}{arg1})
	fake.getJobAllocationMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeNetworkStoreInterface) GetJobAllocationCallCount() int {
	fake.getJobAllocationMutex.RLock()
	defer fake.getJobAllocationMutex.RUnlock()
	return len(fake.getJobAllocationArgsForCall)
}

func (fake *FakeNetworkStoreInterface) GetJobAllocationCalls(stub func(string) (*execution.JobNetworkAllocation, error)) {
	fake.getJobAllocationMutex.Lock()
	defer fake.getJobAllocationMutex.Unlock()
	fake.GetJobAllocationStub = stub
}

func (fake *FakeNetworkStoreInterface) GetJobAllocationArgsForCall(i int) string {
	fake.getJobAllocationMutex.RLock()
	defer fake.getJobAllocationMutex.RUnlock()
	argsForCall := fake.getJobAllocationArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeNetworkStoreInterface) GetJobAllocationReturns(result1 *execution.JobNetworkAllocation, result2 error) {
	fake.getJobAllocationMutex.Lock()
	defer fake.getJobAllocationMutex.Unlock()
	fake.GetJobAllocationStub = nil
	fake.getJobAllocationReturns = struct {
		result1 *execution.JobNetworkAllocation
		result2 error
	}{result1, result2}
}

func (fake *FakeNetworkStoreInterface) GetJobAllocationReturnsOnCall(i int, result1 *execution.JobNetworkAllocation, result2 error) {
	fake.getJobAllocationMutex.Lock()
	defer fake.getJobAllocationMutex.Unlock()
	fake.GetJobAllocationStub = nil
	if fake.getJobAllocationReturnsOnCall == nil {
		fake.getJobAllocationReturnsOnCall = make(map[int]struct {
			result1 *execution.JobNetworkAllocation
			result2 error
		})
	}
	fake.getJobAllocationReturnsOnCall[i] = struct {
		result1 *execution.JobNetworkAllocation
		result2 error
	}{result1, result2}
}

func (fake *FakeNetworkStoreInterface) ReleaseIP(arg1 string, arg2 string) error {
	fake.releaseIPMutex.Lock()
	ret, specificReturn := fake.releaseIPReturnsOnCall[len(fake.releaseIPArgsForCall)]
	fake.releaseIPArgsForCall = append(fake.releaseIPArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	stub := fake.ReleaseIPStub
	fakeReturns := fake.releaseIPReturns
	fake.recordInvocation("ReleaseIP", []interface{}{arg1, arg2})
	fake.releaseIPMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeNetworkStoreInterface) ReleaseIPCallCount() int {
	fake.releaseIPMutex.RLock()
	defer fake.releaseIPMutex.RUnlock()
	return len(fake.releaseIPArgsForCall)
}

func (fake *FakeNetworkStoreInterface) ReleaseIPCalls(stub func(string, string) error) {
	fake.releaseIPMutex.Lock()
	defer fake.releaseIPMutex.Unlock()
	fake.ReleaseIPStub = stub
}

func (fake *FakeNetworkStoreInterface) ReleaseIPArgsForCall(i int) (string, string) {
	fake.releaseIPMutex.RLock()
	defer fake.releaseIPMutex.RUnlock()
	argsForCall := fake.releaseIPArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeNetworkStoreInterface) ReleaseIPReturns(result1 error) {
	fake.releaseIPMutex.Lock()
	defer fake.releaseIPMutex.Unlock()
	fake.ReleaseIPStub = nil
	fake.releaseIPReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkStoreInterface) ReleaseIPReturnsOnCall(i int, result1 error) {
	fake.releaseIPMutex.Lock()
	defer fake.releaseIPMutex.Unlock()
	fake.ReleaseIPStub = nil
	if fake.releaseIPReturnsOnCall == nil {
		fake.releaseIPReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.releaseIPReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkStoreInterface) RemoveJobFromNetwork(arg1 string) error {
	fake.removeJobFromNetworkMutex.Lock()
	ret, specificReturn := fake.removeJobFromNetworkReturnsOnCall[len(fake.removeJobFromNetworkArgsForCall)]
	fake.removeJobFromNetworkArgsForCall = append(fake.removeJobFromNetworkArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.RemoveJobFromNetworkStub
	fakeReturns := fake.removeJobFromNetworkReturns
	fake.recordInvocation("RemoveJobFromNetwork", []interface{}{arg1})
	fake.removeJobFromNetworkMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeNetworkStoreInterface) RemoveJobFromNetworkCallCount() int {
	fake.removeJobFromNetworkMutex.RLock()
	defer fake.removeJobFromNetworkMutex.RUnlock()
	return len(fake.removeJobFromNetworkArgsForCall)
}

func (fake *FakeNetworkStoreInterface) RemoveJobFromNetworkCalls(stub func(string) error) {
	fake.removeJobFromNetworkMutex.Lock()
	defer fake.removeJobFromNetworkMutex.Unlock()
	fake.RemoveJobFromNetworkStub = stub
}

func (fake *FakeNetworkStoreInterface) RemoveJobFromNetworkArgsForCall(i int) string {
	fake.removeJobFromNetworkMutex.RLock()
	defer fake.removeJobFromNetworkMutex.RUnlock()
	argsForCall := fake.removeJobFromNetworkArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeNetworkStoreInterface) RemoveJobFromNetworkReturns(result1 error) {
	fake.removeJobFromNetworkMutex.Lock()
	defer fake.removeJobFromNetworkMutex.Unlock()
	fake.RemoveJobFromNetworkStub = nil
	fake.removeJobFromNetworkReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkStoreInterface) RemoveJobFromNetworkReturnsOnCall(i int, result1 error) {
	fake.removeJobFromNetworkMutex.Lock()
	defer fake.removeJobFromNetworkMutex.Unlock()
	fake.RemoveJobFromNetworkStub = nil
	if fake.removeJobFromNetworkReturnsOnCall == nil {
		fake.removeJobFromNetworkReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.removeJobFromNetworkReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkStoreInterface) 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 *FakeNetworkStoreInterface) 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 _ execution.NetworkStoreInterface = new(FakeNetworkStoreInterface)
