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

import (
	"sync"

	"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/nginx/config/policies"
	"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/conditions"
	"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/state/validation"
)

type FakePolicyValidator struct {
	ConflictsStub        func(policies.Policy, policies.Policy) bool
	conflictsMutex       sync.RWMutex
	conflictsArgsForCall []struct {
		arg1 policies.Policy
		arg2 policies.Policy
	}
	conflictsReturns struct {
		result1 bool
	}
	conflictsReturnsOnCall map[int]struct {
		result1 bool
	}
	ValidateStub        func(policies.Policy) []conditions.Condition
	validateMutex       sync.RWMutex
	validateArgsForCall []struct {
		arg1 policies.Policy
	}
	validateReturns struct {
		result1 []conditions.Condition
	}
	validateReturnsOnCall map[int]struct {
		result1 []conditions.Condition
	}
	ValidateGlobalSettingsStub        func(policies.Policy, *policies.GlobalSettings) []conditions.Condition
	validateGlobalSettingsMutex       sync.RWMutex
	validateGlobalSettingsArgsForCall []struct {
		arg1 policies.Policy
		arg2 *policies.GlobalSettings
	}
	validateGlobalSettingsReturns struct {
		result1 []conditions.Condition
	}
	validateGlobalSettingsReturnsOnCall map[int]struct {
		result1 []conditions.Condition
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakePolicyValidator) Conflicts(arg1 policies.Policy, arg2 policies.Policy) bool {
	fake.conflictsMutex.Lock()
	ret, specificReturn := fake.conflictsReturnsOnCall[len(fake.conflictsArgsForCall)]
	fake.conflictsArgsForCall = append(fake.conflictsArgsForCall, struct {
		arg1 policies.Policy
		arg2 policies.Policy
	}{arg1, arg2})
	stub := fake.ConflictsStub
	fakeReturns := fake.conflictsReturns
	fake.recordInvocation("Conflicts", []interface{}{arg1, arg2})
	fake.conflictsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakePolicyValidator) ConflictsCallCount() int {
	fake.conflictsMutex.RLock()
	defer fake.conflictsMutex.RUnlock()
	return len(fake.conflictsArgsForCall)
}

func (fake *FakePolicyValidator) ConflictsCalls(stub func(policies.Policy, policies.Policy) bool) {
	fake.conflictsMutex.Lock()
	defer fake.conflictsMutex.Unlock()
	fake.ConflictsStub = stub
}

func (fake *FakePolicyValidator) ConflictsArgsForCall(i int) (policies.Policy, policies.Policy) {
	fake.conflictsMutex.RLock()
	defer fake.conflictsMutex.RUnlock()
	argsForCall := fake.conflictsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakePolicyValidator) ConflictsReturns(result1 bool) {
	fake.conflictsMutex.Lock()
	defer fake.conflictsMutex.Unlock()
	fake.ConflictsStub = nil
	fake.conflictsReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakePolicyValidator) ConflictsReturnsOnCall(i int, result1 bool) {
	fake.conflictsMutex.Lock()
	defer fake.conflictsMutex.Unlock()
	fake.ConflictsStub = nil
	if fake.conflictsReturnsOnCall == nil {
		fake.conflictsReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.conflictsReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakePolicyValidator) Validate(arg1 policies.Policy) []conditions.Condition {
	fake.validateMutex.Lock()
	ret, specificReturn := fake.validateReturnsOnCall[len(fake.validateArgsForCall)]
	fake.validateArgsForCall = append(fake.validateArgsForCall, struct {
		arg1 policies.Policy
	}{arg1})
	stub := fake.ValidateStub
	fakeReturns := fake.validateReturns
	fake.recordInvocation("Validate", []interface{}{arg1})
	fake.validateMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakePolicyValidator) ValidateCallCount() int {
	fake.validateMutex.RLock()
	defer fake.validateMutex.RUnlock()
	return len(fake.validateArgsForCall)
}

func (fake *FakePolicyValidator) ValidateCalls(stub func(policies.Policy) []conditions.Condition) {
	fake.validateMutex.Lock()
	defer fake.validateMutex.Unlock()
	fake.ValidateStub = stub
}

func (fake *FakePolicyValidator) ValidateArgsForCall(i int) policies.Policy {
	fake.validateMutex.RLock()
	defer fake.validateMutex.RUnlock()
	argsForCall := fake.validateArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakePolicyValidator) ValidateReturns(result1 []conditions.Condition) {
	fake.validateMutex.Lock()
	defer fake.validateMutex.Unlock()
	fake.ValidateStub = nil
	fake.validateReturns = struct {
		result1 []conditions.Condition
	}{result1}
}

func (fake *FakePolicyValidator) ValidateReturnsOnCall(i int, result1 []conditions.Condition) {
	fake.validateMutex.Lock()
	defer fake.validateMutex.Unlock()
	fake.ValidateStub = nil
	if fake.validateReturnsOnCall == nil {
		fake.validateReturnsOnCall = make(map[int]struct {
			result1 []conditions.Condition
		})
	}
	fake.validateReturnsOnCall[i] = struct {
		result1 []conditions.Condition
	}{result1}
}

func (fake *FakePolicyValidator) ValidateGlobalSettings(arg1 policies.Policy, arg2 *policies.GlobalSettings) []conditions.Condition {
	fake.validateGlobalSettingsMutex.Lock()
	ret, specificReturn := fake.validateGlobalSettingsReturnsOnCall[len(fake.validateGlobalSettingsArgsForCall)]
	fake.validateGlobalSettingsArgsForCall = append(fake.validateGlobalSettingsArgsForCall, struct {
		arg1 policies.Policy
		arg2 *policies.GlobalSettings
	}{arg1, arg2})
	stub := fake.ValidateGlobalSettingsStub
	fakeReturns := fake.validateGlobalSettingsReturns
	fake.recordInvocation("ValidateGlobalSettings", []interface{}{arg1, arg2})
	fake.validateGlobalSettingsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakePolicyValidator) ValidateGlobalSettingsCallCount() int {
	fake.validateGlobalSettingsMutex.RLock()
	defer fake.validateGlobalSettingsMutex.RUnlock()
	return len(fake.validateGlobalSettingsArgsForCall)
}

func (fake *FakePolicyValidator) ValidateGlobalSettingsCalls(stub func(policies.Policy, *policies.GlobalSettings) []conditions.Condition) {
	fake.validateGlobalSettingsMutex.Lock()
	defer fake.validateGlobalSettingsMutex.Unlock()
	fake.ValidateGlobalSettingsStub = stub
}

func (fake *FakePolicyValidator) ValidateGlobalSettingsArgsForCall(i int) (policies.Policy, *policies.GlobalSettings) {
	fake.validateGlobalSettingsMutex.RLock()
	defer fake.validateGlobalSettingsMutex.RUnlock()
	argsForCall := fake.validateGlobalSettingsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakePolicyValidator) ValidateGlobalSettingsReturns(result1 []conditions.Condition) {
	fake.validateGlobalSettingsMutex.Lock()
	defer fake.validateGlobalSettingsMutex.Unlock()
	fake.ValidateGlobalSettingsStub = nil
	fake.validateGlobalSettingsReturns = struct {
		result1 []conditions.Condition
	}{result1}
}

func (fake *FakePolicyValidator) ValidateGlobalSettingsReturnsOnCall(i int, result1 []conditions.Condition) {
	fake.validateGlobalSettingsMutex.Lock()
	defer fake.validateGlobalSettingsMutex.Unlock()
	fake.ValidateGlobalSettingsStub = nil
	if fake.validateGlobalSettingsReturnsOnCall == nil {
		fake.validateGlobalSettingsReturnsOnCall = make(map[int]struct {
			result1 []conditions.Condition
		})
	}
	fake.validateGlobalSettingsReturnsOnCall[i] = struct {
		result1 []conditions.Condition
	}{result1}
}

func (fake *FakePolicyValidator) 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 *FakePolicyValidator) 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 _ validation.PolicyValidator = new(FakePolicyValidator)
