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

import (
	"context"
	"sync"

	"github.com/nginx/nginx-gateway-fabric/v2/internal/controller/nginx/agent"
	"k8s.io/apimachinery/pkg/types"
)

type FakeDeploymentStorer struct {
	GetStub        func(types.NamespacedName) *agent.Deployment
	getMutex       sync.RWMutex
	getArgsForCall []struct {
		arg1 types.NamespacedName
	}
	getReturns struct {
		result1 *agent.Deployment
	}
	getReturnsOnCall map[int]struct {
		result1 *agent.Deployment
	}
	GetOrStoreStub        func(context.Context, types.NamespacedName, chan struct{}) *agent.Deployment
	getOrStoreMutex       sync.RWMutex
	getOrStoreArgsForCall []struct {
		arg1 context.Context
		arg2 types.NamespacedName
		arg3 chan struct{}
	}
	getOrStoreReturns struct {
		result1 *agent.Deployment
	}
	getOrStoreReturnsOnCall map[int]struct {
		result1 *agent.Deployment
	}
	RemoveStub        func(types.NamespacedName)
	removeMutex       sync.RWMutex
	removeArgsForCall []struct {
		arg1 types.NamespacedName
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeDeploymentStorer) Get(arg1 types.NamespacedName) *agent.Deployment {
	fake.getMutex.Lock()
	ret, specificReturn := fake.getReturnsOnCall[len(fake.getArgsForCall)]
	fake.getArgsForCall = append(fake.getArgsForCall, struct {
		arg1 types.NamespacedName
	}{arg1})
	stub := fake.GetStub
	fakeReturns := fake.getReturns
	fake.recordInvocation("Get", []interface{}{arg1})
	fake.getMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDeploymentStorer) GetCallCount() int {
	fake.getMutex.RLock()
	defer fake.getMutex.RUnlock()
	return len(fake.getArgsForCall)
}

func (fake *FakeDeploymentStorer) GetCalls(stub func(types.NamespacedName) *agent.Deployment) {
	fake.getMutex.Lock()
	defer fake.getMutex.Unlock()
	fake.GetStub = stub
}

func (fake *FakeDeploymentStorer) GetArgsForCall(i int) types.NamespacedName {
	fake.getMutex.RLock()
	defer fake.getMutex.RUnlock()
	argsForCall := fake.getArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDeploymentStorer) GetReturns(result1 *agent.Deployment) {
	fake.getMutex.Lock()
	defer fake.getMutex.Unlock()
	fake.GetStub = nil
	fake.getReturns = struct {
		result1 *agent.Deployment
	}{result1}
}

func (fake *FakeDeploymentStorer) GetReturnsOnCall(i int, result1 *agent.Deployment) {
	fake.getMutex.Lock()
	defer fake.getMutex.Unlock()
	fake.GetStub = nil
	if fake.getReturnsOnCall == nil {
		fake.getReturnsOnCall = make(map[int]struct {
			result1 *agent.Deployment
		})
	}
	fake.getReturnsOnCall[i] = struct {
		result1 *agent.Deployment
	}{result1}
}

func (fake *FakeDeploymentStorer) GetOrStore(arg1 context.Context, arg2 types.NamespacedName, arg3 chan struct{}) *agent.Deployment {
	fake.getOrStoreMutex.Lock()
	ret, specificReturn := fake.getOrStoreReturnsOnCall[len(fake.getOrStoreArgsForCall)]
	fake.getOrStoreArgsForCall = append(fake.getOrStoreArgsForCall, struct {
		arg1 context.Context
		arg2 types.NamespacedName
		arg3 chan struct{}
	}{arg1, arg2, arg3})
	stub := fake.GetOrStoreStub
	fakeReturns := fake.getOrStoreReturns
	fake.recordInvocation("GetOrStore", []interface{}{arg1, arg2, arg3})
	fake.getOrStoreMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeDeploymentStorer) GetOrStoreCallCount() int {
	fake.getOrStoreMutex.RLock()
	defer fake.getOrStoreMutex.RUnlock()
	return len(fake.getOrStoreArgsForCall)
}

func (fake *FakeDeploymentStorer) GetOrStoreCalls(stub func(context.Context, types.NamespacedName, chan struct{}) *agent.Deployment) {
	fake.getOrStoreMutex.Lock()
	defer fake.getOrStoreMutex.Unlock()
	fake.GetOrStoreStub = stub
}

func (fake *FakeDeploymentStorer) GetOrStoreArgsForCall(i int) (context.Context, types.NamespacedName, chan struct{}) {
	fake.getOrStoreMutex.RLock()
	defer fake.getOrStoreMutex.RUnlock()
	argsForCall := fake.getOrStoreArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeDeploymentStorer) GetOrStoreReturns(result1 *agent.Deployment) {
	fake.getOrStoreMutex.Lock()
	defer fake.getOrStoreMutex.Unlock()
	fake.GetOrStoreStub = nil
	fake.getOrStoreReturns = struct {
		result1 *agent.Deployment
	}{result1}
}

func (fake *FakeDeploymentStorer) GetOrStoreReturnsOnCall(i int, result1 *agent.Deployment) {
	fake.getOrStoreMutex.Lock()
	defer fake.getOrStoreMutex.Unlock()
	fake.GetOrStoreStub = nil
	if fake.getOrStoreReturnsOnCall == nil {
		fake.getOrStoreReturnsOnCall = make(map[int]struct {
			result1 *agent.Deployment
		})
	}
	fake.getOrStoreReturnsOnCall[i] = struct {
		result1 *agent.Deployment
	}{result1}
}

func (fake *FakeDeploymentStorer) Remove(arg1 types.NamespacedName) {
	fake.removeMutex.Lock()
	fake.removeArgsForCall = append(fake.removeArgsForCall, struct {
		arg1 types.NamespacedName
	}{arg1})
	stub := fake.RemoveStub
	fake.recordInvocation("Remove", []interface{}{arg1})
	fake.removeMutex.Unlock()
	if stub != nil {
		fake.RemoveStub(arg1)
	}
}

func (fake *FakeDeploymentStorer) RemoveCallCount() int {
	fake.removeMutex.RLock()
	defer fake.removeMutex.RUnlock()
	return len(fake.removeArgsForCall)
}

func (fake *FakeDeploymentStorer) RemoveCalls(stub func(types.NamespacedName)) {
	fake.removeMutex.Lock()
	defer fake.removeMutex.Unlock()
	fake.RemoveStub = stub
}

func (fake *FakeDeploymentStorer) RemoveArgsForCall(i int) types.NamespacedName {
	fake.removeMutex.RLock()
	defer fake.removeMutex.RUnlock()
	argsForCall := fake.removeArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeDeploymentStorer) 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 *FakeDeploymentStorer) 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 _ agent.DeploymentStorer = new(FakeDeploymentStorer)
