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

import (
	"sync"

	"code.cloudfoundry.org/eirini/api"
	"code.cloudfoundry.org/eirini/k8s/stset"
	v1 "k8s.io/api/core/v1"
)

type FakeProbeCreator struct {
	Stub        func(*api.LRP) *v1.Probe
	mutex       sync.RWMutex
	argsForCall []struct {
		arg1 *api.LRP
	}
	returns struct {
		result1 *v1.Probe
	}
	returnsOnCall map[int]struct {
		result1 *v1.Probe
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeProbeCreator) Spy(arg1 *api.LRP) *v1.Probe {
	fake.mutex.Lock()
	ret, specificReturn := fake.returnsOnCall[len(fake.argsForCall)]
	fake.argsForCall = append(fake.argsForCall, struct {
		arg1 *api.LRP
	}{arg1})
	stub := fake.Stub
	returns := fake.returns
	fake.recordInvocation("ProbeCreator", []interface{}{arg1})
	fake.mutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return returns.result1
}

func (fake *FakeProbeCreator) CallCount() int {
	fake.mutex.RLock()
	defer fake.mutex.RUnlock()
	return len(fake.argsForCall)
}

func (fake *FakeProbeCreator) Calls(stub func(*api.LRP) *v1.Probe) {
	fake.mutex.Lock()
	defer fake.mutex.Unlock()
	fake.Stub = stub
}

func (fake *FakeProbeCreator) ArgsForCall(i int) *api.LRP {
	fake.mutex.RLock()
	defer fake.mutex.RUnlock()
	return fake.argsForCall[i].arg1
}

func (fake *FakeProbeCreator) Returns(result1 *v1.Probe) {
	fake.mutex.Lock()
	defer fake.mutex.Unlock()
	fake.Stub = nil
	fake.returns = struct {
		result1 *v1.Probe
	}{result1}
}

func (fake *FakeProbeCreator) ReturnsOnCall(i int, result1 *v1.Probe) {
	fake.mutex.Lock()
	defer fake.mutex.Unlock()
	fake.Stub = nil
	if fake.returnsOnCall == nil {
		fake.returnsOnCall = make(map[int]struct {
			result1 *v1.Probe
		})
	}
	fake.returnsOnCall[i] = struct {
		result1 *v1.Probe
	}{result1}
}

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

func (fake *FakeProbeCreator) 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 _ stset.ProbeCreator = new(FakeProbeCreator).Spy
