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

import (
	sync "sync"

	resolver "github.com/operator-framework/operator-lifecycle-manager/pkg/controller/registry/resolver"
)

type FakeAPIIntersectionReconciler struct {
	ReconcileStub        func(resolver.APISet, resolver.OperatorGroupSurface, ...resolver.OperatorGroupSurface) resolver.APIReconciliationResult
	reconcileMutex       sync.RWMutex
	reconcileArgsForCall []struct {
		arg1 resolver.APISet
		arg2 resolver.OperatorGroupSurface
		arg3 []resolver.OperatorGroupSurface
	}
	reconcileReturns struct {
		result1 resolver.APIReconciliationResult
	}
	reconcileReturnsOnCall map[int]struct {
		result1 resolver.APIReconciliationResult
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeAPIIntersectionReconciler) Reconcile(arg1 resolver.APISet, arg2 resolver.OperatorGroupSurface, arg3 ...resolver.OperatorGroupSurface) resolver.APIReconciliationResult {
	fake.reconcileMutex.Lock()
	ret, specificReturn := fake.reconcileReturnsOnCall[len(fake.reconcileArgsForCall)]
	fake.reconcileArgsForCall = append(fake.reconcileArgsForCall, struct {
		arg1 resolver.APISet
		arg2 resolver.OperatorGroupSurface
		arg3 []resolver.OperatorGroupSurface
	}{arg1, arg2, arg3})
	fake.recordInvocation("Reconcile", []interface{}{arg1, arg2, arg3})
	fake.reconcileMutex.Unlock()
	if fake.ReconcileStub != nil {
		return fake.ReconcileStub(arg1, arg2, arg3...)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.reconcileReturns
	return fakeReturns.result1
}

func (fake *FakeAPIIntersectionReconciler) ReconcileCallCount() int {
	fake.reconcileMutex.RLock()
	defer fake.reconcileMutex.RUnlock()
	return len(fake.reconcileArgsForCall)
}

func (fake *FakeAPIIntersectionReconciler) ReconcileCalls(stub func(resolver.APISet, resolver.OperatorGroupSurface, ...resolver.OperatorGroupSurface) resolver.APIReconciliationResult) {
	fake.reconcileMutex.Lock()
	defer fake.reconcileMutex.Unlock()
	fake.ReconcileStub = stub
}

func (fake *FakeAPIIntersectionReconciler) ReconcileArgsForCall(i int) (resolver.APISet, resolver.OperatorGroupSurface, []resolver.OperatorGroupSurface) {
	fake.reconcileMutex.RLock()
	defer fake.reconcileMutex.RUnlock()
	argsForCall := fake.reconcileArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeAPIIntersectionReconciler) ReconcileReturns(result1 resolver.APIReconciliationResult) {
	fake.reconcileMutex.Lock()
	defer fake.reconcileMutex.Unlock()
	fake.ReconcileStub = nil
	fake.reconcileReturns = struct {
		result1 resolver.APIReconciliationResult
	}{result1}
}

func (fake *FakeAPIIntersectionReconciler) ReconcileReturnsOnCall(i int, result1 resolver.APIReconciliationResult) {
	fake.reconcileMutex.Lock()
	defer fake.reconcileMutex.Unlock()
	fake.ReconcileStub = nil
	if fake.reconcileReturnsOnCall == nil {
		fake.reconcileReturnsOnCall = make(map[int]struct {
			result1 resolver.APIReconciliationResult
		})
	}
	fake.reconcileReturnsOnCall[i] = struct {
		result1 resolver.APIReconciliationResult
	}{result1}
}

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

func (fake *FakeAPIIntersectionReconciler) 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 _ resolver.APIIntersectionReconciler = new(FakeAPIIntersectionReconciler)
