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

import (
	"sync"

	"code.cloudfoundry.org/korifi/api/actions"
	"code.cloudfoundry.org/korifi/api/actions/manifest"
	"code.cloudfoundry.org/korifi/api/payloads"
)

type Normalizer struct {
	NormalizeStub        func(payloads.ManifestApplication, manifest.AppState) payloads.ManifestApplication
	normalizeMutex       sync.RWMutex
	normalizeArgsForCall []struct {
		arg1 payloads.ManifestApplication
		arg2 manifest.AppState
	}
	normalizeReturns struct {
		result1 payloads.ManifestApplication
	}
	normalizeReturnsOnCall map[int]struct {
		result1 payloads.ManifestApplication
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *Normalizer) Normalize(arg1 payloads.ManifestApplication, arg2 manifest.AppState) payloads.ManifestApplication {
	fake.normalizeMutex.Lock()
	ret, specificReturn := fake.normalizeReturnsOnCall[len(fake.normalizeArgsForCall)]
	fake.normalizeArgsForCall = append(fake.normalizeArgsForCall, struct {
		arg1 payloads.ManifestApplication
		arg2 manifest.AppState
	}{arg1, arg2})
	stub := fake.NormalizeStub
	fakeReturns := fake.normalizeReturns
	fake.recordInvocation("Normalize", []interface{}{arg1, arg2})
	fake.normalizeMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *Normalizer) NormalizeCallCount() int {
	fake.normalizeMutex.RLock()
	defer fake.normalizeMutex.RUnlock()
	return len(fake.normalizeArgsForCall)
}

func (fake *Normalizer) NormalizeCalls(stub func(payloads.ManifestApplication, manifest.AppState) payloads.ManifestApplication) {
	fake.normalizeMutex.Lock()
	defer fake.normalizeMutex.Unlock()
	fake.NormalizeStub = stub
}

func (fake *Normalizer) NormalizeArgsForCall(i int) (payloads.ManifestApplication, manifest.AppState) {
	fake.normalizeMutex.RLock()
	defer fake.normalizeMutex.RUnlock()
	argsForCall := fake.normalizeArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *Normalizer) NormalizeReturns(result1 payloads.ManifestApplication) {
	fake.normalizeMutex.Lock()
	defer fake.normalizeMutex.Unlock()
	fake.NormalizeStub = nil
	fake.normalizeReturns = struct {
		result1 payloads.ManifestApplication
	}{result1}
}

func (fake *Normalizer) NormalizeReturnsOnCall(i int, result1 payloads.ManifestApplication) {
	fake.normalizeMutex.Lock()
	defer fake.normalizeMutex.Unlock()
	fake.NormalizeStub = nil
	if fake.normalizeReturnsOnCall == nil {
		fake.normalizeReturnsOnCall = make(map[int]struct {
			result1 payloads.ManifestApplication
		})
	}
	fake.normalizeReturnsOnCall[i] = struct {
		result1 payloads.ManifestApplication
	}{result1}
}

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