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

import (
	"io"
	"sync"

	"github.com/cloudfoundry/bosh-cli/v7/director"
	ioa "github.com/cloudfoundry/bosh-cli/v7/io"
)

type FakeFileReporter struct {
	TrackDownloadStub        func(int64, io.Writer) io.Writer
	trackDownloadMutex       sync.RWMutex
	trackDownloadArgsForCall []struct {
		arg1 int64
		arg2 io.Writer
	}
	trackDownloadReturns struct {
		result1 io.Writer
	}
	trackDownloadReturnsOnCall map[int]struct {
		result1 io.Writer
	}
	TrackUploadStub        func(int64, io.ReadCloser) ioa.ReadSeekCloser
	trackUploadMutex       sync.RWMutex
	trackUploadArgsForCall []struct {
		arg1 int64
		arg2 io.ReadCloser
	}
	trackUploadReturns struct {
		result1 ioa.ReadSeekCloser
	}
	trackUploadReturnsOnCall map[int]struct {
		result1 ioa.ReadSeekCloser
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeFileReporter) TrackDownload(arg1 int64, arg2 io.Writer) io.Writer {
	fake.trackDownloadMutex.Lock()
	ret, specificReturn := fake.trackDownloadReturnsOnCall[len(fake.trackDownloadArgsForCall)]
	fake.trackDownloadArgsForCall = append(fake.trackDownloadArgsForCall, struct {
		arg1 int64
		arg2 io.Writer
	}{arg1, arg2})
	stub := fake.TrackDownloadStub
	fakeReturns := fake.trackDownloadReturns
	fake.recordInvocation("TrackDownload", []interface{}{arg1, arg2})
	fake.trackDownloadMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeFileReporter) TrackDownloadCallCount() int {
	fake.trackDownloadMutex.RLock()
	defer fake.trackDownloadMutex.RUnlock()
	return len(fake.trackDownloadArgsForCall)
}

func (fake *FakeFileReporter) TrackDownloadCalls(stub func(int64, io.Writer) io.Writer) {
	fake.trackDownloadMutex.Lock()
	defer fake.trackDownloadMutex.Unlock()
	fake.TrackDownloadStub = stub
}

func (fake *FakeFileReporter) TrackDownloadArgsForCall(i int) (int64, io.Writer) {
	fake.trackDownloadMutex.RLock()
	defer fake.trackDownloadMutex.RUnlock()
	argsForCall := fake.trackDownloadArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeFileReporter) TrackDownloadReturns(result1 io.Writer) {
	fake.trackDownloadMutex.Lock()
	defer fake.trackDownloadMutex.Unlock()
	fake.TrackDownloadStub = nil
	fake.trackDownloadReturns = struct {
		result1 io.Writer
	}{result1}
}

func (fake *FakeFileReporter) TrackDownloadReturnsOnCall(i int, result1 io.Writer) {
	fake.trackDownloadMutex.Lock()
	defer fake.trackDownloadMutex.Unlock()
	fake.TrackDownloadStub = nil
	if fake.trackDownloadReturnsOnCall == nil {
		fake.trackDownloadReturnsOnCall = make(map[int]struct {
			result1 io.Writer
		})
	}
	fake.trackDownloadReturnsOnCall[i] = struct {
		result1 io.Writer
	}{result1}
}

func (fake *FakeFileReporter) TrackUpload(arg1 int64, arg2 io.ReadCloser) ioa.ReadSeekCloser {
	fake.trackUploadMutex.Lock()
	ret, specificReturn := fake.trackUploadReturnsOnCall[len(fake.trackUploadArgsForCall)]
	fake.trackUploadArgsForCall = append(fake.trackUploadArgsForCall, struct {
		arg1 int64
		arg2 io.ReadCloser
	}{arg1, arg2})
	stub := fake.TrackUploadStub
	fakeReturns := fake.trackUploadReturns
	fake.recordInvocation("TrackUpload", []interface{}{arg1, arg2})
	fake.trackUploadMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeFileReporter) TrackUploadCallCount() int {
	fake.trackUploadMutex.RLock()
	defer fake.trackUploadMutex.RUnlock()
	return len(fake.trackUploadArgsForCall)
}

func (fake *FakeFileReporter) TrackUploadCalls(stub func(int64, io.ReadCloser) ioa.ReadSeekCloser) {
	fake.trackUploadMutex.Lock()
	defer fake.trackUploadMutex.Unlock()
	fake.TrackUploadStub = stub
}

func (fake *FakeFileReporter) TrackUploadArgsForCall(i int) (int64, io.ReadCloser) {
	fake.trackUploadMutex.RLock()
	defer fake.trackUploadMutex.RUnlock()
	argsForCall := fake.trackUploadArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeFileReporter) TrackUploadReturns(result1 ioa.ReadSeekCloser) {
	fake.trackUploadMutex.Lock()
	defer fake.trackUploadMutex.Unlock()
	fake.TrackUploadStub = nil
	fake.trackUploadReturns = struct {
		result1 ioa.ReadSeekCloser
	}{result1}
}

func (fake *FakeFileReporter) TrackUploadReturnsOnCall(i int, result1 ioa.ReadSeekCloser) {
	fake.trackUploadMutex.Lock()
	defer fake.trackUploadMutex.Unlock()
	fake.TrackUploadStub = nil
	if fake.trackUploadReturnsOnCall == nil {
		fake.trackUploadReturnsOnCall = make(map[int]struct {
			result1 ioa.ReadSeekCloser
		})
	}
	fake.trackUploadReturnsOnCall[i] = struct {
		result1 ioa.ReadSeekCloser
	}{result1}
}

func (fake *FakeFileReporter) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.trackDownloadMutex.RLock()
	defer fake.trackDownloadMutex.RUnlock()
	fake.trackUploadMutex.RLock()
	defer fake.trackUploadMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeFileReporter) 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 _ director.FileReporter = new(FakeFileReporter)
