-
Notifications
You must be signed in to change notification settings - Fork 5
/
alerts_api.go
688 lines (561 loc) · 24.9 KB
/
alerts_api.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
// Code generated by mockery. DO NOT EDIT.
package mockadmin
import (
context "context"
admin "go.mongodb.org/atlas-sdk/v20231115008/admin"
http "net/http"
mock "github.com/stretchr/testify/mock"
)
// AlertsApi is an autogenerated mock type for the AlertsApi type
type AlertsApi struct {
mock.Mock
}
type AlertsApi_Expecter struct {
mock *mock.Mock
}
func (_m *AlertsApi) EXPECT() *AlertsApi_Expecter {
return &AlertsApi_Expecter{mock: &_m.Mock}
}
// AcknowledgeAlert provides a mock function with given fields: ctx, groupId, alertId, alertViewForNdsGroup
func (_m *AlertsApi) AcknowledgeAlert(ctx context.Context, groupId string, alertId string, alertViewForNdsGroup *admin.AlertViewForNdsGroup) admin.AcknowledgeAlertApiRequest {
ret := _m.Called(ctx, groupId, alertId, alertViewForNdsGroup)
if len(ret) == 0 {
panic("no return value specified for AcknowledgeAlert")
}
var r0 admin.AcknowledgeAlertApiRequest
if rf, ok := ret.Get(0).(func(context.Context, string, string, *admin.AlertViewForNdsGroup) admin.AcknowledgeAlertApiRequest); ok {
r0 = rf(ctx, groupId, alertId, alertViewForNdsGroup)
} else {
r0 = ret.Get(0).(admin.AcknowledgeAlertApiRequest)
}
return r0
}
// AlertsApi_AcknowledgeAlert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcknowledgeAlert'
type AlertsApi_AcknowledgeAlert_Call struct {
*mock.Call
}
// AcknowledgeAlert is a helper method to define mock.On call
// - ctx context.Context
// - groupId string
// - alertId string
// - alertViewForNdsGroup *admin.AlertViewForNdsGroup
func (_e *AlertsApi_Expecter) AcknowledgeAlert(ctx interface{}, groupId interface{}, alertId interface{}, alertViewForNdsGroup interface{}) *AlertsApi_AcknowledgeAlert_Call {
return &AlertsApi_AcknowledgeAlert_Call{Call: _e.mock.On("AcknowledgeAlert", ctx, groupId, alertId, alertViewForNdsGroup)}
}
func (_c *AlertsApi_AcknowledgeAlert_Call) Run(run func(ctx context.Context, groupId string, alertId string, alertViewForNdsGroup *admin.AlertViewForNdsGroup)) *AlertsApi_AcknowledgeAlert_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(*admin.AlertViewForNdsGroup))
})
return _c
}
func (_c *AlertsApi_AcknowledgeAlert_Call) Return(_a0 admin.AcknowledgeAlertApiRequest) *AlertsApi_AcknowledgeAlert_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AlertsApi_AcknowledgeAlert_Call) RunAndReturn(run func(context.Context, string, string, *admin.AlertViewForNdsGroup) admin.AcknowledgeAlertApiRequest) *AlertsApi_AcknowledgeAlert_Call {
_c.Call.Return(run)
return _c
}
// AcknowledgeAlertExecute provides a mock function with given fields: r
func (_m *AlertsApi) AcknowledgeAlertExecute(r admin.AcknowledgeAlertApiRequest) (*admin.AlertViewForNdsGroup, *http.Response, error) {
ret := _m.Called(r)
if len(ret) == 0 {
panic("no return value specified for AcknowledgeAlertExecute")
}
var r0 *admin.AlertViewForNdsGroup
var r1 *http.Response
var r2 error
if rf, ok := ret.Get(0).(func(admin.AcknowledgeAlertApiRequest) (*admin.AlertViewForNdsGroup, *http.Response, error)); ok {
return rf(r)
}
if rf, ok := ret.Get(0).(func(admin.AcknowledgeAlertApiRequest) *admin.AlertViewForNdsGroup); ok {
r0 = rf(r)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*admin.AlertViewForNdsGroup)
}
}
if rf, ok := ret.Get(1).(func(admin.AcknowledgeAlertApiRequest) *http.Response); ok {
r1 = rf(r)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*http.Response)
}
}
if rf, ok := ret.Get(2).(func(admin.AcknowledgeAlertApiRequest) error); ok {
r2 = rf(r)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// AlertsApi_AcknowledgeAlertExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcknowledgeAlertExecute'
type AlertsApi_AcknowledgeAlertExecute_Call struct {
*mock.Call
}
// AcknowledgeAlertExecute is a helper method to define mock.On call
// - r admin.AcknowledgeAlertApiRequest
func (_e *AlertsApi_Expecter) AcknowledgeAlertExecute(r interface{}) *AlertsApi_AcknowledgeAlertExecute_Call {
return &AlertsApi_AcknowledgeAlertExecute_Call{Call: _e.mock.On("AcknowledgeAlertExecute", r)}
}
func (_c *AlertsApi_AcknowledgeAlertExecute_Call) Run(run func(r admin.AcknowledgeAlertApiRequest)) *AlertsApi_AcknowledgeAlertExecute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(admin.AcknowledgeAlertApiRequest))
})
return _c
}
func (_c *AlertsApi_AcknowledgeAlertExecute_Call) Return(_a0 *admin.AlertViewForNdsGroup, _a1 *http.Response, _a2 error) *AlertsApi_AcknowledgeAlertExecute_Call {
_c.Call.Return(_a0, _a1, _a2)
return _c
}
func (_c *AlertsApi_AcknowledgeAlertExecute_Call) RunAndReturn(run func(admin.AcknowledgeAlertApiRequest) (*admin.AlertViewForNdsGroup, *http.Response, error)) *AlertsApi_AcknowledgeAlertExecute_Call {
_c.Call.Return(run)
return _c
}
// AcknowledgeAlertWithParams provides a mock function with given fields: ctx, args
func (_m *AlertsApi) AcknowledgeAlertWithParams(ctx context.Context, args *admin.AcknowledgeAlertApiParams) admin.AcknowledgeAlertApiRequest {
ret := _m.Called(ctx, args)
if len(ret) == 0 {
panic("no return value specified for AcknowledgeAlertWithParams")
}
var r0 admin.AcknowledgeAlertApiRequest
if rf, ok := ret.Get(0).(func(context.Context, *admin.AcknowledgeAlertApiParams) admin.AcknowledgeAlertApiRequest); ok {
r0 = rf(ctx, args)
} else {
r0 = ret.Get(0).(admin.AcknowledgeAlertApiRequest)
}
return r0
}
// AlertsApi_AcknowledgeAlertWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcknowledgeAlertWithParams'
type AlertsApi_AcknowledgeAlertWithParams_Call struct {
*mock.Call
}
// AcknowledgeAlertWithParams is a helper method to define mock.On call
// - ctx context.Context
// - args *admin.AcknowledgeAlertApiParams
func (_e *AlertsApi_Expecter) AcknowledgeAlertWithParams(ctx interface{}, args interface{}) *AlertsApi_AcknowledgeAlertWithParams_Call {
return &AlertsApi_AcknowledgeAlertWithParams_Call{Call: _e.mock.On("AcknowledgeAlertWithParams", ctx, args)}
}
func (_c *AlertsApi_AcknowledgeAlertWithParams_Call) Run(run func(ctx context.Context, args *admin.AcknowledgeAlertApiParams)) *AlertsApi_AcknowledgeAlertWithParams_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*admin.AcknowledgeAlertApiParams))
})
return _c
}
func (_c *AlertsApi_AcknowledgeAlertWithParams_Call) Return(_a0 admin.AcknowledgeAlertApiRequest) *AlertsApi_AcknowledgeAlertWithParams_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AlertsApi_AcknowledgeAlertWithParams_Call) RunAndReturn(run func(context.Context, *admin.AcknowledgeAlertApiParams) admin.AcknowledgeAlertApiRequest) *AlertsApi_AcknowledgeAlertWithParams_Call {
_c.Call.Return(run)
return _c
}
// GetAlert provides a mock function with given fields: ctx, groupId, alertId
func (_m *AlertsApi) GetAlert(ctx context.Context, groupId string, alertId string) admin.GetAlertApiRequest {
ret := _m.Called(ctx, groupId, alertId)
if len(ret) == 0 {
panic("no return value specified for GetAlert")
}
var r0 admin.GetAlertApiRequest
if rf, ok := ret.Get(0).(func(context.Context, string, string) admin.GetAlertApiRequest); ok {
r0 = rf(ctx, groupId, alertId)
} else {
r0 = ret.Get(0).(admin.GetAlertApiRequest)
}
return r0
}
// AlertsApi_GetAlert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAlert'
type AlertsApi_GetAlert_Call struct {
*mock.Call
}
// GetAlert is a helper method to define mock.On call
// - ctx context.Context
// - groupId string
// - alertId string
func (_e *AlertsApi_Expecter) GetAlert(ctx interface{}, groupId interface{}, alertId interface{}) *AlertsApi_GetAlert_Call {
return &AlertsApi_GetAlert_Call{Call: _e.mock.On("GetAlert", ctx, groupId, alertId)}
}
func (_c *AlertsApi_GetAlert_Call) Run(run func(ctx context.Context, groupId string, alertId string)) *AlertsApi_GetAlert_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string))
})
return _c
}
func (_c *AlertsApi_GetAlert_Call) Return(_a0 admin.GetAlertApiRequest) *AlertsApi_GetAlert_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AlertsApi_GetAlert_Call) RunAndReturn(run func(context.Context, string, string) admin.GetAlertApiRequest) *AlertsApi_GetAlert_Call {
_c.Call.Return(run)
return _c
}
// GetAlertExecute provides a mock function with given fields: r
func (_m *AlertsApi) GetAlertExecute(r admin.GetAlertApiRequest) (*admin.AlertViewForNdsGroup, *http.Response, error) {
ret := _m.Called(r)
if len(ret) == 0 {
panic("no return value specified for GetAlertExecute")
}
var r0 *admin.AlertViewForNdsGroup
var r1 *http.Response
var r2 error
if rf, ok := ret.Get(0).(func(admin.GetAlertApiRequest) (*admin.AlertViewForNdsGroup, *http.Response, error)); ok {
return rf(r)
}
if rf, ok := ret.Get(0).(func(admin.GetAlertApiRequest) *admin.AlertViewForNdsGroup); ok {
r0 = rf(r)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*admin.AlertViewForNdsGroup)
}
}
if rf, ok := ret.Get(1).(func(admin.GetAlertApiRequest) *http.Response); ok {
r1 = rf(r)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*http.Response)
}
}
if rf, ok := ret.Get(2).(func(admin.GetAlertApiRequest) error); ok {
r2 = rf(r)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// AlertsApi_GetAlertExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAlertExecute'
type AlertsApi_GetAlertExecute_Call struct {
*mock.Call
}
// GetAlertExecute is a helper method to define mock.On call
// - r admin.GetAlertApiRequest
func (_e *AlertsApi_Expecter) GetAlertExecute(r interface{}) *AlertsApi_GetAlertExecute_Call {
return &AlertsApi_GetAlertExecute_Call{Call: _e.mock.On("GetAlertExecute", r)}
}
func (_c *AlertsApi_GetAlertExecute_Call) Run(run func(r admin.GetAlertApiRequest)) *AlertsApi_GetAlertExecute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(admin.GetAlertApiRequest))
})
return _c
}
func (_c *AlertsApi_GetAlertExecute_Call) Return(_a0 *admin.AlertViewForNdsGroup, _a1 *http.Response, _a2 error) *AlertsApi_GetAlertExecute_Call {
_c.Call.Return(_a0, _a1, _a2)
return _c
}
func (_c *AlertsApi_GetAlertExecute_Call) RunAndReturn(run func(admin.GetAlertApiRequest) (*admin.AlertViewForNdsGroup, *http.Response, error)) *AlertsApi_GetAlertExecute_Call {
_c.Call.Return(run)
return _c
}
// GetAlertWithParams provides a mock function with given fields: ctx, args
func (_m *AlertsApi) GetAlertWithParams(ctx context.Context, args *admin.GetAlertApiParams) admin.GetAlertApiRequest {
ret := _m.Called(ctx, args)
if len(ret) == 0 {
panic("no return value specified for GetAlertWithParams")
}
var r0 admin.GetAlertApiRequest
if rf, ok := ret.Get(0).(func(context.Context, *admin.GetAlertApiParams) admin.GetAlertApiRequest); ok {
r0 = rf(ctx, args)
} else {
r0 = ret.Get(0).(admin.GetAlertApiRequest)
}
return r0
}
// AlertsApi_GetAlertWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAlertWithParams'
type AlertsApi_GetAlertWithParams_Call struct {
*mock.Call
}
// GetAlertWithParams is a helper method to define mock.On call
// - ctx context.Context
// - args *admin.GetAlertApiParams
func (_e *AlertsApi_Expecter) GetAlertWithParams(ctx interface{}, args interface{}) *AlertsApi_GetAlertWithParams_Call {
return &AlertsApi_GetAlertWithParams_Call{Call: _e.mock.On("GetAlertWithParams", ctx, args)}
}
func (_c *AlertsApi_GetAlertWithParams_Call) Run(run func(ctx context.Context, args *admin.GetAlertApiParams)) *AlertsApi_GetAlertWithParams_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*admin.GetAlertApiParams))
})
return _c
}
func (_c *AlertsApi_GetAlertWithParams_Call) Return(_a0 admin.GetAlertApiRequest) *AlertsApi_GetAlertWithParams_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AlertsApi_GetAlertWithParams_Call) RunAndReturn(run func(context.Context, *admin.GetAlertApiParams) admin.GetAlertApiRequest) *AlertsApi_GetAlertWithParams_Call {
_c.Call.Return(run)
return _c
}
// ListAlerts provides a mock function with given fields: ctx, groupId
func (_m *AlertsApi) ListAlerts(ctx context.Context, groupId string) admin.ListAlertsApiRequest {
ret := _m.Called(ctx, groupId)
if len(ret) == 0 {
panic("no return value specified for ListAlerts")
}
var r0 admin.ListAlertsApiRequest
if rf, ok := ret.Get(0).(func(context.Context, string) admin.ListAlertsApiRequest); ok {
r0 = rf(ctx, groupId)
} else {
r0 = ret.Get(0).(admin.ListAlertsApiRequest)
}
return r0
}
// AlertsApi_ListAlerts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAlerts'
type AlertsApi_ListAlerts_Call struct {
*mock.Call
}
// ListAlerts is a helper method to define mock.On call
// - ctx context.Context
// - groupId string
func (_e *AlertsApi_Expecter) ListAlerts(ctx interface{}, groupId interface{}) *AlertsApi_ListAlerts_Call {
return &AlertsApi_ListAlerts_Call{Call: _e.mock.On("ListAlerts", ctx, groupId)}
}
func (_c *AlertsApi_ListAlerts_Call) Run(run func(ctx context.Context, groupId string)) *AlertsApi_ListAlerts_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *AlertsApi_ListAlerts_Call) Return(_a0 admin.ListAlertsApiRequest) *AlertsApi_ListAlerts_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AlertsApi_ListAlerts_Call) RunAndReturn(run func(context.Context, string) admin.ListAlertsApiRequest) *AlertsApi_ListAlerts_Call {
_c.Call.Return(run)
return _c
}
// ListAlertsByAlertConfigurationId provides a mock function with given fields: ctx, groupId, alertConfigId
func (_m *AlertsApi) ListAlertsByAlertConfigurationId(ctx context.Context, groupId string, alertConfigId string) admin.ListAlertsByAlertConfigurationIdApiRequest {
ret := _m.Called(ctx, groupId, alertConfigId)
if len(ret) == 0 {
panic("no return value specified for ListAlertsByAlertConfigurationId")
}
var r0 admin.ListAlertsByAlertConfigurationIdApiRequest
if rf, ok := ret.Get(0).(func(context.Context, string, string) admin.ListAlertsByAlertConfigurationIdApiRequest); ok {
r0 = rf(ctx, groupId, alertConfigId)
} else {
r0 = ret.Get(0).(admin.ListAlertsByAlertConfigurationIdApiRequest)
}
return r0
}
// AlertsApi_ListAlertsByAlertConfigurationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAlertsByAlertConfigurationId'
type AlertsApi_ListAlertsByAlertConfigurationId_Call struct {
*mock.Call
}
// ListAlertsByAlertConfigurationId is a helper method to define mock.On call
// - ctx context.Context
// - groupId string
// - alertConfigId string
func (_e *AlertsApi_Expecter) ListAlertsByAlertConfigurationId(ctx interface{}, groupId interface{}, alertConfigId interface{}) *AlertsApi_ListAlertsByAlertConfigurationId_Call {
return &AlertsApi_ListAlertsByAlertConfigurationId_Call{Call: _e.mock.On("ListAlertsByAlertConfigurationId", ctx, groupId, alertConfigId)}
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationId_Call) Run(run func(ctx context.Context, groupId string, alertConfigId string)) *AlertsApi_ListAlertsByAlertConfigurationId_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string))
})
return _c
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationId_Call) Return(_a0 admin.ListAlertsByAlertConfigurationIdApiRequest) *AlertsApi_ListAlertsByAlertConfigurationId_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationId_Call) RunAndReturn(run func(context.Context, string, string) admin.ListAlertsByAlertConfigurationIdApiRequest) *AlertsApi_ListAlertsByAlertConfigurationId_Call {
_c.Call.Return(run)
return _c
}
// ListAlertsByAlertConfigurationIdExecute provides a mock function with given fields: r
func (_m *AlertsApi) ListAlertsByAlertConfigurationIdExecute(r admin.ListAlertsByAlertConfigurationIdApiRequest) (*admin.PaginatedAlert, *http.Response, error) {
ret := _m.Called(r)
if len(ret) == 0 {
panic("no return value specified for ListAlertsByAlertConfigurationIdExecute")
}
var r0 *admin.PaginatedAlert
var r1 *http.Response
var r2 error
if rf, ok := ret.Get(0).(func(admin.ListAlertsByAlertConfigurationIdApiRequest) (*admin.PaginatedAlert, *http.Response, error)); ok {
return rf(r)
}
if rf, ok := ret.Get(0).(func(admin.ListAlertsByAlertConfigurationIdApiRequest) *admin.PaginatedAlert); ok {
r0 = rf(r)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*admin.PaginatedAlert)
}
}
if rf, ok := ret.Get(1).(func(admin.ListAlertsByAlertConfigurationIdApiRequest) *http.Response); ok {
r1 = rf(r)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*http.Response)
}
}
if rf, ok := ret.Get(2).(func(admin.ListAlertsByAlertConfigurationIdApiRequest) error); ok {
r2 = rf(r)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAlertsByAlertConfigurationIdExecute'
type AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call struct {
*mock.Call
}
// ListAlertsByAlertConfigurationIdExecute is a helper method to define mock.On call
// - r admin.ListAlertsByAlertConfigurationIdApiRequest
func (_e *AlertsApi_Expecter) ListAlertsByAlertConfigurationIdExecute(r interface{}) *AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call {
return &AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call{Call: _e.mock.On("ListAlertsByAlertConfigurationIdExecute", r)}
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call) Run(run func(r admin.ListAlertsByAlertConfigurationIdApiRequest)) *AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(admin.ListAlertsByAlertConfigurationIdApiRequest))
})
return _c
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call) Return(_a0 *admin.PaginatedAlert, _a1 *http.Response, _a2 error) *AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call {
_c.Call.Return(_a0, _a1, _a2)
return _c
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call) RunAndReturn(run func(admin.ListAlertsByAlertConfigurationIdApiRequest) (*admin.PaginatedAlert, *http.Response, error)) *AlertsApi_ListAlertsByAlertConfigurationIdExecute_Call {
_c.Call.Return(run)
return _c
}
// ListAlertsByAlertConfigurationIdWithParams provides a mock function with given fields: ctx, args
func (_m *AlertsApi) ListAlertsByAlertConfigurationIdWithParams(ctx context.Context, args *admin.ListAlertsByAlertConfigurationIdApiParams) admin.ListAlertsByAlertConfigurationIdApiRequest {
ret := _m.Called(ctx, args)
if len(ret) == 0 {
panic("no return value specified for ListAlertsByAlertConfigurationIdWithParams")
}
var r0 admin.ListAlertsByAlertConfigurationIdApiRequest
if rf, ok := ret.Get(0).(func(context.Context, *admin.ListAlertsByAlertConfigurationIdApiParams) admin.ListAlertsByAlertConfigurationIdApiRequest); ok {
r0 = rf(ctx, args)
} else {
r0 = ret.Get(0).(admin.ListAlertsByAlertConfigurationIdApiRequest)
}
return r0
}
// AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAlertsByAlertConfigurationIdWithParams'
type AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call struct {
*mock.Call
}
// ListAlertsByAlertConfigurationIdWithParams is a helper method to define mock.On call
// - ctx context.Context
// - args *admin.ListAlertsByAlertConfigurationIdApiParams
func (_e *AlertsApi_Expecter) ListAlertsByAlertConfigurationIdWithParams(ctx interface{}, args interface{}) *AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call {
return &AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call{Call: _e.mock.On("ListAlertsByAlertConfigurationIdWithParams", ctx, args)}
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call) Run(run func(ctx context.Context, args *admin.ListAlertsByAlertConfigurationIdApiParams)) *AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*admin.ListAlertsByAlertConfigurationIdApiParams))
})
return _c
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call) Return(_a0 admin.ListAlertsByAlertConfigurationIdApiRequest) *AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call) RunAndReturn(run func(context.Context, *admin.ListAlertsByAlertConfigurationIdApiParams) admin.ListAlertsByAlertConfigurationIdApiRequest) *AlertsApi_ListAlertsByAlertConfigurationIdWithParams_Call {
_c.Call.Return(run)
return _c
}
// ListAlertsExecute provides a mock function with given fields: r
func (_m *AlertsApi) ListAlertsExecute(r admin.ListAlertsApiRequest) (*admin.PaginatedAlert, *http.Response, error) {
ret := _m.Called(r)
if len(ret) == 0 {
panic("no return value specified for ListAlertsExecute")
}
var r0 *admin.PaginatedAlert
var r1 *http.Response
var r2 error
if rf, ok := ret.Get(0).(func(admin.ListAlertsApiRequest) (*admin.PaginatedAlert, *http.Response, error)); ok {
return rf(r)
}
if rf, ok := ret.Get(0).(func(admin.ListAlertsApiRequest) *admin.PaginatedAlert); ok {
r0 = rf(r)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*admin.PaginatedAlert)
}
}
if rf, ok := ret.Get(1).(func(admin.ListAlertsApiRequest) *http.Response); ok {
r1 = rf(r)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*http.Response)
}
}
if rf, ok := ret.Get(2).(func(admin.ListAlertsApiRequest) error); ok {
r2 = rf(r)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// AlertsApi_ListAlertsExecute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAlertsExecute'
type AlertsApi_ListAlertsExecute_Call struct {
*mock.Call
}
// ListAlertsExecute is a helper method to define mock.On call
// - r admin.ListAlertsApiRequest
func (_e *AlertsApi_Expecter) ListAlertsExecute(r interface{}) *AlertsApi_ListAlertsExecute_Call {
return &AlertsApi_ListAlertsExecute_Call{Call: _e.mock.On("ListAlertsExecute", r)}
}
func (_c *AlertsApi_ListAlertsExecute_Call) Run(run func(r admin.ListAlertsApiRequest)) *AlertsApi_ListAlertsExecute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(admin.ListAlertsApiRequest))
})
return _c
}
func (_c *AlertsApi_ListAlertsExecute_Call) Return(_a0 *admin.PaginatedAlert, _a1 *http.Response, _a2 error) *AlertsApi_ListAlertsExecute_Call {
_c.Call.Return(_a0, _a1, _a2)
return _c
}
func (_c *AlertsApi_ListAlertsExecute_Call) RunAndReturn(run func(admin.ListAlertsApiRequest) (*admin.PaginatedAlert, *http.Response, error)) *AlertsApi_ListAlertsExecute_Call {
_c.Call.Return(run)
return _c
}
// ListAlertsWithParams provides a mock function with given fields: ctx, args
func (_m *AlertsApi) ListAlertsWithParams(ctx context.Context, args *admin.ListAlertsApiParams) admin.ListAlertsApiRequest {
ret := _m.Called(ctx, args)
if len(ret) == 0 {
panic("no return value specified for ListAlertsWithParams")
}
var r0 admin.ListAlertsApiRequest
if rf, ok := ret.Get(0).(func(context.Context, *admin.ListAlertsApiParams) admin.ListAlertsApiRequest); ok {
r0 = rf(ctx, args)
} else {
r0 = ret.Get(0).(admin.ListAlertsApiRequest)
}
return r0
}
// AlertsApi_ListAlertsWithParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAlertsWithParams'
type AlertsApi_ListAlertsWithParams_Call struct {
*mock.Call
}
// ListAlertsWithParams is a helper method to define mock.On call
// - ctx context.Context
// - args *admin.ListAlertsApiParams
func (_e *AlertsApi_Expecter) ListAlertsWithParams(ctx interface{}, args interface{}) *AlertsApi_ListAlertsWithParams_Call {
return &AlertsApi_ListAlertsWithParams_Call{Call: _e.mock.On("ListAlertsWithParams", ctx, args)}
}
func (_c *AlertsApi_ListAlertsWithParams_Call) Run(run func(ctx context.Context, args *admin.ListAlertsApiParams)) *AlertsApi_ListAlertsWithParams_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*admin.ListAlertsApiParams))
})
return _c
}
func (_c *AlertsApi_ListAlertsWithParams_Call) Return(_a0 admin.ListAlertsApiRequest) *AlertsApi_ListAlertsWithParams_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *AlertsApi_ListAlertsWithParams_Call) RunAndReturn(run func(context.Context, *admin.ListAlertsApiParams) admin.ListAlertsApiRequest) *AlertsApi_ListAlertsWithParams_Call {
_c.Call.Return(run)
return _c
}
// NewAlertsApi creates a new instance of AlertsApi. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewAlertsApi(t interface {
mock.TestingT
Cleanup(func())
}) *AlertsApi {
mock := &AlertsApi{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}