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

import (
	"sync"

	"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state"
	"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/graph"
	"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/types"
	typesa "k8s.io/apimachinery/pkg/types"
	"sigs.k8s.io/controller-runtime/pkg/client"
)

type FakeChangeProcessor struct {
	CaptureDeleteChangeStub        func(types.ObjectType, typesa.NamespacedName)
	captureDeleteChangeMutex       sync.RWMutex
	captureDeleteChangeArgsForCall []struct {
		arg1 types.ObjectType
		arg2 typesa.NamespacedName
	}
	CaptureUpsertChangeStub        func(client.Object)
	captureUpsertChangeMutex       sync.RWMutex
	captureUpsertChangeArgsForCall []struct {
		arg1 client.Object
	}
	GetLatestGraphStub        func() *graph.Graph
	getLatestGraphMutex       sync.RWMutex
	getLatestGraphArgsForCall []struct {
	}
	getLatestGraphReturns struct {
		result1 *graph.Graph
	}
	getLatestGraphReturnsOnCall map[int]struct {
		result1 *graph.Graph
	}
	ProcessStub        func() *graph.Graph
	processMutex       sync.RWMutex
	processArgsForCall []struct {
	}
	processReturns struct {
		result1 *graph.Graph
	}
	processReturnsOnCall map[int]struct {
		result1 *graph.Graph
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeChangeProcessor) CaptureDeleteChange(arg1 types.ObjectType, arg2 typesa.NamespacedName) {
	fake.captureDeleteChangeMutex.Lock()
	fake.captureDeleteChangeArgsForCall = append(fake.captureDeleteChangeArgsForCall, struct {
		arg1 types.ObjectType
		arg2 typesa.NamespacedName
	}{arg1, arg2})
	stub := fake.CaptureDeleteChangeStub
	fake.recordInvocation("CaptureDeleteChange", []interface{}{arg1, arg2})
	fake.captureDeleteChangeMutex.Unlock()
	if stub != nil {
		fake.CaptureDeleteChangeStub(arg1, arg2)
	}
}

func (fake *FakeChangeProcessor) CaptureDeleteChangeCallCount() int {
	fake.captureDeleteChangeMutex.RLock()
	defer fake.captureDeleteChangeMutex.RUnlock()
	return len(fake.captureDeleteChangeArgsForCall)
}

func (fake *FakeChangeProcessor) CaptureDeleteChangeCalls(stub func(types.ObjectType, typesa.NamespacedName)) {
	fake.captureDeleteChangeMutex.Lock()
	defer fake.captureDeleteChangeMutex.Unlock()
	fake.CaptureDeleteChangeStub = stub
}

func (fake *FakeChangeProcessor) CaptureDeleteChangeArgsForCall(i int) (types.ObjectType, typesa.NamespacedName) {
	fake.captureDeleteChangeMutex.RLock()
	defer fake.captureDeleteChangeMutex.RUnlock()
	argsForCall := fake.captureDeleteChangeArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeChangeProcessor) CaptureUpsertChange(arg1 client.Object) {
	fake.captureUpsertChangeMutex.Lock()
	fake.captureUpsertChangeArgsForCall = append(fake.captureUpsertChangeArgsForCall, struct {
		arg1 client.Object
	}{arg1})
	stub := fake.CaptureUpsertChangeStub
	fake.recordInvocation("CaptureUpsertChange", []interface{}{arg1})
	fake.captureUpsertChangeMutex.Unlock()
	if stub != nil {
		fake.CaptureUpsertChangeStub(arg1)
	}
}

func (fake *FakeChangeProcessor) CaptureUpsertChangeCallCount() int {
	fake.captureUpsertChangeMutex.RLock()
	defer fake.captureUpsertChangeMutex.RUnlock()
	return len(fake.captureUpsertChangeArgsForCall)
}

func (fake *FakeChangeProcessor) CaptureUpsertChangeCalls(stub func(client.Object)) {
	fake.captureUpsertChangeMutex.Lock()
	defer fake.captureUpsertChangeMutex.Unlock()
	fake.CaptureUpsertChangeStub = stub
}

func (fake *FakeChangeProcessor) CaptureUpsertChangeArgsForCall(i int) client.Object {
	fake.captureUpsertChangeMutex.RLock()
	defer fake.captureUpsertChangeMutex.RUnlock()
	argsForCall := fake.captureUpsertChangeArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeChangeProcessor) GetLatestGraph() *graph.Graph {
	fake.getLatestGraphMutex.Lock()
	ret, specificReturn := fake.getLatestGraphReturnsOnCall[len(fake.getLatestGraphArgsForCall)]
	fake.getLatestGraphArgsForCall = append(fake.getLatestGraphArgsForCall, struct {
	}{})
	stub := fake.GetLatestGraphStub
	fakeReturns := fake.getLatestGraphReturns
	fake.recordInvocation("GetLatestGraph", []interface{}{})
	fake.getLatestGraphMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeChangeProcessor) GetLatestGraphCallCount() int {
	fake.getLatestGraphMutex.RLock()
	defer fake.getLatestGraphMutex.RUnlock()
	return len(fake.getLatestGraphArgsForCall)
}

func (fake *FakeChangeProcessor) GetLatestGraphCalls(stub func() *graph.Graph) {
	fake.getLatestGraphMutex.Lock()
	defer fake.getLatestGraphMutex.Unlock()
	fake.GetLatestGraphStub = stub
}

func (fake *FakeChangeProcessor) GetLatestGraphReturns(result1 *graph.Graph) {
	fake.getLatestGraphMutex.Lock()
	defer fake.getLatestGraphMutex.Unlock()
	fake.GetLatestGraphStub = nil
	fake.getLatestGraphReturns = struct {
		result1 *graph.Graph
	}{result1}
}

func (fake *FakeChangeProcessor) GetLatestGraphReturnsOnCall(i int, result1 *graph.Graph) {
	fake.getLatestGraphMutex.Lock()
	defer fake.getLatestGraphMutex.Unlock()
	fake.GetLatestGraphStub = nil
	if fake.getLatestGraphReturnsOnCall == nil {
		fake.getLatestGraphReturnsOnCall = make(map[int]struct {
			result1 *graph.Graph
		})
	}
	fake.getLatestGraphReturnsOnCall[i] = struct {
		result1 *graph.Graph
	}{result1}
}

func (fake *FakeChangeProcessor) Process() *graph.Graph {
	fake.processMutex.Lock()
	ret, specificReturn := fake.processReturnsOnCall[len(fake.processArgsForCall)]
	fake.processArgsForCall = append(fake.processArgsForCall, struct {
	}{})
	stub := fake.ProcessStub
	fakeReturns := fake.processReturns
	fake.recordInvocation("Process", []interface{}{})
	fake.processMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeChangeProcessor) ProcessCallCount() int {
	fake.processMutex.RLock()
	defer fake.processMutex.RUnlock()
	return len(fake.processArgsForCall)
}

func (fake *FakeChangeProcessor) ProcessCalls(stub func() *graph.Graph) {
	fake.processMutex.Lock()
	defer fake.processMutex.Unlock()
	fake.ProcessStub = stub
}

func (fake *FakeChangeProcessor) ProcessReturns(result1 *graph.Graph) {
	fake.processMutex.Lock()
	defer fake.processMutex.Unlock()
	fake.ProcessStub = nil
	fake.processReturns = struct {
		result1 *graph.Graph
	}{result1}
}

func (fake *FakeChangeProcessor) ProcessReturnsOnCall(i int, result1 *graph.Graph) {
	fake.processMutex.Lock()
	defer fake.processMutex.Unlock()
	fake.ProcessStub = nil
	if fake.processReturnsOnCall == nil {
		fake.processReturnsOnCall = make(map[int]struct {
			result1 *graph.Graph
		})
	}
	fake.processReturnsOnCall[i] = struct {
		result1 *graph.Graph
	}{result1}
}

func (fake *FakeChangeProcessor) 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 *FakeChangeProcessor) 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 _ state.ChangeProcessor = new(FakeChangeProcessor)
