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

import (
	"sync"

	"code.cloudfoundry.org/cli/actor/v2action"
	"code.cloudfoundry.org/cli/command/v2"
)

type FakeCreateAppManifestActor struct {
	CreateApplicationManifestByNameAndSpaceStub        func(appName string, spaceGUID string, filePath string) (v2action.Warnings, error)
	createApplicationManifestByNameAndSpaceMutex       sync.RWMutex
	createApplicationManifestByNameAndSpaceArgsForCall []struct {
		appName   string
		spaceGUID string
		filePath  string
	}
	createApplicationManifestByNameAndSpaceReturns struct {
		result1 v2action.Warnings
		result2 error
	}
	createApplicationManifestByNameAndSpaceReturnsOnCall map[int]struct {
		result1 v2action.Warnings
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeCreateAppManifestActor) CreateApplicationManifestByNameAndSpace(appName string, spaceGUID string, filePath string) (v2action.Warnings, error) {
	fake.createApplicationManifestByNameAndSpaceMutex.Lock()
	ret, specificReturn := fake.createApplicationManifestByNameAndSpaceReturnsOnCall[len(fake.createApplicationManifestByNameAndSpaceArgsForCall)]
	fake.createApplicationManifestByNameAndSpaceArgsForCall = append(fake.createApplicationManifestByNameAndSpaceArgsForCall, struct {
		appName   string
		spaceGUID string
		filePath  string
	}{appName, spaceGUID, filePath})
	fake.recordInvocation("CreateApplicationManifestByNameAndSpace", []interface{}{appName, spaceGUID, filePath})
	fake.createApplicationManifestByNameAndSpaceMutex.Unlock()
	if fake.CreateApplicationManifestByNameAndSpaceStub != nil {
		return fake.CreateApplicationManifestByNameAndSpaceStub(appName, spaceGUID, filePath)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fake.createApplicationManifestByNameAndSpaceReturns.result1, fake.createApplicationManifestByNameAndSpaceReturns.result2
}

func (fake *FakeCreateAppManifestActor) CreateApplicationManifestByNameAndSpaceCallCount() int {
	fake.createApplicationManifestByNameAndSpaceMutex.RLock()
	defer fake.createApplicationManifestByNameAndSpaceMutex.RUnlock()
	return len(fake.createApplicationManifestByNameAndSpaceArgsForCall)
}

func (fake *FakeCreateAppManifestActor) CreateApplicationManifestByNameAndSpaceArgsForCall(i int) (string, string, string) {
	fake.createApplicationManifestByNameAndSpaceMutex.RLock()
	defer fake.createApplicationManifestByNameAndSpaceMutex.RUnlock()
	return fake.createApplicationManifestByNameAndSpaceArgsForCall[i].appName, fake.createApplicationManifestByNameAndSpaceArgsForCall[i].spaceGUID, fake.createApplicationManifestByNameAndSpaceArgsForCall[i].filePath
}

func (fake *FakeCreateAppManifestActor) CreateApplicationManifestByNameAndSpaceReturns(result1 v2action.Warnings, result2 error) {
	fake.CreateApplicationManifestByNameAndSpaceStub = nil
	fake.createApplicationManifestByNameAndSpaceReturns = struct {
		result1 v2action.Warnings
		result2 error
	}{result1, result2}
}

func (fake *FakeCreateAppManifestActor) CreateApplicationManifestByNameAndSpaceReturnsOnCall(i int, result1 v2action.Warnings, result2 error) {
	fake.CreateApplicationManifestByNameAndSpaceStub = nil
	if fake.createApplicationManifestByNameAndSpaceReturnsOnCall == nil {
		fake.createApplicationManifestByNameAndSpaceReturnsOnCall = make(map[int]struct {
			result1 v2action.Warnings
			result2 error
		})
	}
	fake.createApplicationManifestByNameAndSpaceReturnsOnCall[i] = struct {
		result1 v2action.Warnings
		result2 error
	}{result1, result2}
}

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

func (fake *FakeCreateAppManifestActor) 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 _ v2.CreateAppManifestActor = new(FakeCreateAppManifestActor)
