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

import (
	"sync"

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

type FakePrinter struct {
	PrintStub        func(...interface{})
	printMutex       sync.RWMutex
	printArgsForCall []struct {
		arg1 []interface{}
	}
	PrintfStub        func(string, ...interface{})
	printfMutex       sync.RWMutex
	printfArgsForCall []struct {
		arg1 string
		arg2 []interface{}
	}
	PrintlnStub        func(...interface{})
	printlnMutex       sync.RWMutex
	printlnArgsForCall []struct {
		arg1 []interface{}
	}
	WritesToConsoleStub        func() bool
	writesToConsoleMutex       sync.RWMutex
	writesToConsoleArgsForCall []struct {
	}
	writesToConsoleReturns struct {
		result1 bool
	}
	writesToConsoleReturnsOnCall map[int]struct {
		result1 bool
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakePrinter) Print(arg1 ...interface{}) {
	fake.printMutex.Lock()
	fake.printArgsForCall = append(fake.printArgsForCall, struct {
		arg1 []interface{}
	}{arg1})
	fake.recordInvocation("Print", []interface{}{arg1})
	fake.printMutex.Unlock()
	if fake.PrintStub != nil {
		fake.PrintStub(arg1...)
	}
}

func (fake *FakePrinter) PrintCallCount() int {
	fake.printMutex.RLock()
	defer fake.printMutex.RUnlock()
	return len(fake.printArgsForCall)
}

func (fake *FakePrinter) PrintCalls(stub func(...interface{})) {
	fake.printMutex.Lock()
	defer fake.printMutex.Unlock()
	fake.PrintStub = stub
}

func (fake *FakePrinter) PrintArgsForCall(i int) []interface{} {
	fake.printMutex.RLock()
	defer fake.printMutex.RUnlock()
	argsForCall := fake.printArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakePrinter) Printf(arg1 string, arg2 ...interface{}) {
	fake.printfMutex.Lock()
	fake.printfArgsForCall = append(fake.printfArgsForCall, struct {
		arg1 string
		arg2 []interface{}
	}{arg1, arg2})
	fake.recordInvocation("Printf", []interface{}{arg1, arg2})
	fake.printfMutex.Unlock()
	if fake.PrintfStub != nil {
		fake.PrintfStub(arg1, arg2...)
	}
}

func (fake *FakePrinter) PrintfCallCount() int {
	fake.printfMutex.RLock()
	defer fake.printfMutex.RUnlock()
	return len(fake.printfArgsForCall)
}

func (fake *FakePrinter) PrintfCalls(stub func(string, ...interface{})) {
	fake.printfMutex.Lock()
	defer fake.printfMutex.Unlock()
	fake.PrintfStub = stub
}

func (fake *FakePrinter) PrintfArgsForCall(i int) (string, []interface{}) {
	fake.printfMutex.RLock()
	defer fake.printfMutex.RUnlock()
	argsForCall := fake.printfArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakePrinter) Println(arg1 ...interface{}) {
	fake.printlnMutex.Lock()
	fake.printlnArgsForCall = append(fake.printlnArgsForCall, struct {
		arg1 []interface{}
	}{arg1})
	fake.recordInvocation("Println", []interface{}{arg1})
	fake.printlnMutex.Unlock()
	if fake.PrintlnStub != nil {
		fake.PrintlnStub(arg1...)
	}
}

func (fake *FakePrinter) PrintlnCallCount() int {
	fake.printlnMutex.RLock()
	defer fake.printlnMutex.RUnlock()
	return len(fake.printlnArgsForCall)
}

func (fake *FakePrinter) PrintlnCalls(stub func(...interface{})) {
	fake.printlnMutex.Lock()
	defer fake.printlnMutex.Unlock()
	fake.PrintlnStub = stub
}

func (fake *FakePrinter) PrintlnArgsForCall(i int) []interface{} {
	fake.printlnMutex.RLock()
	defer fake.printlnMutex.RUnlock()
	argsForCall := fake.printlnArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakePrinter) WritesToConsole() bool {
	fake.writesToConsoleMutex.Lock()
	ret, specificReturn := fake.writesToConsoleReturnsOnCall[len(fake.writesToConsoleArgsForCall)]
	fake.writesToConsoleArgsForCall = append(fake.writesToConsoleArgsForCall, struct {
	}{})
	fake.recordInvocation("WritesToConsole", []interface{}{})
	fake.writesToConsoleMutex.Unlock()
	if fake.WritesToConsoleStub != nil {
		return fake.WritesToConsoleStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.writesToConsoleReturns
	return fakeReturns.result1
}

func (fake *FakePrinter) WritesToConsoleCallCount() int {
	fake.writesToConsoleMutex.RLock()
	defer fake.writesToConsoleMutex.RUnlock()
	return len(fake.writesToConsoleArgsForCall)
}

func (fake *FakePrinter) WritesToConsoleCalls(stub func() bool) {
	fake.writesToConsoleMutex.Lock()
	defer fake.writesToConsoleMutex.Unlock()
	fake.WritesToConsoleStub = stub
}

func (fake *FakePrinter) WritesToConsoleReturns(result1 bool) {
	fake.writesToConsoleMutex.Lock()
	defer fake.writesToConsoleMutex.Unlock()
	fake.WritesToConsoleStub = nil
	fake.writesToConsoleReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakePrinter) WritesToConsoleReturnsOnCall(i int, result1 bool) {
	fake.writesToConsoleMutex.Lock()
	defer fake.writesToConsoleMutex.Unlock()
	fake.WritesToConsoleStub = nil
	if fake.writesToConsoleReturnsOnCall == nil {
		fake.writesToConsoleReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.writesToConsoleReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakePrinter) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.printMutex.RLock()
	defer fake.printMutex.RUnlock()
	fake.printfMutex.RLock()
	defer fake.printfMutex.RUnlock()
	fake.printlnMutex.RLock()
	defer fake.printlnMutex.RUnlock()
	fake.writesToConsoleMutex.RLock()
	defer fake.writesToConsoleMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakePrinter) 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 _ trace.Printer = new(FakePrinter)
