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

import (
	"sync"

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

type FakeGPUManagerInterface struct {
	AllocateGPUsStub        func(string, int, int64) (*gpu.GPUAllocation, error)
	allocateGPUsMutex       sync.RWMutex
	allocateGPUsArgsForCall []struct {
		arg1 string
		arg2 int
		arg3 int64
	}
	allocateGPUsReturns struct {
		result1 *gpu.GPUAllocation
		result2 error
	}
	allocateGPUsReturnsOnCall map[int]struct {
		result1 *gpu.GPUAllocation
		result2 error
	}
	GetAllGPUsStub        func() ([]*gpu.GPU, error)
	getAllGPUsMutex       sync.RWMutex
	getAllGPUsArgsForCall []struct {
	}
	getAllGPUsReturns struct {
		result1 []*gpu.GPU
		result2 error
	}
	getAllGPUsReturnsOnCall map[int]struct {
		result1 []*gpu.GPU
		result2 error
	}
	GetAvailableGPUsStub        func() ([]*gpu.GPU, error)
	getAvailableGPUsMutex       sync.RWMutex
	getAvailableGPUsArgsForCall []struct {
	}
	getAvailableGPUsReturns struct {
		result1 []*gpu.GPU
		result2 error
	}
	getAvailableGPUsReturnsOnCall map[int]struct {
		result1 []*gpu.GPU
		result2 error
	}
	GetGPUCountStub        func() int
	getGPUCountMutex       sync.RWMutex
	getGPUCountArgsForCall []struct {
	}
	getGPUCountReturns struct {
		result1 int
	}
	getGPUCountReturnsOnCall map[int]struct {
		result1 int
	}
	GetJobAllocationStub        func(string) (*gpu.GPUAllocation, error)
	getJobAllocationMutex       sync.RWMutex
	getJobAllocationArgsForCall []struct {
		arg1 string
	}
	getJobAllocationReturns struct {
		result1 *gpu.GPUAllocation
		result2 error
	}
	getJobAllocationReturnsOnCall map[int]struct {
		result1 *gpu.GPUAllocation
		result2 error
	}
	InitializeStub        func() error
	initializeMutex       sync.RWMutex
	initializeArgsForCall []struct {
	}
	initializeReturns struct {
		result1 error
	}
	initializeReturnsOnCall map[int]struct {
		result1 error
	}
	IsEnabledStub        func() bool
	isEnabledMutex       sync.RWMutex
	isEnabledArgsForCall []struct {
	}
	isEnabledReturns struct {
		result1 bool
	}
	isEnabledReturnsOnCall map[int]struct {
		result1 bool
	}
	ReleaseGPUsStub        func(string) error
	releaseGPUsMutex       sync.RWMutex
	releaseGPUsArgsForCall []struct {
		arg1 string
	}
	releaseGPUsReturns struct {
		result1 error
	}
	releaseGPUsReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeGPUManagerInterface) AllocateGPUs(arg1 string, arg2 int, arg3 int64) (*gpu.GPUAllocation, error) {
	fake.allocateGPUsMutex.Lock()
	ret, specificReturn := fake.allocateGPUsReturnsOnCall[len(fake.allocateGPUsArgsForCall)]
	fake.allocateGPUsArgsForCall = append(fake.allocateGPUsArgsForCall, struct {
		arg1 string
		arg2 int
		arg3 int64
	}{arg1, arg2, arg3})
	stub := fake.AllocateGPUsStub
	fakeReturns := fake.allocateGPUsReturns
	fake.recordInvocation("AllocateGPUs", []interface{}{arg1, arg2, arg3})
	fake.allocateGPUsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeGPUManagerInterface) AllocateGPUsCallCount() int {
	fake.allocateGPUsMutex.RLock()
	defer fake.allocateGPUsMutex.RUnlock()
	return len(fake.allocateGPUsArgsForCall)
}

func (fake *FakeGPUManagerInterface) AllocateGPUsCalls(stub func(string, int, int64) (*gpu.GPUAllocation, error)) {
	fake.allocateGPUsMutex.Lock()
	defer fake.allocateGPUsMutex.Unlock()
	fake.AllocateGPUsStub = stub
}

func (fake *FakeGPUManagerInterface) AllocateGPUsArgsForCall(i int) (string, int, int64) {
	fake.allocateGPUsMutex.RLock()
	defer fake.allocateGPUsMutex.RUnlock()
	argsForCall := fake.allocateGPUsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeGPUManagerInterface) AllocateGPUsReturns(result1 *gpu.GPUAllocation, result2 error) {
	fake.allocateGPUsMutex.Lock()
	defer fake.allocateGPUsMutex.Unlock()
	fake.AllocateGPUsStub = nil
	fake.allocateGPUsReturns = struct {
		result1 *gpu.GPUAllocation
		result2 error
	}{result1, result2}
}

func (fake *FakeGPUManagerInterface) AllocateGPUsReturnsOnCall(i int, result1 *gpu.GPUAllocation, result2 error) {
	fake.allocateGPUsMutex.Lock()
	defer fake.allocateGPUsMutex.Unlock()
	fake.AllocateGPUsStub = nil
	if fake.allocateGPUsReturnsOnCall == nil {
		fake.allocateGPUsReturnsOnCall = make(map[int]struct {
			result1 *gpu.GPUAllocation
			result2 error
		})
	}
	fake.allocateGPUsReturnsOnCall[i] = struct {
		result1 *gpu.GPUAllocation
		result2 error
	}{result1, result2}
}

func (fake *FakeGPUManagerInterface) GetAllGPUs() ([]*gpu.GPU, error) {
	fake.getAllGPUsMutex.Lock()
	ret, specificReturn := fake.getAllGPUsReturnsOnCall[len(fake.getAllGPUsArgsForCall)]
	fake.getAllGPUsArgsForCall = append(fake.getAllGPUsArgsForCall, struct {
	}{})
	stub := fake.GetAllGPUsStub
	fakeReturns := fake.getAllGPUsReturns
	fake.recordInvocation("GetAllGPUs", []interface{}{})
	fake.getAllGPUsMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeGPUManagerInterface) GetAllGPUsCallCount() int {
	fake.getAllGPUsMutex.RLock()
	defer fake.getAllGPUsMutex.RUnlock()
	return len(fake.getAllGPUsArgsForCall)
}

func (fake *FakeGPUManagerInterface) GetAllGPUsCalls(stub func() ([]*gpu.GPU, error)) {
	fake.getAllGPUsMutex.Lock()
	defer fake.getAllGPUsMutex.Unlock()
	fake.GetAllGPUsStub = stub
}

func (fake *FakeGPUManagerInterface) GetAllGPUsReturns(result1 []*gpu.GPU, result2 error) {
	fake.getAllGPUsMutex.Lock()
	defer fake.getAllGPUsMutex.Unlock()
	fake.GetAllGPUsStub = nil
	fake.getAllGPUsReturns = struct {
		result1 []*gpu.GPU
		result2 error
	}{result1, result2}
}

func (fake *FakeGPUManagerInterface) GetAllGPUsReturnsOnCall(i int, result1 []*gpu.GPU, result2 error) {
	fake.getAllGPUsMutex.Lock()
	defer fake.getAllGPUsMutex.Unlock()
	fake.GetAllGPUsStub = nil
	if fake.getAllGPUsReturnsOnCall == nil {
		fake.getAllGPUsReturnsOnCall = make(map[int]struct {
			result1 []*gpu.GPU
			result2 error
		})
	}
	fake.getAllGPUsReturnsOnCall[i] = struct {
		result1 []*gpu.GPU
		result2 error
	}{result1, result2}
}

func (fake *FakeGPUManagerInterface) GetAvailableGPUs() ([]*gpu.GPU, error) {
	fake.getAvailableGPUsMutex.Lock()
	ret, specificReturn := fake.getAvailableGPUsReturnsOnCall[len(fake.getAvailableGPUsArgsForCall)]
	fake.getAvailableGPUsArgsForCall = append(fake.getAvailableGPUsArgsForCall, struct {
	}{})
	stub := fake.GetAvailableGPUsStub
	fakeReturns := fake.getAvailableGPUsReturns
	fake.recordInvocation("GetAvailableGPUs", []interface{}{})
	fake.getAvailableGPUsMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeGPUManagerInterface) GetAvailableGPUsCallCount() int {
	fake.getAvailableGPUsMutex.RLock()
	defer fake.getAvailableGPUsMutex.RUnlock()
	return len(fake.getAvailableGPUsArgsForCall)
}

func (fake *FakeGPUManagerInterface) GetAvailableGPUsCalls(stub func() ([]*gpu.GPU, error)) {
	fake.getAvailableGPUsMutex.Lock()
	defer fake.getAvailableGPUsMutex.Unlock()
	fake.GetAvailableGPUsStub = stub
}

func (fake *FakeGPUManagerInterface) GetAvailableGPUsReturns(result1 []*gpu.GPU, result2 error) {
	fake.getAvailableGPUsMutex.Lock()
	defer fake.getAvailableGPUsMutex.Unlock()
	fake.GetAvailableGPUsStub = nil
	fake.getAvailableGPUsReturns = struct {
		result1 []*gpu.GPU
		result2 error
	}{result1, result2}
}

func (fake *FakeGPUManagerInterface) GetAvailableGPUsReturnsOnCall(i int, result1 []*gpu.GPU, result2 error) {
	fake.getAvailableGPUsMutex.Lock()
	defer fake.getAvailableGPUsMutex.Unlock()
	fake.GetAvailableGPUsStub = nil
	if fake.getAvailableGPUsReturnsOnCall == nil {
		fake.getAvailableGPUsReturnsOnCall = make(map[int]struct {
			result1 []*gpu.GPU
			result2 error
		})
	}
	fake.getAvailableGPUsReturnsOnCall[i] = struct {
		result1 []*gpu.GPU
		result2 error
	}{result1, result2}
}

func (fake *FakeGPUManagerInterface) GetGPUCount() int {
	fake.getGPUCountMutex.Lock()
	ret, specificReturn := fake.getGPUCountReturnsOnCall[len(fake.getGPUCountArgsForCall)]
	fake.getGPUCountArgsForCall = append(fake.getGPUCountArgsForCall, struct {
	}{})
	stub := fake.GetGPUCountStub
	fakeReturns := fake.getGPUCountReturns
	fake.recordInvocation("GetGPUCount", []interface{}{})
	fake.getGPUCountMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeGPUManagerInterface) GetGPUCountCallCount() int {
	fake.getGPUCountMutex.RLock()
	defer fake.getGPUCountMutex.RUnlock()
	return len(fake.getGPUCountArgsForCall)
}

func (fake *FakeGPUManagerInterface) GetGPUCountCalls(stub func() int) {
	fake.getGPUCountMutex.Lock()
	defer fake.getGPUCountMutex.Unlock()
	fake.GetGPUCountStub = stub
}

func (fake *FakeGPUManagerInterface) GetGPUCountReturns(result1 int) {
	fake.getGPUCountMutex.Lock()
	defer fake.getGPUCountMutex.Unlock()
	fake.GetGPUCountStub = nil
	fake.getGPUCountReturns = struct {
		result1 int
	}{result1}
}

func (fake *FakeGPUManagerInterface) GetGPUCountReturnsOnCall(i int, result1 int) {
	fake.getGPUCountMutex.Lock()
	defer fake.getGPUCountMutex.Unlock()
	fake.GetGPUCountStub = nil
	if fake.getGPUCountReturnsOnCall == nil {
		fake.getGPUCountReturnsOnCall = make(map[int]struct {
			result1 int
		})
	}
	fake.getGPUCountReturnsOnCall[i] = struct {
		result1 int
	}{result1}
}

func (fake *FakeGPUManagerInterface) GetJobAllocation(arg1 string) (*gpu.GPUAllocation, 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 *FakeGPUManagerInterface) GetJobAllocationCallCount() int {
	fake.getJobAllocationMutex.RLock()
	defer fake.getJobAllocationMutex.RUnlock()
	return len(fake.getJobAllocationArgsForCall)
}

func (fake *FakeGPUManagerInterface) GetJobAllocationCalls(stub func(string) (*gpu.GPUAllocation, error)) {
	fake.getJobAllocationMutex.Lock()
	defer fake.getJobAllocationMutex.Unlock()
	fake.GetJobAllocationStub = stub
}

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

func (fake *FakeGPUManagerInterface) GetJobAllocationReturns(result1 *gpu.GPUAllocation, result2 error) {
	fake.getJobAllocationMutex.Lock()
	defer fake.getJobAllocationMutex.Unlock()
	fake.GetJobAllocationStub = nil
	fake.getJobAllocationReturns = struct {
		result1 *gpu.GPUAllocation
		result2 error
	}{result1, result2}
}

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

func (fake *FakeGPUManagerInterface) Initialize() error {
	fake.initializeMutex.Lock()
	ret, specificReturn := fake.initializeReturnsOnCall[len(fake.initializeArgsForCall)]
	fake.initializeArgsForCall = append(fake.initializeArgsForCall, struct {
	}{})
	stub := fake.InitializeStub
	fakeReturns := fake.initializeReturns
	fake.recordInvocation("Initialize", []interface{}{})
	fake.initializeMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeGPUManagerInterface) InitializeCallCount() int {
	fake.initializeMutex.RLock()
	defer fake.initializeMutex.RUnlock()
	return len(fake.initializeArgsForCall)
}

func (fake *FakeGPUManagerInterface) InitializeCalls(stub func() error) {
	fake.initializeMutex.Lock()
	defer fake.initializeMutex.Unlock()
	fake.InitializeStub = stub
}

func (fake *FakeGPUManagerInterface) InitializeReturns(result1 error) {
	fake.initializeMutex.Lock()
	defer fake.initializeMutex.Unlock()
	fake.InitializeStub = nil
	fake.initializeReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeGPUManagerInterface) InitializeReturnsOnCall(i int, result1 error) {
	fake.initializeMutex.Lock()
	defer fake.initializeMutex.Unlock()
	fake.InitializeStub = nil
	if fake.initializeReturnsOnCall == nil {
		fake.initializeReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.initializeReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeGPUManagerInterface) IsEnabled() bool {
	fake.isEnabledMutex.Lock()
	ret, specificReturn := fake.isEnabledReturnsOnCall[len(fake.isEnabledArgsForCall)]
	fake.isEnabledArgsForCall = append(fake.isEnabledArgsForCall, struct {
	}{})
	stub := fake.IsEnabledStub
	fakeReturns := fake.isEnabledReturns
	fake.recordInvocation("IsEnabled", []interface{}{})
	fake.isEnabledMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeGPUManagerInterface) IsEnabledCallCount() int {
	fake.isEnabledMutex.RLock()
	defer fake.isEnabledMutex.RUnlock()
	return len(fake.isEnabledArgsForCall)
}

func (fake *FakeGPUManagerInterface) IsEnabledCalls(stub func() bool) {
	fake.isEnabledMutex.Lock()
	defer fake.isEnabledMutex.Unlock()
	fake.IsEnabledStub = stub
}

func (fake *FakeGPUManagerInterface) IsEnabledReturns(result1 bool) {
	fake.isEnabledMutex.Lock()
	defer fake.isEnabledMutex.Unlock()
	fake.IsEnabledStub = nil
	fake.isEnabledReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeGPUManagerInterface) IsEnabledReturnsOnCall(i int, result1 bool) {
	fake.isEnabledMutex.Lock()
	defer fake.isEnabledMutex.Unlock()
	fake.IsEnabledStub = nil
	if fake.isEnabledReturnsOnCall == nil {
		fake.isEnabledReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isEnabledReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeGPUManagerInterface) ReleaseGPUs(arg1 string) error {
	fake.releaseGPUsMutex.Lock()
	ret, specificReturn := fake.releaseGPUsReturnsOnCall[len(fake.releaseGPUsArgsForCall)]
	fake.releaseGPUsArgsForCall = append(fake.releaseGPUsArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.ReleaseGPUsStub
	fakeReturns := fake.releaseGPUsReturns
	fake.recordInvocation("ReleaseGPUs", []interface{}{arg1})
	fake.releaseGPUsMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeGPUManagerInterface) ReleaseGPUsCallCount() int {
	fake.releaseGPUsMutex.RLock()
	defer fake.releaseGPUsMutex.RUnlock()
	return len(fake.releaseGPUsArgsForCall)
}

func (fake *FakeGPUManagerInterface) ReleaseGPUsCalls(stub func(string) error) {
	fake.releaseGPUsMutex.Lock()
	defer fake.releaseGPUsMutex.Unlock()
	fake.ReleaseGPUsStub = stub
}

func (fake *FakeGPUManagerInterface) ReleaseGPUsArgsForCall(i int) string {
	fake.releaseGPUsMutex.RLock()
	defer fake.releaseGPUsMutex.RUnlock()
	argsForCall := fake.releaseGPUsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeGPUManagerInterface) ReleaseGPUsReturns(result1 error) {
	fake.releaseGPUsMutex.Lock()
	defer fake.releaseGPUsMutex.Unlock()
	fake.ReleaseGPUsStub = nil
	fake.releaseGPUsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeGPUManagerInterface) ReleaseGPUsReturnsOnCall(i int, result1 error) {
	fake.releaseGPUsMutex.Lock()
	defer fake.releaseGPUsMutex.Unlock()
	fake.ReleaseGPUsStub = nil
	if fake.releaseGPUsReturnsOnCall == nil {
		fake.releaseGPUsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.releaseGPUsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeGPUManagerInterface) 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 *FakeGPUManagerInterface) 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 _ gpu.GPUManagerInterface = new(FakeGPUManagerInterface)
