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

import (
	"sync"

	"github.com/cloudfoundry/bosh-agent/v2/platform/windows/disk"
)

type FakeWindowsDiskLinker struct {
	LinkStub        func(string, string) error
	linkMutex       sync.RWMutex
	linkArgsForCall []struct {
		arg1 string
		arg2 string
	}
	linkReturns struct {
		result1 error
	}
	linkReturnsOnCall map[int]struct {
		result1 error
	}
	LinkTargetStub        func(string) (string, error)
	linkTargetMutex       sync.RWMutex
	linkTargetArgsForCall []struct {
		arg1 string
	}
	linkTargetReturns struct {
		result1 string
		result2 error
	}
	linkTargetReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeWindowsDiskLinker) Link(arg1 string, arg2 string) error {
	fake.linkMutex.Lock()
	ret, specificReturn := fake.linkReturnsOnCall[len(fake.linkArgsForCall)]
	fake.linkArgsForCall = append(fake.linkArgsForCall, struct {
		arg1 string
		arg2 string
	}{arg1, arg2})
	stub := fake.LinkStub
	fakeReturns := fake.linkReturns
	fake.recordInvocation("Link", []interface{}{arg1, arg2})
	fake.linkMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeWindowsDiskLinker) LinkCallCount() int {
	fake.linkMutex.RLock()
	defer fake.linkMutex.RUnlock()
	return len(fake.linkArgsForCall)
}

func (fake *FakeWindowsDiskLinker) LinkCalls(stub func(string, string) error) {
	fake.linkMutex.Lock()
	defer fake.linkMutex.Unlock()
	fake.LinkStub = stub
}

func (fake *FakeWindowsDiskLinker) LinkArgsForCall(i int) (string, string) {
	fake.linkMutex.RLock()
	defer fake.linkMutex.RUnlock()
	argsForCall := fake.linkArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeWindowsDiskLinker) LinkReturns(result1 error) {
	fake.linkMutex.Lock()
	defer fake.linkMutex.Unlock()
	fake.LinkStub = nil
	fake.linkReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeWindowsDiskLinker) LinkReturnsOnCall(i int, result1 error) {
	fake.linkMutex.Lock()
	defer fake.linkMutex.Unlock()
	fake.LinkStub = nil
	if fake.linkReturnsOnCall == nil {
		fake.linkReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.linkReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeWindowsDiskLinker) LinkTarget(arg1 string) (string, error) {
	fake.linkTargetMutex.Lock()
	ret, specificReturn := fake.linkTargetReturnsOnCall[len(fake.linkTargetArgsForCall)]
	fake.linkTargetArgsForCall = append(fake.linkTargetArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.LinkTargetStub
	fakeReturns := fake.linkTargetReturns
	fake.recordInvocation("LinkTarget", []interface{}{arg1})
	fake.linkTargetMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeWindowsDiskLinker) LinkTargetCallCount() int {
	fake.linkTargetMutex.RLock()
	defer fake.linkTargetMutex.RUnlock()
	return len(fake.linkTargetArgsForCall)
}

func (fake *FakeWindowsDiskLinker) LinkTargetCalls(stub func(string) (string, error)) {
	fake.linkTargetMutex.Lock()
	defer fake.linkTargetMutex.Unlock()
	fake.LinkTargetStub = stub
}

func (fake *FakeWindowsDiskLinker) LinkTargetArgsForCall(i int) string {
	fake.linkTargetMutex.RLock()
	defer fake.linkTargetMutex.RUnlock()
	argsForCall := fake.linkTargetArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeWindowsDiskLinker) LinkTargetReturns(result1 string, result2 error) {
	fake.linkTargetMutex.Lock()
	defer fake.linkTargetMutex.Unlock()
	fake.LinkTargetStub = nil
	fake.linkTargetReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeWindowsDiskLinker) LinkTargetReturnsOnCall(i int, result1 string, result2 error) {
	fake.linkTargetMutex.Lock()
	defer fake.linkTargetMutex.Unlock()
	fake.LinkTargetStub = nil
	if fake.linkTargetReturnsOnCall == nil {
		fake.linkTargetReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.linkTargetReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

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

func (fake *FakeWindowsDiskLinker) 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 _ disk.WindowsDiskLinker = new(FakeWindowsDiskLinker)
