github.com/cs3org/reva/v2@v2.27.7/tests/cs3mocks/mocks/CollaborationAPIClient.go (about) 1 // Copyright 2018-2022 CERN 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 // In applying this license, CERN does not waive the privileges and immunities 16 // granted to it by virtue of its status as an Intergovernmental Organization 17 // or submit itself to any jurisdiction. 18 19 // Code generated by mockery v2.40.2. DO NOT EDIT. 20 21 package mocks 22 23 import ( 24 context "context" 25 26 collaborationv1beta1 "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1" 27 28 grpc "google.golang.org/grpc" 29 30 mock "github.com/stretchr/testify/mock" 31 ) 32 33 // CollaborationAPIClient is an autogenerated mock type for the CollaborationAPIClient type 34 type CollaborationAPIClient struct { 35 mock.Mock 36 } 37 38 type CollaborationAPIClient_Expecter struct { 39 mock *mock.Mock 40 } 41 42 func (_m *CollaborationAPIClient) EXPECT() *CollaborationAPIClient_Expecter { 43 return &CollaborationAPIClient_Expecter{mock: &_m.Mock} 44 } 45 46 // CreateShare provides a mock function with given fields: ctx, in, opts 47 func (_m *CollaborationAPIClient) CreateShare(ctx context.Context, in *collaborationv1beta1.CreateShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error) { 48 _va := make([]interface{}, len(opts)) 49 for _i := range opts { 50 _va[_i] = opts[_i] 51 } 52 var _ca []interface{} 53 _ca = append(_ca, ctx, in) 54 _ca = append(_ca, _va...) 55 ret := _m.Called(_ca...) 56 57 if len(ret) == 0 { 58 panic("no return value specified for CreateShare") 59 } 60 61 var r0 *collaborationv1beta1.CreateShareResponse 62 var r1 error 63 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.CreateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error)); ok { 64 return rf(ctx, in, opts...) 65 } 66 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.CreateShareRequest, ...grpc.CallOption) *collaborationv1beta1.CreateShareResponse); ok { 67 r0 = rf(ctx, in, opts...) 68 } else { 69 if ret.Get(0) != nil { 70 r0 = ret.Get(0).(*collaborationv1beta1.CreateShareResponse) 71 } 72 } 73 74 if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.CreateShareRequest, ...grpc.CallOption) error); ok { 75 r1 = rf(ctx, in, opts...) 76 } else { 77 r1 = ret.Error(1) 78 } 79 80 return r0, r1 81 } 82 83 // CollaborationAPIClient_CreateShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateShare' 84 type CollaborationAPIClient_CreateShare_Call struct { 85 *mock.Call 86 } 87 88 // CreateShare is a helper method to define mock.On call 89 // - ctx context.Context 90 // - in *collaborationv1beta1.CreateShareRequest 91 // - opts ...grpc.CallOption 92 func (_e *CollaborationAPIClient_Expecter) CreateShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_CreateShare_Call { 93 return &CollaborationAPIClient_CreateShare_Call{Call: _e.mock.On("CreateShare", 94 append([]interface{}{ctx, in}, opts...)...)} 95 } 96 97 func (_c *CollaborationAPIClient_CreateShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.CreateShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_CreateShare_Call { 98 _c.Call.Run(func(args mock.Arguments) { 99 variadicArgs := make([]grpc.CallOption, len(args)-2) 100 for i, a := range args[2:] { 101 if a != nil { 102 variadicArgs[i] = a.(grpc.CallOption) 103 } 104 } 105 run(args[0].(context.Context), args[1].(*collaborationv1beta1.CreateShareRequest), variadicArgs...) 106 }) 107 return _c 108 } 109 110 func (_c *CollaborationAPIClient_CreateShare_Call) Return(_a0 *collaborationv1beta1.CreateShareResponse, _a1 error) *CollaborationAPIClient_CreateShare_Call { 111 _c.Call.Return(_a0, _a1) 112 return _c 113 } 114 115 func (_c *CollaborationAPIClient_CreateShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.CreateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.CreateShareResponse, error)) *CollaborationAPIClient_CreateShare_Call { 116 _c.Call.Return(run) 117 return _c 118 } 119 120 // GetReceivedShare provides a mock function with given fields: ctx, in, opts 121 func (_m *CollaborationAPIClient) GetReceivedShare(ctx context.Context, in *collaborationv1beta1.GetReceivedShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error) { 122 _va := make([]interface{}, len(opts)) 123 for _i := range opts { 124 _va[_i] = opts[_i] 125 } 126 var _ca []interface{} 127 _ca = append(_ca, ctx, in) 128 _ca = append(_ca, _va...) 129 ret := _m.Called(_ca...) 130 131 if len(ret) == 0 { 132 panic("no return value specified for GetReceivedShare") 133 } 134 135 var r0 *collaborationv1beta1.GetReceivedShareResponse 136 var r1 error 137 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.GetReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error)); ok { 138 return rf(ctx, in, opts...) 139 } 140 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.GetReceivedShareRequest, ...grpc.CallOption) *collaborationv1beta1.GetReceivedShareResponse); ok { 141 r0 = rf(ctx, in, opts...) 142 } else { 143 if ret.Get(0) != nil { 144 r0 = ret.Get(0).(*collaborationv1beta1.GetReceivedShareResponse) 145 } 146 } 147 148 if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.GetReceivedShareRequest, ...grpc.CallOption) error); ok { 149 r1 = rf(ctx, in, opts...) 150 } else { 151 r1 = ret.Error(1) 152 } 153 154 return r0, r1 155 } 156 157 // CollaborationAPIClient_GetReceivedShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReceivedShare' 158 type CollaborationAPIClient_GetReceivedShare_Call struct { 159 *mock.Call 160 } 161 162 // GetReceivedShare is a helper method to define mock.On call 163 // - ctx context.Context 164 // - in *collaborationv1beta1.GetReceivedShareRequest 165 // - opts ...grpc.CallOption 166 func (_e *CollaborationAPIClient_Expecter) GetReceivedShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_GetReceivedShare_Call { 167 return &CollaborationAPIClient_GetReceivedShare_Call{Call: _e.mock.On("GetReceivedShare", 168 append([]interface{}{ctx, in}, opts...)...)} 169 } 170 171 func (_c *CollaborationAPIClient_GetReceivedShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.GetReceivedShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_GetReceivedShare_Call { 172 _c.Call.Run(func(args mock.Arguments) { 173 variadicArgs := make([]grpc.CallOption, len(args)-2) 174 for i, a := range args[2:] { 175 if a != nil { 176 variadicArgs[i] = a.(grpc.CallOption) 177 } 178 } 179 run(args[0].(context.Context), args[1].(*collaborationv1beta1.GetReceivedShareRequest), variadicArgs...) 180 }) 181 return _c 182 } 183 184 func (_c *CollaborationAPIClient_GetReceivedShare_Call) Return(_a0 *collaborationv1beta1.GetReceivedShareResponse, _a1 error) *CollaborationAPIClient_GetReceivedShare_Call { 185 _c.Call.Return(_a0, _a1) 186 return _c 187 } 188 189 func (_c *CollaborationAPIClient_GetReceivedShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.GetReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetReceivedShareResponse, error)) *CollaborationAPIClient_GetReceivedShare_Call { 190 _c.Call.Return(run) 191 return _c 192 } 193 194 // GetShare provides a mock function with given fields: ctx, in, opts 195 func (_m *CollaborationAPIClient) GetShare(ctx context.Context, in *collaborationv1beta1.GetShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error) { 196 _va := make([]interface{}, len(opts)) 197 for _i := range opts { 198 _va[_i] = opts[_i] 199 } 200 var _ca []interface{} 201 _ca = append(_ca, ctx, in) 202 _ca = append(_ca, _va...) 203 ret := _m.Called(_ca...) 204 205 if len(ret) == 0 { 206 panic("no return value specified for GetShare") 207 } 208 209 var r0 *collaborationv1beta1.GetShareResponse 210 var r1 error 211 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.GetShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error)); ok { 212 return rf(ctx, in, opts...) 213 } 214 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.GetShareRequest, ...grpc.CallOption) *collaborationv1beta1.GetShareResponse); ok { 215 r0 = rf(ctx, in, opts...) 216 } else { 217 if ret.Get(0) != nil { 218 r0 = ret.Get(0).(*collaborationv1beta1.GetShareResponse) 219 } 220 } 221 222 if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.GetShareRequest, ...grpc.CallOption) error); ok { 223 r1 = rf(ctx, in, opts...) 224 } else { 225 r1 = ret.Error(1) 226 } 227 228 return r0, r1 229 } 230 231 // CollaborationAPIClient_GetShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetShare' 232 type CollaborationAPIClient_GetShare_Call struct { 233 *mock.Call 234 } 235 236 // GetShare is a helper method to define mock.On call 237 // - ctx context.Context 238 // - in *collaborationv1beta1.GetShareRequest 239 // - opts ...grpc.CallOption 240 func (_e *CollaborationAPIClient_Expecter) GetShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_GetShare_Call { 241 return &CollaborationAPIClient_GetShare_Call{Call: _e.mock.On("GetShare", 242 append([]interface{}{ctx, in}, opts...)...)} 243 } 244 245 func (_c *CollaborationAPIClient_GetShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.GetShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_GetShare_Call { 246 _c.Call.Run(func(args mock.Arguments) { 247 variadicArgs := make([]grpc.CallOption, len(args)-2) 248 for i, a := range args[2:] { 249 if a != nil { 250 variadicArgs[i] = a.(grpc.CallOption) 251 } 252 } 253 run(args[0].(context.Context), args[1].(*collaborationv1beta1.GetShareRequest), variadicArgs...) 254 }) 255 return _c 256 } 257 258 func (_c *CollaborationAPIClient_GetShare_Call) Return(_a0 *collaborationv1beta1.GetShareResponse, _a1 error) *CollaborationAPIClient_GetShare_Call { 259 _c.Call.Return(_a0, _a1) 260 return _c 261 } 262 263 func (_c *CollaborationAPIClient_GetShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.GetShareRequest, ...grpc.CallOption) (*collaborationv1beta1.GetShareResponse, error)) *CollaborationAPIClient_GetShare_Call { 264 _c.Call.Return(run) 265 return _c 266 } 267 268 // ListReceivedShares provides a mock function with given fields: ctx, in, opts 269 func (_m *CollaborationAPIClient) ListReceivedShares(ctx context.Context, in *collaborationv1beta1.ListReceivedSharesRequest, opts ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error) { 270 _va := make([]interface{}, len(opts)) 271 for _i := range opts { 272 _va[_i] = opts[_i] 273 } 274 var _ca []interface{} 275 _ca = append(_ca, ctx, in) 276 _ca = append(_ca, _va...) 277 ret := _m.Called(_ca...) 278 279 if len(ret) == 0 { 280 panic("no return value specified for ListReceivedShares") 281 } 282 283 var r0 *collaborationv1beta1.ListReceivedSharesResponse 284 var r1 error 285 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ListReceivedSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error)); ok { 286 return rf(ctx, in, opts...) 287 } 288 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ListReceivedSharesRequest, ...grpc.CallOption) *collaborationv1beta1.ListReceivedSharesResponse); ok { 289 r0 = rf(ctx, in, opts...) 290 } else { 291 if ret.Get(0) != nil { 292 r0 = ret.Get(0).(*collaborationv1beta1.ListReceivedSharesResponse) 293 } 294 } 295 296 if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.ListReceivedSharesRequest, ...grpc.CallOption) error); ok { 297 r1 = rf(ctx, in, opts...) 298 } else { 299 r1 = ret.Error(1) 300 } 301 302 return r0, r1 303 } 304 305 // CollaborationAPIClient_ListReceivedShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListReceivedShares' 306 type CollaborationAPIClient_ListReceivedShares_Call struct { 307 *mock.Call 308 } 309 310 // ListReceivedShares is a helper method to define mock.On call 311 // - ctx context.Context 312 // - in *collaborationv1beta1.ListReceivedSharesRequest 313 // - opts ...grpc.CallOption 314 func (_e *CollaborationAPIClient_Expecter) ListReceivedShares(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_ListReceivedShares_Call { 315 return &CollaborationAPIClient_ListReceivedShares_Call{Call: _e.mock.On("ListReceivedShares", 316 append([]interface{}{ctx, in}, opts...)...)} 317 } 318 319 func (_c *CollaborationAPIClient_ListReceivedShares_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.ListReceivedSharesRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_ListReceivedShares_Call { 320 _c.Call.Run(func(args mock.Arguments) { 321 variadicArgs := make([]grpc.CallOption, len(args)-2) 322 for i, a := range args[2:] { 323 if a != nil { 324 variadicArgs[i] = a.(grpc.CallOption) 325 } 326 } 327 run(args[0].(context.Context), args[1].(*collaborationv1beta1.ListReceivedSharesRequest), variadicArgs...) 328 }) 329 return _c 330 } 331 332 func (_c *CollaborationAPIClient_ListReceivedShares_Call) Return(_a0 *collaborationv1beta1.ListReceivedSharesResponse, _a1 error) *CollaborationAPIClient_ListReceivedShares_Call { 333 _c.Call.Return(_a0, _a1) 334 return _c 335 } 336 337 func (_c *CollaborationAPIClient_ListReceivedShares_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ListReceivedSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListReceivedSharesResponse, error)) *CollaborationAPIClient_ListReceivedShares_Call { 338 _c.Call.Return(run) 339 return _c 340 } 341 342 // ListShares provides a mock function with given fields: ctx, in, opts 343 func (_m *CollaborationAPIClient) ListShares(ctx context.Context, in *collaborationv1beta1.ListSharesRequest, opts ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error) { 344 _va := make([]interface{}, len(opts)) 345 for _i := range opts { 346 _va[_i] = opts[_i] 347 } 348 var _ca []interface{} 349 _ca = append(_ca, ctx, in) 350 _ca = append(_ca, _va...) 351 ret := _m.Called(_ca...) 352 353 if len(ret) == 0 { 354 panic("no return value specified for ListShares") 355 } 356 357 var r0 *collaborationv1beta1.ListSharesResponse 358 var r1 error 359 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ListSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error)); ok { 360 return rf(ctx, in, opts...) 361 } 362 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.ListSharesRequest, ...grpc.CallOption) *collaborationv1beta1.ListSharesResponse); ok { 363 r0 = rf(ctx, in, opts...) 364 } else { 365 if ret.Get(0) != nil { 366 r0 = ret.Get(0).(*collaborationv1beta1.ListSharesResponse) 367 } 368 } 369 370 if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.ListSharesRequest, ...grpc.CallOption) error); ok { 371 r1 = rf(ctx, in, opts...) 372 } else { 373 r1 = ret.Error(1) 374 } 375 376 return r0, r1 377 } 378 379 // CollaborationAPIClient_ListShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListShares' 380 type CollaborationAPIClient_ListShares_Call struct { 381 *mock.Call 382 } 383 384 // ListShares is a helper method to define mock.On call 385 // - ctx context.Context 386 // - in *collaborationv1beta1.ListSharesRequest 387 // - opts ...grpc.CallOption 388 func (_e *CollaborationAPIClient_Expecter) ListShares(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_ListShares_Call { 389 return &CollaborationAPIClient_ListShares_Call{Call: _e.mock.On("ListShares", 390 append([]interface{}{ctx, in}, opts...)...)} 391 } 392 393 func (_c *CollaborationAPIClient_ListShares_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.ListSharesRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_ListShares_Call { 394 _c.Call.Run(func(args mock.Arguments) { 395 variadicArgs := make([]grpc.CallOption, len(args)-2) 396 for i, a := range args[2:] { 397 if a != nil { 398 variadicArgs[i] = a.(grpc.CallOption) 399 } 400 } 401 run(args[0].(context.Context), args[1].(*collaborationv1beta1.ListSharesRequest), variadicArgs...) 402 }) 403 return _c 404 } 405 406 func (_c *CollaborationAPIClient_ListShares_Call) Return(_a0 *collaborationv1beta1.ListSharesResponse, _a1 error) *CollaborationAPIClient_ListShares_Call { 407 _c.Call.Return(_a0, _a1) 408 return _c 409 } 410 411 func (_c *CollaborationAPIClient_ListShares_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.ListSharesRequest, ...grpc.CallOption) (*collaborationv1beta1.ListSharesResponse, error)) *CollaborationAPIClient_ListShares_Call { 412 _c.Call.Return(run) 413 return _c 414 } 415 416 // RemoveShare provides a mock function with given fields: ctx, in, opts 417 func (_m *CollaborationAPIClient) RemoveShare(ctx context.Context, in *collaborationv1beta1.RemoveShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error) { 418 _va := make([]interface{}, len(opts)) 419 for _i := range opts { 420 _va[_i] = opts[_i] 421 } 422 var _ca []interface{} 423 _ca = append(_ca, ctx, in) 424 _ca = append(_ca, _va...) 425 ret := _m.Called(_ca...) 426 427 if len(ret) == 0 { 428 panic("no return value specified for RemoveShare") 429 } 430 431 var r0 *collaborationv1beta1.RemoveShareResponse 432 var r1 error 433 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error)); ok { 434 return rf(ctx, in, opts...) 435 } 436 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) *collaborationv1beta1.RemoveShareResponse); ok { 437 r0 = rf(ctx, in, opts...) 438 } else { 439 if ret.Get(0) != nil { 440 r0 = ret.Get(0).(*collaborationv1beta1.RemoveShareResponse) 441 } 442 } 443 444 if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) error); ok { 445 r1 = rf(ctx, in, opts...) 446 } else { 447 r1 = ret.Error(1) 448 } 449 450 return r0, r1 451 } 452 453 // CollaborationAPIClient_RemoveShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveShare' 454 type CollaborationAPIClient_RemoveShare_Call struct { 455 *mock.Call 456 } 457 458 // RemoveShare is a helper method to define mock.On call 459 // - ctx context.Context 460 // - in *collaborationv1beta1.RemoveShareRequest 461 // - opts ...grpc.CallOption 462 func (_e *CollaborationAPIClient_Expecter) RemoveShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_RemoveShare_Call { 463 return &CollaborationAPIClient_RemoveShare_Call{Call: _e.mock.On("RemoveShare", 464 append([]interface{}{ctx, in}, opts...)...)} 465 } 466 467 func (_c *CollaborationAPIClient_RemoveShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.RemoveShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_RemoveShare_Call { 468 _c.Call.Run(func(args mock.Arguments) { 469 variadicArgs := make([]grpc.CallOption, len(args)-2) 470 for i, a := range args[2:] { 471 if a != nil { 472 variadicArgs[i] = a.(grpc.CallOption) 473 } 474 } 475 run(args[0].(context.Context), args[1].(*collaborationv1beta1.RemoveShareRequest), variadicArgs...) 476 }) 477 return _c 478 } 479 480 func (_c *CollaborationAPIClient_RemoveShare_Call) Return(_a0 *collaborationv1beta1.RemoveShareResponse, _a1 error) *CollaborationAPIClient_RemoveShare_Call { 481 _c.Call.Return(_a0, _a1) 482 return _c 483 } 484 485 func (_c *CollaborationAPIClient_RemoveShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.RemoveShareRequest, ...grpc.CallOption) (*collaborationv1beta1.RemoveShareResponse, error)) *CollaborationAPIClient_RemoveShare_Call { 486 _c.Call.Return(run) 487 return _c 488 } 489 490 // UpdateReceivedShare provides a mock function with given fields: ctx, in, opts 491 func (_m *CollaborationAPIClient) UpdateReceivedShare(ctx context.Context, in *collaborationv1beta1.UpdateReceivedShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error) { 492 _va := make([]interface{}, len(opts)) 493 for _i := range opts { 494 _va[_i] = opts[_i] 495 } 496 var _ca []interface{} 497 _ca = append(_ca, ctx, in) 498 _ca = append(_ca, _va...) 499 ret := _m.Called(_ca...) 500 501 if len(ret) == 0 { 502 panic("no return value specified for UpdateReceivedShare") 503 } 504 505 var r0 *collaborationv1beta1.UpdateReceivedShareResponse 506 var r1 error 507 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.UpdateReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error)); ok { 508 return rf(ctx, in, opts...) 509 } 510 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.UpdateReceivedShareRequest, ...grpc.CallOption) *collaborationv1beta1.UpdateReceivedShareResponse); ok { 511 r0 = rf(ctx, in, opts...) 512 } else { 513 if ret.Get(0) != nil { 514 r0 = ret.Get(0).(*collaborationv1beta1.UpdateReceivedShareResponse) 515 } 516 } 517 518 if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.UpdateReceivedShareRequest, ...grpc.CallOption) error); ok { 519 r1 = rf(ctx, in, opts...) 520 } else { 521 r1 = ret.Error(1) 522 } 523 524 return r0, r1 525 } 526 527 // CollaborationAPIClient_UpdateReceivedShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateReceivedShare' 528 type CollaborationAPIClient_UpdateReceivedShare_Call struct { 529 *mock.Call 530 } 531 532 // UpdateReceivedShare is a helper method to define mock.On call 533 // - ctx context.Context 534 // - in *collaborationv1beta1.UpdateReceivedShareRequest 535 // - opts ...grpc.CallOption 536 func (_e *CollaborationAPIClient_Expecter) UpdateReceivedShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_UpdateReceivedShare_Call { 537 return &CollaborationAPIClient_UpdateReceivedShare_Call{Call: _e.mock.On("UpdateReceivedShare", 538 append([]interface{}{ctx, in}, opts...)...)} 539 } 540 541 func (_c *CollaborationAPIClient_UpdateReceivedShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.UpdateReceivedShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_UpdateReceivedShare_Call { 542 _c.Call.Run(func(args mock.Arguments) { 543 variadicArgs := make([]grpc.CallOption, len(args)-2) 544 for i, a := range args[2:] { 545 if a != nil { 546 variadicArgs[i] = a.(grpc.CallOption) 547 } 548 } 549 run(args[0].(context.Context), args[1].(*collaborationv1beta1.UpdateReceivedShareRequest), variadicArgs...) 550 }) 551 return _c 552 } 553 554 func (_c *CollaborationAPIClient_UpdateReceivedShare_Call) Return(_a0 *collaborationv1beta1.UpdateReceivedShareResponse, _a1 error) *CollaborationAPIClient_UpdateReceivedShare_Call { 555 _c.Call.Return(_a0, _a1) 556 return _c 557 } 558 559 func (_c *CollaborationAPIClient_UpdateReceivedShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.UpdateReceivedShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateReceivedShareResponse, error)) *CollaborationAPIClient_UpdateReceivedShare_Call { 560 _c.Call.Return(run) 561 return _c 562 } 563 564 // UpdateShare provides a mock function with given fields: ctx, in, opts 565 func (_m *CollaborationAPIClient) UpdateShare(ctx context.Context, in *collaborationv1beta1.UpdateShareRequest, opts ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error) { 566 _va := make([]interface{}, len(opts)) 567 for _i := range opts { 568 _va[_i] = opts[_i] 569 } 570 var _ca []interface{} 571 _ca = append(_ca, ctx, in) 572 _ca = append(_ca, _va...) 573 ret := _m.Called(_ca...) 574 575 if len(ret) == 0 { 576 panic("no return value specified for UpdateShare") 577 } 578 579 var r0 *collaborationv1beta1.UpdateShareResponse 580 var r1 error 581 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.UpdateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error)); ok { 582 return rf(ctx, in, opts...) 583 } 584 if rf, ok := ret.Get(0).(func(context.Context, *collaborationv1beta1.UpdateShareRequest, ...grpc.CallOption) *collaborationv1beta1.UpdateShareResponse); ok { 585 r0 = rf(ctx, in, opts...) 586 } else { 587 if ret.Get(0) != nil { 588 r0 = ret.Get(0).(*collaborationv1beta1.UpdateShareResponse) 589 } 590 } 591 592 if rf, ok := ret.Get(1).(func(context.Context, *collaborationv1beta1.UpdateShareRequest, ...grpc.CallOption) error); ok { 593 r1 = rf(ctx, in, opts...) 594 } else { 595 r1 = ret.Error(1) 596 } 597 598 return r0, r1 599 } 600 601 // CollaborationAPIClient_UpdateShare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateShare' 602 type CollaborationAPIClient_UpdateShare_Call struct { 603 *mock.Call 604 } 605 606 // UpdateShare is a helper method to define mock.On call 607 // - ctx context.Context 608 // - in *collaborationv1beta1.UpdateShareRequest 609 // - opts ...grpc.CallOption 610 func (_e *CollaborationAPIClient_Expecter) UpdateShare(ctx interface{}, in interface{}, opts ...interface{}) *CollaborationAPIClient_UpdateShare_Call { 611 return &CollaborationAPIClient_UpdateShare_Call{Call: _e.mock.On("UpdateShare", 612 append([]interface{}{ctx, in}, opts...)...)} 613 } 614 615 func (_c *CollaborationAPIClient_UpdateShare_Call) Run(run func(ctx context.Context, in *collaborationv1beta1.UpdateShareRequest, opts ...grpc.CallOption)) *CollaborationAPIClient_UpdateShare_Call { 616 _c.Call.Run(func(args mock.Arguments) { 617 variadicArgs := make([]grpc.CallOption, len(args)-2) 618 for i, a := range args[2:] { 619 if a != nil { 620 variadicArgs[i] = a.(grpc.CallOption) 621 } 622 } 623 run(args[0].(context.Context), args[1].(*collaborationv1beta1.UpdateShareRequest), variadicArgs...) 624 }) 625 return _c 626 } 627 628 func (_c *CollaborationAPIClient_UpdateShare_Call) Return(_a0 *collaborationv1beta1.UpdateShareResponse, _a1 error) *CollaborationAPIClient_UpdateShare_Call { 629 _c.Call.Return(_a0, _a1) 630 return _c 631 } 632 633 func (_c *CollaborationAPIClient_UpdateShare_Call) RunAndReturn(run func(context.Context, *collaborationv1beta1.UpdateShareRequest, ...grpc.CallOption) (*collaborationv1beta1.UpdateShareResponse, error)) *CollaborationAPIClient_UpdateShare_Call { 634 _c.Call.Return(run) 635 return _c 636 } 637 638 // NewCollaborationAPIClient creates a new instance of CollaborationAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 639 // The first argument is typically a *testing.T value. 640 func NewCollaborationAPIClient(t interface { 641 mock.TestingT 642 Cleanup(func()) 643 }) *CollaborationAPIClient { 644 mock := &CollaborationAPIClient{} 645 mock.Mock.Test(t) 646 647 t.Cleanup(func() { mock.AssertExpectations(t) }) 648 649 return mock 650 }