github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/command/v2/v2fakes/fake_space_actor_v3.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v2fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v3action" 8 "code.cloudfoundry.org/cli/command/v2" 9 ) 10 11 type FakeSpaceActorV3 struct { 12 CloudControllerAPIVersionStub func() string 13 cloudControllerAPIVersionMutex sync.RWMutex 14 cloudControllerAPIVersionArgsForCall []struct{} 15 cloudControllerAPIVersionReturns struct { 16 result1 string 17 } 18 cloudControllerAPIVersionReturnsOnCall map[int]struct { 19 result1 string 20 } 21 GetEffectiveIsolationSegmentBySpaceStub func(spaceGUID string, orgDefaultIsolationSegmentGUID string) (v3action.IsolationSegment, v3action.Warnings, error) 22 getEffectiveIsolationSegmentBySpaceMutex sync.RWMutex 23 getEffectiveIsolationSegmentBySpaceArgsForCall []struct { 24 spaceGUID string 25 orgDefaultIsolationSegmentGUID string 26 } 27 getEffectiveIsolationSegmentBySpaceReturns struct { 28 result1 v3action.IsolationSegment 29 result2 v3action.Warnings 30 result3 error 31 } 32 getEffectiveIsolationSegmentBySpaceReturnsOnCall map[int]struct { 33 result1 v3action.IsolationSegment 34 result2 v3action.Warnings 35 result3 error 36 } 37 invocations map[string][][]interface{} 38 invocationsMutex sync.RWMutex 39 } 40 41 func (fake *FakeSpaceActorV3) CloudControllerAPIVersion() string { 42 fake.cloudControllerAPIVersionMutex.Lock() 43 ret, specificReturn := fake.cloudControllerAPIVersionReturnsOnCall[len(fake.cloudControllerAPIVersionArgsForCall)] 44 fake.cloudControllerAPIVersionArgsForCall = append(fake.cloudControllerAPIVersionArgsForCall, struct{}{}) 45 fake.recordInvocation("CloudControllerAPIVersion", []interface{}{}) 46 fake.cloudControllerAPIVersionMutex.Unlock() 47 if fake.CloudControllerAPIVersionStub != nil { 48 return fake.CloudControllerAPIVersionStub() 49 } 50 if specificReturn { 51 return ret.result1 52 } 53 return fake.cloudControllerAPIVersionReturns.result1 54 } 55 56 func (fake *FakeSpaceActorV3) CloudControllerAPIVersionCallCount() int { 57 fake.cloudControllerAPIVersionMutex.RLock() 58 defer fake.cloudControllerAPIVersionMutex.RUnlock() 59 return len(fake.cloudControllerAPIVersionArgsForCall) 60 } 61 62 func (fake *FakeSpaceActorV3) CloudControllerAPIVersionReturns(result1 string) { 63 fake.CloudControllerAPIVersionStub = nil 64 fake.cloudControllerAPIVersionReturns = struct { 65 result1 string 66 }{result1} 67 } 68 69 func (fake *FakeSpaceActorV3) CloudControllerAPIVersionReturnsOnCall(i int, result1 string) { 70 fake.CloudControllerAPIVersionStub = nil 71 if fake.cloudControllerAPIVersionReturnsOnCall == nil { 72 fake.cloudControllerAPIVersionReturnsOnCall = make(map[int]struct { 73 result1 string 74 }) 75 } 76 fake.cloudControllerAPIVersionReturnsOnCall[i] = struct { 77 result1 string 78 }{result1} 79 } 80 81 func (fake *FakeSpaceActorV3) GetEffectiveIsolationSegmentBySpace(spaceGUID string, orgDefaultIsolationSegmentGUID string) (v3action.IsolationSegment, v3action.Warnings, error) { 82 fake.getEffectiveIsolationSegmentBySpaceMutex.Lock() 83 ret, specificReturn := fake.getEffectiveIsolationSegmentBySpaceReturnsOnCall[len(fake.getEffectiveIsolationSegmentBySpaceArgsForCall)] 84 fake.getEffectiveIsolationSegmentBySpaceArgsForCall = append(fake.getEffectiveIsolationSegmentBySpaceArgsForCall, struct { 85 spaceGUID string 86 orgDefaultIsolationSegmentGUID string 87 }{spaceGUID, orgDefaultIsolationSegmentGUID}) 88 fake.recordInvocation("GetEffectiveIsolationSegmentBySpace", []interface{}{spaceGUID, orgDefaultIsolationSegmentGUID}) 89 fake.getEffectiveIsolationSegmentBySpaceMutex.Unlock() 90 if fake.GetEffectiveIsolationSegmentBySpaceStub != nil { 91 return fake.GetEffectiveIsolationSegmentBySpaceStub(spaceGUID, orgDefaultIsolationSegmentGUID) 92 } 93 if specificReturn { 94 return ret.result1, ret.result2, ret.result3 95 } 96 return fake.getEffectiveIsolationSegmentBySpaceReturns.result1, fake.getEffectiveIsolationSegmentBySpaceReturns.result2, fake.getEffectiveIsolationSegmentBySpaceReturns.result3 97 } 98 99 func (fake *FakeSpaceActorV3) GetEffectiveIsolationSegmentBySpaceCallCount() int { 100 fake.getEffectiveIsolationSegmentBySpaceMutex.RLock() 101 defer fake.getEffectiveIsolationSegmentBySpaceMutex.RUnlock() 102 return len(fake.getEffectiveIsolationSegmentBySpaceArgsForCall) 103 } 104 105 func (fake *FakeSpaceActorV3) GetEffectiveIsolationSegmentBySpaceArgsForCall(i int) (string, string) { 106 fake.getEffectiveIsolationSegmentBySpaceMutex.RLock() 107 defer fake.getEffectiveIsolationSegmentBySpaceMutex.RUnlock() 108 return fake.getEffectiveIsolationSegmentBySpaceArgsForCall[i].spaceGUID, fake.getEffectiveIsolationSegmentBySpaceArgsForCall[i].orgDefaultIsolationSegmentGUID 109 } 110 111 func (fake *FakeSpaceActorV3) GetEffectiveIsolationSegmentBySpaceReturns(result1 v3action.IsolationSegment, result2 v3action.Warnings, result3 error) { 112 fake.GetEffectiveIsolationSegmentBySpaceStub = nil 113 fake.getEffectiveIsolationSegmentBySpaceReturns = struct { 114 result1 v3action.IsolationSegment 115 result2 v3action.Warnings 116 result3 error 117 }{result1, result2, result3} 118 } 119 120 func (fake *FakeSpaceActorV3) GetEffectiveIsolationSegmentBySpaceReturnsOnCall(i int, result1 v3action.IsolationSegment, result2 v3action.Warnings, result3 error) { 121 fake.GetEffectiveIsolationSegmentBySpaceStub = nil 122 if fake.getEffectiveIsolationSegmentBySpaceReturnsOnCall == nil { 123 fake.getEffectiveIsolationSegmentBySpaceReturnsOnCall = make(map[int]struct { 124 result1 v3action.IsolationSegment 125 result2 v3action.Warnings 126 result3 error 127 }) 128 } 129 fake.getEffectiveIsolationSegmentBySpaceReturnsOnCall[i] = struct { 130 result1 v3action.IsolationSegment 131 result2 v3action.Warnings 132 result3 error 133 }{result1, result2, result3} 134 } 135 136 func (fake *FakeSpaceActorV3) Invocations() map[string][][]interface{} { 137 fake.invocationsMutex.RLock() 138 defer fake.invocationsMutex.RUnlock() 139 fake.cloudControllerAPIVersionMutex.RLock() 140 defer fake.cloudControllerAPIVersionMutex.RUnlock() 141 fake.getEffectiveIsolationSegmentBySpaceMutex.RLock() 142 defer fake.getEffectiveIsolationSegmentBySpaceMutex.RUnlock() 143 copiedInvocations := map[string][][]interface{}{} 144 for key, value := range fake.invocations { 145 copiedInvocations[key] = value 146 } 147 return copiedInvocations 148 } 149 150 func (fake *FakeSpaceActorV3) recordInvocation(key string, args []interface{}) { 151 fake.invocationsMutex.Lock() 152 defer fake.invocationsMutex.Unlock() 153 if fake.invocations == nil { 154 fake.invocations = map[string][][]interface{}{} 155 } 156 if fake.invocations[key] == nil { 157 fake.invocations[key] = [][]interface{}{} 158 } 159 fake.invocations[key] = append(fake.invocations[key], args) 160 } 161 162 var _ v2.SpaceActorV3 = new(FakeSpaceActorV3)