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

import (
	"sync"
	"time"

	"code.cloudfoundry.org/guardian/rundmc/goci"
	"code.cloudfoundry.org/guardian/rundmc/runrunc"
	"code.cloudfoundry.org/lager/v3"
)

type FakeDepot struct {
	CreateStub        func(lager.Logger, string, goci.Bndl) (string, error)
	createMutex       sync.RWMutex
	createArgsForCall []struct {
		arg1 lager.Logger
		arg2 string
		arg3 goci.Bndl
	}
	createReturns struct {
		result1 string
		result2 error
	}
	createReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	CreatedTimeStub        func(lager.Logger, string) (time.Time, error)
	createdTimeMutex       sync.RWMutex
	createdTimeArgsForCall []struct {
		arg1 lager.Logger
		arg2 string
	}
	createdTimeReturns struct {
		result1 time.Time
		result2 error
	}
	createdTimeReturnsOnCall map[int]struct {
		result1 time.Time
		result2 error
	}
	DestroyStub        func(lager.Logger, string) error
	destroyMutex       sync.RWMutex
	destroyArgsForCall []struct {
		arg1 lager.Logger
		arg2 string
	}
	destroyReturns struct {
		result1 error
	}
	destroyReturnsOnCall map[int]struct {
		result1 error
	}
	HandlesStub        func() ([]string, error)
	handlesMutex       sync.RWMutex
	handlesArgsForCall []struct {
	}
	handlesReturns struct {
		result1 []string
		result2 error
	}
	handlesReturnsOnCall map[int]struct {
		result1 []string
		result2 error
	}
	LoadStub        func(lager.Logger, string) (goci.Bndl, error)
	loadMutex       sync.RWMutex
	loadArgsForCall []struct {
		arg1 lager.Logger
		arg2 string
	}
	loadReturns struct {
		result1 goci.Bndl
		result2 error
	}
	loadReturnsOnCall map[int]struct {
		result1 goci.Bndl
		result2 error
	}
	LookupStub        func(lager.Logger, string) (string, error)
	lookupMutex       sync.RWMutex
	lookupArgsForCall []struct {
		arg1 lager.Logger
		arg2 string
	}
	lookupReturns struct {
		result1 string
		result2 error
	}
	lookupReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDepot) Create(arg1 lager.Logger, arg2 string, arg3 goci.Bndl) (string, error) {
	fake.createMutex.Lock()
	ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)]
	fake.createArgsForCall = append(fake.createArgsForCall, struct {
		arg1 lager.Logger
		arg2 string
		arg3 goci.Bndl
	}{arg1, arg2, arg3})
	fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3})
	fake.createMutex.Unlock()
	if fake.CreateStub != nil {
		return fake.CreateStub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.createReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeDepot) CreateCallCount() int {
	fake.createMutex.RLock()
	defer fake.createMutex.RUnlock()
	return len(fake.createArgsForCall)
}

func (fake *FakeDepot) CreateCalls(stub func(lager.Logger, string, goci.Bndl) (string, error)) {
	fake.createMutex.Lock()
	defer fake.createMutex.Unlock()
	fake.CreateStub = stub
}

