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

import (
	"sync"

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

type Resource struct {
	RelationshipsStub        func() map[string]string
	relationshipsMutex       sync.RWMutex
	relationshipsArgsForCall []struct {
	}
	relationshipsReturns struct {
		result1 map[string]string
	}
	relationshipsReturnsOnCall map[int]struct {
		result1 map[string]string
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *Resource) Relationships() map[string]string {
	fake.relationshipsMutex.Lock()
	ret, specificReturn := fake.relationshipsReturnsOnCall[len(fake.relationshipsArgsForCall)]
	fake.relationshipsArgsForCall = append(fake.relationshipsArgsForCall, struct {
	}{})
	stub := fake.RelationshipsStub
	fakeReturns := fake.relationshipsReturns
	fake.recordInvocation("Relationships", []interface{}{})
	fake.relationshipsMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *Resource) RelationshipsCallCount() int {
	fake.relationshipsMutex.RLock()
	defer fake.relationshipsMutex.RUnlock()
	return len(fake.relationshipsArgsForCall)
}

func (fake *Resource) RelationshipsCalls(stub func() map[string]string) {
	fake.relationshipsMutex.Lock()
	defer fake.relationshipsMutex.Unlock()
	fake.RelationshipsStub = stub
}

func (fake *Resource) RelationshipsReturns(result1 map[string]string) {
	fake.relationshipsMutex.Lock()
	defer fake.relationshipsMutex.Unlock()
	fake.RelationshipsStub = nil
	fake.relationshipsReturns = struct {
		result1 map[string]string
	}{result1}
}

func (fake *Resource) RelationshipsReturnsOnCall(i int, result1 map[string]string) {
	fake.relationshipsMutex.Lock()
	defer fake.relationshipsMutex.Unlock()
	fake.RelationshipsStub = nil
	if fake.relationshipsReturnsOnCall == nil {
		fake.relationshipsReturnsOnCall = make(map[int]struct {
			result1 map[string]string
		})
	}
	fake.relationshipsReturnsOnCall[i] = struct {
		result1 map[string]string
	}{result1}
}

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