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

import (
	"sync"

	"code.cloudfoundry.org/cfnetworking-cli-api/cfnetworking/cfnetv1"
	"code.cloudfoundry.org/cli/actor/cfnetworkingaction"
)

type FakeNetworkingClient struct {
	CreatePoliciesStub        func([]cfnetv1.Policy) error
	createPoliciesMutex       sync.RWMutex
	createPoliciesArgsForCall []struct {
		arg1 []cfnetv1.Policy
	}
	createPoliciesReturns struct {
		result1 error
	}
	createPoliciesReturnsOnCall map[int]struct {
		result1 error
	}
	ListPoliciesStub        func(...string) ([]cfnetv1.Policy, error)
	listPoliciesMutex       sync.RWMutex
	listPoliciesArgsForCall []struct {
		arg1 []string
	}
	listPoliciesReturns struct {
		result1 []cfnetv1.Policy
		result2 error
	}
	listPoliciesReturnsOnCall map[int]struct {
		result1 []cfnetv1.Policy
		result2 error
	}
	RemovePoliciesStub        func([]cfnetv1.Policy) error
	removePoliciesMutex       sync.RWMutex
	removePoliciesArgsForCall []struct {
		arg1 []cfnetv1.Policy
	}
	removePoliciesReturns struct {
		result1 error
	}
	removePoliciesReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeNetworkingClient) CreatePolicies(arg1 []cfnetv1.Policy) error {
	var arg1Copy []cfnetv1.Policy
	if arg1 != nil {
		arg1Copy = make([]cfnetv1.Policy, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.createPoliciesMutex.Lock()
	ret, specificReturn := fake.createPoliciesReturnsOnCall[len(fake.createPoliciesArgsForCall)]
	fake.createPoliciesArgsForCall = append(fake.createPoliciesArgsForCall, struct {
		arg1 []cfnetv1.Policy
	}{arg1Copy})
	fake.recordInvocation("CreatePolicies", []interface{}{arg1Copy})
	fake.createPoliciesMutex.Unlock()
	if fake.CreatePoliciesStub != nil {
		return fake.CreatePoliciesStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.createPoliciesReturns
	return fakeReturns.result1
}

func (fake *FakeNetworkingClient) CreatePoliciesCallCount() int {
	fake.createPoliciesMutex.RLock()
	defer fake.createPoliciesMutex.RUnlock()
	return len(fake.createPoliciesArgsForCall)
}

func (fake *FakeNetworkingClient) CreatePoliciesCalls(stub func([]cfnetv1.Policy) error) {
	fake.createPoliciesMutex.Lock()
	defer fake.createPoliciesMutex.Unlock()
	fake.CreatePoliciesStub = stub
}

func (fake *FakeNetworkingClient) CreatePoliciesArgsForCall(i int) []cfnetv1.Policy {
	fake.createPoliciesMutex.RLock()
	defer fake.createPoliciesMutex.RUnlock()
	argsForCall := fake.createPoliciesArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeNetworkingClient) CreatePoliciesReturns(result1 error) {
	fake.createPoliciesMutex.Lock()
	defer fake.createPoliciesMutex.Unlock()
	fake.CreatePoliciesStub = nil
	fake.createPoliciesReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkingClient) CreatePoliciesReturnsOnCall(i int, result1 error) {
	fake.createPoliciesMutex.Lock()
	defer fake.createPoliciesMutex.Unlock()
	fake.CreatePoliciesStub = nil
	if fake.createPoliciesReturnsOnCall == nil {
		fake.createPoliciesReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.createPoliciesReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkingClient) ListPolicies(arg1 ...string) ([]cfnetv1.Policy, error) {
	fake.listPoliciesMutex.Lock()
	ret, specificReturn := fake.listPoliciesReturnsOnCall[len(fake.listPoliciesArgsForCall)]
	fake.listPoliciesArgsForCall = append(fake.listPoliciesArgsForCall, struct {
		arg1 []string
	}{arg1})
	fake.recordInvocation("ListPolicies", []interface{}{arg1})
	fake.listPoliciesMutex.Unlock()
	if fake.ListPoliciesStub != nil {
		return fake.ListPoliciesStub(arg1...)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.listPoliciesReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeNetworkingClient) ListPoliciesCallCount() int {
	fake.listPoliciesMutex.RLock()
	defer fake.listPoliciesMutex.RUnlock()
	return len(fake.listPoliciesArgsForCall)
}

func (fake *FakeNetworkingClient) ListPoliciesCalls(stub func(...string) ([]cfnetv1.Policy, error)) {
	fake.listPoliciesMutex.Lock()
	defer fake.listPoliciesMutex.Unlock()
	fake.ListPoliciesStub = stub
}

func (fake *FakeNetworkingClient) ListPoliciesArgsForCall(i int) []string {
	fake.listPoliciesMutex.RLock()
	defer fake.listPoliciesMutex.RUnlock()
	argsForCall := fake.listPoliciesArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeNetworkingClient) ListPoliciesReturns(result1 []cfnetv1.Policy, result2 error) {
	fake.listPoliciesMutex.Lock()
	defer fake.listPoliciesMutex.Unlock()
	fake.ListPoliciesStub = nil
	fake.listPoliciesReturns = struct {
		result1 []cfnetv1.Policy
		result2 error
	}{result1, result2}
}

func (fake *FakeNetworkingClient) ListPoliciesReturnsOnCall(i int, result1 []cfnetv1.Policy, result2 error) {
	fake.listPoliciesMutex.Lock()
	defer fake.listPoliciesMutex.Unlock()
	fake.ListPoliciesStub = nil
	if fake.listPoliciesReturnsOnCall == nil {
		fake.listPoliciesReturnsOnCall = make(map[int]struct {
			result1 []cfnetv1.Policy
			result2 error
		})
	}
	fake.listPoliciesReturnsOnCall[i] = struct {
		result1 []cfnetv1.Policy
		result2 error
	}{result1, result2}
}

func (fake *FakeNetworkingClient) RemovePolicies(arg1 []cfnetv1.Policy) error {
	var arg1Copy []cfnetv1.Policy
	if arg1 != nil {
		arg1Copy = make([]cfnetv1.Policy, len(arg1))
		copy(arg1Copy, arg1)
	}
	fake.removePoliciesMutex.Lock()
	ret, specificReturn := fake.removePoliciesReturnsOnCall[len(fake.removePoliciesArgsForCall)]
	fake.removePoliciesArgsForCall = append(fake.removePoliciesArgsForCall, struct {
		arg1 []cfnetv1.Policy
	}{arg1Copy})
	fake.recordInvocation("RemovePolicies", []interface{}{arg1Copy})
	fake.removePoliciesMutex.Unlock()
	if fake.RemovePoliciesStub != nil {
		return fake.RemovePoliciesStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.removePoliciesReturns
	return fakeReturns.result1
}

func (fake *FakeNetworkingClient) RemovePoliciesCallCount() int {
	fake.removePoliciesMutex.RLock()
	defer fake.removePoliciesMutex.RUnlock()
	return len(fake.removePoliciesArgsForCall)
}

func (fake *FakeNetworkingClient) RemovePoliciesCalls(stub func([]cfnetv1.Policy) error) {
	fake.removePoliciesMutex.Lock()
	defer fake.removePoliciesMutex.Unlock()
	fake.RemovePoliciesStub = stub
}

func (fake *FakeNetworkingClient) RemovePoliciesArgsForCall(i int) []cfnetv1.Policy {
	fake.removePoliciesMutex.RLock()
	defer fake.removePoliciesMutex.RUnlock()
	argsForCall := fake.removePoliciesArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeNetworkingClient) RemovePoliciesReturns(result1 error) {
	fake.removePoliciesMutex.Lock()
	defer fake.removePoliciesMutex.Unlock()
	fake.RemovePoliciesStub = nil
	fake.removePoliciesReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeNetworkingClient) RemovePoliciesReturnsOnCall(i int, result1 error) {
	fake.removePoliciesMutex.Lock()
	defer fake.removePoliciesMutex.Unlock()
	fake.RemovePoliciesStub = nil
	if fake.removePoliciesReturnsOnCall == nil {
		fake.removePoliciesReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.removePoliciesReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

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

func (fake *FakeNetworkingClient) 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 _ cfnetworkingaction.NetworkingClient = new(FakeNetworkingClient)
