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