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

import (
	"sync"

	"code.cloudfoundry.org/auctioneer"
	lager "code.cloudfoundry.org/lager/v3"
)

type FakeClient struct {
	RequestLRPAuctionsStub        func(lager.Logger, string, []*auctioneer.LRPStartRequest) error
	requestLRPAuctionsMutex       sync.RWMutex
	requestLRPAuctionsArgsForCall []struct {
		arg1 lager.Logger
		arg2 string
		arg3 []*auctioneer.LRPStartRequest
	}
	requestLRPAuctionsReturns struct {
		result1 error
	}
	requestLRPAuctionsReturnsOnCall map[int]struct {
		result1 error
	}
	RequestTaskAuctionsStub        func(lager.Logger, string, []*auctioneer.TaskStartRequest) error
	requestTaskAuctionsMutex       sync.RWMutex
	requestTaskAuctionsArgsForCall []struct {
		arg1 lager.Logger
		arg2 string
		arg3 []*auctioneer.TaskStartRequest
	}
	requestTaskAuctionsReturns struct {
		result1 error
	}
	requestTaskAuctionsReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeClient) RequestLRPAuctions(arg1 lager.Logger, arg2 string, arg3 []*auctioneer.LRPStartRequest) error {
	var arg3Copy []*auctioneer.LRPStartRequest
	if arg3 != nil {
		arg3Copy = make([]*auctioneer.LRPStartRequest, len(arg3))
		copy(arg3Copy, arg3)
	}
	fake.requestLRPAuctionsMutex.Lock()
	ret, specificReturn := fake.requestLRPAuctionsReturnsOnCall[len(fake.requestLRPAuctionsArgsForCall)]
	fake.requestLRPAuctionsArgsForCall = append(fake.requestLRPAuctionsArgsForCall, struct {
		arg1 lager.Logger
		arg2 string
		arg3 []*auctioneer.LRPStartRequest
	}{arg1, arg2, arg3Copy})
	stub := fake.RequestLRPAuctionsStub
	fakeReturns := fake.requestLRPAuctionsReturns
	fake.recordInvocation("RequestLRPAuctions", []interface{}{arg1, arg2, arg3Copy})
	fake.requestLRPAuctionsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeClient) RequestLRPAuctionsCallCount() int {
	fake.requestLRPAuctionsMutex.RLock()
	defer fake.requestLRPAuctionsMutex.RUnlock()
	return len(fake.requestLRPAuctionsArgsForCall)
}

func (fake *FakeClient) RequestLRPAuctionsCalls(stub func(lager.Logger, string, []*auctioneer.LRPStartRequest) error) {
	fake.requestLRPAuctionsMutex.Lock()
	defer fake.requestLRPAuctionsMutex.Unlock()
	fake.RequestLRPAuctionsStub = stub
}

func (fake *FakeClient) RequestLRPAuctionsArgsForCall(i int) (lager.Logger, string, []*auctioneer.LRPStartRequest) {
	fake.requestLRPAuctionsMutex.RLock()
	defer fake.requestLRPAuctionsMutex.RUnlock()
	argsForCall := fake.requestLRPAuctionsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeClient) RequestLRPAuctionsReturns(result1 error) {
	fake.requestLRPAuctionsMutex.Lock()
	defer fake.requestLRPAuctionsMutex.Unlock()
	fake.RequestLRPAuctionsStub = nil
	fake.requestLRPAuctionsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeClient) RequestLRPAuctionsReturnsOnCall(i int, result1 error) {
	fake.requestLRPAuctionsMutex.Lock()
	defer fake.requestLRPAuctionsMutex.Unlock()
	fake.RequestLRPAuctionsStub = nil
	if fake.requestLRPAuctionsReturnsOnCall == nil {
		fake.requestLRPAuctionsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.requestLRPAuctionsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeClient) RequestTaskAuctions(arg1 lager.Logger, arg2 string, arg3 []*auctioneer.TaskStartRequest) error {
	var arg3Copy []*auctioneer.TaskStartRequest
	if arg3 != nil {
		arg3Copy = make([]*auctioneer.TaskStartRequest, len(arg3))
		copy(arg3Copy, arg3)
	}
	fake.requestTaskAuctionsMutex.Lock()
	ret, specificReturn := fake.requestTaskAuctionsReturnsOnCall[len(fake.requestTaskAuctionsArgsForCall)]
	fake.requestTaskAuctionsArgsForCall = append(fake.requestTaskAuctionsArgsForCall, struct {
		arg1 lager.Logger
		arg2 string
		arg3 []*auctioneer.TaskStartRequest
	}{arg1, arg2, arg3Copy})
	stub := fake.RequestTaskAuctionsStub
	fakeReturns := fake.requestTaskAuctionsReturns
	fake.recordInvocation("RequestTaskAuctions", []interface{}{arg1, arg2, arg3Copy})
	fake.requestTaskAuctionsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeClient) RequestTaskAuctionsCallCount() int {
	fake.requestTaskAuctionsMutex.RLock()
	defer fake.requestTaskAuctionsMutex.RUnlock()
	return len(fake.requestTaskAuctionsArgsForCall)
}

func (fake *FakeClient) RequestTaskAuctionsCalls(stub func(lager.Logger, string, []*auctioneer.TaskStartRequest) error) {
	fake.requestTaskAuctionsMutex.Lock()
	defer fake.requestTaskAuctionsMutex.Unlock()
	fake.RequestTaskAuctionsStub = stub
}

func (fake *FakeClient) RequestTaskAuctionsArgsForCall(i int) (lager.Logger, string, []*auctioneer.TaskStartRequest) {
	fake.requestTaskAuctionsMutex.RLock()
	defer fake.requestTaskAuctionsMutex.RUnlock()
	argsForCall := fake.requestTaskAuctionsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeClient) RequestTaskAuctionsReturns(result1 error) {
	fake.requestTaskAuctionsMutex.Lock()
	defer fake.requestTaskAuctionsMutex.Unlock()
	fake.RequestTaskAuctionsStub = nil
	fake.requestTaskAuctionsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeClient) RequestTaskAuctionsReturnsOnCall(i int, result1 error) {
	fake.requestTaskAuctionsMutex.Lock()
	defer fake.requestTaskAuctionsMutex.Unlock()
	fake.RequestTaskAuctionsStub = nil
	if fake.requestTaskAuctionsReturnsOnCall == nil {
		fake.requestTaskAuctionsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.requestTaskAuctionsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeClient) 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 _ auctioneer.Client = new(FakeClient)
