-
Notifications
You must be signed in to change notification settings - Fork 0
/
switchm_common.go
489 lines (395 loc) · 14.6 KB
/
switchm_common.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
package bigdog
// API Version: v9_1
import (
"errors"
"io"
)
// SwitchMCommonBulkDeleteRequest
//
// Definition: common_bulkDeleteRequest
type SwitchMCommonBulkDeleteRequest struct {
IdList SwitchMCommonIdList `json:"idList,omitempty"`
}
func NewSwitchMCommonBulkDeleteRequest() *SwitchMCommonBulkDeleteRequest {
m := new(SwitchMCommonBulkDeleteRequest)
return m
}
// SwitchMCommonCreateResult
//
// Definition: common_createResult
type SwitchMCommonCreateResult struct {
Id *string `json:"id,omitempty"`
}
type SwitchMCommonCreateResultAPIResponse struct {
*RawAPIResponse
Data *SwitchMCommonCreateResult
}
func newSwitchMCommonCreateResultAPIResponse(src APISource, meta APIResponseMeta, body io.ReadCloser) APIResponse {
r := new(SwitchMCommonCreateResultAPIResponse)
r.RawAPIResponse = newRawAPIResponse(src, meta, body).(*RawAPIResponse)
return r
}
func (r *SwitchMCommonCreateResultAPIResponse) 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(SwitchMCommonCreateResult)
if err := r.doHydrate(data); err != nil {
return nil, err
}
r.Data = data
return r.Data, nil
}
func NewSwitchMCommonCreateResult() *SwitchMCommonCreateResult {
m := new(SwitchMCommonCreateResult)
return m
}
// SwitchMCommonFilterOperator
//
// Definition: common_filterOperator
//
// Constraints:
// - oneof:[eq,gt,lt,gte,lte]
type SwitchMCommonFilterOperator string
func NewSwitchMCommonFilterOperator() *SwitchMCommonFilterOperator {
m := new(SwitchMCommonFilterOperator)
return m
}
// SwitchMCommonFullTextSearch
//
// Definition: common_fullTextSearch
type SwitchMCommonFullTextSearch struct {
// Fields
// Specific fields to search
Fields []string `json:"fields,omitempty"`
// Type
// Search logic operator
// Constraints:
// - oneof:[AND,OR]
Type *string `json:"type,omitempty"`
// Value
// Text or number to search
Value *string `json:"value,omitempty"`
}
func NewSwitchMCommonFullTextSearch() *SwitchMCommonFullTextSearch {
m := new(SwitchMCommonFullTextSearch)
return m
}
// SwitchMCommonIdList
//
// Definition: common_idList
type SwitchMCommonIdList []string
func MakeSwitchMCommonIdList() SwitchMCommonIdList {
m := make(SwitchMCommonIdList, 0)
return m
}
// SwitchMCommonQueryCriteria
//
// Definition: common_queryCriteria
type SwitchMCommonQueryCriteria struct {
// Attributes
// Get specific columns only
Attributes []string `json:"attributes,omitempty"`
// Criteria
// Add backward compatibility for UI framework
Criteria *string `json:"criteria,omitempty"`
// ExpandDomains
// Whether to expand domains into sub domains/ zones or not
ExpandDomains *bool `json:"expandDomains,omitempty"`
// ExtraFilters
// "AND" condition for multiple filters
ExtraFilters []*SwitchMCommonQueryCriteriaExtraFiltersType `json:"extraFilters,omitempty"`
// ExtraNotFilters
// "NOT" condition for multiple filters
ExtraNotFilters []*SwitchMCommonQueryCriteriaExtraNotFiltersType `json:"extraNotFilters,omitempty"`
ExtraTimeRange *SwitchMCommonTimeRange `json:"extraTimeRange,omitempty"`
// Filters
// Filters used to select specific resource scope
Filters []*SwitchMCommonQueryCriteriaFiltersType `json:"filters,omitempty"`
FullTextSearch *SwitchMCommonFullTextSearch `json:"fullTextSearch,omitempty"`
// Limit
// Size of one page
// Constraints:
// - min:1
Limit *int `json:"limit,omitempty"`
// Options
// Specified feature required information
Options interface{} `json:"options,omitempty"`
// Page
// Page number to get
// Constraints:
// - min:1
Page *int `json:"page,omitempty"`
// Query
// Add backward compatibility for UI framework
Query *string `json:"query,omitempty"`
// SortInfo
// About sorting
SortInfo *SwitchMCommonQueryCriteriaSortInfoType `json:"sortInfo,omitempty"`
}
func NewSwitchMCommonQueryCriteria() *SwitchMCommonQueryCriteria {
m := new(SwitchMCommonQueryCriteria)
return m
}
// SwitchMCommonQueryCriteriaExtraFiltersType
//
// Definition: common_queryCriteriaExtraFiltersType
type SwitchMCommonQueryCriteriaExtraFiltersType struct {
Operator *SwitchMCommonFilterOperator `json:"operator,omitempty"`
// Type
// Filters for specific attributes
Type *string `json:"type,omitempty"`
// Value
// value to search
Value *string `json:"value,omitempty"`
}
func NewSwitchMCommonQueryCriteriaExtraFiltersType() *SwitchMCommonQueryCriteriaExtraFiltersType {
m := new(SwitchMCommonQueryCriteriaExtraFiltersType)
return m
}
// SwitchMCommonQueryCriteriaExtraNotFiltersType
//
// Definition: common_queryCriteriaExtraNotFiltersType
type SwitchMCommonQueryCriteriaExtraNotFiltersType struct {
// Type
// Filters for specific attribute
Type *string `json:"type,omitempty"`
// Value
// value not to search
Value *string `json:"value,omitempty"`
}
func NewSwitchMCommonQueryCriteriaExtraNotFiltersType() *SwitchMCommonQueryCriteriaExtraNotFiltersType {
m := new(SwitchMCommonQueryCriteriaExtraNotFiltersType)
return m
}
// SwitchMCommonQueryCriteriaFiltersType
//
// Definition: common_queryCriteriaFiltersType
type SwitchMCommonQueryCriteriaFiltersType struct {
Operator *SwitchMCommonFilterOperator `json:"operator,omitempty"`
// Type
// Group type
Type *string `json:"type,omitempty"`
// Value
// Group ID
Value *string `json:"value,omitempty"`
}
func NewSwitchMCommonQueryCriteriaFiltersType() *SwitchMCommonQueryCriteriaFiltersType {
m := new(SwitchMCommonQueryCriteriaFiltersType)
return m
}
// SwitchMCommonQueryCriteriaSortInfoType
//
// Definition: common_queryCriteriaSortInfoType
//
// About sorting
type SwitchMCommonQueryCriteriaSortInfoType struct {
// Dir
// Constraints:
// - oneof:[ASC,DESC]
Dir *string `json:"dir,omitempty"`
SortColumn *string `json:"sortColumn,omitempty"`
}
func NewSwitchMCommonQueryCriteriaSortInfoType() *SwitchMCommonQueryCriteriaSortInfoType {
m := new(SwitchMCommonQueryCriteriaSortInfoType)
return m
}
// SwitchMCommonQueryCriteriaSuperSet
//
// Definition: common_queryCriteriaSuperSet
type SwitchMCommonQueryCriteriaSuperSet struct {
// Attributes
// Get specific columns only
Attributes []string `json:"attributes,omitempty"`
// Criteria
// Add backward compatibility for UI framework
Criteria *string `json:"criteria,omitempty"`
// ExpandDomains
// Whether to expand domains into sub domains/ zones or not
ExpandDomains *bool `json:"expandDomains,omitempty"`
// ExtraFilters
// "AND" condition for multiple filters
ExtraFilters []*SwitchMCommonQueryCriteriaSuperSetExtraFiltersType `json:"extraFilters,omitempty"`
// ExtraNotFilters
// "NOT" condition for multiple filters
ExtraNotFilters []*SwitchMCommonQueryCriteriaSuperSetExtraNotFiltersType `json:"extraNotFilters,omitempty"`
ExtraTimeRange *SwitchMCommonTimeRange `json:"extraTimeRange,omitempty"`
// Filters
// Filters used to select specific resource scope
Filters []*SwitchMCommonQueryCriteriaSuperSetFiltersType `json:"filters,omitempty"`
FullTextSearch *SwitchMCommonFullTextSearch `json:"fullTextSearch,omitempty"`
// Limit
// Size of one page
// Constraints:
// - min:1
Limit *int `json:"limit,omitempty"`
// Options
// Specified feature required informaion
Options *SwitchMCommonQueryCriteriaSuperSetOptionsType `json:"options,omitempty"`
// Page
// Page number to get
// Constraints:
// - min:1
Page *int `json:"page,omitempty"`
// Query
// Add backward compatibility for UI framework
Query *string `json:"query,omitempty"`
// SortInfo
// About sorting
SortInfo *SwitchMCommonQueryCriteriaSortInfoType `json:"sortInfo,omitempty"`
}
func NewSwitchMCommonQueryCriteriaSuperSet() *SwitchMCommonQueryCriteriaSuperSet {
m := new(SwitchMCommonQueryCriteriaSuperSet)
return m
}
// SwitchMCommonQueryCriteriaSuperSetExtraFiltersType
//
// Definition: common_queryCriteriaSuperSetExtraFiltersType
type SwitchMCommonQueryCriteriaSuperSetExtraFiltersType struct {
Operator *SwitchMCommonFilterOperator `json:"operator,omitempty"`
// Type
// Filters for specific attribute
// Constraints:
// - oneof:[CONTROLBLADE,DATABLADE,DOMAIN,ZONE,THIRD_PARTY_ZONE,APGROUP,WLANGROUP,INDOORMAP,AP,WLAN,ProtocolType,TIMERANGE,RADIOID,WLANID,CATEGORY,CLIENT,CP,DP,CLUSTER,NODE,BLADE,SYNCEDSTATUS,OSTYPE,APP,PORT,STATUS,REGISTRATIONSTATE,GATEWAY,APIPADDRESS,CLIENTIPADDRESS,SEVERITY,ACKNOWLEDGED,MVNOID,USER,USERID,WLANNAME,AUDITIPADDRESS,AUDITUSERUUID,AUDITOBJECT,AUDITACTION,AUDITTENANTUUID,AUDITOBJECTUUID,AUTHTYPE,AUDITTYPE,H20SuppportEnabled,AaaSuppportEnabled,GppSuppportEnabled,Type,RogueMac,SSID,ALARMSTATE,DEVICENAME,SWITCH,SWITCH_GROUP,ZoneAffinityProfileId,FIRMWARE_TYPE,SCHEDULED_TIME,VLAN,FAMILY_ID,SWITCH_ID,transactionId,hasLayerThreeConfig,clientAuthType,clientIpv4Addr,clientIpv6Addr,clientMac,clientUserName,switchName,ADMIN_STATUS,PORT_STATUS,POE_ENABLED]
Type *string `json:"type,omitempty"`
// Value
// Value to search
Value *string `json:"value,omitempty"`
}
func NewSwitchMCommonQueryCriteriaSuperSetExtraFiltersType() *SwitchMCommonQueryCriteriaSuperSetExtraFiltersType {
m := new(SwitchMCommonQueryCriteriaSuperSetExtraFiltersType)
return m
}
// SwitchMCommonQueryCriteriaSuperSetExtraNotFiltersType
//
// Definition: common_queryCriteriaSuperSetExtraNotFiltersType
type SwitchMCommonQueryCriteriaSuperSetExtraNotFiltersType struct {
// Type
// Filters for specific attribute
// Constraints:
// - oneof:[CONTROLBLADE,DATABLADE,DOMAIN,ZONE,THIRD_PARTY_ZONE,APGROUP,WLANGROUP,INDOORMAP,AP,WLAN,ProtocolType,TIMERANGE,RADIOID,WLANID,CATEGORY,CLIENT,CP,DP,CLUSTER,NODE,BLADE,SYNCEDSTATUS,OSTYPE,APP,PORT,STATUS,REGISTRATIONSTATE,GATEWAY,APIPADDRESS,CLIENTIPADDRESS,SEVERITY,ACKNOWLEDGED,MVNOID,USER,USERID,WLANNAME,AUDITIPADDRESS,AUDITUSERUUID,AUDITOBJECT,AUDITACTION,AUDITTENANTUUID,AUDITOBJECTUUID,AUTHTYPE,AUDITTYPE,H20SuppportEnabled,AaaSuppportEnabled,GppSuppportEnabled,Type,RogueMac,SSID,ALARMSTATE,DEVICENAME,SWITCH,ZoneAffinityProfileId,FIRMWARE_TYPE,SCHEDULED_TIME,VLAN,FAMILY_ID,SWITCH_ID,switchStatus.alerts,switchStatus.status,transactionId,hasLayerThreeConfig]
Type *string `json:"type,omitempty"`
// Value
// Value not to search
Value *string `json:"value,omitempty"`
}
func NewSwitchMCommonQueryCriteriaSuperSetExtraNotFiltersType() *SwitchMCommonQueryCriteriaSuperSetExtraNotFiltersType {
m := new(SwitchMCommonQueryCriteriaSuperSetExtraNotFiltersType)
return m
}
// SwitchMCommonQueryCriteriaSuperSetFiltersType
//
// Definition: common_queryCriteriaSuperSetFiltersType
type SwitchMCommonQueryCriteriaSuperSetFiltersType struct {
Operator *SwitchMCommonFilterOperator `json:"operator,omitempty"`
// Type
// Group type
// Constraints:
// - oneof:[SYSTEM,CATEGORY,CONTROLBLADE,DATABLADE,DOMAIN,ZONE,THIRD_PARTY_ZONE,APGROUP,WLANGROUP,INDOORMAP,AP,WLAN,BLADE,SYNCEDSTATUS,REGISTRATIONSTATE,STATUS,SWITCH_GROUP,FAMILY_ID,PORT,SWITCH_ID_PORT_IDENTIFIER]
Type *string `json:"type,omitempty"`
// Value
// Group ID
Value *string `json:"value,omitempty"`
}
func NewSwitchMCommonQueryCriteriaSuperSetFiltersType() *SwitchMCommonQueryCriteriaSuperSetFiltersType {
m := new(SwitchMCommonQueryCriteriaSuperSetFiltersType)
return m
}
// SwitchMCommonQueryCriteriaSuperSetOptionsType
//
// Definition: common_queryCriteriaSuperSetOptionsType
//
// Specified feature required informaion
type SwitchMCommonQueryCriteriaSuperSetOptionsType struct {
// AcctincludeNa
// Include Not Available acct service option while returning result
AcctincludeNa *bool `json:"acct_includeNa,omitempty"`
// AccttestableOnly
// Only get testable service type
AccttestableOnly *bool `json:"acct_testableOnly,omitempty"`
// Accttype
// Accounting service types to get, use comma to separate, Ex: RADIUS,CGF
Accttype *string `json:"acct_type,omitempty"`
// AuthhostedAaaSupportedEnabled
// Indicate if Hosted AAA Support is enabled
AuthhostedAaaSupportedEnabled *bool `json:"auth_hostedAaaSupportedEnabled,omitempty"`
// AuthincludeAdGlobal
// If AD is in list, include only AD with Global Catalog configured
AuthincludeAdGlobal *bool `json:"auth_includeAdGlobal,omitempty"`
// AuthincludeGuest
// Include Guest auth service while returning result
AuthincludeGuest *bool `json:"auth_includeGuest,omitempty"`
// AuthincludeLocalDb
// Include LocalDB auth service while returning result
AuthincludeLocalDb *bool `json:"auth_includeLocalDb,omitempty"`
// AuthincludeNa
// Include Not Available auth service option while returning result
AuthincludeNa *bool `json:"auth_includeNa,omitempty"`
// AuthplmnIdentifierEnabled
// Indicate if Configure PLMN identifier is enabled
AuthplmnIdentifierEnabled *bool `json:"auth_plmnIdentifierEnabled,omitempty"`
// AuthrealmType
// To get specific authentication service information for configuring realm based authentication profile
// Constraints:
// - oneof:[ALL,RADIUS]
AuthrealmType *string `json:"auth_realmType,omitempty"`
// AuthtestableOnly
// Only get testable service type
AuthtestableOnly *bool `json:"auth_testableOnly,omitempty"`
// Authtype
// Authentication service types to get, use comma to separate, Ex: RADIUS,AD
Authtype *string `json:"auth_type,omitempty"`
// Forwardingtype
// Forwarding service types to get, use comma to separate, Ex: L2oGRE,TTGPDG,Bridge,Advanced
Forwardingtype *string `json:"forwarding_type,omitempty"`
// GlobalFilterId
// Specify GlobalFilter ID for query
GlobalFilterId *string `json:"globalFilterId,omitempty"`
// IncludeSharedResources
// Whether to include the resources of parent domain or not
IncludeSharedResources *bool `json:"includeSharedResources,omitempty"`
// IncludeUsers
// Should also retrieve users or not
IncludeUsers *bool `json:"includeUsers,omitempty"`
// INCLUDERBACMETADATA
// Whether to include RBAC metadata or not
INCLUDERBACMETADATA *bool `json:"INCLUDE_RBAC_METADATA,omitempty"`
// InMap
// Specify inMap status for query
InMap *bool `json:"inMap,omitempty"`
// TENANTID
// Specify Tenant ID for query
TENANTID *string `json:"TENANT_ID,omitempty"`
}
func NewSwitchMCommonQueryCriteriaSuperSetOptionsType() *SwitchMCommonQueryCriteriaSuperSetOptionsType {
m := new(SwitchMCommonQueryCriteriaSuperSetOptionsType)
return m
}
// SwitchMCommonTimeRange
//
// Definition: common_timeRange
type SwitchMCommonTimeRange struct {
// End
// end time for collecting data
End *float64 `json:"end,omitempty"`
// Field
// time field for collecting data
// Constraints:
// - oneof:[insertionTime]
Field *string `json:"field,omitempty"`
// Interval
// time interval in second
Interval *float64 `json:"interval,omitempty"`
// Start
// start time for collecting data
Start *float64 `json:"start,omitempty"`
}
func NewSwitchMCommonTimeRange() *SwitchMCommonTimeRange {
m := new(SwitchMCommonTimeRange)
return m
}