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

import (
	"sync"
	"time"

	"code.cloudfoundry.org/auction/auctiontypes"
)

type FakeAuctionMetricEmitterDelegate struct {
	AuctionCompletedStub        func(auctiontypes.AuctionResults) error
	auctionCompletedMutex       sync.RWMutex
	auctionCompletedArgsForCall []struct {
		arg1 auctiontypes.AuctionResults
	}
	auctionCompletedReturns struct {
		result1 error
	}
	auctionCompletedReturnsOnCall map[int]struct {
		result1 error
	}
	FailedCellStateRequestStub        func() error
	failedCellStateRequestMutex       sync.RWMutex
	failedCellStateRequestArgsForCall []struct {
	}
	failedCellStateRequestReturns struct {
		result1 error
	}
	failedCellStateRequestReturnsOnCall map[int]struct {
		result1 error
	}
	FetchStatesCompletedStub        func(time.Duration) error
	fetchStatesCompletedMutex       sync.RWMutex
	fetchStatesCompletedArgsForCall []struct {
		arg1 time.Duration
	}
	fetchStatesCompletedReturns struct {
		result1 error
	}
	fetchStatesCompletedReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeAuctionMetricEmitterDelegate) AuctionCompleted(arg1 auctiontypes.AuctionResults) error {
	fake.auctionCompletedMutex.Lock()
	ret, specificReturn := fake.auctionCompletedReturnsOnCall[len(fake.auctionCompletedArgsForCall)]
	fake.auctionCompletedArgsForCall = append(fake.auctionCompletedArgsForCall, struct {
		arg1 auctiontypes.AuctionResults
	}{arg1})
	stub := fake.AuctionCompletedStub
	fakeReturns := fake.auctionCompletedReturns
	fake.recordInvocation("AuctionCompleted", []interface{}{arg1})
	fake.auctionCompletedMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeAuctionMetricEmitterDelegate) AuctionCompletedCallCount() int {
	fake.auctionCompletedMutex.RLock()
	defer fake.auctionCompletedMutex.RUnlock()
	return len(fake.auctionCompletedArgsForCall)
}

func (fake *FakeAuctionMetricEmitterDelegate) AuctionCompletedCalls(stub func(auctiontypes.AuctionResults) error) {
	fake.auctionCompletedMutex.Lock()
	defer fake.auctionCompletedMutex.Unlock()
	fake.AuctionCompletedStub = stub
}

