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

import (
	"sync"

	"code.cloudfoundry.org/cli/command"
)

type FakeSharedActor struct {
	CheckTargetStub        func(bool, bool) error
	checkTargetMutex       sync.RWMutex
	checkTargetArgsForCall []struct {
		arg1 bool
		arg2 bool
	}
	checkTargetReturns struct {
		result1 error
	}
	checkTargetReturnsOnCall map[int]struct {
		result1 error
	}
	IsLoggedInStub        func() bool
	isLoggedInMutex       sync.RWMutex
	isLoggedInArgsForCall []struct {
	}
	isLoggedInReturns struct {
		result1 bool
	}
	isLoggedInReturnsOnCall map[int]struct {
		result1 bool
	}
	IsOrgTargetedStub        func() bool
	isOrgTargetedMutex       sync.RWMutex
	isOrgTargetedArgsForCall []struct {
	}
	isOrgTargetedReturns struct {
		result1 bool
	}
	isOrgTargetedReturnsOnCall map[int]struct {
		result1 bool
	}
	IsSpaceTargetedStub        func() bool
	isSpaceTargetedMutex       sync.RWMutex
	isSpaceTargetedArgsForCall []struct {
	}
	isSpaceTargetedReturns struct {
		result1 bool
	}
	isSpaceTargetedReturnsOnCall map[int]struct {
		result1 bool
	}
	RequireCurrentUserStub        func() (string, error)
	requireCurrentUserMutex       sync.RWMutex
	requireCurrentUserArgsForCall []struct {
	}
	requireCurrentUserReturns struct {
		result1 string
		result2 error
	}
	requireCurrentUserReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	RequireTargetedOrgStub        func() (string, error)
	requireTargetedOrgMutex       sync.RWMutex
	requireTargetedOrgArgsForCall []struct {
	}
	requireTargetedOrgReturns struct {
		result1 string
		result2 error
	}
	requireTargetedOrgReturnsOnCall map[int]struct {
		result1 string
		result2 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeSharedActor) CheckTarget(arg1 bool, arg2 bool) error {
	fake.checkTargetMutex.Lock()
	ret, specificReturn := fake.checkTargetReturnsOnCall[len(fake.checkTargetArgsForCall)]
	fake.checkTargetArgsForCall = append(fake.checkTargetArgsForCall, struct {
		arg1 bool
		arg2 bool
	}{arg1, arg2})
	fake.recordInvocation("CheckTarget", []interface{}{arg1, arg2})
	fake.checkTargetMutex.Unlock()
	if fake.CheckTargetStub != nil {
		return fake.CheckTargetStub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.checkTargetReturns
	return fakeReturns.result1
}

func (fake *FakeSharedActor) CheckTargetCallCount() int {
	fake.checkTargetMutex.RLock()
	defer fake.checkTargetMutex.RUnlock()
	return len(fake.checkTargetArgsForCall)
}

func (fake *FakeSharedActor) CheckTargetCalls(stub func(bool, bool) error) {
	fake.checkTargetMutex.Lock()
	defer fake.checkTargetMutex.Unlock()
	fake.CheckTargetStub = stub
}

func (fake *FakeSharedActor) CheckTargetArgsForCall(i int) (bool, bool) {
	fake.checkTargetMutex.RLock()
	defer fake.checkTargetMutex.RUnlock()
	argsForCall := fake.checkTargetArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeSharedActor) CheckTargetReturns(result1 error) {
	fake.checkTargetMutex.Lock()
	defer fake.checkTargetMutex.Unlock()
	fake.CheckTargetStub = nil
	fake.checkTargetReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeSharedActor) CheckTargetReturnsOnCall(i int, result1 error) {
	fake.checkTargetMutex.Lock()
	defer fake.checkTargetMutex.Unlock()
	fake.CheckTargetStub = nil
	if fake.checkTargetReturnsOnCall == nil {
		fake.checkTargetReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.checkTargetReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeSharedActor) IsLoggedIn() bool {
	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
	}
	fakeReturns := fake.isLoggedInReturns
	return fakeReturns.result1
}

func (fake *FakeSharedActor) IsLoggedInCallCount() int {
	fake.isLoggedInMutex.RLock()
	defer fake.isLoggedInMutex.RUnlock()
	return len(fake.isLoggedInArgsForCall)
}

func (fake *FakeSharedActor) IsLoggedInCalls(stub func() bool) {
	fake.isLoggedInMutex.Lock()
	defer fake.isLoggedInMutex.Unlock()
	fake.IsLoggedInStub = stub
}

func (fake *FakeSharedActor) IsLoggedInReturns(result1 bool) {
	fake.isLoggedInMutex.Lock()
	defer fake.isLoggedInMutex.Unlock()
	fake.IsLoggedInStub = nil
	fake.isLoggedInReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeSharedActor) IsLoggedInReturnsOnCall(i int, result1 bool) {
	fake.isLoggedInMutex.Lock()
	defer fake.isLoggedInMutex.Unlock()
	fake.IsLoggedInStub = nil
	if fake.isLoggedInReturnsOnCall == nil {
		fake.isLoggedInReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isLoggedInReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeSharedActor) IsOrgTargeted() bool {
	fake.isOrgTargetedMutex.Lock()
	ret, specificReturn := fake.isOrgTargetedReturnsOnCall[len(fake.isOrgTargetedArgsForCall)]
	fake.isOrgTargetedArgsForCall = append(fake.isOrgTargetedArgsForCall, struct {
	}{})
	fake.recordInvocation("IsOrgTargeted", []interface{}{})
	fake.isOrgTargetedMutex.Unlock()
	if fake.IsOrgTargetedStub != nil {
		return fake.IsOrgTargetedStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.isOrgTargetedReturns
	return fakeReturns.result1
}

func (fake *FakeSharedActor) IsOrgTargetedCallCount() int {
	fake.isOrgTargetedMutex.RLock()
	defer fake.isOrgTargetedMutex.RUnlock()
	return len(fake.isOrgTargetedArgsForCall)
}

func (fake *FakeSharedActor) IsOrgTargetedCalls(stub func() bool) {
	fake.isOrgTargetedMutex.Lock()
	defer fake.isOrgTargetedMutex.Unlock()
	fake.IsOrgTargetedStub = stub
}

func (fake *FakeSharedActor) IsOrgTargetedReturns(result1 bool) {
	fake.isOrgTargetedMutex.Lock()
	defer fake.isOrgTargetedMutex.Unlock()
	fake.IsOrgTargetedStub = nil
	fake.isOrgTargetedReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeSharedActor) IsOrgTargetedReturnsOnCall(i int, result1 bool) {
	fake.isOrgTargetedMutex.Lock()
	defer fake.isOrgTargetedMutex.Unlock()
	fake.IsOrgTargetedStub = nil
	if fake.isOrgTargetedReturnsOnCall == nil {
		fake.isOrgTargetedReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isOrgTargetedReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeSharedActor) IsSpaceTargeted() bool {
	fake.isSpaceTargetedMutex.Lock()
	ret, specificReturn := fake.isSpaceTargetedReturnsOnCall[len(fake.isSpaceTargetedArgsForCall)]
	fake.isSpaceTargetedArgsForCall = append(fake.isSpaceTargetedArgsForCall, struct {
	}{})
	fake.recordInvocation("IsSpaceTargeted", []interface{}{})
	fake.isSpaceTargetedMutex.Unlock()
	if fake.IsSpaceTargetedStub != nil {
		return fake.IsSpaceTargetedStub()
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.isSpaceTargetedReturns
	return fakeReturns.result1
}

func (fake *FakeSharedActor) IsSpaceTargetedCallCount() int {
	fake.isSpaceTargetedMutex.RLock()
	defer fake.isSpaceTargetedMutex.RUnlock()
	return len(fake.isSpaceTargetedArgsForCall)
}

func (fake *FakeSharedActor) IsSpaceTargetedCalls(stub func() bool) {
	fake.isSpaceTargetedMutex.Lock()
	defer fake.isSpaceTargetedMutex.Unlock()
	fake.IsSpaceTargetedStub = stub
}

func (fake *FakeSharedActor) IsSpaceTargetedReturns(result1 bool) {
	fake.isSpaceTargetedMutex.Lock()
	defer fake.isSpaceTargetedMutex.Unlock()
	fake.IsSpaceTargetedStub = nil
	fake.isSpaceTargetedReturns = struct {
		result1 bool
	}{result1}
}

func (fake *FakeSharedActor) IsSpaceTargetedReturnsOnCall(i int, result1 bool) {
	fake.isSpaceTargetedMutex.Lock()
	defer fake.isSpaceTargetedMutex.Unlock()
	fake.IsSpaceTargetedStub = nil
	if fake.isSpaceTargetedReturnsOnCall == nil {
		fake.isSpaceTargetedReturnsOnCall = make(map[int]struct {
			result1 bool
		})
	}
	fake.isSpaceTargetedReturnsOnCall[i] = struct {
		result1 bool
	}{result1}
}

func (fake *FakeSharedActor) RequireCurrentUser() (string, error) {
	fake.requireCurrentUserMutex.Lock()
	ret, specificReturn := fake.requireCurrentUserReturnsOnCall[len(fake.requireCurrentUserArgsForCall)]
	fake.requireCurrentUserArgsForCall = append(fake.requireCurrentUserArgsForCall, struct {
	}{})
	fake.recordInvocation("RequireCurrentUser", []interface{}{})
	fake.requireCurrentUserMutex.Unlock()
	if fake.RequireCurrentUserStub != nil {
		return fake.RequireCurrentUserStub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.requireCurrentUserReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeSharedActor) RequireCurrentUserCallCount() int {
	fake.requireCurrentUserMutex.RLock()
	defer fake.requireCurrentUserMutex.RUnlock()
	return len(fake.requireCurrentUserArgsForCall)
}

func (fake *FakeSharedActor) RequireCurrentUserCalls(stub func() (string, error)) {
	fake.requireCurrentUserMutex.Lock()
	defer fake.requireCurrentUserMutex.Unlock()
	fake.RequireCurrentUserStub = stub
}

func (fake *FakeSharedActor) RequireCurrentUserReturns(result1 string, result2 error) {
	fake.requireCurrentUserMutex.Lock()
	defer fake.requireCurrentUserMutex.Unlock()
	fake.RequireCurrentUserStub = nil
	fake.requireCurrentUserReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeSharedActor) RequireCurrentUserReturnsOnCall(i int, result1 string, result2 error) {
	fake.requireCurrentUserMutex.Lock()
	defer fake.requireCurrentUserMutex.Unlock()
	fake.RequireCurrentUserStub = nil
	if fake.requireCurrentUserReturnsOnCall == nil {
		fake.requireCurrentUserReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.requireCurrentUserReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeSharedActor) RequireTargetedOrg() (string, error) {
	fake.requireTargetedOrgMutex.Lock()
	ret, specificReturn := fake.requireTargetedOrgReturnsOnCall[len(fake.requireTargetedOrgArgsForCall)]
	fake.requireTargetedOrgArgsForCall = append(fake.requireTargetedOrgArgsForCall, struct {
	}{})
	fake.recordInvocation("RequireTargetedOrg", []interface{}{})
	fake.requireTargetedOrgMutex.Unlock()
	if fake.RequireTargetedOrgStub != nil {
		return fake.RequireTargetedOrgStub()
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	fakeReturns := fake.requireTargetedOrgReturns
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeSharedActor) RequireTargetedOrgCallCount() int {
	fake.requireTargetedOrgMutex.RLock()
	defer fake.requireTargetedOrgMutex.RUnlock()
	return len(fake.requireTargetedOrgArgsForCall)
}

func (fake *FakeSharedActor) RequireTargetedOrgCalls(stub func() (string, error)) {
	fake.requireTargetedOrgMutex.Lock()
	defer fake.requireTargetedOrgMutex.Unlock()
	fake.RequireTargetedOrgStub = stub
}

func (fake *FakeSharedActor) RequireTargetedOrgReturns(result1 string, result2 error) {
	fake.requireTargetedOrgMutex.Lock()
	defer fake.requireTargetedOrgMutex.Unlock()
	fake.RequireTargetedOrgStub = nil
	fake.requireTargetedOrgReturns = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeSharedActor) RequireTargetedOrgReturnsOnCall(i int, result1 string, result2 error) {
	fake.requireTargetedOrgMutex.Lock()
	defer fake.requireTargetedOrgMutex.Unlock()
	fake.RequireTargetedOrgStub = nil
	if fake.requireTargetedOrgReturnsOnCall == nil {
		fake.requireTargetedOrgReturnsOnCall = make(map[int]struct {
			result1 string
			result2 error
		})
	}
	fake.requireTargetedOrgReturnsOnCall[i] = struct {
		result1 string
		result2 error
	}{result1, result2}
}

func (fake *FakeSharedActor) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.checkTargetMutex.RLock()
	defer fake.checkTargetMutex.RUnlock()
	fake.isLoggedInMutex.RLock()
	defer fake.isLoggedInMutex.RUnlock()
	fake.isOrgTargetedMutex.RLock()
	defer fake.isOrgTargetedMutex.RUnlock()
	fake.isSpaceTargetedMutex.RLock()
	defer fake.isSpaceTargetedMutex.RUnlock()
	fake.requireCurrentUserMutex.RLock()
	defer fake.requireCurrentUserMutex.RUnlock()
	fake.requireTargetedOrgMutex.RLock()
	defer fake.requireTargetedOrgMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeSharedActor) 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 _ command.SharedActor = new(FakeSharedActor)
