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

import (
	"io"
	"sync"

	"code.cloudfoundry.org/cli/actor/v7action"
)

type FakeSimpleProgressBar struct {
	InitializeStub        func(string) (io.Reader, int64, error)
	initializeMutex       sync.RWMutex
	initializeArgsForCall []struct {
		arg1 string
	}
	initializeReturns struct {
		result1 io.Reader
		result2 int64
		result3 error
	}
	initializeReturnsOnCall map[int]struct {
		result1 io.Reader
		result2 int64
		result3 error
	}
	TerminateStub        func()
	terminateMutex       sync.RWMutex
	terminateArgsForCall []struct {
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeSimpleProgressBar) Initialize(arg1 string) (io.Reader, int64, error) {
	fake.initializeMutex.Lock()
	ret, specificReturn := fake.initializeReturnsOnCall[len(fake.initializeArgsForCall)]
	fake.initializeArgsForCall = append(fake.initializeArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("Initialize", []interface{}{arg1})
	fake.initializeMutex.Unlock()
	if fake.InitializeStub != nil {
		return fake.InitializeStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2, ret.result3
	}
	fakeReturns := fake.initializeReturns
	return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
}

func (fake *FakeSimpleProgressBar) InitializeCallCount() int {
	fake.initializeMutex.RLock()
	defer fake.initializeMutex.RUnlock()
	return len(fake.initializeArgsForCall)
}

func (fake *FakeSimpleProgressBar) InitializeCalls(stub func(string) (io.Reader, int64, error)) {
	fake.initializeMutex.Lock()
	defer fake.initializeMutex.Unlock()
	fake.InitializeStub = stub
}

func (fake *FakeSimpleProgressBar) InitializeArgsForCall(i int) string {
	fake.initializeMutex.RLock()
	defer fake.initializeMutex.RUnlock()
	argsForCall := fake.initializeArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeSimpleProgressBar) InitializeReturns(result1 io.Reader, result2 int64, result3 error) {
	fake.initializeMutex.Lock()
	defer fake.initializeMutex.Unlock()
	fake.InitializeStub = nil
	fake.initializeReturns = struct {
		result1 io.Reader
		result2 int64
		result3 error
	}{result1, result2, result3}
}

func (fake *FakeSimpleProgressBar) InitializeReturnsOnCall(i int, result1 io.Reader, result2 int64, result3 error) {
	fake.initializeMutex.Lock()
	defer fake.initializeMutex.Unlock()
	fake.InitializeStub = nil
	if fake.initializeReturnsOnCall == nil {
		fake.initializeReturnsOnCall = make(map[int]struct {
			result1 io.Reader
			result2 int64
			result3 error
		})
	}
	fake.initializeReturnsOnCall[i] = struct {
		result1 io.Reader
		result2 int64
		result3 error
	}{result1, result2, result3}
}

func (fake *FakeSimpleProgressBar) Terminate() {
	fake.terminateMutex.Lock()
	fake.terminateArgsForCall = append(fake.terminateArgsForCall, struct {
	}{})
	fake.recordInvocation("Terminate", []interface{}{})
	fake.terminateMutex.Unlock()
	if fake.TerminateStub != nil {
		fake.TerminateStub()
	}
}

func (fake *FakeSimpleProgressBar) TerminateCallCount() int {
	fake.terminateMutex.RLock()
	defer fake.terminateMutex.RUnlock()
	return len(fake.terminateArgsForCall)
}

func (fake *FakeSimpleProgressBar) TerminateCalls(stub func()) {
	fake.terminateMutex.Lock()
	defer fake.terminateMutex.Unlock()
	fake.TerminateStub = stub
}

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

func (fake *FakeSimpleProgressBar) 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 _ v7action.SimpleProgressBar = new(FakeSimpleProgressBar)
