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

import (
	"sync"

	"github.com/cloudfoundry/bosh-agent/platform/openiscsi"
)

type FakeOpenIscsi struct {
	DiscoveryStub        func(string) error
	discoveryMutex       sync.RWMutex
	discoveryArgsForCall []struct {
		arg1 string
	}
	discoveryReturns struct {
		result1 error
	}
	discoveryReturnsOnCall map[int]struct {
		result1 error
	}
	IsLoggedinStub        func() (bool, error)
	isLoggedinMutex       sync.RWMutex
	isLoggedinArgsForCall []struct {
	}
	isLoggedinReturns struct {
		result1 bool
		result2 error
	}
	isLoggedinReturnsOnCall map[int]struct {
		result1 bool
		result2 error
	}
	LoginStub        func() error
	loginMutex       sync.RWMutex
	loginArgsForCall []struct {
	}
	loginReturns struct {
		result1 error
	}
	loginReturnsOnCall map[int]struct {
		result1 error
	}
	LogoutStub        func() error
	logoutMutex       sync.RWMutex
	logoutArgsForCall []struct {
	}
	logoutReturns struct {
		result1 error
	}
	logoutReturnsOnCall map[int]struct {
		result1 error
	}
	RestartStub        func() error
	restartMutex       sync.RWMutex
	restartArgsForCall []struct {
	}
	restartReturns struct {
		result1 error
	}
	restartReturnsOnCall map[int]struct {
		result1 error
	}
	SetupStub        func(string, string, string) error
	setupMutex       sync.RWMutex
	setupArgsForCall []struct {
		arg1 string
		arg2 string
		arg3 string
	}
	setupReturns struct {
		result1 error
	}
	setupReturnsOnCall map[int]struct {
		result1 error
	}
	StartStub        func() error
	startMutex       sync.RWMutex
	startArgsForCall []struct {
	}
	startReturns struct {
		result1 error
	}
	startReturnsOnCall map[int]struct {
		result1 error
	}
	StopStub        func() error
	stopMutex       sync.RWMutex
	stopArgsForCall []struct {
	}
	stopReturns struct {
		result1 error
	}
	stopReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeOpenIscsi) Discovery(arg1 string) error {
	fake.discoveryMutex.Lock()
	ret, specificReturn := fake.discoveryReturnsOnCall[len(fake.discoveryArgsForCall)]
	fake.discoveryArgsForCall = append(fake.discoveryArgsForCall, struct {
		arg1 string
	}{arg1})
	fake.recordInvocation("Discovery", []interface{}{arg1})
	fake.discoveryMutex.Unlock()
	if fake.DiscoveryStub != nil {
		return fake.DiscoveryStub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.discoveryReturns
	return fakeReturns.result1
}

func (fake *FakeOpenIscsi) DiscoveryCallCount() int {
	fake.discoveryMutex.RLock()
	defer fake.discoveryMutex.RUnlock()
	return len(fake.discoveryArgsForCall)
}

func (fake *FakeOpenIscsi) DiscoveryCalls(stub func(string) error) {
	fake.discoveryMutex.Lock()
	defer fake.discoveryMutex.Unlock()
	fake.DiscoveryStub = stub
}

func (fake *FakeOpenIscsi) DiscoveryArgsForCall(i int) string {
	fake.discoveryMutex.RLock()
	defer fake.discoveryMutex.RUnlock()
	argsForCall := fake.discoveryArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeOpenIscsi) DiscoveryReturns(result1 error) {
	fake.discoveryMutex.Lock()
	defer fake.discoveryMutex.Unlock()
	fake.DiscoveryStub = nil
	fake.discoveryReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) DiscoveryReturnsOnCall(i int, result1 error) {
	fake.discoveryMutex.Lock()
	defer fake.discoveryMutex.Unlock()
	fake.DiscoveryStub = nil
	if fake.discoveryReturnsOnCall == nil {
		fake.discoveryReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.discoveryReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) IsLoggedin() (bool, error) {
	fake.isLoggedinMutex.Lock()
	ret, specificReturn := fake.isLoggedinReturnsOnCall[len(fake.isLoggedinArgsForCall)]
	fake.isLoggedinArgsForCall = append(fake.isLoggedinArgsForCall, struct {
	}{})
	fake.recordInvocation("IsLoggedin", []interface{}{})
	fake.isLoggedinMutex.Unlock()
	if fake.IsLoggedinStub != nil {
		return fake.IsLoggedinStub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.isLoggedinReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeOpenIscsi) IsLoggedinCallCount() int {
	fake.isLoggedinMutex.RLock()
	defer fake.isLoggedinMutex.RUnlock()
	return len(fake.isLoggedinArgsForCall)
}

func (fake *FakeOpenIscsi) IsLoggedinCalls(stub func() (bool, error)) {
	fake.isLoggedinMutex.Lock()
	defer fake.isLoggedinMutex.Unlock()
	fake.IsLoggedinStub = stub
}

func (fake *FakeOpenIscsi) IsLoggedinReturns(result1 bool, result2 error) {
	fake.isLoggedinMutex.Lock()
	defer fake.isLoggedinMutex.Unlock()
	fake.IsLoggedinStub = nil
	fake.isLoggedinReturns = struct {
		result1 bool
		result2 error
	}{result1, result2}
}

func (fake *FakeOpenIscsi) IsLoggedinReturnsOnCall(i int, result1 bool, result2 error) {
	fake.isLoggedinMutex.Lock()
	defer fake.isLoggedinMutex.Unlock()
	fake.IsLoggedinStub = nil
	if fake.isLoggedinReturnsOnCall == nil {
		fake.isLoggedinReturnsOnCall = make(map[int]struct {
			result1 bool
			result2 error
		})
	}
	fake.isLoggedinReturnsOnCall[i] = struct {
		result1 bool
		result2 error
	}{result1, result2}
}

func (fake *FakeOpenIscsi) Login() error {
	fake.loginMutex.Lock()
	ret, specificReturn := fake.loginReturnsOnCall[len(fake.loginArgsForCall)]
	fake.loginArgsForCall = append(fake.loginArgsForCall, struct {
	}{})
	fake.recordInvocation("Login", []interface{}{})
	fake.loginMutex.Unlock()
	if fake.LoginStub != nil {
		return fake.LoginStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.loginReturns
	return fakeReturns.result1
}

func (fake *FakeOpenIscsi) LoginCallCount() int {
	fake.loginMutex.RLock()
	defer fake.loginMutex.RUnlock()
	return len(fake.loginArgsForCall)
}

func (fake *FakeOpenIscsi) LoginCalls(stub func() error) {
	fake.loginMutex.Lock()
	defer fake.loginMutex.Unlock()
	fake.LoginStub = stub
}

func (fake *FakeOpenIscsi) LoginReturns(result1 error) {
	fake.loginMutex.Lock()
	defer fake.loginMutex.Unlock()
	fake.LoginStub = nil
	fake.loginReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) LoginReturnsOnCall(i int, result1 error) {
	fake.loginMutex.Lock()
	defer fake.loginMutex.Unlock()
	fake.LoginStub = nil
	if fake.loginReturnsOnCall == nil {
		fake.loginReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.loginReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) Logout() error {
	fake.logoutMutex.Lock()
	ret, specificReturn := fake.logoutReturnsOnCall[len(fake.logoutArgsForCall)]
	fake.logoutArgsForCall = append(fake.logoutArgsForCall, struct {
	}{})
	fake.recordInvocation("Logout", []interface{}{})
	fake.logoutMutex.Unlock()
	if fake.LogoutStub != nil {
		return fake.LogoutStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.logoutReturns
	return fakeReturns.result1
}

func (fake *FakeOpenIscsi) LogoutCallCount() int {
	fake.logoutMutex.RLock()
	defer fake.logoutMutex.RUnlock()
	return len(fake.logoutArgsForCall)
}

func (fake *FakeOpenIscsi) LogoutCalls(stub func() error) {
	fake.logoutMutex.Lock()
	defer fake.logoutMutex.Unlock()
	fake.LogoutStub = stub
}

func (fake *FakeOpenIscsi) LogoutReturns(result1 error) {
	fake.logoutMutex.Lock()
	defer fake.logoutMutex.Unlock()
	fake.LogoutStub = nil
	fake.logoutReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) LogoutReturnsOnCall(i int, result1 error) {
	fake.logoutMutex.Lock()
	defer fake.logoutMutex.Unlock()
	fake.LogoutStub = nil
	if fake.logoutReturnsOnCall == nil {
		fake.logoutReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.logoutReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) Restart() error {
	fake.restartMutex.Lock()
	ret, specificReturn := fake.restartReturnsOnCall[len(fake.restartArgsForCall)]
	fake.restartArgsForCall = append(fake.restartArgsForCall, struct {
	}{})
	fake.recordInvocation("Restart", []interface{}{})
	fake.restartMutex.Unlock()
	if fake.RestartStub != nil {
		return fake.RestartStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.restartReturns
	return fakeReturns.result1
}

func (fake *FakeOpenIscsi) RestartCallCount() int {
	fake.restartMutex.RLock()
	defer fake.restartMutex.RUnlock()
	return len(fake.restartArgsForCall)
}

func (fake *FakeOpenIscsi) RestartCalls(stub func() error) {
	fake.restartMutex.Lock()
	defer fake.restartMutex.Unlock()
	fake.RestartStub = stub
}

func (fake *FakeOpenIscsi) RestartReturns(result1 error) {
	fake.restartMutex.Lock()
	defer fake.restartMutex.Unlock()
	fake.RestartStub = nil
	fake.restartReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) RestartReturnsOnCall(i int, result1 error) {
	fake.restartMutex.Lock()
	defer fake.restartMutex.Unlock()
	fake.RestartStub = nil
	if fake.restartReturnsOnCall == nil {
		fake.restartReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.restartReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) Setup(arg1 string, arg2 string, arg3 string) error {
	fake.setupMutex.Lock()
	ret, specificReturn := fake.setupReturnsOnCall[len(fake.setupArgsForCall)]
	fake.setupArgsForCall = append(fake.setupArgsForCall, struct {
		arg1 string
		arg2 string
		arg3 string
	}{arg1, arg2, arg3})
	fake.recordInvocation("Setup", []interface{}{arg1, arg2, arg3})
	fake.setupMutex.Unlock()
	if fake.SetupStub != nil {
		return fake.SetupStub(arg1, arg2, arg3)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.setupReturns
	return fakeReturns.result1
}

func (fake *FakeOpenIscsi) SetupCallCount() int {
	fake.setupMutex.RLock()
	defer fake.setupMutex.RUnlock()
	return len(fake.setupArgsForCall)
}

func (fake *FakeOpenIscsi) SetupCalls(stub func(string, string, string) error) {
	fake.setupMutex.Lock()
	defer fake.setupMutex.Unlock()
	fake.SetupStub = stub
}

func (fake *FakeOpenIscsi) SetupArgsForCall(i int) (string, string, string) {
	fake.setupMutex.RLock()
	defer fake.setupMutex.RUnlock()
	argsForCall := fake.setupArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}

func (fake *FakeOpenIscsi) SetupReturns(result1 error) {
	fake.setupMutex.Lock()
	defer fake.setupMutex.Unlock()
	fake.SetupStub = nil
	fake.setupReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) SetupReturnsOnCall(i int, result1 error) {
	fake.setupMutex.Lock()
	defer fake.setupMutex.Unlock()
	fake.SetupStub = nil
	if fake.setupReturnsOnCall == nil {
		fake.setupReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.setupReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) Start() error {
	fake.startMutex.Lock()
	ret, specificReturn := fake.startReturnsOnCall[len(fake.startArgsForCall)]
	fake.startArgsForCall = append(fake.startArgsForCall, struct {
	}{})
	fake.recordInvocation("Start", []interface{}{})
	fake.startMutex.Unlock()
	if fake.StartStub != nil {
		return fake.StartStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.startReturns
	return fakeReturns.result1
}

func (fake *FakeOpenIscsi) StartCallCount() int {
	fake.startMutex.RLock()
	defer fake.startMutex.RUnlock()
	return len(fake.startArgsForCall)
}

func (fake *FakeOpenIscsi) StartCalls(stub func() error) {
	fake.startMutex.Lock()
	defer fake.startMutex.Unlock()
	fake.StartStub = stub
}

func (fake *FakeOpenIscsi) StartReturns(result1 error) {
	fake.startMutex.Lock()
	defer fake.startMutex.Unlock()
	fake.StartStub = nil
	fake.startReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) StartReturnsOnCall(i int, result1 error) {
	fake.startMutex.Lock()
	defer fake.startMutex.Unlock()
	fake.StartStub = nil
	if fake.startReturnsOnCall == nil {
		fake.startReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.startReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) Stop() error {
	fake.stopMutex.Lock()
	ret, specificReturn := fake.stopReturnsOnCall[len(fake.stopArgsForCall)]
	fake.stopArgsForCall = append(fake.stopArgsForCall, struct {
	}{})
	fake.recordInvocation("Stop", []interface{}{})
	fake.stopMutex.Unlock()
	if fake.StopStub != nil {
		return fake.StopStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.stopReturns
	return fakeReturns.result1
}

func (fake *FakeOpenIscsi) StopCallCount() int {
	fake.stopMutex.RLock()
	defer fake.stopMutex.RUnlock()
	return len(fake.stopArgsForCall)
}

func (fake *FakeOpenIscsi) StopCalls(stub func() error) {
	fake.stopMutex.Lock()
	defer fake.stopMutex.Unlock()
	fake.StopStub = stub
}

func (fake *FakeOpenIscsi) StopReturns(result1 error) {
	fake.stopMutex.Lock()
	defer fake.stopMutex.Unlock()
	fake.StopStub = nil
	fake.stopReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) StopReturnsOnCall(i int, result1 error) {
	fake.stopMutex.Lock()
	defer fake.stopMutex.Unlock()
	fake.StopStub = nil
	if fake.stopReturnsOnCall == nil {
		fake.stopReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.stopReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeOpenIscsi) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.discoveryMutex.RLock()
	defer fake.discoveryMutex.RUnlock()
	fake.isLoggedinMutex.RLock()
	defer fake.isLoggedinMutex.RUnlock()
	fake.loginMutex.RLock()
	defer fake.loginMutex.RUnlock()
	fake.logoutMutex.RLock()
	defer fake.logoutMutex.RUnlock()
	fake.restartMutex.RLock()
	defer fake.restartMutex.RUnlock()
	fake.setupMutex.RLock()
	defer fake.setupMutex.RUnlock()
	fake.startMutex.RLock()
	defer fake.startMutex.RUnlock()
	fake.stopMutex.RLock()
	defer fake.stopMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeOpenIscsi) 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 _ openiscsi.OpenIscsi = new(FakeOpenIscsi)
