-
Notifications
You must be signed in to change notification settings - Fork 0
/
switchm_traffic.go
908 lines (774 loc) · 27.8 KB
/
switchm_traffic.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
package bigdog
// API Version: v9_1
import (
"context"
"errors"
"io"
"net/http"
"time"
)
type SwitchMTrafficService struct {
apiClient *VSZClient
}
func NewSwitchMTrafficService(c *VSZClient) *SwitchMTrafficService {
s := new(SwitchMTrafficService)
s.apiClient = c
return s
}
func (ss *SwitchMService) SwitchMTrafficService() *SwitchMTrafficService {
return NewSwitchMTrafficService(ss.apiClient)
}
// SwitchMTrafficBroadcast
//
// Definition: traffic_broadcast
type SwitchMTrafficBroadcast struct {
BroadcastIn *string `json:"broadcastIn,omitempty"`
BroadcastOut *string `json:"broadcastOut,omitempty"`
Timestamp *string `json:"timestamp,omitempty"`
Total *int `json:"total,omitempty"`
}
func NewSwitchMTrafficBroadcast() *SwitchMTrafficBroadcast {
m := new(SwitchMTrafficBroadcast)
return m
}
// SwitchMTrafficBroadcastQueryResultList
//
// Definition: traffic_broadcastQueryResultList
type SwitchMTrafficBroadcastQueryResultList struct {
Extra interface{} `json:"extra,omitempty"`
FirstIndex *int `json:"firstIndex,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTrafficBroadcast `json:"list,omitempty"`
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficBroadcastQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficBroadcastQueryResultList
}
func newSwitchMTrafficBroadcastQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficBroadcastQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficBroadcastQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficBroadcastQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficBroadcastQueryResultList() *SwitchMTrafficBroadcastQueryResultList {
m := new(SwitchMTrafficBroadcastQueryResultList)
return m
}
// SwitchMTrafficMulticast
//
// Definition: traffic_multicast
type SwitchMTrafficMulticast struct {
MulticastIn *string `json:"multicastIn,omitempty"`
MulticastOut *string `json:"multicastOut,omitempty"`
Timestamp *string `json:"timestamp,omitempty"`
Total *int `json:"total,omitempty"`
}
func NewSwitchMTrafficMulticast() *SwitchMTrafficMulticast {
m := new(SwitchMTrafficMulticast)
return m
}
// SwitchMTrafficMulticastQueryResultList
//
// Definition: traffic_multicastQueryResultList
type SwitchMTrafficMulticastQueryResultList struct {
Extra interface{} `json:"extra,omitempty"`
FirstIndex *int `json:"firstIndex,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTrafficMulticast `json:"list,omitempty"`
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficMulticastQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficMulticastQueryResultList
}
func newSwitchMTrafficMulticastQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficMulticastQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficMulticastQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficMulticastQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficMulticastQueryResultList() *SwitchMTrafficMulticastQueryResultList {
m := new(SwitchMTrafficMulticastQueryResultList)
return m
}
// SwitchMTrafficPortError
//
// Definition: traffic_portError
type SwitchMTrafficPortError struct {
CrcErr *string `json:"crcErr,omitempty"`
InErr *string `json:"inErr,omitempty"`
OutErr *string `json:"outErr,omitempty"`
Timestamp *string `json:"timestamp,omitempty"`
Total *int `json:"total,omitempty"`
}
func NewSwitchMTrafficPortError() *SwitchMTrafficPortError {
m := new(SwitchMTrafficPortError)
return m
}
// SwitchMTrafficPortErrorQueryResultList
//
// Definition: traffic_portErrorQueryResultList
type SwitchMTrafficPortErrorQueryResultList struct {
Extra interface{} `json:"extra,omitempty"`
FirstIndex *int `json:"firstIndex,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTrafficPortError `json:"list,omitempty"`
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficPortErrorQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficPortErrorQueryResultList
}
func newSwitchMTrafficPortErrorQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficPortErrorQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficPortErrorQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficPortErrorQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficPortErrorQueryResultList() *SwitchMTrafficPortErrorQueryResultList {
m := new(SwitchMTrafficPortErrorQueryResultList)
return m
}
// SwitchMTrafficTopPortErrorQueryResultList
//
// Definition: traffic_topPortErrorQueryResultList
type SwitchMTrafficTopPortErrorQueryResultList struct {
// Extra
// Extra information for top port error
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first top port error returned out of the complete list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicates if there are more top port error after the currently displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTrafficUsage `json:"list,omitempty"`
// RawDataTotalCount
// Top port error count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total of top port error count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficTopPortErrorQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficTopPortErrorQueryResultList
}
func newSwitchMTrafficTopPortErrorQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficTopPortErrorQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficTopPortErrorQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficTopPortErrorQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficTopPortErrorQueryResultList() *SwitchMTrafficTopPortErrorQueryResultList {
m := new(SwitchMTrafficTopPortErrorQueryResultList)
return m
}
// SwitchMTrafficTopPortTrafficUsageQueryResultList
//
// Definition: traffic_topPortTrafficUsageQueryResultList
type SwitchMTrafficTopPortTrafficUsageQueryResultList struct {
// Extra
// Extra information for top port traffic usage
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first top port traffic usage returned out of the complete list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicates if there are more top port traffic usage after the currently displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTrafficUsage `json:"list,omitempty"`
// RawDataTotalCount
// Top port traffic usage count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total of top port traffic usage count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficTopPortTrafficUsageQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficTopPortTrafficUsageQueryResultList
}
func newSwitchMTrafficTopPortTrafficUsageQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficTopPortTrafficUsageQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficTopPortTrafficUsageQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficTopPortTrafficUsageQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficTopPortTrafficUsageQueryResultList() *SwitchMTrafficTopPortTrafficUsageQueryResultList {
m := new(SwitchMTrafficTopPortTrafficUsageQueryResultList)
return m
}
// SwitchMTrafficTopSwitchPoEUtilizationQueryResultList
//
// Definition: traffic_topSwitchPoEUtilizationQueryResultList
type SwitchMTrafficTopSwitchPoEUtilizationQueryResultList struct {
// Extra
// Extra information for top PoE utilization
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first top PoE usage returned out of the complete list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicates if there are more top PoE usage after the currently displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTrafficUsage `json:"list,omitempty"`
// RawDataTotalCount
// PoE utilization count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total PoE utilization count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficTopSwitchPoEUtilizationQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficTopSwitchPoEUtilizationQueryResultList
}
func newSwitchMTrafficTopSwitchPoEUtilizationQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficTopSwitchPoEUtilizationQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficTopSwitchPoEUtilizationQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficTopSwitchPoEUtilizationQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficTopSwitchPoEUtilizationQueryResultList() *SwitchMTrafficTopSwitchPoEUtilizationQueryResultList {
m := new(SwitchMTrafficTopSwitchPoEUtilizationQueryResultList)
return m
}
// SwitchMTrafficTopTrafficUsageQueryResultList
//
// Definition: traffic_topTrafficUsageQueryResultList
type SwitchMTrafficTopTrafficUsageQueryResultList struct {
// Extra
// Extra information for top traffic usage
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first top traffic usage returned out of the complete list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicates if there are more top traffic usage after the currently displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTrafficUsage `json:"list,omitempty"`
// RawDataTotalCount
// Top traffic usage count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total of top traffic usage count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficTopTrafficUsageQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficTopTrafficUsageQueryResultList
}
func newSwitchMTrafficTopTrafficUsageQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficTopTrafficUsageQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficTopTrafficUsageQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficTopTrafficUsageQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficTopTrafficUsageQueryResultList() *SwitchMTrafficTopTrafficUsageQueryResultList {
m := new(SwitchMTrafficTopTrafficUsageQueryResultList)
return m
}
// SwitchMTraffic
//
// Definition: traffic_traffic
type SwitchMTraffic struct {
// Rx
// RX traffic of the switch
Rx interface{} `json:"rx,omitempty"`
// Timestamp
// Timestamp of the switch traffic
Timestamp *string `json:"timestamp,omitempty"`
// Total
// Total traffic of the switch
Total interface{} `json:"total,omitempty"`
// Tx
// TX traffic of the switch
Tx interface{} `json:"tx,omitempty"`
}
func NewSwitchMTraffic() *SwitchMTraffic {
m := new(SwitchMTraffic)
return m
}
// SwitchMTrafficQueryResultList
//
// Definition: traffic_trafficQueryResultList
type SwitchMTrafficQueryResultList struct {
// Extra
// Extra information for traffic list
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first traffic list returned out of the complete traffic list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicates if there are more traffic list after the currently displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTraffic `json:"list,omitempty"`
// RawDataTotalCount
// Total traffic count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total of traffic list count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficQueryResultList
}
func newSwitchMTrafficQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficQueryResultList() *SwitchMTrafficQueryResultList {
m := new(SwitchMTrafficQueryResultList)
return m
}
// SwitchMTrafficUsage
//
// Definition: traffic_trafficUsage
type SwitchMTrafficUsage struct {
// Id
// Identifier of the Traffic Usage
Id *string `json:"id,omitempty"`
// Key
// Interface of the Traffic Usage
Key *string `json:"key,omitempty"`
// Value
// Total Tx and Rx of Traffic Usage
Value *float64 `json:"value,omitempty"`
}
func NewSwitchMTrafficUsage() *SwitchMTrafficUsage {
m := new(SwitchMTrafficUsage)
return m
}
// SwitchMTrafficUnicast
//
// Definition: traffic_unicast
type SwitchMTrafficUnicast struct {
Timestamp *string `json:"timestamp,omitempty"`
Total *int `json:"total,omitempty"`
UnicastIn *string `json:"unicastIn,omitempty"`
UnicastOut *string `json:"unicastOut,omitempty"`
}
func NewSwitchMTrafficUnicast() *SwitchMTrafficUnicast {
m := new(SwitchMTrafficUnicast)
return m
}
// SwitchMTrafficUnicastQueryResultList
//
// Definition: traffic_unicastQueryResultList
type SwitchMTrafficUnicastQueryResultList struct {
Extra interface{} `json:"extra,omitempty"`
FirstIndex *int `json:"firstIndex,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMTrafficUnicast `json:"list,omitempty"`
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMTrafficUnicastQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMTrafficUnicastQueryResultList
}
func newSwitchMTrafficUnicastQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMTrafficUnicastQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMTrafficUnicastQueryResultListAPIResponse) Hydrate() (interface{}, error) {
r.mu.Lock()
defer r.mu.Unlock()
if r.err != nil {
if errors.Is(r.err, ErrResponseHydrated) {
return r.Data, nil
}
return nil, r.err
}
data := new(SwitchMTrafficUnicastQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMTrafficUnicastQueryResultList() *SwitchMTrafficUnicastQueryResultList {
m := new(SwitchMTrafficUnicastQueryResultList)
return m
}
// AddTrafficTopPoeutilization
//
// Use this API command retrieve the top 10 switches by the PoE utilization.
//
// Operation ID: addTrafficTopPoeutilization
// Operation path: /traffic/top/poeutilization
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTopPoeutilization(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficTopSwitchPoEUtilizationQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficTopSwitchPoEUtilizationQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTopPoeutilization, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficTopSwitchPoEUtilizationQueryResultListAPIResponse), err
}
// AddTrafficTopPorterror
//
// Use this API command to get the top 10 switches by the porterror.
//
// Operation ID: addTrafficTopPorterror
// Operation path: /traffic/top/porterror
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTopPorterror(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficTopPortErrorQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficTopPortErrorQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTopPorterror, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficTopPortErrorQueryResultListAPIResponse), err
}
// AddTrafficTopPortusage
//
// Use this API command to get the top 10 ports by the traffic.
//
// Operation ID: addTrafficTopPortusage
// Operation path: /traffic/top/portusage
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTopPortusage(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficTopPortTrafficUsageQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficTopPortTrafficUsageQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTopPortusage, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficTopPortTrafficUsageQueryResultListAPIResponse), err
}
// AddTrafficTopUsage
//
// Use this API command to retrieve Top Swich/Port usage data based on the time duration.
//
// Operation ID: addTrafficTopUsage
// Operation path: /traffic/top/usage
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTopUsage(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficTopTrafficUsageQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficTopTrafficUsageQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTopUsage, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficTopTrafficUsageQueryResultListAPIResponse), err
}
// AddTrafficTotalBroadcast
//
// Use this API command to retrieve Switch/Port Broadcast trend data based on the time duration.
//
// Operation ID: addTrafficTotalBroadcast
// Operation path: /traffic/total/broadcast
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTotalBroadcast(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficBroadcastQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficBroadcastQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTotalBroadcast, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficBroadcastQueryResultListAPIResponse), err
}
// AddTrafficTotalMulticast
//
// Use this API command to retrieve Switch/Port Multicast trend data based on the time duration.
//
// Operation ID: addTrafficTotalMulticast
// Operation path: /traffic/total/multicast
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTotalMulticast(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficMulticastQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficMulticastQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTotalMulticast, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficMulticastQueryResultListAPIResponse), err
}
// AddTrafficTotalPorterror
//
// Use this API command to retrieve Switch/Port Port Errors data based on the time duration.
//
// Operation ID: addTrafficTotalPorterror
// Operation path: /traffic/total/porterror
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTotalPorterror(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficPortErrorQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficPortErrorQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTotalPorterror, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficPortErrorQueryResultListAPIResponse), err
}
// AddTrafficTotalTrend
//
// Use this API command to retrieve Swich/Port trend data based on the time duration.
//
// Operation ID: addTrafficTotalTrend
// Operation path: /traffic/total/trend
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTotalTrend(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTotalTrend, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficQueryResultListAPIResponse), err
}
// AddTrafficTotalUnicast
//
// Use this API command to retrieve Switch/Port Unicast trend data based on the time duration.
//
// Operation ID: addTrafficTotalUnicast
// Operation path: /traffic/total/unicast
// Success code: 200 (OK)
//
// Request body:
// - body *SwitchMCommonQueryCriteriaSuperSet
func (s *SwitchMTrafficService) AddTrafficTotalUnicast(ctx context.Context, body *SwitchMCommonQueryCriteriaSuperSet, mutators ...RequestMutator) (*SwitchMTrafficUnicastQueryResultListAPIResponse, error) {
var (
req *APIRequest
httpResp *http.Response
execDur time.Duration
resp APIResponse
err error
respFn = newSwitchMTrafficUnicastQueryResultListAPIResponse
)
req = apiRequestFromPool(APISourceVSZ, http.MethodPost, RouteSwitchMAddTrafficTotalUnicast, true)
defer recycleAPIRequest(req)
req.Header.Set(headerKeyContentType, headerValueApplicationJSON)
req.Header.Set(headerKeyAccept, "*/*")
req.SetBody(body)
httpResp, execDur, err = s.apiClient.Do(ctx, req, mutators...)
resp, err = handleAPIResponse(req, http.StatusOK, httpResp, execDur, respFn, s.apiClient.autoHydrate, s.apiClient.ev, err)
return resp.(*SwitchMTrafficUnicastQueryResultListAPIResponse), err
}