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

import (
	"sync"

	"code.cloudfoundry.org/gorouter/accesslog/schema"
)

type FakeLogSender struct {
	SendAppLogStub        func(string, string, map[string]string)
	sendAppLogMutex       sync.RWMutex
	sendAppLogArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 map[string]string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeLogSender) SendAppLog(arg1 string, arg2 string, arg3 map[string]string) {
	fake.sendAppLogMutex.Lock()
	fake.sendAppLogArgsForCall = append(fake.sendAppLogArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 map[string]string
	}{arg1, arg2, arg3})
	stub := fake.SendAppLogStub
	fake.recordInvocation("SendAppLog", []interface{}{arg1, arg2, arg3})
	fake.sendAppLogMutex.Unlock()
	if stub != nil {
		fake.SendAppLogStub(arg1, arg2, arg3)
	}
}

func (fake *FakeLogSender) SendAppLogCallCount() int {
	fake.sendAppLogMutex.RLock()
	defer fake.sendAppLogMutex.RUnlock()
	return len(fake.sendAppLogArgsForCall)
}

func (fake *FakeLogSender) SendAppLogCalls(stub func(string, string, map[string]string)) {
	fake.sendAppLogMutex.Lock()
	defer fake.sendAppLogMutex.Unlock()
	fake.SendAppLogStub = stub
}

func (fake *FakeLogSender) SendAppLogArgsForCall(i int) (string, string, map[string]string) {
	fake.sendAppLogMutex.RLock()
	defer fake.sendAppLogMutex.RUnlock()
	argsForCall := fake.sendAppLogArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

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

func (fake *FakeLogSender) 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 _ schema.LogSender = new(FakeLogSender)
