-
Notifications
You must be signed in to change notification settings - Fork 0
/
switchm_switch.go
1742 lines (1466 loc) · 48.2 KB
/
switchm_switch.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
package bigdog
// API Version: v9_1
import (
"context"
"encoding/json"
"errors"
"io"
"net/http"
"time"
)
type SwitchMSwitchService struct {
apiClient *VSZClient
}
func NewSwitchMSwitchService(c *VSZClient) *SwitchMSwitchService {
s := new(SwitchMSwitchService)
s.apiClient = c
return s
}
func (ss *SwitchMService) SwitchMSwitchService() *SwitchMSwitchService {
return NewSwitchMSwitchService(ss.apiClient)
}
// SwitchMSwitchAuditId
//
// Definition: switch_auditId
type SwitchMSwitchAuditId struct {
// Id
// Audit Id
Id *string `json:"id,omitempty"`
// Name
// Audit name
Name *string `json:"name,omitempty"`
}
type SwitchMSwitchAuditIdAPIResponse struct {
*RawAPIResponse
Data *SwitchMSwitchAuditId
}
func newSwitchMSwitchAuditIdAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMSwitchAuditIdAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMSwitchAuditIdAPIResponse) 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(SwitchMSwitchAuditId)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMSwitchAuditId() *SwitchMSwitchAuditId {
m := new(SwitchMSwitchAuditId)
return m
}
// SwitchMSwitchBarChart
//
// Definition: switch_barChart
type SwitchMSwitchBarChart struct {
// Id
// Identifier of the barchart
Id *string `json:"id,omitempty"`
// Key
// Key of the barchart
Key *string `json:"key,omitempty"`
// Value
// Metrics of the barchart
Value *float64 `json:"value,omitempty"`
}
func NewSwitchMSwitchBarChart() *SwitchMSwitchBarChart {
m := new(SwitchMSwitchBarChart)
return m
}
// SwitchMSwitchConnectedAPsQueryList
//
// Definition: switch_connectedAPsQueryList
type SwitchMSwitchConnectedAPsQueryList struct {
// Extra
// Any additional response data
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first switch connected AP returned out of the complete list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicator of whether there are more switch connected AP after the current displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMSwitchConnectedDevice `json:"list,omitempty"`
// RawDataTotalCount
// Connected AP list count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total connected AP list count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMSwitchConnectedAPsQueryListAPIResponse struct {
*RawAPIResponse
Data *SwitchMSwitchConnectedAPsQueryList
}
func newSwitchMSwitchConnectedAPsQueryListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMSwitchConnectedAPsQueryListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMSwitchConnectedAPsQueryListAPIResponse) 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(SwitchMSwitchConnectedAPsQueryList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMSwitchConnectedAPsQueryList() *SwitchMSwitchConnectedAPsQueryList {
m := new(SwitchMSwitchConnectedAPsQueryList)
return m
}
// SwitchMSwitchConnectedDevice
//
// Definition: switch_connectedDevice
type SwitchMSwitchConnectedDevice struct {
// DomainId
// Identifier of the management domain to which the connected device belong
DomainId *string `json:"domainId,omitempty"`
// Id
// Identifier of connected device
Id *string `json:"id,omitempty"`
// IsRuckusAP
// Remote connected device is Ruckus AP, True or False.
IsRuckusAP *string `json:"isRuckusAP,omitempty"`
// LocalPort
// Local port which connect to remote device
LocalPort *string `json:"localPort,omitempty"`
// LocalPortIfaceName
// Local port interface name
LocalPortIfaceName *string `json:"localPortIfaceName,omitempty"`
// LocalPortMac
// Local port mac address
LocalPortMac *string `json:"localPortMac,omitempty"`
RemoteDeviceMac *string `json:"remoteDeviceMac,omitempty"`
// RemoteDeviceName
// Remote connected device name
RemoteDeviceName *string `json:"remoteDeviceName,omitempty"`
// RemotePort
// Remote device port which connected to local device
RemotePort *string `json:"remotePort,omitempty"`
// RemotePortDesc
// Remote connected device port description
RemotePortDesc *string `json:"remotePortDesc,omitempty"`
// RemotePortMac
// Remote connected device port mac address
RemotePortMac *string `json:"remotePortMac,omitempty"`
// RemotePortType
// Remote connected device port type
RemotePortType *string `json:"remotePortType,omitempty"`
// SampledInstant
// Sampled instant
SampledInstant interface{} `json:"sampledInstant,omitempty"`
// SwitchGroup
// Switch group
SwitchGroup *string `json:"switchGroup,omitempty"`
// SwitchGroupLevelOneId
// Switch group level one Id
SwitchGroupLevelOneId *string `json:"switchGroupLevelOneId,omitempty"`
// SwitchGroupLevelTwoId
// Switch group level two Id
SwitchGroupLevelTwoId *string `json:"switchGroupLevelTwoId,omitempty"`
// SwitchId
// Switch Id
SwitchId *string `json:"switchId,omitempty"`
// SwitchName
// Switch name
SwitchName *string `json:"switchName,omitempty"`
// TenantId
// Tenant Id
TenantId *string `json:"tenantId,omitempty"`
// UnitId
// Unit Id
UnitId *string `json:"unitId,omitempty"`
}
func NewSwitchMSwitchConnectedDevice() *SwitchMSwitchConnectedDevice {
m := new(SwitchMSwitchConnectedDevice)
return m
}
// SwitchMSwitchConnectedDevicesQueryList
//
// Definition: switch_connectedDevicesQueryList
type SwitchMSwitchConnectedDevicesQueryList struct {
// Extra
// Any additional response data
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first switch connected devices returned out of the complete list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicator of whether there are more switch connected devices after the current displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMSwitchConnectedDevice `json:"list,omitempty"`
// RawDataTotalCount
// Connected devices list count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total connected devices list count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMSwitchConnectedDevicesQueryListAPIResponse struct {
*RawAPIResponse
Data *SwitchMSwitchConnectedDevicesQueryList
}
func newSwitchMSwitchConnectedDevicesQueryListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMSwitchConnectedDevicesQueryListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMSwitchConnectedDevicesQueryListAPIResponse) 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(SwitchMSwitchConnectedDevicesQueryList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMSwitchConnectedDevicesQueryList() *SwitchMSwitchConnectedDevicesQueryList {
m := new(SwitchMSwitchConnectedDevicesQueryList)
return m
}
// SwitchMSwitchDeleteSwitchesResultList
//
// Definition: switch_deleteSwitchesResultList
type SwitchMSwitchDeleteSwitchesResultList struct {
// Extra
// Any additional response data
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first delete switches returned out of the complete list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicator of whether there are more delete switches after the current displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMSwitchAuditId `json:"list,omitempty"`
// RawDataTotalCount
// Delete switches list count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total delete switches list count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMSwitchDeleteSwitchesResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMSwitchDeleteSwitchesResultList
}
func newSwitchMSwitchDeleteSwitchesResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMSwitchDeleteSwitchesResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMSwitchDeleteSwitchesResultListAPIResponse) 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(SwitchMSwitchDeleteSwitchesResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMSwitchDeleteSwitchesResultList() *SwitchMSwitchDeleteSwitchesResultList {
m := new(SwitchMSwitchDeleteSwitchesResultList)
return m
}
// SwitchMSwitchFirmware
//
// Definition: switch_firmware
type SwitchMSwitchFirmware struct {
// FromVersion
// Original fireware version before firmware update
FromVersion *string `json:"fromVersion,omitempty"`
// Timestamp
// Timestamp of fireware update
Timestamp *float64 `json:"timestamp,omitempty"`
// ToVersion
// Firmware version after firmware update
ToVersion *string `json:"toVersion,omitempty"`
}
func NewSwitchMSwitchFirmware() *SwitchMSwitchFirmware {
m := new(SwitchMSwitchFirmware)
return m
}
// SwitchMSwitchFirmwareHistoryQueryResultList
//
// Definition: switch_firmwareHistoryQueryResultList
type SwitchMSwitchFirmwareHistoryQueryResultList struct {
// Extra
// Any additional response data
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first firmware history returned out of the complete query list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicator of whether there are more firmware history after the current displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMSwitchFirmware `json:"list,omitempty"`
// RawDataTotalCount
// Firmware history list count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total firmware history list count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMSwitchFirmwareHistoryQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMSwitchFirmwareHistoryQueryResultList
}
func newSwitchMSwitchFirmwareHistoryQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMSwitchFirmwareHistoryQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMSwitchFirmwareHistoryQueryResultListAPIResponse) 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(SwitchMSwitchFirmwareHistoryQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMSwitchFirmwareHistoryQueryResultList() *SwitchMSwitchFirmwareHistoryQueryResultList {
m := new(SwitchMSwitchFirmwareHistoryQueryResultList)
return m
}
// SwitchMSwitchNetworkSwitch
//
// Definition: switch_networkSwitch
type SwitchMSwitchNetworkSwitch struct {
// Alarm
// Count of switch alarm
Alarm *int `json:"alarm,omitempty"`
// DefaultGateway
// Default gateway of switch
DefaultGateway *string `json:"defaultGateway,omitempty"`
// DomainId
// Identifier of the management domain to which the switch belong
DomainId *string `json:"domainId,omitempty"`
// Family
// Switch Model Family
Family *string `json:"family,omitempty"`
// FirmwareUpdate
// Information of firmware update
FirmwareUpdate *SwitchMSwitchNetworkSwitchFirmwareUpdateType `json:"firmwareUpdate,omitempty"`
// FirmwareVersion
// Switch firmware version
FirmwareVersion *string `json:"firmwareVersion,omitempty"`
// GroupFirmware
// Firmware of switch group
GroupFirmware *string `json:"groupFirmware,omitempty"`
// GroupId
// Identifier of switch group
GroupId *string `json:"groupId,omitempty"`
// GroupName
// Name of switch group
GroupName *string `json:"groupName,omitempty"`
// Id
// Identifier of switch
Id *string `json:"id,omitempty"`
// IpAddress
// switch IP address
IpAddress *string `json:"ipAddress,omitempty"`
// IpAddressType
// IP address type
IpAddressType *string `json:"ipAddressType,omitempty"`
// LastBackupStatus
// Last config backup status of switch
// Constraints:
// - oneof:[STARTED,SUCCESS,FAILED]
LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
// LastBackupTime
// Last config backup time of switch
LastBackupTime *int `json:"lastBackupTime,omitempty"`
// LastRestoreStatus
// Last config restore status of switch
// Constraints:
// - oneof:[STARTED,SUCCESS,FAILED]
LastRestoreStatus *string `json:"lastRestoreStatus,omitempty"`
// LastRestoreTime
// Last config restore time of switch
LastRestoreTime *int `json:"lastRestoreTime,omitempty"`
// MacAddress
// Switch mac address
MacAddress *string `json:"macAddress,omitempty"`
// Model
// Switch model
Model *string `json:"model,omitempty"`
// Modules
// Stack or Switch
Modules *string `json:"modules,omitempty"`
// NumOfUnits
// Count of switch unit
NumOfUnits *int `json:"numOfUnits,omitempty"`
// ParentGroupId
// Identifier of parent switch group
ParentGroupId *string `json:"parentGroupId,omitempty"`
// Poe
// Information of PoE
Poe *SwitchMSwitchNetworkSwitchPoeType `json:"poe,omitempty"`
// Ports
// Total port count
Ports *int `json:"ports,omitempty"`
// PortStatus
// Information of port status
PortStatus *SwitchMSwitchNetworkSwitchPortStatusType `json:"portStatus,omitempty"`
// RegistrationStatus
// Status for switch registater to ICX-M
RegistrationStatus *string `json:"registrationStatus,omitempty"`
// SerialNumber
// SWitch serial number
SerialNumber *string `json:"serialNumber,omitempty"`
// StackId
// Stack Id
StackId *string `json:"stackId,omitempty"`
// Status
// Status of switch, Ex: ONLINE, OFFLINE
Status *string `json:"status,omitempty"`
SupportedCsl *int `json:"supportedCsl,omitempty"`
// SwitchName
// Switch name
SwitchName *string `json:"switchName,omitempty"`
// UpTime
// SWitch uptime
UpTime *string `json:"upTime,omitempty"`
}
type SwitchMSwitchNetworkSwitchAPIResponse struct {
*RawAPIResponse
Data *SwitchMSwitchNetworkSwitch
}
func newSwitchMSwitchNetworkSwitchAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMSwitchNetworkSwitchAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMSwitchNetworkSwitchAPIResponse) 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(SwitchMSwitchNetworkSwitch)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMSwitchNetworkSwitch() *SwitchMSwitchNetworkSwitch {
m := new(SwitchMSwitchNetworkSwitch)
return m
}
// SwitchMSwitchNetworkSwitchFirmwareUpdateType
//
// Definition: switch_networkSwitchFirmwareUpdateType
//
// Information of firmware update
type SwitchMSwitchNetworkSwitchFirmwareUpdateType struct {
// ModifiedTime
// Modified time of the firmware update scheduled
ModifiedTime *string `json:"modifiedTime,omitempty"`
// ScheduledTime
// Scheduled time of firmware update
ScheduledTime *string `json:"scheduledTime,omitempty"`
// ScheduleId
// Schedule Id of firmware update
ScheduleId *string `json:"scheduleId,omitempty"`
// Status
// Status of firmware update
Status *string `json:"status,omitempty"`
// ToVersion
// Update to which firmware version
ToVersion *string `json:"toVersion,omitempty"`
}
func NewSwitchMSwitchNetworkSwitchFirmwareUpdateType() *SwitchMSwitchNetworkSwitchFirmwareUpdateType {
m := new(SwitchMSwitchNetworkSwitchFirmwareUpdateType)
return m
}
// SwitchMSwitchNetworkSwitchPoeType
//
// Definition: switch_networkSwitchPoeType
//
// Information of PoE
type SwitchMSwitchNetworkSwitchPoeType struct {
// Free
// Free power capacity of a switch
Free *int `json:"free,omitempty"`
// Percent
// Percentage of power usage for a switch
Percent *float64 `json:"percent,omitempty"`
// Total
// Total power capacity of a switch
Total *int `json:"total,omitempty"`
}
func NewSwitchMSwitchNetworkSwitchPoeType() *SwitchMSwitchNetworkSwitchPoeType {
m := new(SwitchMSwitchNetworkSwitchPoeType)
return m
}
// SwitchMSwitchNetworkSwitchPortStatusType
//
// Definition: switch_networkSwitchPortStatusType
//
// Information of port status
type SwitchMSwitchNetworkSwitchPortStatusType struct {
// AdminDown
// Count for port status is admin down of switch
AdminDown *int `json:"adminDown,omitempty"`
// Down
// Count for port status is down of switch
Down *int `json:"down,omitempty"`
// Speed
// Port speed of switch
Speed *string `json:"speed,omitempty"`
// SpeedInt
// Switch port fully speed
SpeedInt *int `json:"speedInt,omitempty"`
// Total
// Total count for port status of switch
Total *int `json:"total,omitempty"`
// Up
// Count for port status is up of switch
Up *int `json:"up,omitempty"`
// Warning
// Count for port status is warring of switch
Warning *int `json:"warning,omitempty"`
}
func NewSwitchMSwitchNetworkSwitchPortStatusType() *SwitchMSwitchNetworkSwitchPortStatusType {
m := new(SwitchMSwitchNetworkSwitchPortStatusType)
return m
}
// SwitchMSwitchPortDetails
//
// Definition: switch_portDetails
type SwitchMSwitchPortDetails struct {
// AdminStatus
// Admin status of switch port, UP or DOWN
AdminStatus *string `json:"adminStatus,omitempty"`
// ConnectedDevice
// Connected device information
ConnectedDevice []*SwitchMSwitchConnectedDevice `json:"connectedDevice,omitempty"`
// Id
// Identifier of switch port
Id *string `json:"id,omitempty"`
// InUtilization
// Switch port traffic in utilization
InUtilization *float64 `json:"inUtilization,omitempty"`
// LagName
// LAG name of switch port
LagName *string `json:"lagName,omitempty"`
// Mac
// Mac address of switch port
Mac *string `json:"mac,omitempty"`
// Name
// Name of switch port
Name *string `json:"name,omitempty"`
// NeighborName
// Switch port connected neighbor name
NeighborName *string `json:"neighborName,omitempty"`
// OpticsType
// Switch port optics type
OpticsType *string `json:"opticsType,omitempty"`
// OutUtilization
// Switch port traffic out utilization
OutUtilization *float64 `json:"outUtilization,omitempty"`
// Packets
// Port packet transmit information
Packets *SwitchMSwitchPortDetailsPacketsType `json:"packets,omitempty"`
// Poe
// PoE information of switch port
Poe *SwitchMSwitchPortDetailsPoeType `json:"poe,omitempty"`
// PoeEnabled
// PoE Enabled, True or False
PoeEnabled *bool `json:"poeEnabled,omitempty"`
// PoeType
// PoE type
PoeType *string `json:"poeType,omitempty"`
// PortError
// Port error Information
PortError *SwitchMSwitchPortDetailsPortErrorType `json:"portError,omitempty"`
// PortIdentifier
// Port Identifier of switch port
PortIdentifier *string `json:"portIdentifier,omitempty"`
// PortSpeed
// Switch port speed
PortSpeed *string `json:"portSpeed,omitempty"`
// SampledInstant
// Sampled instant of switch port
SampledInstant *string `json:"sampledInstant,omitempty"`
// Status
// Status of switch port, UP or DOWN
Status *string `json:"status,omitempty"`
// StpState
// Switch port STP state
StpState *int `json:"stpState,omitempty"`
SwitchFamily *string `json:"switchFamily,omitempty"`
// SwitchGroup
// Switch group of switch port
SwitchGroup *string `json:"switchGroup,omitempty"`
SwitchId *string `json:"switchId,omitempty"`
SwitchModel *string `json:"switchModel,omitempty"`
// SwitchName
// Switch Name of switch port
SwitchName *string `json:"switchName,omitempty"`
// TrafficUsage
// Traffic usage information
TrafficUsage *SwitchMSwitchPortDetailsTrafficUsageType `json:"trafficUsage,omitempty"`
// Type
// Type of switch port
Type *string `json:"type,omitempty"`
// UnTaggedVlan
// Untagged vlan of switch port
UnTaggedVlan *string `json:"unTaggedVlan,omitempty"`
// UsedInFormingStack
// Used in forming stack, True or False
UsedInFormingStack *bool `json:"usedInFormingStack,omitempty"`
// Vlans
// Switch port include vlans
Vlans *string `json:"vlans,omitempty"`
}
func NewSwitchMSwitchPortDetails() *SwitchMSwitchPortDetails {
m := new(SwitchMSwitchPortDetails)
return m
}
// SwitchMSwitchPortDetailsPacketsType
//
// Definition: switch_portDetailsPacketsType
//
// Port packet transmit information
type SwitchMSwitchPortDetailsPacketsType struct {
// BroadcastIn
// Switch port broadcast in packet count
BroadcastIn *int `json:"broadcastIn,omitempty"`
// BroadcastOut
// Switch port broadcast out packet count
BroadcastOut *int `json:"broadcastOut,omitempty"`
// MulticastIn
// Switch port multicast in packet count
MulticastIn *int `json:"multicastIn,omitempty"`
// MulticastOut
// Switch port multicast out packet count
MulticastOut *int `json:"multicastOut,omitempty"`
}
func NewSwitchMSwitchPortDetailsPacketsType() *SwitchMSwitchPortDetailsPacketsType {
m := new(SwitchMSwitchPortDetailsPacketsType)
return m
}
// SwitchMSwitchPortDetailsPoeType
//
// Definition: switch_portDetailsPoeType
//
// PoE information of switch port
type SwitchMSwitchPortDetailsPoeType struct {
// Free
// Free power capacity of switch port
Free *int `json:"free,omitempty"`
// Percent
// Power used percentage of switch port
Percent *float64 `json:"percent,omitempty"`
// Total
// Total power capacity of switch port
Total *int `json:"total,omitempty"`
}
func NewSwitchMSwitchPortDetailsPoeType() *SwitchMSwitchPortDetailsPoeType {
m := new(SwitchMSwitchPortDetailsPoeType)
return m
}
// SwitchMSwitchPortDetailsPortErrorType
//
// Definition: switch_portDetailsPortErrorType
//
// Port error Information
type SwitchMSwitchPortDetailsPortErrorType struct {
// CrcError
// Switch port CRC error count
CrcError *int `json:"crcError,omitempty"`
// InDiscard
// Switch port traffic in discard count
InDiscard *int `json:"inDiscard,omitempty"`
// InError
// Switch port traffic in error count
InError *int `json:"inError,omitempty"`
// OutError
// Switch port traffic out error count
OutError *int `json:"outError,omitempty"`
}
func NewSwitchMSwitchPortDetailsPortErrorType() *SwitchMSwitchPortDetailsPortErrorType {
m := new(SwitchMSwitchPortDetailsPortErrorType)
return m
}
// SwitchMSwitchPortDetailsQueryResultList
//
// Definition: switch_portDetailsQueryResultList
type SwitchMSwitchPortDetailsQueryResultList struct {
// Extra
// Any additional response data
Extra interface{} `json:"extra,omitempty"`
// FirstIndex
// Index of the first switch port detail returned out of the complete list
FirstIndex *int `json:"firstIndex,omitempty"`
// HasMore
// Indicator of whether there are more switch port detail after the current displayed list
HasMore *bool `json:"hasMore,omitempty"`
List []*SwitchMSwitchPortDetails `json:"list,omitempty"`
// RawDataTotalCount
// Switch port detail list count
RawDataTotalCount *int `json:"rawDataTotalCount,omitempty"`
// TotalCount
// Total switch port detail list count
TotalCount *int `json:"totalCount,omitempty"`
}
type SwitchMSwitchPortDetailsQueryResultListAPIResponse struct {
*RawAPIResponse
Data *SwitchMSwitchPortDetailsQueryResultList
}
func newSwitchMSwitchPortDetailsQueryResultListAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMSwitchPortDetailsQueryResultListAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMSwitchPortDetailsQueryResultListAPIResponse) 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(SwitchMSwitchPortDetailsQueryResultList)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMSwitchPortDetailsQueryResultList() *SwitchMSwitchPortDetailsQueryResultList {
m := new(SwitchMSwitchPortDetailsQueryResultList)
return m
}
// SwitchMSwitchPortDetailsTrafficUsageType
//
// Definition: switch_portDetailsTrafficUsageType
//
// Traffic usage information
type SwitchMSwitchPortDetailsTrafficUsageType struct {
// Rx
// Rx traffic usage of switch port
Rx *int `json:"rx,omitempty"`
// Tx
// Tx traffic usage of switch port
Tx *int `json:"tx,omitempty"`
}
func NewSwitchMSwitchPortDetailsTrafficUsageType() *SwitchMSwitchPortDetailsTrafficUsageType {
m := new(SwitchMSwitchPortDetailsTrafficUsageType)
return m
}
// SwitchMSwitchPortStatus
//
// Definition: switch_portStatus
//
// $
type SwitchMSwitchPortStatus struct {
// AdminDown
// Admin down port count
AdminDown *int `json:"adminDown,omitempty"`
// Down
// Down port count
Down *int `json:"down,omitempty"`
// Speed
// Switch port speed
Speed *string `json:"speed,omitempty"`