func (fake *FakeAuctionMetricEmitterDelegate) AuctionCompletedArgsForCall(i int) auctiontypes.AuctionResults {
	fake.auctionCompletedMutex.RLock()
	defer fake.auctionCompletedMutex.RUnlock()
	argsForCall := fake.auctionCompletedArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeAuctionMetricEmitterDelegate) AuctionCompletedReturns(result1 error) {
	fake.auctionCompletedMutex.Lock()
	defer fake.auctionCompletedMutex.Unlock()
	fake.AuctionCompletedStub = nil
	fake.auctionCompletedReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeAuctionMetricEmitterDelegate) AuctionCompletedReturnsOnCall(i int, result1 error) {
	fake.auctionCompletedMutex.Lock()
	defer fake.auctionCompletedMutex.Unlock()
	fake.AuctionCompletedStub = nil
	if fake.auctionCompletedReturnsOnCall == nil {
		fake.auctionCompletedReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.auctionCompletedReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeAuctionMetricEmitterDelegate) FailedCellStateRequest() error {
	fake.failedCellStateRequestMutex.Lock()
	ret, specificReturn := fake.failedCellStateRequestReturnsOnCall[len(fake.failedCellStateRequestArgsForCall)]
	fake.failedCellStateRequestArgsForCall = append(fake.failedCellStateRequestArgsForCall, struct {
	}{})
	stub := fake.FailedCellStateRequestStub
	fakeReturns := fake.failedCellStateRequestReturns
	fake.recordInvocation("FailedCellStateRequest", []interface{}{})
	fake.failedCellStateRequestMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeAuctionMetricEmitterDelegate) FailedCellStateRequestCallCount() int {
	fake.failedCellStateRequestMutex.RLock()
	defer fake.failedCellStateRequestMutex.RUnlock()
	return len(fake.failedCellStateRequestArgsForCall)
}

func (fake *FakeAuctionMetricEmitterDelegate) FailedCellStateRequestCalls(stub func() error) {
	fake.failedCellStateRequestMutex.Lock()
	defer fake.failedCellStateRequestMutex.Unlock()
	fake.FailedCellStateRequestStub = stub
}

func (fake *FakeAuctionMetricEmitterDelegate) FailedCellStateRequestReturns(result1 error) {
	fake.failedCellStateRequestMutex.Lock()
	defer fake.failedCellStateRequestMutex.Unlock()
	fake.FailedCellStateRequestStub = nil
	fake.failedCellStateRequestReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeAuctionMetricEmitterDelegate) FailedCellStateRequestReturnsOnCall(i int, result1 error) {
	fake.failedCellStateRequestMutex.Lock()
	defer fake.failedCellStateRequestMutex.Unlock()
	fake.FailedCellStateRequestStub = nil
	if fake.failedCellStateRequestReturnsOnCall == nil {
		fake.failedCellStateRequestReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.failedCellStateRequestReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeAuctionMetricEmitterDelegate) FetchStatesCompleted(arg1 time.Duration) error {
	fake.fetchStatesCompletedMutex.Lock()
	ret, specificReturn := fake.fetchStatesCompletedReturnsOnCall[len(fake.fetchStatesCompletedArgsForCall)]
	fake.fetchStatesCompletedArgsForCall = append(fake.fetchStatesCompletedArgsForCall, struct {
		arg1 time.Duration
	}{arg1})
	stub := fake.FetchStatesCompletedStub
	fakeReturns := fake.fetchStatesCompletedReturns
	fake.recordInvocation("FetchStatesCompleted", []interface{}{arg1})
	fake.fetchStatesCompletedMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeAuctionMetricEmitterDelegate) FetchStatesCompletedCallCount() int {
	fake.fetchStatesCompletedMutex.RLock()
	defer fake.fetchStatesCompletedMutex.RUnlock()
	return len(fake.fetchStatesCompletedArgsForCall)
}

func (fake *FakeAuctionMetricEmitterDelegate) FetchStatesCompletedCalls(stub func(time.Duration) error) {
	fake.fetchStatesCompletedMutex.Lock()
	defer fake.fetchStatesCompletedMutex.Unlock()
	fake.FetchStatesCompletedStub = stub
}

func (fake *FakeAuctionMetricEmitterDelegate) FetchStatesCompletedArgsForCall(i int) time.Duration {
	fake.fetchStatesCompletedMutex.RLock()
	defer fake.fetchStatesCompletedMutex.RUnlock()
	argsForCall := fake.fetchStatesCompletedArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeAuctionMetricEmitterDelegate) FetchStatesCompletedReturns(result1 error) {
	fake.fetchStatesCompletedMutex.Lock()
	defer fake.fetchStatesCompletedMutex.Unlock()
	fake.FetchStatesCompletedStub = nil
	fake.fetchStatesCompletedReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeAuctionMetricEmitterDelegate) FetchStatesCompletedReturnsOnCall(i int, result1 error) {
	fake.fetchStatesCompletedMutex.Lock()
	defer fake.fetchStatesCompletedMutex.Unlock()
	fake.FetchStatesCompletedStub = nil
	if fake.fetchStatesCompletedReturnsOnCall == nil {
		fake.fetchStatesCompletedReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.fetchStatesCompletedReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeAuctionMetricEmitterDelegate) 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 _ auctiontypes.AuctionMetricEmitterDelegate = new(FakeAuctionMetricEmitterDelegate)
