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

import (
	"sync"

	"code.cloudfoundry.org/korifi/api/repositories/include"
	"code.cloudfoundry.org/korifi/api/repositories/relationships"
)

type ResourcePresenter struct {
	PresentResourceStub        func(relationships.Resource) any
	presentResourceMutex       sync.RWMutex
	presentResourceArgsForCall []struct {
		arg1 relationships.Resource
	}
	presentResourceReturns struct {
		result1 any
	}
	presentResourceReturnsOnCall map[int]struct {
		result1 any
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *ResourcePresenter) PresentResource(arg1 relationships.Resource) any {
	fake.presentResourceMutex.Lock()
	ret, specificReturn := fake.presentResourceReturnsOnCall[len(fake.presentResourceArgsForCall)]
	fake.presentResourceArgsForCall = append(fake.presentResourceArgsForCall, struct {
		arg1 relationships.Resource
	}{arg1})
	stub := fake.PresentResourceStub
	fakeReturns := fake.presentResourceReturns
	fake.recordInvocation("PresentResource", []interface{}{arg1})
	fake.presentResourceMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *ResourcePresenter) PresentResourceCallCount() int {
	fake.presentResourceMutex.RLock()
	defer fake.presentResourceMutex.RUnlock()
	return len(fake.presentResourceArgsForCall)
}

func (fake *ResourcePresenter) PresentResourceCalls(stub func(relationships.Resource) any) {
	fake.presentResourceMutex.Lock()
	defer fake.presentResourceMutex.Unlock()
	fake.PresentResourceStub = stub
}

func (fake *ResourcePresenter) PresentResourceArgsForCall(i int) relationships.Resource {
	fake.presentResourceMutex.RLock()
	defer fake.presentResourceMutex.RUnlock()
	argsForCall := fake.presentResourceArgsForCall[i]
	return argsForCall.arg1
}

func (fake *ResourcePresenter) PresentResourceReturns(result1 any) {
	fake.presentResourceMutex.Lock()
	defer fake.presentResourceMutex.Unlock()
	fake.PresentResourceStub = nil
	fake.presentResourceReturns = struct {
		result1 any
	}{result1}
}

func (fake *ResourcePresenter) PresentResourceReturnsOnCall(i int, result1 any) {
	fake.presentResourceMutex.Lock()
	defer fake.presentResourceMutex.Unlock()
	fake.PresentResourceStub = nil
	if fake.presentResourceReturnsOnCall == nil {
		fake.presentResourceReturnsOnCall = make(map[int]struct {
			result1 any
		})
	}
	fake.presentResourceReturnsOnCall[i] = struct {
		result1 any
	}{result1}
}

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

func (fake *ResourcePresenter) 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 _ include.ResourcePresenter = new(ResourcePresenter)
