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

import (
	"net/http"
	"sync"

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

type FakeRequestDumperInterface struct {
	DumpRequestStub        func(*http.Request)
	dumpRequestMutex       sync.RWMutex
	dumpRequestArgsForCall []struct {
		arg1 *http.Request
	}
	DumpResponseStub        func(*http.Response)
	dumpResponseMutex       sync.RWMutex
	dumpResponseArgsForCall []struct {
		arg1 *http.Response
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeRequestDumperInterface) DumpRequest(arg1 *http.Request) {
	fake.dumpRequestMutex.Lock()
	fake.dumpRequestArgsForCall = append(fake.dumpRequestArgsForCall, struct {
		arg1 *http.Request
	}{arg1})
	fake.recordInvocation("DumpRequest", []interface{}{arg1})
	fake.dumpRequestMutex.Unlock()
	if fake.DumpRequestStub != nil {
		fake.DumpRequestStub(arg1)
	}
}

func (fake *FakeRequestDumperInterface) DumpRequestCallCount() int {
	fake.dumpRequestMutex.RLock()
	defer fake.dumpRequestMutex.RUnlock()
	return len(fake.dumpRequestArgsForCall)
}

func (fake *FakeRequestDumperInterface) DumpRequestCalls(stub func(*http.Request)) {
	fake.dumpRequestMutex.Lock()
	defer fake.dumpRequestMutex.Unlock()
	fake.DumpRequestStub = stub
}

func (fake *FakeRequestDumperInterface) DumpRequestArgsForCall(i int) *http.Request {
	fake.dumpRequestMutex.RLock()
	defer fake.dumpRequestMutex.RUnlock()
	argsForCall := fake.dumpRequestArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeRequestDumperInterface) DumpResponse(arg1 *http.Response) {
	fake.dumpResponseMutex.Lock()
	fake.dumpResponseArgsForCall = append(fake.dumpResponseArgsForCall, struct {
		arg1 *http.Response
	}{arg1})
	fake.recordInvocation("DumpResponse", []interface{}{arg1})
	fake.dumpResponseMutex.Unlock()
	if fake.DumpResponseStub != nil {
		fake.DumpResponseStub(arg1)
	}
}

func (fake *FakeRequestDumperInterface) DumpResponseCallCount() int {
	fake.dumpResponseMutex.RLock()
	defer fake.dumpResponseMutex.RUnlock()
	return len(fake.dumpResponseArgsForCall)
}

func (fake *FakeRequestDumperInterface) DumpResponseCalls(stub func(*http.Response)) {
	fake.dumpResponseMutex.Lock()
	defer fake.dumpResponseMutex.Unlock()
	fake.DumpResponseStub = stub
}

func (fake *FakeRequestDumperInterface) DumpResponseArgsForCall(i int) *http.Response {
	fake.dumpResponseMutex.RLock()
	defer fake.dumpResponseMutex.RUnlock()
	argsForCall := fake.dumpResponseArgsForCall[i]
	return argsForCall.arg1
}

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

func (fake *FakeRequestDumperInterface) 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 _ net.RequestDumperInterface = new(FakeRequestDumperInterface)
