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

import (
	"sync"

	"github.com/cloudfoundry/bosh-cli/v7/installation/blobextract"
)

type FakeExtractor struct {
	ChmodExecutablesStub        func(string) error
	chmodExecutablesMutex       sync.RWMutex
	chmodExecutablesArgsForCall []struct {
		arg1 string
	}
	chmodExecutablesReturns struct {
		result1 error
	}
	chmodExecutablesReturnsOnCall map[int]struct {
		result1 error
	}
	CleanupStub        func(string, string) error
	cleanupMutex       sync.RWMutex
	cleanupArgsForCall []struct {
		arg1 string
		arg2 string
	}
	cleanupReturns struct {
		result1 error
	}
	cleanupReturnsOnCall map[int]struct {
		result1 error
	}
	ExtractStub        func(string, string, string) error
	extractMutex       sync.RWMutex
	extractArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 string
	}
	extractReturns struct {
		result1 error
	}
	extractReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeExtractor) ChmodExecutables(arg1 string) error {
	fake.chmodExecutablesMutex.Lock()
	ret, specificReturn := fake.chmodExecutablesReturnsOnCall[len(fake.chmodExecutablesArgsForCall)]
	fake.chmodExecutablesArgsForCall = append(fake.chmodExecutablesArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.ChmodExecutablesStub
	fakeReturns := fake.chmodExecutablesReturns
	fake.recordInvocation("ChmodExecutables", []interface{}{arg1})
	fake.chmodExecutablesMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeExtractor) ChmodExecutablesCallCount() int {
	fake.chmodExecutablesMutex.RLock()
	defer fake.chmodExecutablesMutex.RUnlock()
	return len(fake.chmodExecutablesArgsForCall)
}

func (fake *FakeExtractor) ChmodExecutablesCalls(stub func(string) error) {
	fake.chmodExecutablesMutex.Lock()
	defer fake.chmodExecutablesMutex.Unlock()
	fake.ChmodExecutablesStub = stub
}

func (fake *FakeExtractor) ChmodExecutablesArgsForCall(i int) string {
	fake.chmodExecutablesMutex.RLock()
	defer fake.chmodExecutablesMutex.RUnlock()
	argsForCall := fake.chmodExecutablesArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeExtractor) ChmodExecutablesReturns(result1 error) {
	fake.chmodExecutablesMutex.Lock()
	defer fake.chmodExecutablesMutex.Unlock()
	fake.ChmodExecutablesStub = nil
	fake.chmodExecutablesReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeExtractor) ChmodExecutablesReturnsOnCall(i int, result1 error) {
	fake.chmodExecutablesMutex.Lock()
	defer fake.chmodExecutablesMutex.Unlock()
	fake.ChmodExecutablesStub = nil
	if fake.chmodExecutablesReturnsOnCall == nil {
		fake.chmodExecutablesReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.chmodExecutablesReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeExtractor) Cleanup(arg1 string, arg2 string) error {
	fake.cleanupMutex.Lock()
	ret, specificReturn := fake.cleanupReturnsOnCall[len(fake.cleanupArgsForCall)]
	fake.cleanupArgsForCall = append(fake.cleanupArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	stub := fake.CleanupStub
	fakeReturns := fake.cleanupReturns
	fake.recordInvocation("Cleanup", []interface{}{arg1, arg2})
	fake.cleanupMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeExtractor) CleanupCallCount() int {
	fake.cleanupMutex.RLock()
	defer fake.cleanupMutex.RUnlock()
	return len(fake.cleanupArgsForCall)
}

func (fake *FakeExtractor) CleanupCalls(stub func(string, string) error) {
	fake.cleanupMutex.Lock()
	defer fake.cleanupMutex.Unlock()
	fake.CleanupStub = stub
}

func (fake *FakeExtractor) CleanupArgsForCall(i int) (string, string) {
	fake.cleanupMutex.RLock()
	defer fake.cleanupMutex.RUnlock()
	argsForCall := fake.cleanupArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeExtractor) CleanupReturns(result1 error) {
	fake.cleanupMutex.Lock()
	defer fake.cleanupMutex.Unlock()
	fake.CleanupStub = nil
	fake.cleanupReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeExtractor) CleanupReturnsOnCall(i int, result1 error) {
	fake.cleanupMutex.Lock()
	defer fake.cleanupMutex.Unlock()
	fake.CleanupStub = nil
	if fake.cleanupReturnsOnCall == nil {
		fake.cleanupReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.cleanupReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeExtractor) Extract(arg1 string, arg2 string, arg3 string) error {
	fake.extractMutex.Lock()
	ret, specificReturn := fake.extractReturnsOnCall[len(fake.extractArgsForCall)]
	fake.extractArgsForCall = append(fake.extractArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 string
	}{arg1, arg2, arg3})
	stub := fake.ExtractStub
	fakeReturns := fake.extractReturns
	fake.recordInvocation("Extract", []interface{}{arg1, arg2, arg3})
	fake.extractMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeExtractor) ExtractCallCount() int {
	fake.extractMutex.RLock()
	defer fake.extractMutex.RUnlock()
	return len(fake.extractArgsForCall)
}

func (fake *FakeExtractor) ExtractCalls(stub func(string, string, string) error) {
	fake.extractMutex.Lock()
	defer fake.extractMutex.Unlock()
	fake.ExtractStub = stub
}

func (fake *FakeExtractor) ExtractArgsForCall(i int) (string, string, string) {
	fake.extractMutex.RLock()
	defer fake.extractMutex.RUnlock()
	argsForCall := fake.extractArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeExtractor) ExtractReturns(result1 error) {
	fake.extractMutex.Lock()
	defer fake.extractMutex.Unlock()
	fake.ExtractStub = nil
	fake.extractReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeExtractor) ExtractReturnsOnCall(i int, result1 error) {
	fake.extractMutex.Lock()
	defer fake.extractMutex.Unlock()
	fake.ExtractStub = nil
	if fake.extractReturnsOnCall == nil {
		fake.extractReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.extractReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeExtractor) 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 _ blobextract.Extractor = new(FakeExtractor)
