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

import (
	"sync"

	v7 "code.cloudfoundry.org/cli/command/v7"
	"code.cloudfoundry.org/cli/util/manifestparser"
	"github.com/cloudfoundry/bosh-cli/director/template"
)

type FakeManifestParser struct {
	InterpolateManifestStub        func(string, []string, []template.VarKV) ([]byte, error)
	interpolateManifestMutex       sync.RWMutex
	interpolateManifestArgsForCall []struct {
		arg1 string
		arg2 []string
		arg3 []template.VarKV
	}
	interpolateManifestReturns struct {
		result1 []byte
		result2 error
	}
	interpolateManifestReturnsOnCall map[int]struct {
		result1 []byte
		result2 error
	}
	MarshalManifestStub        func(manifestparser.Manifest) ([]byte, error)
	marshalManifestMutex       sync.RWMutex
	marshalManifestArgsForCall []struct {
		arg1 manifestparser.Manifest
	}
	marshalManifestReturns struct {
		result1 []byte
		result2 error
	}
	marshalManifestReturnsOnCall map[int]struct {
		result1 []byte
		result2 error
	}
	ParseManifestStub        func(string, []byte) (manifestparser.Manifest, error)
	parseManifestMutex       sync.RWMutex
	parseManifestArgsForCall []struct {
		arg1 string
		arg2 []byte
	}
	parseManifestReturns struct {
		result1 manifestparser.Manifest
		result2 error
	}
	parseManifestReturnsOnCall map[int]struct {
		result1 manifestparser.Manifest
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeManifestParser) InterpolateManifest(arg1 string, arg2 []string, arg3 []template.VarKV) ([]byte, error) {
	var arg2Copy []string
	if arg2 != nil {
		arg2Copy = make([]string, len(arg2))
		copy(arg2Copy, arg2)
	}
	var arg3Copy []template.VarKV
	if arg3 != nil {
		arg3Copy = make([]template.VarKV, len(arg3))
		copy(arg3Copy, arg3)
	}
	fake.interpolateManifestMutex.Lock()
	ret, specificReturn := fake.interpolateManifestReturnsOnCall[len(fake.interpolateManifestArgsForCall)]
	fake.interpolateManifestArgsForCall = append(fake.interpolateManifestArgsForCall, struct {
		arg1 string
		arg2 []string
		arg3 []template.VarKV
	}{arg1, arg2Copy, arg3Copy})
	fake.recordInvocation("InterpolateManifest", []interface{}{arg1, arg2Copy, arg3Copy})
	fake.interpolateManifestMutex.Unlock()
	if fake.InterpolateManifestStub != nil {
		return fake.InterpolateManifestStub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.interpolateManifestReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeManifestParser) InterpolateManifestCallCount() int {
	fake.interpolateManifestMutex.RLock()
	defer fake.interpolateManifestMutex.RUnlock()
	return len(fake.interpolateManifestArgsForCall)
}

func (fake *FakeManifestParser) InterpolateManifestCalls(stub func(string, []string, []template.VarKV) ([]byte, error)) {
	fake.interpolateManifestMutex.Lock()
	defer fake.interpolateManifestMutex.Unlock()
	fake.InterpolateManifestStub = stub
}

func (fake *FakeManifestParser) InterpolateManifestArgsForCall(i int) (string, []string, []template.VarKV) {
	fake.interpolateManifestMutex.RLock()
	defer fake.interpolateManifestMutex.RUnlock()
	argsForCall := fake.interpolateManifestArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeManifestParser) InterpolateManifestReturns(result1 []byte, result2 error) {
	fake.interpolateManifestMutex.Lock()
	defer fake.interpolateManifestMutex.Unlock()
	fake.InterpolateManifestStub = nil
	fake.interpolateManifestReturns = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeManifestParser) InterpolateManifestReturnsOnCall(i int, result1 []byte, result2 error) {
	fake.interpolateManifestMutex.Lock()
	defer fake.interpolateManifestMutex.Unlock()
	fake.InterpolateManifestStub = nil
	if fake.interpolateManifestReturnsOnCall == nil {
		fake.interpolateManifestReturnsOnCall = make(map[int]struct {
			result1 []byte
			result2 error
		})
	}
	fake.interpolateManifestReturnsOnCall[i] = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeManifestParser) MarshalManifest(arg1 manifestparser.Manifest) ([]byte, error) {
	fake.marshalManifestMutex.Lock()
	ret, specificReturn := fake.marshalManifestReturnsOnCall[len(fake.marshalManifestArgsForCall)]
	fake.marshalManifestArgsForCall = append(fake.marshalManifestArgsForCall, struct {
		arg1 manifestparser.Manifest
	}{arg1})
	fake.recordInvocation("MarshalManifest", []interface{}{arg1})
	fake.marshalManifestMutex.Unlock()
	if fake.MarshalManifestStub != nil {
		return fake.MarshalManifestStub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.marshalManifestReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeManifestParser) MarshalManifestCallCount() int {
	fake.marshalManifestMutex.RLock()
	defer fake.marshalManifestMutex.RUnlock()
	return len(fake.marshalManifestArgsForCall)
}

func (fake *FakeManifestParser) MarshalManifestCalls(stub func(manifestparser.Manifest) ([]byte, error)) {
	fake.marshalManifestMutex.Lock()
	defer fake.marshalManifestMutex.Unlock()
	fake.MarshalManifestStub = stub
}

func (fake *FakeManifestParser) MarshalManifestArgsForCall(i int) manifestparser.Manifest {
	fake.marshalManifestMutex.RLock()
	defer fake.marshalManifestMutex.RUnlock()
	argsForCall := fake.marshalManifestArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeManifestParser) MarshalManifestReturns(result1 []byte, result2 error) {
	fake.marshalManifestMutex.Lock()
	defer fake.marshalManifestMutex.Unlock()
	fake.MarshalManifestStub = nil
	fake.marshalManifestReturns = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeManifestParser) MarshalManifestReturnsOnCall(i int, result1 []byte, result2 error) {
	fake.marshalManifestMutex.Lock()
	defer fake.marshalManifestMutex.Unlock()
	fake.MarshalManifestStub = nil
	if fake.marshalManifestReturnsOnCall == nil {
		fake.marshalManifestReturnsOnCall = make(map[int]struct {
			result1 []byte
			result2 error
		})
	}
	fake.marshalManifestReturnsOnCall[i] = struct {
		result1 []byte
		result2 error
	}{result1, result2}
}

func (fake *FakeManifestParser) ParseManifest(arg1 string, arg2 []byte) (manifestparser.Manifest, error) {
	var arg2Copy []byte
	if arg2 != nil {
		arg2Copy = make([]byte, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.parseManifestMutex.Lock()
	ret, specificReturn := fake.parseManifestReturnsOnCall[len(fake.parseManifestArgsForCall)]
	fake.parseManifestArgsForCall = append(fake.parseManifestArgsForCall, struct {
		arg1 string
		arg2 []byte
	}{arg1, arg2Copy})
	fake.recordInvocation("ParseManifest", []interface{}{arg1, arg2Copy})
	fake.parseManifestMutex.Unlock()
	if fake.ParseManifestStub != nil {
		return fake.ParseManifestStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.parseManifestReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeManifestParser) ParseManifestCallCount() int {
	fake.parseManifestMutex.RLock()
	defer fake.parseManifestMutex.RUnlock()
	return len(fake.parseManifestArgsForCall)
}

func (fake *FakeManifestParser) ParseManifestCalls(stub func(string, []byte) (manifestparser.Manifest, error)) {
	fake.parseManifestMutex.Lock()
	defer fake.parseManifestMutex.Unlock()
	fake.ParseManifestStub = stub
}

func (fake *FakeManifestParser) ParseManifestArgsForCall(i int) (string, []byte) {
	fake.parseManifestMutex.RLock()
	defer fake.parseManifestMutex.RUnlock()
	argsForCall := fake.parseManifestArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeManifestParser) ParseManifestReturns(result1 manifestparser.Manifest, result2 error) {
	fake.parseManifestMutex.Lock()
	defer fake.parseManifestMutex.Unlock()
	fake.ParseManifestStub = nil
	fake.parseManifestReturns = struct {
		result1 manifestparser.Manifest
		result2 error
	}{result1, result2}
}

func (fake *FakeManifestParser) ParseManifestReturnsOnCall(i int, result1 manifestparser.Manifest, result2 error) {
	fake.parseManifestMutex.Lock()
	defer fake.parseManifestMutex.Unlock()
	fake.ParseManifestStub = nil
	if fake.parseManifestReturnsOnCall == nil {
		fake.parseManifestReturnsOnCall = make(map[int]struct {
			result1 manifestparser.Manifest
			result2 error
		})
	}
	fake.parseManifestReturnsOnCall[i] = struct {
		result1 manifestparser.Manifest
		result2 error
	}{result1, result2}
}

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

func (fake *FakeManifestParser) 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 _ v7.ManifestParser = new(FakeManifestParser)
