github.com/arunkumar7540/cli@v6.45.0+incompatible/command/v7/v7fakes/fake_delete_label_actor.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package v7fakes 3 4 import ( 5 "sync" 6 7 "code.cloudfoundry.org/cli/actor/v7action" 8 v7 "code.cloudfoundry.org/cli/command/v7" 9 "code.cloudfoundry.org/cli/types" 10 ) 11 12 type FakeDeleteLabelActor struct { 13 UpdateApplicationLabelsByApplicationNameStub func(string, string, map[string]types.NullString) (v7action.Warnings, error) 14 updateApplicationLabelsByApplicationNameMutex sync.RWMutex 15 updateApplicationLabelsByApplicationNameArgsForCall []struct { 16 arg1 string 17 arg2 string 18 arg3 map[string]types.NullString 19 } 20 updateApplicationLabelsByApplicationNameReturns struct { 21 result1 v7action.Warnings 22 result2 error 23 } 24 updateApplicationLabelsByApplicationNameReturnsOnCall map[int]struct { 25 result1 v7action.Warnings 26 result2 error 27 } 28 UpdateOrganizationLabelsByOrganizationNameStub func(string, map[string]types.NullString) (v7action.Warnings, error) 29 updateOrganizationLabelsByOrganizationNameMutex sync.RWMutex 30 updateOrganizationLabelsByOrganizationNameArgsForCall []struct { 31 arg1 string 32 arg2 map[string]types.NullString 33 } 34 updateOrganizationLabelsByOrganizationNameReturns struct { 35 result1 v7action.Warnings 36 result2 error 37 } 38 updateOrganizationLabelsByOrganizationNameReturnsOnCall map[int]struct { 39 result1 v7action.Warnings 40 result2 error 41 } 42 invocations map[string][][]interface{} 43 invocationsMutex sync.RWMutex 44 } 45 46 func (fake *FakeDeleteLabelActor) UpdateApplicationLabelsByApplicationName(arg1 string, arg2 string, arg3 map[string]types.NullString) (v7action.Warnings, error) { 47 fake.updateApplicationLabelsByApplicationNameMutex.Lock() 48 ret, specificReturn := fake.updateApplicationLabelsByApplicationNameReturnsOnCall[len(fake.updateApplicationLabelsByApplicationNameArgsForCall)] 49 fake.updateApplicationLabelsByApplicationNameArgsForCall = append(fake.updateApplicationLabelsByApplicationNameArgsForCall, struct { 50 arg1 string 51 arg2 string 52 arg3 map[string]types.NullString 53 }{arg1, arg2, arg3}) 54 fake.recordInvocation("UpdateApplicationLabelsByApplicationName", []interface{}{arg1, arg2, arg3}) 55 fake.updateApplicationLabelsByApplicationNameMutex.Unlock() 56 if fake.UpdateApplicationLabelsByApplicationNameStub != nil { 57 return fake.UpdateApplicationLabelsByApplicationNameStub(arg1, arg2, arg3) 58 } 59 if specificReturn { 60 return ret.result1, ret.result2 61 } 62 fakeReturns := fake.updateApplicationLabelsByApplicationNameReturns 63 return fakeReturns.result1, fakeReturns.result2 64 } 65 66 func (fake *FakeDeleteLabelActor) UpdateApplicationLabelsByApplicationNameCallCount() int { 67 fake.updateApplicationLabelsByApplicationNameMutex.RLock() 68 defer fake.updateApplicationLabelsByApplicationNameMutex.RUnlock() 69 return len(fake.updateApplicationLabelsByApplicationNameArgsForCall) 70 } 71 72 func (fake *FakeDeleteLabelActor) UpdateApplicationLabelsByApplicationNameCalls(stub func(string, string, map[string]types.NullString) (v7action.Warnings, error)) { 73 fake.updateApplicationLabelsByApplicationNameMutex.Lock() 74 defer fake.updateApplicationLabelsByApplicationNameMutex.Unlock() 75 fake.UpdateApplicationLabelsByApplicationNameStub = stub 76 } 77 78 func (fake *FakeDeleteLabelActor) UpdateApplicationLabelsByApplicationNameArgsForCall(i int) (string, string, map[string]types.NullString) { 79 fake.updateApplicationLabelsByApplicationNameMutex.RLock() 80 defer fake.updateApplicationLabelsByApplicationNameMutex.RUnlock() 81 argsForCall := fake.updateApplicationLabelsByApplicationNameArgsForCall[i] 82 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 83 } 84 85 func (fake *FakeDeleteLabelActor) UpdateApplicationLabelsByApplicationNameReturns(result1 v7action.Warnings, result2 error) { 86 fake.updateApplicationLabelsByApplicationNameMutex.Lock() 87 defer fake.updateApplicationLabelsByApplicationNameMutex.Unlock() 88 fake.UpdateApplicationLabelsByApplicationNameStub = nil 89 fake.updateApplicationLabelsByApplicationNameReturns = struct { 90 result1 v7action.Warnings 91 result2 error 92 }{result1, result2} 93 } 94 95 func (fake *FakeDeleteLabelActor) UpdateApplicationLabelsByApplicationNameReturnsOnCall(i int, result1 v7action.Warnings, result2 error) { 96 fake.updateApplicationLabelsByApplicationNameMutex.Lock() 97 defer fake.updateApplicationLabelsByApplicationNameMutex.Unlock() 98 fake.UpdateApplicationLabelsByApplicationNameStub = nil 99 if fake.updateApplicationLabelsByApplicationNameReturnsOnCall == nil { 100 fake.updateApplicationLabelsByApplicationNameReturnsOnCall = make(map[int]struct { 101 result1 v7action.Warnings 102 result2 error 103 }) 104 } 105 fake.updateApplicationLabelsByApplicationNameReturnsOnCall[i] = struct { 106 result1 v7action.Warnings 107 result2 error 108 }{result1, result2} 109 } 110 111 func (fake *FakeDeleteLabelActor) UpdateOrganizationLabelsByOrganizationName(arg1 string, arg2 map[string]types.NullString) (v7action.Warnings, error) { 112 fake.updateOrganizationLabelsByOrganizationNameMutex.Lock() 113 ret, specificReturn := fake.updateOrganizationLabelsByOrganizationNameReturnsOnCall[len(fake.updateOrganizationLabelsByOrganizationNameArgsForCall)] 114 fake.updateOrganizationLabelsByOrganizationNameArgsForCall = append(fake.updateOrganizationLabelsByOrganizationNameArgsForCall, struct { 115 arg1 string 116 arg2 map[string]types.NullString 117 }{arg1, arg2}) 118 fake.recordInvocation("UpdateOrganizationLabelsByOrganizationName", []interface{}{arg1, arg2}) 119 fake.updateOrganizationLabelsByOrganizationNameMutex.Unlock() 120 if fake.UpdateOrganizationLabelsByOrganizationNameStub != nil { 121 return fake.UpdateOrganizationLabelsByOrganizationNameStub(arg1, arg2) 122 } 123 if specificReturn { 124 return ret.result1, ret.result2 125 } 126 fakeReturns := fake.updateOrganizationLabelsByOrganizationNameReturns 127 return fakeReturns.result1, fakeReturns.result2 128 } 129 130 func (fake *FakeDeleteLabelActor) UpdateOrganizationLabelsByOrganizationNameCallCount() int { 131 fake.updateOrganizationLabelsByOrganizationNameMutex.RLock() 132 defer fake.updateOrganizationLabelsByOrganizationNameMutex.RUnlock() 133 return len(fake.updateOrganizationLabelsByOrganizationNameArgsForCall) 134 } 135 136 func (fake *FakeDeleteLabelActor) UpdateOrganizationLabelsByOrganizationNameCalls(stub func(string, map[string]types.NullString) (v7action.Warnings, error)) { 137 fake.updateOrganizationLabelsByOrganizationNameMutex.Lock() 138 defer fake.updateOrganizationLabelsByOrganizationNameMutex.Unlock() 139 fake.UpdateOrganizationLabelsByOrganizationNameStub = stub 140 } 141 142 func (fake *FakeDeleteLabelActor) UpdateOrganizationLabelsByOrganizationNameArgsForCall(i int) (string, map[string]types.NullString) { 143 fake.updateOrganizationLabelsByOrganizationNameMutex.RLock() 144 defer fake.updateOrganizationLabelsByOrganizationNameMutex.RUnlock() 145 argsForCall := fake.updateOrganizationLabelsByOrganizationNameArgsForCall[i] 146 return argsForCall.arg1, argsForCall.arg2 147 } 148 149 func (fake *FakeDeleteLabelActor) UpdateOrganizationLabelsByOrganizationNameReturns(result1 v7action.Warnings, result2 error) { 150 fake.updateOrganizationLabelsByOrganizationNameMutex.Lock() 151 defer fake.updateOrganizationLabelsByOrganizationNameMutex.Unlock() 152 fake.UpdateOrganizationLabelsByOrganizationNameStub = nil 153 fake.updateOrganizationLabelsByOrganizationNameReturns = struct { 154 result1 v7action.Warnings 155 result2 error 156 }{result1, result2} 157 } 158 159 func (fake *FakeDeleteLabelActor) UpdateOrganizationLabelsByOrganizationNameReturnsOnCall(i int, result1 v7action.Warnings, result2 error) { 160 fake.updateOrganizationLabelsByOrganizationNameMutex.Lock() 161 defer fake.updateOrganizationLabelsByOrganizationNameMutex.Unlock() 162 fake.UpdateOrganizationLabelsByOrganizationNameStub = nil 163 if fake.updateOrganizationLabelsByOrganizationNameReturnsOnCall == nil { 164 fake.updateOrganizationLabelsByOrganizationNameReturnsOnCall = make(map[int]struct { 165 result1 v7action.Warnings 166 result2 error 167 }) 168 } 169 fake.updateOrganizationLabelsByOrganizationNameReturnsOnCall[i] = struct { 170 result1 v7action.Warnings 171 result2 error 172 }{result1, result2} 173 } 174 175 func (fake *FakeDeleteLabelActor) Invocations() map[string][][]interface{} { 176 fake.invocationsMutex.RLock() 177 defer fake.invocationsMutex.RUnlock() 178 fake.updateApplicationLabelsByApplicationNameMutex.RLock() 179 defer fake.updateApplicationLabelsByApplicationNameMutex.RUnlock() 180 fake.updateOrganizationLabelsByOrganizationNameMutex.RLock() 181 defer fake.updateOrganizationLabelsByOrganizationNameMutex.RUnlock() 182 copiedInvocations := map[string][][]interface{}{} 183 for key, value := range fake.invocations { 184 copiedInvocations[key] = value 185 } 186 return copiedInvocations 187 } 188 189 func (fake *FakeDeleteLabelActor) recordInvocation(key string, args []interface{}) { 190 fake.invocationsMutex.Lock() 191 defer fake.invocationsMutex.Unlock() 192 if fake.invocations == nil { 193 fake.invocations = map[string][][]interface{}{} 194 } 195 if fake.invocations[key] == nil { 196 fake.invocations[key] = [][]interface{}{} 197 } 198 fake.invocations[key] = append(fake.invocations[key], args) 199 } 200 201 var _ v7.DeleteLabelActor = new(FakeDeleteLabelActor)