func (fake *FakeDepot) CreateArgsForCall(i int) (lager.Logger, string, goci.Bndl) {
	fake.createMutex.RLock()
	defer fake.createMutex.RUnlock()
	argsForCall := fake.createArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeDepot) CreateReturns(result1 string, result2 error) {
	fake.createMutex.Lock()
	defer fake.createMutex.Unlock()
	fake.CreateStub = nil
	fake.createReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) CreateReturnsOnCall(i int, result1 string, result2 error) {
	fake.createMutex.Lock()
	defer fake.createMutex.Unlock()
	fake.CreateStub = nil
	if fake.createReturnsOnCall == nil {
		fake.createReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.createReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) CreatedTime(arg1 lager.Logger, arg2 string) (time.Time, error) {
	fake.createdTimeMutex.Lock()
	ret, specificReturn := fake.createdTimeReturnsOnCall[len(fake.createdTimeArgsForCall)]
	fake.createdTimeArgsForCall = append(fake.createdTimeArgsForCall, struct {
		arg1 lager.Logger
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("CreatedTime", []interface{}{arg1, arg2})
	fake.createdTimeMutex.Unlock()
	if fake.CreatedTimeStub != nil {
		return fake.CreatedTimeStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.createdTimeReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeDepot) CreatedTimeCallCount() int {
	fake.createdTimeMutex.RLock()
	defer fake.createdTimeMutex.RUnlock()
	return len(fake.createdTimeArgsForCall)
}

func (fake *FakeDepot) CreatedTimeCalls(stub func(lager.Logger, string) (time.Time, error)) {
	fake.createdTimeMutex.Lock()
	defer fake.createdTimeMutex.Unlock()
	fake.CreatedTimeStub = stub
}

func (fake *FakeDepot) CreatedTimeArgsForCall(i int) (lager.Logger, string) {
	fake.createdTimeMutex.RLock()
	defer fake.createdTimeMutex.RUnlock()
	argsForCall := fake.createdTimeArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeDepot) CreatedTimeReturns(result1 time.Time, result2 error) {
	fake.createdTimeMutex.Lock()
	defer fake.createdTimeMutex.Unlock()
	fake.CreatedTimeStub = nil
	fake.createdTimeReturns = struct {
		result1 time.Time
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) CreatedTimeReturnsOnCall(i int, result1 time.Time, result2 error) {
	fake.createdTimeMutex.Lock()
	defer fake.createdTimeMutex.Unlock()
	fake.CreatedTimeStub = nil
	if fake.createdTimeReturnsOnCall == nil {
		fake.createdTimeReturnsOnCall = make(map[int]struct {
			result1 time.Time
			result2 error
		})
	}
	fake.createdTimeReturnsOnCall[i] = struct {
		result1 time.Time
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) Destroy(arg1 lager.Logger, arg2 string) error {
	fake.destroyMutex.Lock()
	ret, specificReturn := fake.destroyReturnsOnCall[len(fake.destroyArgsForCall)]
	fake.destroyArgsForCall = append(fake.destroyArgsForCall, struct {
		arg1 lager.Logger
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("Destroy", []interface{}{arg1, arg2})
	fake.destroyMutex.Unlock()
	if fake.DestroyStub != nil {
		return fake.DestroyStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.destroyReturns
	return fakeReturns.result1
}

func (fake *FakeDepot) DestroyCallCount() int {
	fake.destroyMutex.RLock()
	defer fake.destroyMutex.RUnlock()
	return len(fake.destroyArgsForCall)
}

func (fake *FakeDepot) DestroyCalls(stub func(lager.Logger, string) error) {
	fake.destroyMutex.Lock()
	defer fake.destroyMutex.Unlock()
	fake.DestroyStub = stub
}

func (fake *FakeDepot) DestroyArgsForCall(i int) (lager.Logger, string) {
	fake.destroyMutex.RLock()
	defer fake.destroyMutex.RUnlock()
	argsForCall := fake.destroyArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeDepot) DestroyReturns(result1 error) {
	fake.destroyMutex.Lock()
	defer fake.destroyMutex.Unlock()
	fake.DestroyStub = nil
	fake.destroyReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeDepot) DestroyReturnsOnCall(i int, result1 error) {
	fake.destroyMutex.Lock()
	defer fake.destroyMutex.Unlock()
	fake.DestroyStub = nil
	if fake.destroyReturnsOnCall == nil {
		fake.destroyReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.destroyReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeDepot) Handles() ([]string, error) {
	fake.handlesMutex.Lock()
	ret, specificReturn := fake.handlesReturnsOnCall[len(fake.handlesArgsForCall)]
	fake.handlesArgsForCall = append(fake.handlesArgsForCall, struct {
	}{})
	fake.recordInvocation("Handles", []interface{}{})
	fake.handlesMutex.Unlock()
	if fake.HandlesStub != nil {
		return fake.HandlesStub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.handlesReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeDepot) HandlesCallCount() int {
	fake.handlesMutex.RLock()
	defer fake.handlesMutex.RUnlock()
	return len(fake.handlesArgsForCall)
}

func (fake *FakeDepot) HandlesCalls(stub func() ([]string, error)) {
	fake.handlesMutex.Lock()
	defer fake.handlesMutex.Unlock()
	fake.HandlesStub = stub
}

func (fake *FakeDepot) HandlesReturns(result1 []string, result2 error) {
	fake.handlesMutex.Lock()
	defer fake.handlesMutex.Unlock()
	fake.HandlesStub = nil
	fake.handlesReturns = struct {
		result1 []string
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) HandlesReturnsOnCall(i int, result1 []string, result2 error) {
	fake.handlesMutex.Lock()
	defer fake.handlesMutex.Unlock()
	fake.HandlesStub = nil
	if fake.handlesReturnsOnCall == nil {
		fake.handlesReturnsOnCall = make(map[int]struct {
			result1 []string
			result2 error
		})
	}
	fake.handlesReturnsOnCall[i] = struct {
		result1 []string
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) Load(arg1 lager.Logger, arg2 string) (goci.Bndl, error) {
	fake.loadMutex.Lock()
	ret, specificReturn := fake.loadReturnsOnCall[len(fake.loadArgsForCall)]
	fake.loadArgsForCall = append(fake.loadArgsForCall, struct {
		arg1 lager.Logger
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("Load", []interface{}{arg1, arg2})
	fake.loadMutex.Unlock()
	if fake.LoadStub != nil {
		return fake.LoadStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.loadReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeDepot) LoadCallCount() int {
	fake.loadMutex.RLock()
	defer fake.loadMutex.RUnlock()
	return len(fake.loadArgsForCall)
}

func (fake *FakeDepot) LoadCalls(stub func(lager.Logger, string) (goci.Bndl, error)) {
	fake.loadMutex.Lock()
	defer fake.loadMutex.Unlock()
	fake.LoadStub = stub
}

func (fake *FakeDepot) LoadArgsForCall(i int) (lager.Logger, string) {
	fake.loadMutex.RLock()
	defer fake.loadMutex.RUnlock()
	argsForCall := fake.loadArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeDepot) LoadReturns(result1 goci.Bndl, result2 error) {
	fake.loadMutex.Lock()
	defer fake.loadMutex.Unlock()
	fake.LoadStub = nil
	fake.loadReturns = struct {
		result1 goci.Bndl
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) LoadReturnsOnCall(i int, result1 goci.Bndl, result2 error) {
	fake.loadMutex.Lock()
	defer fake.loadMutex.Unlock()
	fake.LoadStub = nil
	if fake.loadReturnsOnCall == nil {
		fake.loadReturnsOnCall = make(map[int]struct {
			result1 goci.Bndl
			result2 error
		})
	}
	fake.loadReturnsOnCall[i] = struct {
		result1 goci.Bndl
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) Lookup(arg1 lager.Logger, arg2 string) (string, error) {
	fake.lookupMutex.Lock()
	ret, specificReturn := fake.lookupReturnsOnCall[len(fake.lookupArgsForCall)]
	fake.lookupArgsForCall = append(fake.lookupArgsForCall, struct {
		arg1 lager.Logger
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("Lookup", []interface{}{arg1, arg2})
	fake.lookupMutex.Unlock()
	if fake.LookupStub != nil {
		return fake.LookupStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.lookupReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeDepot) LookupCallCount() int {
	fake.lookupMutex.RLock()
	defer fake.lookupMutex.RUnlock()
	return len(fake.lookupArgsForCall)
}

func (fake *FakeDepot) LookupCalls(stub func(lager.Logger, string) (string, error)) {
	fake.lookupMutex.Lock()
	defer fake.lookupMutex.Unlock()
	fake.LookupStub = stub
}

func (fake *FakeDepot) LookupArgsForCall(i int) (lager.Logger, string) {
	fake.lookupMutex.RLock()
	defer fake.lookupMutex.RUnlock()
	argsForCall := fake.lookupArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeDepot) LookupReturns(result1 string, result2 error) {
	fake.lookupMutex.Lock()
	defer fake.lookupMutex.Unlock()
	fake.LookupStub = nil
	fake.lookupReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) LookupReturnsOnCall(i int, result1 string, result2 error) {
	fake.lookupMutex.Lock()
	defer fake.lookupMutex.Unlock()
	fake.LookupStub = nil
	if fake.lookupReturnsOnCall == nil {
		fake.lookupReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.lookupReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeDepot) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.createMutex.RLock()
	defer fake.createMutex.RUnlock()
	fake.createdTimeMutex.RLock()
	defer fake.createdTimeMutex.RUnlock()
	fake.destroyMutex.RLock()
	defer fake.destroyMutex.RUnlock()
	fake.handlesMutex.RLock()
	defer fake.handlesMutex.RUnlock()
	fake.loadMutex.RLock()
	defer fake.loadMutex.RUnlock()
	fake.lookupMutex.RLock()
	defer fake.lookupMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeDepot) 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 _ runrunc.Depot = new(FakeDepot)
