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

import (
	"io"
	"sync"

	"github.com/cloudfoundry/bosh-cli/v7/releasedir"
)

type FakeBlobsDir struct {
	BlobsStub        func() ([]releasedir.Blob, error)
	blobsMutex       sync.RWMutex
	blobsArgsForCall []struct {
	}
	blobsReturns struct {
		result1 []releasedir.Blob
		result2 error
	}
	blobsReturnsOnCall map[int]struct {
		result1 []releasedir.Blob
		result2 error
	}
	InitStub        func() error
	initMutex       sync.RWMutex
	initArgsForCall []struct {
	}
	initReturns struct {
		result1 error
	}
	initReturnsOnCall map[int]struct {
		result1 error
	}
	SyncBlobsStub        func(int) error
	syncBlobsMutex       sync.RWMutex
	syncBlobsArgsForCall []struct {
		arg1 int
	}
	syncBlobsReturns struct {
		result1 error
	}
	syncBlobsReturnsOnCall map[int]struct {
		result1 error
	}
	TrackBlobStub        func(string, io.ReadCloser) (releasedir.Blob, error)
	trackBlobMutex       sync.RWMutex
	trackBlobArgsForCall []struct {
		arg1 string
		arg2 io.ReadCloser
	}
	trackBlobReturns struct {
		result1 releasedir.Blob
		result2 error
	}
	trackBlobReturnsOnCall map[int]struct {
		result1 releasedir.Blob
		result2 error
	}
	UntrackBlobStub        func(string) error
	untrackBlobMutex       sync.RWMutex
	untrackBlobArgsForCall []struct {
		arg1 string
	}
	untrackBlobReturns struct {
		result1 error
	}
	untrackBlobReturnsOnCall map[int]struct {
		result1 error
	}
	UploadBlobsStub        func() error
	uploadBlobsMutex       sync.RWMutex
	uploadBlobsArgsForCall []struct {
	}
	uploadBlobsReturns struct {
		result1 error
	}
	uploadBlobsReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeBlobsDir) Blobs() ([]releasedir.Blob, error) {
	fake.blobsMutex.Lock()
	ret, specificReturn := fake.blobsReturnsOnCall[len(fake.blobsArgsForCall)]
	fake.blobsArgsForCall = append(fake.blobsArgsForCall, struct {
	}{})
	stub := fake.BlobsStub
	fakeReturns := fake.blobsReturns
	fake.recordInvocation("Blobs", []interface{}{})
	fake.blobsMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBlobsDir) BlobsCallCount() int {
	fake.blobsMutex.RLock()
	defer fake.blobsMutex.RUnlock()
	return len(fake.blobsArgsForCall)
}

func (fake *FakeBlobsDir) BlobsCalls(stub func() ([]releasedir.Blob, error)) {
	fake.blobsMutex.Lock()
	defer fake.blobsMutex.Unlock()
	fake.BlobsStub = stub
}

func (fake *FakeBlobsDir) BlobsReturns(result1 []releasedir.Blob, result2 error) {
	fake.blobsMutex.Lock()
	defer fake.blobsMutex.Unlock()
	fake.BlobsStub = nil
	fake.blobsReturns = struct {
		result1 []releasedir.Blob
		result2 error
	}{result1, result2}
}

func (fake *FakeBlobsDir) BlobsReturnsOnCall(i int, result1 []releasedir.Blob, result2 error) {
	fake.blobsMutex.Lock()
	defer fake.blobsMutex.Unlock()
	fake.BlobsStub = nil
	if fake.blobsReturnsOnCall == nil {
		fake.blobsReturnsOnCall = make(map[int]struct {
			result1 []releasedir.Blob
			result2 error
		})
	}
	fake.blobsReturnsOnCall[i] = struct {
		result1 []releasedir.Blob
		result2 error
	}{result1, result2}
}

func (fake *FakeBlobsDir) Init() error {
	fake.initMutex.Lock()
	ret, specificReturn := fake.initReturnsOnCall[len(fake.initArgsForCall)]
	fake.initArgsForCall = append(fake.initArgsForCall, struct {
	}{})
	stub := fake.InitStub
	fakeReturns := fake.initReturns
	fake.recordInvocation("Init", []interface{}{})
	fake.initMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBlobsDir) InitCallCount() int {
	fake.initMutex.RLock()
	defer fake.initMutex.RUnlock()
	return len(fake.initArgsForCall)
}

