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

import (
	"os"
	"sync"

	"code.cloudfoundry.org/cli/cf/appfiles"
)

type FakeZipper struct {
	GetZipSizeStub        func(*os.File) (int64, error)
	getZipSizeMutex       sync.RWMutex
	getZipSizeArgsForCall []struct {
		arg1 *os.File
	}
	getZipSizeReturns struct {
		result1 int64
		result2 error
	}
	getZipSizeReturnsOnCall map[int]struct {
		result1 int64
		result2 error
	}
	IsZipFileStub        func(string) bool
	isZipFileMutex       sync.RWMutex
	isZipFileArgsForCall []struct {
		arg1 string
	}
	isZipFileReturns struct {
		result1 bool
	}
	isZipFileReturnsOnCall map[int]struct {
		result1 bool
	}
	UnzipStub        func(string, string) error
	unzipMutex       sync.RWMutex
	unzipArgsForCall []struct {
		arg1 string
		arg2 string
	}
	unzipReturns struct {
		result1 error
	}
	unzipReturnsOnCall map[int]struct {
		result1 error
	}
	ZipStub        func(string, *os.File) error
	zipMutex       sync.RWMutex
	zipArgsForCall []struct {
		arg1 string
		arg2 *os.File
	}
	zipReturns struct {
		result1 error
	}
	zipReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeZipper) GetZipSize(arg1 *os.File) (int64, error) {
	fake.getZipSizeMutex.Lock()
	ret, specificReturn := fake.getZipSizeReturnsOnCall[len(fake.getZipSizeArgsForCall)]
	fake.getZipSizeArgsForCall = append(fake.getZipSizeArgsForCall, struct {
		arg1 *os.File
	}{arg1})
	fake.recordInvocation("GetZipSize", []interface{}{arg1})
	fake.getZipSizeMutex.Unlock()
	if fake.GetZipSizeStub != nil {
		return fake.GetZipSizeStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.getZipSizeReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeZipper) GetZipSizeCallCount() int {
	fake.getZipSizeMutex.RLock()
	defer fake.getZipSizeMutex.RUnlock()
	return len(fake.getZipSizeArgsForCall)
}

func (fake *FakeZipper) GetZipSizeCalls(stub func(*os.File) (int64, error)) {
	fake.getZipSizeMutex.Lock()
	defer fake.getZipSizeMutex.Unlock()
	fake.GetZipSizeStub = stub
}

func (fake *FakeZipper) GetZipSizeArgsForCall(i int) *os.File {
	fake.getZipSizeMutex.RLock()
	defer fake.getZipSizeMutex.RUnlock()
	argsForCall := fake.getZipSizeArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeZipper) GetZipSizeReturns(result1 int64, result2 error) {
	fake.getZipSizeMutex.Lock()
	defer fake.getZipSizeMutex.Unlock()
	fake.GetZipSizeStub = nil
	fake.getZipSizeReturns = struct {
		result1 int64
		result2 error
	}{result1, result2}
}

func (fake *FakeZipper) GetZipSizeReturnsOnCall(i int, result1 int64, result2 error) {
	fake.getZipSizeMutex.Lock()
	defer fake.getZipSizeMutex.Unlock()
	fake.GetZipSizeStub = nil
	if fake.getZipSizeReturnsOnCall == nil {
		fake.getZipSizeReturnsOnCall = make(map[int]struct {
			result1 int64
			result2 error
		})
	}
	fake.getZipSizeReturnsOnCall[i] = struct {
		result1 int64
		result2 error
	}{result1, result2}
}

func (fake *FakeZipper) IsZipFile(arg1 string) bool {
	fake.isZipFileMutex.Lock()
	ret, specificReturn := fake.isZipFileReturnsOnCall[len(fake.isZipFileArgsForCall)]
	fake.isZipFileArgsForCall = append(fake.isZipFileArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("IsZipFile", []interface{}{arg1})
	fake.isZipFileMutex.Unlock()
	if fake.IsZipFileStub != nil {
		return fake.IsZipFileStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.isZipFileReturns
	return fakeReturns.result1
}

func (fake *FakeZipper) IsZipFileCallCount() int {
	fake.isZipFileMutex.RLock()
	defer fake.isZipFileMutex.RUnlock()
	return len(fake.isZipFileArgsForCall)
}

func (fake *FakeZipper) IsZipFileCalls(stub func(string) bool) {
	fake.isZipFileMutex.Lock()
	defer fake.isZipFileMutex.Unlock()
	fake.IsZipFileStub = stub
}

func (fake *FakeZipper) IsZipFileArgsForCall(i int) string {
	fake.isZipFileMutex.RLock()
	defer fake.isZipFileMutex.RUnlock()
	argsForCall := fake.isZipFileArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeZipper) IsZipFileReturns(result1 bool) {
	fake.isZipFileMutex.Lock()
	defer fake.isZipFileMutex.Unlock()
	fake.IsZipFileStub = nil
	fake.isZipFileReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeZipper) IsZipFileReturnsOnCall(i int, result1 bool) {
	fake.isZipFileMutex.Lock()
	defer fake.isZipFileMutex.Unlock()
	fake.IsZipFileStub = nil
	if fake.isZipFileReturnsOnCall == nil {
		fake.isZipFileReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isZipFileReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeZipper) Unzip(arg1 string, arg2 string) error {
	fake.unzipMutex.Lock()
	ret, specificReturn := fake.unzipReturnsOnCall[len(fake.unzipArgsForCall)]
	fake.unzipArgsForCall = append(fake.unzipArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	fake.recordInvocation("Unzip", []interface{}{arg1, arg2})
	fake.unzipMutex.Unlock()
	if fake.UnzipStub != nil {
		return fake.UnzipStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.unzipReturns
	return fakeReturns.result1
}

func (fake *FakeZipper) UnzipCallCount() int {
	fake.unzipMutex.RLock()
	defer fake.unzipMutex.RUnlock()
	return len(fake.unzipArgsForCall)
}

func (fake *FakeZipper) UnzipCalls(stub func(string, string) error) {
	fake.unzipMutex.Lock()
	defer fake.unzipMutex.Unlock()
	fake.UnzipStub = stub
}

func (fake *FakeZipper) UnzipArgsForCall(i int) (string, string) {
	fake.unzipMutex.RLock()
	defer fake.unzipMutex.RUnlock()
	argsForCall := fake.unzipArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeZipper) UnzipReturns(result1 error) {
	fake.unzipMutex.Lock()
	defer fake.unzipMutex.Unlock()
	fake.UnzipStub = nil
	fake.unzipReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeZipper) UnzipReturnsOnCall(i int, result1 error) {
	fake.unzipMutex.Lock()
	defer fake.unzipMutex.Unlock()
	fake.UnzipStub = nil
	if fake.unzipReturnsOnCall == nil {
		fake.unzipReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.unzipReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeZipper) Zip(arg1 string, arg2 *os.File) error {
	fake.zipMutex.Lock()
	ret, specificReturn := fake.zipReturnsOnCall[len(fake.zipArgsForCall)]
	fake.zipArgsForCall = append(fake.zipArgsForCall, struct {
		arg1 string
		arg2 *os.File
	}{arg1, arg2})
	fake.recordInvocation("Zip", []interface{}{arg1, arg2})
	fake.zipMutex.Unlock()
	if fake.ZipStub != nil {
		return fake.ZipStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.zipReturns
	return fakeReturns.result1
}

func (fake *FakeZipper) ZipCallCount() int {
	fake.zipMutex.RLock()
	defer fake.zipMutex.RUnlock()
	return len(fake.zipArgsForCall)
}

func (fake *FakeZipper) ZipCalls(stub func(string, *os.File) error) {
	fake.zipMutex.Lock()
	defer fake.zipMutex.Unlock()
	fake.ZipStub = stub
}

func (fake *FakeZipper) ZipArgsForCall(i int) (string, *os.File) {
	fake.zipMutex.RLock()
	defer fake.zipMutex.RUnlock()
	argsForCall := fake.zipArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeZipper) ZipReturns(result1 error) {
	fake.zipMutex.Lock()
	defer fake.zipMutex.Unlock()
	fake.ZipStub = nil
	fake.zipReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeZipper) ZipReturnsOnCall(i int, result1 error) {
	fake.zipMutex.Lock()
	defer fake.zipMutex.Unlock()
	fake.ZipStub = nil
	if fake.zipReturnsOnCall == nil {
		fake.zipReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.zipReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeZipper) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.getZipSizeMutex.RLock()
	defer fake.getZipSizeMutex.RUnlock()
	fake.isZipFileMutex.RLock()
	defer fake.isZipFileMutex.RUnlock()
	fake.unzipMutex.RLock()
	defer fake.unzipMutex.RUnlock()
	fake.zipMutex.RLock()
	defer fake.zipMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeZipper) 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 _ appfiles.Zipper = new(FakeZipper)
