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

import (
	"sync"
	"time"

	"code.cloudfoundry.org/gorouter/metrics"
	"code.cloudfoundry.org/gorouter/route"
)

type FakeVarzReporter struct {
	CaptureBadGatewayStub        func()
	captureBadGatewayMutex       sync.RWMutex
	captureBadGatewayArgsForCall []struct {
	}
	CaptureBadRequestStub        func()
	captureBadRequestMutex       sync.RWMutex
	captureBadRequestArgsForCall []struct {
	}
	CaptureRoutingRequestStub        func(*route.Endpoint)
	captureRoutingRequestMutex       sync.RWMutex
	captureRoutingRequestArgsForCall []struct {
		arg1 *route.Endpoint
	}
	CaptureRoutingResponseLatencyStub        func(*route.Endpoint, int, time.Time, time.Duration)
	captureRoutingResponseLatencyMutex       sync.RWMutex
	captureRoutingResponseLatencyArgsForCall []struct {
		arg1 *route.Endpoint
		arg2 int
		arg3 time.Time
		arg4 time.Duration
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeVarzReporter) CaptureBadGateway() {
	fake.captureBadGatewayMutex.Lock()
	fake.captureBadGatewayArgsForCall = append(fake.captureBadGatewayArgsForCall, struct {
	}{})
	stub := fake.CaptureBadGatewayStub
	fake.recordInvocation("CaptureBadGateway", []interface{}{})
	fake.captureBadGatewayMutex.Unlock()
	if stub != nil {
		fake.CaptureBadGatewayStub()
	}
}

func (fake *FakeVarzReporter) CaptureBadGatewayCallCount() int {
	fake.captureBadGatewayMutex.RLock()
	defer fake.captureBadGatewayMutex.RUnlock()
	return len(fake.captureBadGatewayArgsForCall)
}

func (fake *FakeVarzReporter) CaptureBadGatewayCalls(stub func()) {
	fake.captureBadGatewayMutex.Lock()
	defer fake.captureBadGatewayMutex.Unlock()
	fake.CaptureBadGatewayStub = stub
}

func (fake *FakeVarzReporter) CaptureBadRequest() {
	fake.captureBadRequestMutex.Lock()
	fake.captureBadRequestArgsForCall = append(fake.captureBadRequestArgsForCall, struct {
	}{})
	stub := fake.CaptureBadRequestStub
	fake.recordInvocation("CaptureBadRequest", []interface{}{})
	fake.captureBadRequestMutex.Unlock()
	if stub != nil {
		fake.CaptureBadRequestStub()
	}
}

func (fake *FakeVarzReporter) CaptureBadRequestCallCount() int {
	fake.captureBadRequestMutex.RLock()
	defer fake.captureBadRequestMutex.RUnlock()
	return len(fake.captureBadRequestArgsForCall)
}

func (fake *FakeVarzReporter) CaptureBadRequestCalls(stub func()) {
	fake.captureBadRequestMutex.Lock()
	defer fake.captureBadRequestMutex.Unlock()
	fake.CaptureBadRequestStub = stub
}

func (fake *FakeVarzReporter) CaptureRoutingRequest(arg1 *route.Endpoint) {
	fake.captureRoutingRequestMutex.Lock()
	fake.captureRoutingRequestArgsForCall = append(fake.captureRoutingRequestArgsForCall, struct {
		arg1 *route.Endpoint
	}{arg1})
	stub := fake.CaptureRoutingRequestStub
	fake.recordInvocation("CaptureRoutingRequest", []interface{}{arg1})
	fake.captureRoutingRequestMutex.Unlock()
	if stub != nil {
		fake.CaptureRoutingRequestStub(arg1)
	}
}

func (fake *FakeVarzReporter) CaptureRoutingRequestCallCount() int {
	fake.captureRoutingRequestMutex.RLock()
	defer fake.captureRoutingRequestMutex.RUnlock()
	return len(fake.captureRoutingRequestArgsForCall)
}

func (fake *FakeVarzReporter) CaptureRoutingRequestCalls(stub func(*route.Endpoint)) {
	fake.captureRoutingRequestMutex.Lock()
	defer fake.captureRoutingRequestMutex.Unlock()
	fake.CaptureRoutingRequestStub = stub
}

func (fake *FakeVarzReporter) CaptureRoutingRequestArgsForCall(i int) *route.Endpoint {
	fake.captureRoutingRequestMutex.RLock()
	defer fake.captureRoutingRequestMutex.RUnlock()
	argsForCall := fake.captureRoutingRequestArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeVarzReporter) CaptureRoutingResponseLatency(arg1 *route.Endpoint, arg2 int, arg3 time.Time, arg4 time.Duration) {
	fake.captureRoutingResponseLatencyMutex.Lock()
	fake.captureRoutingResponseLatencyArgsForCall = append(fake.captureRoutingResponseLatencyArgsForCall, struct {
		arg1 *route.Endpoint
		arg2 int
		arg3 time.Time
		arg4 time.Duration
	}{arg1, arg2, arg3, arg4})
	stub := fake.CaptureRoutingResponseLatencyStub
	fake.recordInvocation("CaptureRoutingResponseLatency", []interface{}{arg1, arg2, arg3, arg4})
	fake.captureRoutingResponseLatencyMutex.Unlock()
	if stub != nil {
		fake.CaptureRoutingResponseLatencyStub(arg1, arg2, arg3, arg4)
	}
}

func (fake *FakeVarzReporter) CaptureRoutingResponseLatencyCallCount() int {
	fake.captureRoutingResponseLatencyMutex.RLock()
	defer fake.captureRoutingResponseLatencyMutex.RUnlock()
	return len(fake.captureRoutingResponseLatencyArgsForCall)
}

func (fake *FakeVarzReporter) CaptureRoutingResponseLatencyCalls(stub func(*route.Endpoint, int, time.Time, time.Duration)) {
	fake.captureRoutingResponseLatencyMutex.Lock()
	defer fake.captureRoutingResponseLatencyMutex.Unlock()
	fake.CaptureRoutingResponseLatencyStub = stub
}

func (fake *FakeVarzReporter) CaptureRoutingResponseLatencyArgsForCall(i int) (*route.Endpoint, int, time.Time, time.Duration) {
	fake.captureRoutingResponseLatencyMutex.RLock()
	defer fake.captureRoutingResponseLatencyMutex.RUnlock()
	argsForCall := fake.captureRoutingResponseLatencyArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
}

func (fake *FakeVarzReporter) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.captureBadGatewayMutex.RLock()
	defer fake.captureBadGatewayMutex.RUnlock()
	fake.captureBadRequestMutex.RLock()
	defer fake.captureBadRequestMutex.RUnlock()
	fake.captureRoutingRequestMutex.RLock()
	defer fake.captureRoutingRequestMutex.RUnlock()
	fake.captureRoutingResponseLatencyMutex.RLock()
	defer fake.captureRoutingResponseLatencyMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeVarzReporter) 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)
}

//lint:ignore SA1019 - auto-generated fake will go away when Varz goes away
var _ metrics.VarzReporter = new(FakeVarzReporter)
