// 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/apps/v1"
	v1a "k8s.io/api/core/v1"
)

type FakeLRPToStatefulSetConverter struct {
	ConvertStub        func(string, *api.LRP, *v1a.Secret) (*v1.StatefulSet, error)
	convertMutex       sync.RWMutex
	convertArgsForCall []struct {
		arg1 string
		arg2 *api.LRP
		arg3 *v1a.Secret
	}
	convertReturns struct {
		result1 *v1.StatefulSet
		result2 error
	}
	convertReturnsOnCall map[int]struct {
		result1 *v1.StatefulSet
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeLRPToStatefulSetConverter) Convert(arg1 string, arg2 *api.LRP, arg3 *v1a.Secret) (*v1.StatefulSet, error) {
	fake.convertMutex.Lock()
	ret, specificReturn := fake.convertReturnsOnCall[len(fake.convertArgsForCall)]
	fake.convertArgsForCall = append(fake.convertArgsForCall, struct {
		arg1 string
		arg2 *api.LRP
		arg3 *v1a.Secret
	}{arg1, arg2, arg3})
	stub := fake.ConvertStub
	fakeReturns := fake.convertReturns
	fake.recordInvocation("Convert", []interface{}{arg1, arg2, arg3})
	fake.convertMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeLRPToStatefulSetConverter) ConvertCallCount() int {
	fake.convertMutex.RLock()
	defer fake.convertMutex.RUnlock()
	return len(fake.convertArgsForCall)
}

func (fake *FakeLRPToStatefulSetConverter) ConvertCalls(stub func(string, *api.LRP, *v1a.Secret) (*v1.StatefulSet, error)) {
	fake.convertMutex.Lock()
	defer fake.convertMutex.Unlock()
	fake.ConvertStub = stub
}

func (fake *FakeLRPToStatefulSetConverter) ConvertArgsForCall(i int) (string, *api.LRP, *v1a.Secret) {
	fake.convertMutex.RLock()
	defer fake.convertMutex.RUnlock()
	argsForCall := fake.convertArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeLRPToStatefulSetConverter) ConvertReturns(result1 *v1.StatefulSet, result2 error) {
	fake.convertMutex.Lock()
	defer fake.convertMutex.Unlock()
	fake.ConvertStub = nil
	fake.convertReturns = struct {
		result1 *v1.StatefulSet
		result2 error
	}{result1, result2}
}

func (fake *FakeLRPToStatefulSetConverter) ConvertReturnsOnCall(i int, result1 *v1.StatefulSet, result2 error) {
	fake.convertMutex.Lock()
	defer fake.convertMutex.Unlock()
	fake.ConvertStub = nil
	if fake.convertReturnsOnCall == nil {
		fake.convertReturnsOnCall = make(map[int]struct {
			result1 *v1.StatefulSet
			result2 error
		})
	}
	fake.convertReturnsOnCall[i] = struct {
		result1 *v1.StatefulSet
		result2 error
	}{result1, result2}
}

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

func (fake *FakeLRPToStatefulSetConverter) 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.LRPToStatefulSetConverter = new(FakeLRPToStatefulSetConverter)
