// This file was generated by counterfeiter
package fakes

import (
	"sync"

	"code.cloudfoundry.org/app-autoscaler/src/autoscaler/healthendpoint"

	"github.com/prometheus/client_golang/prometheus"
)

type FakeHTTPStatusCollector struct {
	DescribeStub        func(chan<- *prometheus.Desc)
	describeMutex       sync.RWMutex
	describeArgsForCall []struct {
		arg1 chan<- *prometheus.Desc
	}
	CollectStub        func(chan<- prometheus.Metric)
	collectMutex       sync.RWMutex
	collectArgsForCall []struct {
		arg1 chan<- prometheus.Metric
	}
	IncConcurrentHTTPRequestStub        func()
	incConcurrentHTTPRequestMutex       sync.RWMutex
	incConcurrentHTTPRequestArgsForCall []struct{}
	DecConcurrentHTTPRequestStub        func()
	decConcurrentHTTPRequestMutex       sync.RWMutex
	decConcurrentHTTPRequestArgsForCall []struct{}
	invocations                         map[string][][]interface{}
	invocationsMutex                    sync.RWMutex
}

func (fake *FakeHTTPStatusCollector) Describe(arg1 chan<- *prometheus.Desc) {
	fake.describeMutex.Lock()
	fake.describeArgsForCall = append(fake.describeArgsForCall, struct {
		arg1 chan<- *prometheus.Desc
	}{arg1})
	fake.recordInvocation("Describe", []interface{}{arg1})
	fake.describeMutex.Unlock()
	if fake.DescribeStub != nil {
		fake.DescribeStub(arg1)
	}
}

func (fake *FakeHTTPStatusCollector) DescribeCallCount() int {
	fake.describeMutex.RLock()
	defer fake.describeMutex.RUnlock()
	return len(fake.describeArgsForCall)
}

func (fake *FakeHTTPStatusCollector) DescribeArgsForCall(i int) chan<- *prometheus.Desc {
	fake.describeMutex.RLock()
	defer fake.describeMutex.RUnlock()
	return fake.describeArgsForCall[i].arg1
}

func (fake *FakeHTTPStatusCollector) Collect(arg1 chan<- prometheus.Metric) {
	fake.collectMutex.Lock()
	fake.collectArgsForCall = append(fake.collectArgsForCall, struct {
		arg1 chan<- prometheus.Metric
	}{arg1})
	fake.recordInvocation("Collect", []interface{}{arg1})
	fake.collectMutex.Unlock()
	if fake.CollectStub != nil {
		fake.CollectStub(arg1)
	}
}

func (fake *FakeHTTPStatusCollector) CollectCallCount() int {
	fake.collectMutex.RLock()
	defer fake.collectMutex.RUnlock()
	return len(fake.collectArgsForCall)
}

func (fake *FakeHTTPStatusCollector) CollectArgsForCall(i int) chan<- prometheus.Metric {
	fake.collectMutex.RLock()
	defer fake.collectMutex.RUnlock()
	return fake.collectArgsForCall[i].arg1
}

func (fake *FakeHTTPStatusCollector) IncConcurrentHTTPRequest() {
	fake.incConcurrentHTTPRequestMutex.Lock()
	fake.incConcurrentHTTPRequestArgsForCall = append(fake.incConcurrentHTTPRequestArgsForCall, struct{}{})
	fake.recordInvocation("IncConcurrentHTTPRequest", []interface{}{})
	fake.incConcurrentHTTPRequestMutex.Unlock()
	if fake.IncConcurrentHTTPRequestStub != nil {
		fake.IncConcurrentHTTPRequestStub()
	}
}

func (fake *FakeHTTPStatusCollector) IncConcurrentHTTPRequestCallCount() int {
	fake.incConcurrentHTTPRequestMutex.RLock()
	defer fake.incConcurrentHTTPRequestMutex.RUnlock()
	return len(fake.incConcurrentHTTPRequestArgsForCall)
}

func (fake *FakeHTTPStatusCollector) DecConcurrentHTTPRequest() {
	fake.decConcurrentHTTPRequestMutex.Lock()
	fake.decConcurrentHTTPRequestArgsForCall = append(fake.decConcurrentHTTPRequestArgsForCall, struct{}{})
	fake.recordInvocation("DecConcurrentHTTPRequest", []interface{}{})
	fake.decConcurrentHTTPRequestMutex.Unlock()
	if fake.DecConcurrentHTTPRequestStub != nil {
		fake.DecConcurrentHTTPRequestStub()
	}
}

func (fake *FakeHTTPStatusCollector) DecConcurrentHTTPRequestCallCount() int {
	fake.decConcurrentHTTPRequestMutex.RLock()
	defer fake.decConcurrentHTTPRequestMutex.RUnlock()
	return len(fake.decConcurrentHTTPRequestArgsForCall)
}

func (fake *FakeHTTPStatusCollector) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.describeMutex.RLock()
	defer fake.describeMutex.RUnlock()
	fake.collectMutex.RLock()
	defer fake.collectMutex.RUnlock()
	fake.incConcurrentHTTPRequestMutex.RLock()
	defer fake.incConcurrentHTTPRequestMutex.RUnlock()
	fake.decConcurrentHTTPRequestMutex.RLock()
	defer fake.decConcurrentHTTPRequestMutex.RUnlock()
	return fake.invocations
}

func (fake *FakeHTTPStatusCollector) 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 _ healthendpoint.HTTPStatusCollector = new(FakeHTTPStatusCollector)
