/
mock_warehouses_interface.go
1689 lines (1403 loc) · 63.5 KB
/
mock_warehouses_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by mockery v2.39.1. DO NOT EDIT.
package sql
import (
context "context"
listing "github.com/databricks/databricks-sdk-go/listing"
mock "github.com/stretchr/testify/mock"
retries "github.com/databricks/databricks-sdk-go/retries"
sql "github.com/databricks/databricks-sdk-go/service/sql"
time "time"
)
// MockWarehousesInterface is an autogenerated mock type for the WarehousesInterface type
type MockWarehousesInterface struct {
mock.Mock
}
type MockWarehousesInterface_Expecter struct {
mock *mock.Mock
}
func (_m *MockWarehousesInterface) EXPECT() *MockWarehousesInterface_Expecter {
return &MockWarehousesInterface_Expecter{mock: &_m.Mock}
}
// Create provides a mock function with given fields: ctx, createWarehouseRequest
func (_m *MockWarehousesInterface) Create(ctx context.Context, createWarehouseRequest sql.CreateWarehouseRequest) (*sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse], error) {
ret := _m.Called(ctx, createWarehouseRequest)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 *sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse]
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWarehouseRequest) (*sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse], error)); ok {
return rf(ctx, createWarehouseRequest)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWarehouseRequest) *sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse]); ok {
r0 = rf(ctx, createWarehouseRequest)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse])
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.CreateWarehouseRequest) error); ok {
r1 = rf(ctx, createWarehouseRequest)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
type MockWarehousesInterface_Create_Call struct {
*mock.Call
}
// Create is a helper method to define mock.On call
// - ctx context.Context
// - createWarehouseRequest sql.CreateWarehouseRequest
func (_e *MockWarehousesInterface_Expecter) Create(ctx interface{}, createWarehouseRequest interface{}) *MockWarehousesInterface_Create_Call {
return &MockWarehousesInterface_Create_Call{Call: _e.mock.On("Create", ctx, createWarehouseRequest)}
}
func (_c *MockWarehousesInterface_Create_Call) Run(run func(ctx context.Context, createWarehouseRequest sql.CreateWarehouseRequest)) *MockWarehousesInterface_Create_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.CreateWarehouseRequest))
})
return _c
}
func (_c *MockWarehousesInterface_Create_Call) Return(_a0 *sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse], _a1 error) *MockWarehousesInterface_Create_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_Create_Call) RunAndReturn(run func(context.Context, sql.CreateWarehouseRequest) (*sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse], error)) *MockWarehousesInterface_Create_Call {
_c.Call.Return(run)
return _c
}
// CreateAndWait provides a mock function with given fields: ctx, createWarehouseRequest, options
func (_m *MockWarehousesInterface) CreateAndWait(ctx context.Context, createWarehouseRequest sql.CreateWarehouseRequest, options ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error) {
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, createWarehouseRequest)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for CreateAndWait")
}
var r0 *sql.GetWarehouseResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)); ok {
return rf(ctx, createWarehouseRequest, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) *sql.GetWarehouseResponse); ok {
r0 = rf(ctx, createWarehouseRequest, options...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.GetWarehouseResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.CreateWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) error); ok {
r1 = rf(ctx, createWarehouseRequest, options...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_CreateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWait'
type MockWarehousesInterface_CreateAndWait_Call struct {
*mock.Call
}
// CreateAndWait is a helper method to define mock.On call
// - ctx context.Context
// - createWarehouseRequest sql.CreateWarehouseRequest
// - options ...retries.Option[sql.GetWarehouseResponse]
func (_e *MockWarehousesInterface_Expecter) CreateAndWait(ctx interface{}, createWarehouseRequest interface{}, options ...interface{}) *MockWarehousesInterface_CreateAndWait_Call {
return &MockWarehousesInterface_CreateAndWait_Call{Call: _e.mock.On("CreateAndWait",
append([]interface{}{ctx, createWarehouseRequest}, options...)...)}
}
func (_c *MockWarehousesInterface_CreateAndWait_Call) Run(run func(ctx context.Context, createWarehouseRequest sql.CreateWarehouseRequest, options ...retries.Option[sql.GetWarehouseResponse])) *MockWarehousesInterface_CreateAndWait_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]retries.Option[sql.GetWarehouseResponse], len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(retries.Option[sql.GetWarehouseResponse])
}
}
run(args[0].(context.Context), args[1].(sql.CreateWarehouseRequest), variadicArgs...)
})
return _c
}
func (_c *MockWarehousesInterface_CreateAndWait_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_CreateAndWait_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_CreateAndWait_Call) RunAndReturn(run func(context.Context, sql.CreateWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_CreateAndWait_Call {
_c.Call.Return(run)
return _c
}
// Delete provides a mock function with given fields: ctx, request
func (_m *MockWarehousesInterface) Delete(ctx context.Context, request sql.DeleteWarehouseRequest) error {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for Delete")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteWarehouseRequest) error); ok {
r0 = rf(ctx, request)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockWarehousesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type MockWarehousesInterface_Delete_Call struct {
*mock.Call
}
// Delete is a helper method to define mock.On call
// - ctx context.Context
// - request sql.DeleteWarehouseRequest
func (_e *MockWarehousesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockWarehousesInterface_Delete_Call {
return &MockWarehousesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)}
}
func (_c *MockWarehousesInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteWarehouseRequest)) *MockWarehousesInterface_Delete_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.DeleteWarehouseRequest))
})
return _c
}
func (_c *MockWarehousesInterface_Delete_Call) Return(_a0 error) *MockWarehousesInterface_Delete_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockWarehousesInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteWarehouseRequest) error) *MockWarehousesInterface_Delete_Call {
_c.Call.Return(run)
return _c
}
// DeleteById provides a mock function with given fields: ctx, id
func (_m *MockWarehousesInterface) DeleteById(ctx context.Context, id string) error {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for DeleteById")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockWarehousesInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById'
type MockWarehousesInterface_DeleteById_Call struct {
*mock.Call
}
// DeleteById is a helper method to define mock.On call
// - ctx context.Context
// - id string
func (_e *MockWarehousesInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockWarehousesInterface_DeleteById_Call {
return &MockWarehousesInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)}
}
func (_c *MockWarehousesInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockWarehousesInterface_DeleteById_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockWarehousesInterface_DeleteById_Call) Return(_a0 error) *MockWarehousesInterface_DeleteById_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockWarehousesInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockWarehousesInterface_DeleteById_Call {
_c.Call.Return(run)
return _c
}
// Edit provides a mock function with given fields: ctx, editWarehouseRequest
func (_m *MockWarehousesInterface) Edit(ctx context.Context, editWarehouseRequest sql.EditWarehouseRequest) (*sql.WaitGetWarehouseRunning[struct{}], error) {
ret := _m.Called(ctx, editWarehouseRequest)
if len(ret) == 0 {
panic("no return value specified for Edit")
}
var r0 *sql.WaitGetWarehouseRunning[struct{}]
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.EditWarehouseRequest) (*sql.WaitGetWarehouseRunning[struct{}], error)); ok {
return rf(ctx, editWarehouseRequest)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.EditWarehouseRequest) *sql.WaitGetWarehouseRunning[struct{}]); ok {
r0 = rf(ctx, editWarehouseRequest)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.WaitGetWarehouseRunning[struct{}])
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.EditWarehouseRequest) error); ok {
r1 = rf(ctx, editWarehouseRequest)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_Edit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Edit'
type MockWarehousesInterface_Edit_Call struct {
*mock.Call
}
// Edit is a helper method to define mock.On call
// - ctx context.Context
// - editWarehouseRequest sql.EditWarehouseRequest
func (_e *MockWarehousesInterface_Expecter) Edit(ctx interface{}, editWarehouseRequest interface{}) *MockWarehousesInterface_Edit_Call {
return &MockWarehousesInterface_Edit_Call{Call: _e.mock.On("Edit", ctx, editWarehouseRequest)}
}
func (_c *MockWarehousesInterface_Edit_Call) Run(run func(ctx context.Context, editWarehouseRequest sql.EditWarehouseRequest)) *MockWarehousesInterface_Edit_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.EditWarehouseRequest))
})
return _c
}
func (_c *MockWarehousesInterface_Edit_Call) Return(_a0 *sql.WaitGetWarehouseRunning[struct{}], _a1 error) *MockWarehousesInterface_Edit_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_Edit_Call) RunAndReturn(run func(context.Context, sql.EditWarehouseRequest) (*sql.WaitGetWarehouseRunning[struct{}], error)) *MockWarehousesInterface_Edit_Call {
_c.Call.Return(run)
return _c
}
// EditAndWait provides a mock function with given fields: ctx, editWarehouseRequest, options
func (_m *MockWarehousesInterface) EditAndWait(ctx context.Context, editWarehouseRequest sql.EditWarehouseRequest, options ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error) {
_va := make([]interface{}, len(options))
for _i := range options {
_va[_i] = options[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, editWarehouseRequest)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for EditAndWait")
}
var r0 *sql.GetWarehouseResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.EditWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)); ok {
return rf(ctx, editWarehouseRequest, options...)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.EditWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) *sql.GetWarehouseResponse); ok {
r0 = rf(ctx, editWarehouseRequest, options...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.GetWarehouseResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.EditWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) error); ok {
r1 = rf(ctx, editWarehouseRequest, options...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_EditAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EditAndWait'
type MockWarehousesInterface_EditAndWait_Call struct {
*mock.Call
}
// EditAndWait is a helper method to define mock.On call
// - ctx context.Context
// - editWarehouseRequest sql.EditWarehouseRequest
// - options ...retries.Option[sql.GetWarehouseResponse]
func (_e *MockWarehousesInterface_Expecter) EditAndWait(ctx interface{}, editWarehouseRequest interface{}, options ...interface{}) *MockWarehousesInterface_EditAndWait_Call {
return &MockWarehousesInterface_EditAndWait_Call{Call: _e.mock.On("EditAndWait",
append([]interface{}{ctx, editWarehouseRequest}, options...)...)}
}
func (_c *MockWarehousesInterface_EditAndWait_Call) Run(run func(ctx context.Context, editWarehouseRequest sql.EditWarehouseRequest, options ...retries.Option[sql.GetWarehouseResponse])) *MockWarehousesInterface_EditAndWait_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]retries.Option[sql.GetWarehouseResponse], len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(retries.Option[sql.GetWarehouseResponse])
}
}
run(args[0].(context.Context), args[1].(sql.EditWarehouseRequest), variadicArgs...)
})
return _c
}
func (_c *MockWarehousesInterface_EditAndWait_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_EditAndWait_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_EditAndWait_Call) RunAndReturn(run func(context.Context, sql.EditWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_EditAndWait_Call {
_c.Call.Return(run)
return _c
}
// EndpointInfoNameToIdMap provides a mock function with given fields: ctx, request
func (_m *MockWarehousesInterface) EndpointInfoNameToIdMap(ctx context.Context, request sql.ListWarehousesRequest) (map[string]string, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for EndpointInfoNameToIdMap")
}
var r0 map[string]string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.ListWarehousesRequest) (map[string]string, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.ListWarehousesRequest) map[string]string); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.ListWarehousesRequest) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_EndpointInfoNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EndpointInfoNameToIdMap'
type MockWarehousesInterface_EndpointInfoNameToIdMap_Call struct {
*mock.Call
}
// EndpointInfoNameToIdMap is a helper method to define mock.On call
// - ctx context.Context
// - request sql.ListWarehousesRequest
func (_e *MockWarehousesInterface_Expecter) EndpointInfoNameToIdMap(ctx interface{}, request interface{}) *MockWarehousesInterface_EndpointInfoNameToIdMap_Call {
return &MockWarehousesInterface_EndpointInfoNameToIdMap_Call{Call: _e.mock.On("EndpointInfoNameToIdMap", ctx, request)}
}
func (_c *MockWarehousesInterface_EndpointInfoNameToIdMap_Call) Run(run func(ctx context.Context, request sql.ListWarehousesRequest)) *MockWarehousesInterface_EndpointInfoNameToIdMap_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.ListWarehousesRequest))
})
return _c
}
func (_c *MockWarehousesInterface_EndpointInfoNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockWarehousesInterface_EndpointInfoNameToIdMap_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_EndpointInfoNameToIdMap_Call) RunAndReturn(run func(context.Context, sql.ListWarehousesRequest) (map[string]string, error)) *MockWarehousesInterface_EndpointInfoNameToIdMap_Call {
_c.Call.Return(run)
return _c
}
// Get provides a mock function with given fields: ctx, request
func (_m *MockWarehousesInterface) Get(ctx context.Context, request sql.GetWarehouseRequest) (*sql.GetWarehouseResponse, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 *sql.GetWarehouseResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehouseRequest) (*sql.GetWarehouseResponse, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehouseRequest) *sql.GetWarehouseResponse); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.GetWarehouseResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.GetWarehouseRequest) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type MockWarehousesInterface_Get_Call struct {
*mock.Call
}
// Get is a helper method to define mock.On call
// - ctx context.Context
// - request sql.GetWarehouseRequest
func (_e *MockWarehousesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockWarehousesInterface_Get_Call {
return &MockWarehousesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)}
}
func (_c *MockWarehousesInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetWarehouseRequest)) *MockWarehousesInterface_Get_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.GetWarehouseRequest))
})
return _c
}
func (_c *MockWarehousesInterface_Get_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_Get_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetWarehouseRequest) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_Get_Call {
_c.Call.Return(run)
return _c
}
// GetById provides a mock function with given fields: ctx, id
func (_m *MockWarehousesInterface) GetById(ctx context.Context, id string) (*sql.GetWarehouseResponse, error) {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for GetById")
}
var r0 *sql.GetWarehouseResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.GetWarehouseResponse, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *sql.GetWarehouseResponse); ok {
r0 = rf(ctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.GetWarehouseResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById'
type MockWarehousesInterface_GetById_Call struct {
*mock.Call
}
// GetById is a helper method to define mock.On call
// - ctx context.Context
// - id string
func (_e *MockWarehousesInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockWarehousesInterface_GetById_Call {
return &MockWarehousesInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)}
}
func (_c *MockWarehousesInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockWarehousesInterface_GetById_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockWarehousesInterface_GetById_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_GetById_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_GetById_Call {
_c.Call.Return(run)
return _c
}
// GetByName provides a mock function with given fields: ctx, name
func (_m *MockWarehousesInterface) GetByName(ctx context.Context, name string) (*sql.EndpointInfo, error) {
ret := _m.Called(ctx, name)
if len(ret) == 0 {
panic("no return value specified for GetByName")
}
var r0 *sql.EndpointInfo
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.EndpointInfo, error)); ok {
return rf(ctx, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *sql.EndpointInfo); ok {
r0 = rf(ctx, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.EndpointInfo)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName'
type MockWarehousesInterface_GetByName_Call struct {
*mock.Call
}
// GetByName is a helper method to define mock.On call
// - ctx context.Context
// - name string
func (_e *MockWarehousesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockWarehousesInterface_GetByName_Call {
return &MockWarehousesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)}
}
func (_c *MockWarehousesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockWarehousesInterface_GetByName_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockWarehousesInterface_GetByName_Call) Return(_a0 *sql.EndpointInfo, _a1 error) *MockWarehousesInterface_GetByName_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sql.EndpointInfo, error)) *MockWarehousesInterface_GetByName_Call {
_c.Call.Return(run)
return _c
}
// GetPermissionLevels provides a mock function with given fields: ctx, request
func (_m *MockWarehousesInterface) GetPermissionLevels(ctx context.Context, request sql.GetWarehousePermissionLevelsRequest) (*sql.GetWarehousePermissionLevelsResponse, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for GetPermissionLevels")
}
var r0 *sql.GetWarehousePermissionLevelsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehousePermissionLevelsRequest) (*sql.GetWarehousePermissionLevelsResponse, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehousePermissionLevelsRequest) *sql.GetWarehousePermissionLevelsResponse); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.GetWarehousePermissionLevelsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.GetWarehousePermissionLevelsRequest) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels'
type MockWarehousesInterface_GetPermissionLevels_Call struct {
*mock.Call
}
// GetPermissionLevels is a helper method to define mock.On call
// - ctx context.Context
// - request sql.GetWarehousePermissionLevelsRequest
func (_e *MockWarehousesInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockWarehousesInterface_GetPermissionLevels_Call {
return &MockWarehousesInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)}
}
func (_c *MockWarehousesInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request sql.GetWarehousePermissionLevelsRequest)) *MockWarehousesInterface_GetPermissionLevels_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.GetWarehousePermissionLevelsRequest))
})
return _c
}
func (_c *MockWarehousesInterface_GetPermissionLevels_Call) Return(_a0 *sql.GetWarehousePermissionLevelsResponse, _a1 error) *MockWarehousesInterface_GetPermissionLevels_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, sql.GetWarehousePermissionLevelsRequest) (*sql.GetWarehousePermissionLevelsResponse, error)) *MockWarehousesInterface_GetPermissionLevels_Call {
_c.Call.Return(run)
return _c
}
// GetPermissionLevelsByWarehouseId provides a mock function with given fields: ctx, warehouseId
func (_m *MockWarehousesInterface) GetPermissionLevelsByWarehouseId(ctx context.Context, warehouseId string) (*sql.GetWarehousePermissionLevelsResponse, error) {
ret := _m.Called(ctx, warehouseId)
if len(ret) == 0 {
panic("no return value specified for GetPermissionLevelsByWarehouseId")
}
var r0 *sql.GetWarehousePermissionLevelsResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.GetWarehousePermissionLevelsResponse, error)); ok {
return rf(ctx, warehouseId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *sql.GetWarehousePermissionLevelsResponse); ok {
r0 = rf(ctx, warehouseId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.GetWarehousePermissionLevelsResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, warehouseId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByWarehouseId'
type MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call struct {
*mock.Call
}
// GetPermissionLevelsByWarehouseId is a helper method to define mock.On call
// - ctx context.Context
// - warehouseId string
func (_e *MockWarehousesInterface_Expecter) GetPermissionLevelsByWarehouseId(ctx interface{}, warehouseId interface{}) *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call {
return &MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call{Call: _e.mock.On("GetPermissionLevelsByWarehouseId", ctx, warehouseId)}
}
func (_c *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call) Run(run func(ctx context.Context, warehouseId string)) *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call) Return(_a0 *sql.GetWarehousePermissionLevelsResponse, _a1 error) *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call) RunAndReturn(run func(context.Context, string) (*sql.GetWarehousePermissionLevelsResponse, error)) *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call {
_c.Call.Return(run)
return _c
}
// GetPermissions provides a mock function with given fields: ctx, request
func (_m *MockWarehousesInterface) GetPermissions(ctx context.Context, request sql.GetWarehousePermissionsRequest) (*sql.WarehousePermissions, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for GetPermissions")
}
var r0 *sql.WarehousePermissions
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehousePermissionsRequest) (*sql.WarehousePermissions, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehousePermissionsRequest) *sql.WarehousePermissions); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.WarehousePermissions)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.GetWarehousePermissionsRequest) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions'
type MockWarehousesInterface_GetPermissions_Call struct {
*mock.Call
}
// GetPermissions is a helper method to define mock.On call
// - ctx context.Context
// - request sql.GetWarehousePermissionsRequest
func (_e *MockWarehousesInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockWarehousesInterface_GetPermissions_Call {
return &MockWarehousesInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)}
}
func (_c *MockWarehousesInterface_GetPermissions_Call) Run(run func(ctx context.Context, request sql.GetWarehousePermissionsRequest)) *MockWarehousesInterface_GetPermissions_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.GetWarehousePermissionsRequest))
})
return _c
}
func (_c *MockWarehousesInterface_GetPermissions_Call) Return(_a0 *sql.WarehousePermissions, _a1 error) *MockWarehousesInterface_GetPermissions_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, sql.GetWarehousePermissionsRequest) (*sql.WarehousePermissions, error)) *MockWarehousesInterface_GetPermissions_Call {
_c.Call.Return(run)
return _c
}
// GetPermissionsByWarehouseId provides a mock function with given fields: ctx, warehouseId
func (_m *MockWarehousesInterface) GetPermissionsByWarehouseId(ctx context.Context, warehouseId string) (*sql.WarehousePermissions, error) {
ret := _m.Called(ctx, warehouseId)
if len(ret) == 0 {
panic("no return value specified for GetPermissionsByWarehouseId")
}
var r0 *sql.WarehousePermissions
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.WarehousePermissions, error)); ok {
return rf(ctx, warehouseId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *sql.WarehousePermissions); ok {
r0 = rf(ctx, warehouseId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.WarehousePermissions)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, warehouseId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_GetPermissionsByWarehouseId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByWarehouseId'
type MockWarehousesInterface_GetPermissionsByWarehouseId_Call struct {
*mock.Call
}
// GetPermissionsByWarehouseId is a helper method to define mock.On call
// - ctx context.Context
// - warehouseId string
func (_e *MockWarehousesInterface_Expecter) GetPermissionsByWarehouseId(ctx interface{}, warehouseId interface{}) *MockWarehousesInterface_GetPermissionsByWarehouseId_Call {
return &MockWarehousesInterface_GetPermissionsByWarehouseId_Call{Call: _e.mock.On("GetPermissionsByWarehouseId", ctx, warehouseId)}
}
func (_c *MockWarehousesInterface_GetPermissionsByWarehouseId_Call) Run(run func(ctx context.Context, warehouseId string)) *MockWarehousesInterface_GetPermissionsByWarehouseId_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockWarehousesInterface_GetPermissionsByWarehouseId_Call) Return(_a0 *sql.WarehousePermissions, _a1 error) *MockWarehousesInterface_GetPermissionsByWarehouseId_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_GetPermissionsByWarehouseId_Call) RunAndReturn(run func(context.Context, string) (*sql.WarehousePermissions, error)) *MockWarehousesInterface_GetPermissionsByWarehouseId_Call {
_c.Call.Return(run)
return _c
}
// GetWorkspaceWarehouseConfig provides a mock function with given fields: ctx
func (_m *MockWarehousesInterface) GetWorkspaceWarehouseConfig(ctx context.Context) (*sql.GetWorkspaceWarehouseConfigResponse, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for GetWorkspaceWarehouseConfig")
}
var r0 *sql.GetWorkspaceWarehouseConfigResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*sql.GetWorkspaceWarehouseConfigResponse, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *sql.GetWorkspaceWarehouseConfigResponse); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.GetWorkspaceWarehouseConfigResponse)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkspaceWarehouseConfig'
type MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call struct {
*mock.Call
}
// GetWorkspaceWarehouseConfig is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockWarehousesInterface_Expecter) GetWorkspaceWarehouseConfig(ctx interface{}) *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call {
return &MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call{Call: _e.mock.On("GetWorkspaceWarehouseConfig", ctx)}
}
func (_c *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call) Run(run func(ctx context.Context)) *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call) Return(_a0 *sql.GetWorkspaceWarehouseConfigResponse, _a1 error) *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call) RunAndReturn(run func(context.Context) (*sql.GetWorkspaceWarehouseConfigResponse, error)) *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call {
_c.Call.Return(run)
return _c
}
// Impl provides a mock function with given fields:
func (_m *MockWarehousesInterface) Impl() sql.WarehousesService {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Impl")
}
var r0 sql.WarehousesService
if rf, ok := ret.Get(0).(func() sql.WarehousesService); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(sql.WarehousesService)
}
}
return r0
}
// MockWarehousesInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl'
type MockWarehousesInterface_Impl_Call struct {
*mock.Call
}
// Impl is a helper method to define mock.On call
func (_e *MockWarehousesInterface_Expecter) Impl() *MockWarehousesInterface_Impl_Call {
return &MockWarehousesInterface_Impl_Call{Call: _e.mock.On("Impl")}
}
func (_c *MockWarehousesInterface_Impl_Call) Run(run func()) *MockWarehousesInterface_Impl_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockWarehousesInterface_Impl_Call) Return(_a0 sql.WarehousesService) *MockWarehousesInterface_Impl_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockWarehousesInterface_Impl_Call) RunAndReturn(run func() sql.WarehousesService) *MockWarehousesInterface_Impl_Call {
_c.Call.Return(run)
return _c
}
// List provides a mock function with given fields: ctx, request
func (_m *MockWarehousesInterface) List(ctx context.Context, request sql.ListWarehousesRequest) listing.Iterator[sql.EndpointInfo] {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 listing.Iterator[sql.EndpointInfo]
if rf, ok := ret.Get(0).(func(context.Context, sql.ListWarehousesRequest) listing.Iterator[sql.EndpointInfo]); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(listing.Iterator[sql.EndpointInfo])
}
}
return r0
}
// MockWarehousesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
type MockWarehousesInterface_List_Call struct {
*mock.Call
}
// List is a helper method to define mock.On call
// - ctx context.Context
// - request sql.ListWarehousesRequest
func (_e *MockWarehousesInterface_Expecter) List(ctx interface{}, request interface{}) *MockWarehousesInterface_List_Call {
return &MockWarehousesInterface_List_Call{Call: _e.mock.On("List", ctx, request)}
}
func (_c *MockWarehousesInterface_List_Call) Run(run func(ctx context.Context, request sql.ListWarehousesRequest)) *MockWarehousesInterface_List_Call {