func (fake *FakeBlobsDir) InitCalls(stub func() error) {
	fake.initMutex.Lock()
	defer fake.initMutex.Unlock()
	fake.InitStub = stub
}

func (fake *FakeBlobsDir) InitReturns(result1 error) {
	fake.initMutex.Lock()
	defer fake.initMutex.Unlock()
	fake.InitStub = nil
	fake.initReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBlobsDir) InitReturnsOnCall(i int, result1 error) {
	fake.initMutex.Lock()
	defer fake.initMutex.Unlock()
	fake.InitStub = nil
	if fake.initReturnsOnCall == nil {
		fake.initReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.initReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBlobsDir) SyncBlobs(arg1 int) error {
	fake.syncBlobsMutex.Lock()
	ret, specificReturn := fake.syncBlobsReturnsOnCall[len(fake.syncBlobsArgsForCall)]
	fake.syncBlobsArgsForCall = append(fake.syncBlobsArgsForCall, struct {
		arg1 int
	}{arg1})
	stub := fake.SyncBlobsStub
	fakeReturns := fake.syncBlobsReturns
	fake.recordInvocation("SyncBlobs", []interface{}{arg1})
	fake.syncBlobsMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBlobsDir) SyncBlobsCallCount() int {
	fake.syncBlobsMutex.RLock()
	defer fake.syncBlobsMutex.RUnlock()
	return len(fake.syncBlobsArgsForCall)
}

func (fake *FakeBlobsDir) SyncBlobsCalls(stub func(int) error) {
	fake.syncBlobsMutex.Lock()
	defer fake.syncBlobsMutex.Unlock()
	fake.SyncBlobsStub = stub
}

func (fake *FakeBlobsDir) SyncBlobsArgsForCall(i int) int {
	fake.syncBlobsMutex.RLock()
	defer fake.syncBlobsMutex.RUnlock()
	argsForCall := fake.syncBlobsArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeBlobsDir) SyncBlobsReturns(result1 error) {
	fake.syncBlobsMutex.Lock()
	defer fake.syncBlobsMutex.Unlock()
	fake.SyncBlobsStub = nil
	fake.syncBlobsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBlobsDir) SyncBlobsReturnsOnCall(i int, result1 error) {
	fake.syncBlobsMutex.Lock()
	defer fake.syncBlobsMutex.Unlock()
	fake.SyncBlobsStub = nil
	if fake.syncBlobsReturnsOnCall == nil {
		fake.syncBlobsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.syncBlobsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBlobsDir) TrackBlob(arg1 string, arg2 io.ReadCloser) (releasedir.Blob, error) {
	fake.trackBlobMutex.Lock()
	ret, specificReturn := fake.trackBlobReturnsOnCall[len(fake.trackBlobArgsForCall)]
	fake.trackBlobArgsForCall = append(fake.trackBlobArgsForCall, struct {
		arg1 string
		arg2 io.ReadCloser
	}{arg1, arg2})
	stub := fake.TrackBlobStub
	fakeReturns := fake.trackBlobReturns
	fake.recordInvocation("TrackBlob", []interface{}{arg1, arg2})
	fake.trackBlobMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBlobsDir) TrackBlobCallCount() int {
	fake.trackBlobMutex.RLock()
	defer fake.trackBlobMutex.RUnlock()
	return len(fake.trackBlobArgsForCall)
}

func (fake *FakeBlobsDir) TrackBlobCalls(stub func(string, io.ReadCloser) (releasedir.Blob, error)) {
	fake.trackBlobMutex.Lock()
	defer fake.trackBlobMutex.Unlock()
	fake.TrackBlobStub = stub
}

func (fake *FakeBlobsDir) TrackBlobArgsForCall(i int) (string, io.ReadCloser) {
	fake.trackBlobMutex.RLock()
	defer fake.trackBlobMutex.RUnlock()
	argsForCall := fake.trackBlobArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBlobsDir) TrackBlobReturns(result1 releasedir.Blob, result2 error) {
	fake.trackBlobMutex.Lock()
	defer fake.trackBlobMutex.Unlock()
	fake.TrackBlobStub = nil
	fake.trackBlobReturns = struct {
		result1 releasedir.Blob
		result2 error
	}{result1, result2}
}

func (fake *FakeBlobsDir) TrackBlobReturnsOnCall(i int, result1 releasedir.Blob, result2 error) {
	fake.trackBlobMutex.Lock()
	defer fake.trackBlobMutex.Unlock()
	fake.TrackBlobStub = nil
	if fake.trackBlobReturnsOnCall == nil {
		fake.trackBlobReturnsOnCall = make(map[int]struct {
			result1 releasedir.Blob
			result2 error
		})
	}
	fake.trackBlobReturnsOnCall[i] = struct {
		result1 releasedir.Blob
		result2 error
	}{result1, result2}
}

func (fake *FakeBlobsDir) UntrackBlob(arg1 string) error {
	fake.untrackBlobMutex.Lock()
	ret, specificReturn := fake.untrackBlobReturnsOnCall[len(fake.untrackBlobArgsForCall)]
	fake.untrackBlobArgsForCall = append(fake.untrackBlobArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.UntrackBlobStub
	fakeReturns := fake.untrackBlobReturns
	fake.recordInvocation("UntrackBlob", []interface{}{arg1})
	fake.untrackBlobMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBlobsDir) UntrackBlobCallCount() int {
	fake.untrackBlobMutex.RLock()
	defer fake.untrackBlobMutex.RUnlock()
	return len(fake.untrackBlobArgsForCall)
}

func (fake *FakeBlobsDir) UntrackBlobCalls(stub func(string) error) {
	fake.untrackBlobMutex.Lock()
	defer fake.untrackBlobMutex.Unlock()
	fake.UntrackBlobStub = stub
}

func (fake *FakeBlobsDir) UntrackBlobArgsForCall(i int) string {
	fake.untrackBlobMutex.RLock()
	defer fake.untrackBlobMutex.RUnlock()
	argsForCall := fake.untrackBlobArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeBlobsDir) UntrackBlobReturns(result1 error) {
	fake.untrackBlobMutex.Lock()
	defer fake.untrackBlobMutex.Unlock()
	fake.UntrackBlobStub = nil
	fake.untrackBlobReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBlobsDir) UntrackBlobReturnsOnCall(i int, result1 error) {
	fake.untrackBlobMutex.Lock()
	defer fake.untrackBlobMutex.Unlock()
	fake.UntrackBlobStub = nil
	if fake.untrackBlobReturnsOnCall == nil {
		fake.untrackBlobReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.untrackBlobReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBlobsDir) UploadBlobs() error {
	fake.uploadBlobsMutex.Lock()
	ret, specificReturn := fake.uploadBlobsReturnsOnCall[len(fake.uploadBlobsArgsForCall)]
	fake.uploadBlobsArgsForCall = append(fake.uploadBlobsArgsForCall, struct {
	}{})
	stub := fake.UploadBlobsStub
	fakeReturns := fake.uploadBlobsReturns
	fake.recordInvocation("UploadBlobs", []interface{}{})
	fake.uploadBlobsMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBlobsDir) UploadBlobsCallCount() int {
	fake.uploadBlobsMutex.RLock()
	defer fake.uploadBlobsMutex.RUnlock()
	return len(fake.uploadBlobsArgsForCall)
}

func (fake *FakeBlobsDir) UploadBlobsCalls(stub func() error) {
	fake.uploadBlobsMutex.Lock()
	defer fake.uploadBlobsMutex.Unlock()
	fake.UploadBlobsStub = stub
}

func (fake *FakeBlobsDir) UploadBlobsReturns(result1 error) {
	fake.uploadBlobsMutex.Lock()
	defer fake.uploadBlobsMutex.Unlock()
	fake.UploadBlobsStub = nil
	fake.uploadBlobsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBlobsDir) UploadBlobsReturnsOnCall(i int, result1 error) {
	fake.uploadBlobsMutex.Lock()
	defer fake.uploadBlobsMutex.Unlock()
	fake.UploadBlobsStub = nil
	if fake.uploadBlobsReturnsOnCall == nil {
		fake.uploadBlobsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.uploadBlobsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBlobsDir) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.blobsMutex.RLock()
	defer fake.blobsMutex.RUnlock()
	fake.initMutex.RLock()
	defer fake.initMutex.RUnlock()
	fake.syncBlobsMutex.RLock()
	defer fake.syncBlobsMutex.RUnlock()
	fake.trackBlobMutex.RLock()
	defer fake.trackBlobMutex.RUnlock()
	fake.untrackBlobMutex.RLock()
	defer fake.untrackBlobMutex.RUnlock()
	fake.uploadBlobsMutex.RLock()
	defer fake.uploadBlobsMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeBlobsDir) 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 _ releasedir.BlobsDir = new(FakeBlobsDir)
