-
Notifications
You must be signed in to change notification settings - Fork 1
/
api_userGroups.go
808 lines (720 loc) · 40.8 KB
/
api_userGroups.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
package api
import (
"context"
"encoding/json"
"errors"
"fmt"
"github.com/myENA/vsz-api/validators"
"net/http"
)
// This file is auto-generated
// Generation Date: 2018-04-27T15:10:38-0500
// API Version: v5
type UserGroupsAPI struct {
client *Client
}
type (
ScgUserGroupDeleteScgUserGroupDelete1RequestIDListSlice []string
ScgUserGroupDeleteScgUserGroupDelete1Request struct {
IDList ScgUserGroupDeleteScgUserGroupDelete1RequestIDListSlice `json:"idList,omitempty"`
}
)
// ScgUserGroupDeleteScgUserGroupDelete1: Delete multiple SCG user group
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - requestBody: *ScgUserGroupDeleteScgUserGroupDelete1Request
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - []byte: Any bytes to be found in response body
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupDeleteScgUserGroupDelete1(ctx context.Context, requestBody *ScgUserGroupDeleteScgUserGroupDelete1Request) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
request := NewRequest("DELETE", "/v5_0/userGroups", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
return u.client.Ensure(ctx, request, 200, nil)
}
type (
ScgUserGroupAddScgUserGroupPostRequestPermissionsSlice []*ScgUserGroupAddScgUserGroupPostRequestPermissions
ScgUserGroupAddScgUserGroupPostRequestPermissionsIdsSlice []string
ScgUserGroupAddScgUserGroupPostRequestPermissions struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Ids ScgUserGroupAddScgUserGroupPostRequestPermissionsIdsSlice `json:"ids,omitempty"`
Resource *string `json:"resource,omitempty"`
}
ScgUserGroupAddScgUserGroupPostRequestResourceGroupsSlice []*ScgUserGroupAddScgUserGroupPostRequestResourceGroups
ScgUserGroupAddScgUserGroupPostRequestResourceGroups struct {
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
}
ScgUserGroupAddScgUserGroupPostRequestUsersSlice []*ScgUserGroupAddScgUserGroupPostRequestUsers
ScgUserGroupAddScgUserGroupPostRequestUsers struct {
CompanyName *string `json:"companyName,omitempty"`
CreateDateTime *int `json:"createDateTime,omitempty"`
CreatorID *string `json:"creatorId,omitempty"`
CreatorUsername *string `json:"creatorUsername,omitempty"`
DomainID *string `json:"domainId,omitempty"`
Email *string `json:"email,omitempty"`
Enabled *int `json:"enabled,omitempty"`
ID *string `json:"id,omitempty"`
ModifiedDateTime *int `json:"modifiedDateTime,omitempty"`
ModifierID *string `json:"modifierId,omitempty"`
ModifierUsername *string `json:"modifierUsername,omitempty"`
Passphrase *string `json:"passphrase,omitempty"`
Phone *string `json:"phone,omitempty"`
RealName *string `json:"realName,omitempty"`
TenantUUID *string `json:"tenantUUID,omitempty"`
Title *string `json:"title,omitempty"`
UserName *string `json:"userName,omitempty"`
}
ScgUserGroupAddScgUserGroupPostRequest struct {
CreateDateTime *int `json:"createDateTime,omitempty"`
CreatorID *string `json:"creatorId,omitempty"`
CreatorUsername *string `json:"creatorUsername,omitempty"`
Description *string `json:"description,omitempty"`
DomainID *string `json:"domainId,omitempty"`
ID *string `json:"id,omitempty"`
ModifiedDateTime *int `json:"modifiedDateTime,omitempty"`
ModifierID *string `json:"modifierId,omitempty"`
ModifierUsername *string `json:"modifierUsername,omitempty"`
Name *string `json:"name,omitempty"`
Permissions ScgUserGroupAddScgUserGroupPostRequestPermissionsSlice `json:"permissions,omitempty"`
ResourceGroups ScgUserGroupAddScgUserGroupPostRequestResourceGroupsSlice `json:"resourceGroups,omitempty"`
Role *string `json:"role,omitempty"`
TenantID *string `json:"tenantId,omitempty"`
Users ScgUserGroupAddScgUserGroupPostRequestUsersSlice `json:"users,omitempty"`
}
ScgUserGroupAddScgUserGroupPost201Response struct {
ID *string `json:"id,omitempty"`
}
)
// ScgUserGroupAddScgUserGroupPost: Add SCG user group
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - requestBody: *ScgUserGroupAddScgUserGroupPostRequest
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - *ScgUserGroupAddScgUserGroupPost201Response
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupAddScgUserGroupPost(ctx context.Context, requestBody *ScgUserGroupAddScgUserGroupPostRequest) (*http.Response, *ScgUserGroupAddScgUserGroupPost201Response, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
request := NewRequest("POST", "/v5_0/userGroups", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
out := &ScgUserGroupAddScgUserGroupPost201Response{}
httpResponse, _, err := u.client.Ensure(ctx, request, 201, out)
return httpResponse, out, err
}
type (
ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseListSlice []*ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseList
ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseListItemsSlice []*ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseListItems
ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseListItems struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Resource *string `json:"resource,omitempty"`
}
ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseListItemsDescriptionSlice []string
ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseList struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Items ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseListItemsSlice `json:"items,omitempty"`
ItemsDescription ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseListItemsDescriptionSlice `json:"itemsDescription,omitempty"`
Resource *string `json:"resource,omitempty"`
}
ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200Response struct {
Extra *json.RawMessage `json:"extra,omitempty"`
FirstIndex *int `json:"firstIndex,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
List ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200ResponseListSlice `json:"list,omitempty"`
TotalCount *int `json:"totalCount,omitempty"`
}
)
// ScgUserGroupGetPermittedCategoriesOfCurrentUserGet: Get permitted categories of current user
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - *ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200Response
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupGetPermittedCategoriesOfCurrentUserGet(ctx context.Context) (*http.Response, *ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200Response, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
request := NewRequest("GET", "/v5_0/userGroups/currentUser/permissionCategories", true)
out := &ScgUserGroupGetPermittedCategoriesOfCurrentUserGet200Response{}
httpResponse, _, err := u.client.Ensure(ctx, request, 200, out)
return httpResponse, out, err
}
type (
ScgUserGroupQueryUserGroupsPostRequestAttributesSlice []string
ScgUserGroupQueryUserGroupsPostRequestExtraFiltersSlice []*ScgUserGroupQueryUserGroupsPostRequestExtraFilters
ScgUserGroupQueryUserGroupsPostRequestExtraFilters struct {
Operator *string `json:"operator,omitempty"`
Type *string `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequestExtraNotFiltersSlice []*ScgUserGroupQueryUserGroupsPostRequestExtraNotFilters
ScgUserGroupQueryUserGroupsPostRequestExtraNotFilters struct {
Type *string `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequestExtraTimeRange struct {
End *float64 `json:"end,omitempty"`
Field *string `json:"field,omitempty"`
Interval *float64 `json:"interval,omitempty"`
Start *float64 `json:"start,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequestFiltersSlice []*ScgUserGroupQueryUserGroupsPostRequestFilters
ScgUserGroupQueryUserGroupsPostRequestFilters struct {
Operator *string `json:"operator,omitempty"`
Type *string `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequestFullTextSearchFieldsSlice []string
ScgUserGroupQueryUserGroupsPostRequestFullTextSearch struct {
Fields ScgUserGroupQueryUserGroupsPostRequestFullTextSearchFieldsSlice `json:"fields,omitempty"`
Type *string `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequestOptionsGuestPassExpiration struct {
End *float64 `json:"end,omitempty"`
Interval *float64 `json:"interval,omitempty"`
Start *float64 `json:"start,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequestOptionsLocalUserAuditTime struct {
End *float64 `json:"end,omitempty"`
Interval *float64 `json:"interval,omitempty"`
Start *float64 `json:"start,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequestOptions struct {
INCLUDERBACMETADATA *bool `json:"INCLUDE_RBAC_METADATA,omitempty"`
TENANTID *string `json:"TENANT_ID,omitempty"`
AcctIncludeNa *bool `json:"acct_includeNa,omitempty"`
AcctTestableOnly *bool `json:"acct_testableOnly,omitempty"`
AcctType *string `json:"acct_type,omitempty"`
AuthHostedAaaSupportedEnabled *bool `json:"auth_hostedAaaSupportedEnabled,omitempty"`
AuthIncludeAdGlobal *bool `json:"auth_includeAdGlobal,omitempty"`
AuthIncludeGuest *bool `json:"auth_includeGuest,omitempty"`
AuthIncludeLocalDb *bool `json:"auth_includeLocalDb,omitempty"`
AuthIncludeNa *bool `json:"auth_includeNa,omitempty"`
AuthPlmnIdentifierEnabled *bool `json:"auth_plmnIdentifierEnabled,omitempty"`
AuthRealmType *string `json:"auth_realmType,omitempty"`
AuthTestableOnly *bool `json:"auth_testableOnly,omitempty"`
AuthType *string `json:"auth_type,omitempty"`
ForwardingType *string `json:"forwarding_type,omitempty"`
GlobalFilterID *string `json:"globalFilterId,omitempty"`
GuestPassDisplayName *string `json:"guestPass_displayName,omitempty"`
GuestPassExpiration *ScgUserGroupQueryUserGroupsPostRequestOptionsGuestPassExpiration `json:"guestPass_expiration,omitempty"`
GuestPassWlan *string `json:"guestPass_wlan,omitempty"`
InMap *bool `json:"inMap,omitempty"`
IncludeSharedResources *bool `json:"includeSharedResources,omitempty"`
IncludeUsers *bool `json:"includeUsers,omitempty"`
LocalUserAuditTime *ScgUserGroupQueryUserGroupsPostRequestOptionsLocalUserAuditTime `json:"localUser_auditTime,omitempty"`
LocalUserDisplayName *string `json:"localUser_displayName,omitempty"`
LocalUserFirstName *string `json:"localUser_firstName,omitempty"`
LocalUserLastName *string `json:"localUser_lastName,omitempty"`
LocalUserMailAddress *string `json:"localUser_mailAddress,omitempty"`
LocalUserPrimaryPhoneNumber *string `json:"localUser_primaryPhoneNumber,omitempty"`
LocalUserStatus *string `json:"localUser_status,omitempty"`
LocalUserSubscriberType *string `json:"localUser_subscriberType,omitempty"`
LocalUserUserName *string `json:"localUser_userName,omitempty"`
LocalUserUserSource *string `json:"localUser_userSource,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequestSortInfo struct {
Dir *string `json:"dir,omitempty"`
SortColumn *string `json:"sortColumn,omitempty"`
}
ScgUserGroupQueryUserGroupsPostRequest struct {
Attributes ScgUserGroupQueryUserGroupsPostRequestAttributesSlice `json:"attributes,omitempty"`
Criteria *string `json:"criteria,omitempty"`
ExpandDomains *bool `json:"expandDomains,omitempty"`
ExtraFilters ScgUserGroupQueryUserGroupsPostRequestExtraFiltersSlice `json:"extraFilters,omitempty"`
ExtraNotFilters ScgUserGroupQueryUserGroupsPostRequestExtraNotFiltersSlice `json:"extraNotFilters,omitempty"`
ExtraTimeRange *ScgUserGroupQueryUserGroupsPostRequestExtraTimeRange `json:"extraTimeRange,omitempty"`
Filters ScgUserGroupQueryUserGroupsPostRequestFiltersSlice `json:"filters,omitempty"`
FullTextSearch *ScgUserGroupQueryUserGroupsPostRequestFullTextSearch `json:"fullTextSearch,omitempty"`
Limit *int `json:"limit,omitempty"`
Options *ScgUserGroupQueryUserGroupsPostRequestOptions `json:"options,omitempty"`
Page *int `json:"page,omitempty"`
Query *string `json:"query,omitempty"`
SortInfo *ScgUserGroupQueryUserGroupsPostRequestSortInfo `json:"sortInfo,omitempty"`
Start *int `json:"start,omitempty"`
}
ScgUserGroupQueryUserGroupsPost200ResponseListSlice []*ScgUserGroupQueryUserGroupsPost200ResponseList
ScgUserGroupQueryUserGroupsPost200ResponseListPermissionsSlice []*ScgUserGroupQueryUserGroupsPost200ResponseListPermissions
ScgUserGroupQueryUserGroupsPost200ResponseListPermissionsIdsSlice []string
ScgUserGroupQueryUserGroupsPost200ResponseListPermissions struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Ids ScgUserGroupQueryUserGroupsPost200ResponseListPermissionsIdsSlice `json:"ids,omitempty"`
Resource *string `json:"resource,omitempty"`
}
ScgUserGroupQueryUserGroupsPost200ResponseListResourceGroupsSlice []*ScgUserGroupQueryUserGroupsPost200ResponseListResourceGroups
ScgUserGroupQueryUserGroupsPost200ResponseListResourceGroups struct {
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
}
ScgUserGroupQueryUserGroupsPost200ResponseListUsersSlice []*ScgUserGroupQueryUserGroupsPost200ResponseListUsers
ScgUserGroupQueryUserGroupsPost200ResponseListUsers struct {
CompanyName *string `json:"companyName,omitempty"`
CreateDateTime *int `json:"createDateTime,omitempty"`
CreatorID *string `json:"creatorId,omitempty"`
CreatorUsername *string `json:"creatorUsername,omitempty"`
DomainID *string `json:"domainId,omitempty"`
Email *string `json:"email,omitempty"`
Enabled *int `json:"enabled,omitempty"`
ID *string `json:"id,omitempty"`
ModifiedDateTime *int `json:"modifiedDateTime,omitempty"`
ModifierID *string `json:"modifierId,omitempty"`
ModifierUsername *string `json:"modifierUsername,omitempty"`
Passphrase *string `json:"passphrase,omitempty"`
Phone *string `json:"phone,omitempty"`
RealName *string `json:"realName,omitempty"`
TenantUUID *string `json:"tenantUUID,omitempty"`
Title *string `json:"title,omitempty"`
UserName *string `json:"userName,omitempty"`
}
ScgUserGroupQueryUserGroupsPost200ResponseList struct {
CreateDateTime *int `json:"createDateTime,omitempty"`
CreatorID *string `json:"creatorId,omitempty"`
CreatorUsername *string `json:"creatorUsername,omitempty"`
Description *string `json:"description,omitempty"`
DomainID *string `json:"domainId,omitempty"`
ID *string `json:"id,omitempty"`
ModifiedDateTime *int `json:"modifiedDateTime,omitempty"`
ModifierID *string `json:"modifierId,omitempty"`
ModifierUsername *string `json:"modifierUsername,omitempty"`
Name *string `json:"name,omitempty"`
Permissions ScgUserGroupQueryUserGroupsPost200ResponseListPermissionsSlice `json:"permissions,omitempty"`
ResourceGroups ScgUserGroupQueryUserGroupsPost200ResponseListResourceGroupsSlice `json:"resourceGroups,omitempty"`
Role *string `json:"role,omitempty"`
TenantID *string `json:"tenantId,omitempty"`
Users ScgUserGroupQueryUserGroupsPost200ResponseListUsersSlice `json:"users,omitempty"`
}
ScgUserGroupQueryUserGroupsPost200Response struct {
Extra *json.RawMessage `json:"extra,omitempty"`
FirstIndex *int `json:"firstIndex,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
List ScgUserGroupQueryUserGroupsPost200ResponseListSlice `json:"list,omitempty"`
TotalCount *int `json:"totalCount,omitempty"`
}
)
// ScgUserGroupQueryUserGroupsPost: Query user groups
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - requestBody: *ScgUserGroupQueryUserGroupsPostRequest
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - *ScgUserGroupQueryUserGroupsPost200Response
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupQueryUserGroupsPost(ctx context.Context, requestBody *ScgUserGroupQueryUserGroupsPostRequest) (*http.Response, *ScgUserGroupQueryUserGroupsPost200Response, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
request := NewRequest("POST", "/v5_0/userGroups/query", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
out := &ScgUserGroupQueryUserGroupsPost200Response{}
httpResponse, _, err := u.client.Ensure(ctx, request, 200, out)
return httpResponse, out, err
}
type (
ScgUserGroupGetPreDefinedRolesGet200ResponseListSlice []*ScgUserGroupGetPreDefinedRolesGet200ResponseList
ScgUserGroupGetPreDefinedRolesGet200ResponseList struct {
Label *string `json:"label,omitempty"`
Value *string `json:"value,omitempty"`
}
ScgUserGroupGetPreDefinedRolesGet200Response struct {
FirstIndex *int `json:"firstIndex,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
List ScgUserGroupGetPreDefinedRolesGet200ResponseListSlice `json:"list,omitempty"`
TotalCount *int `json:"totalCount,omitempty"`
}
)
// ScgUserGroupGetPreDefinedRolesGet: Get pre-defined roles
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - *ScgUserGroupGetPreDefinedRolesGet200Response
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupGetPreDefinedRolesGet(ctx context.Context) (*http.Response, *ScgUserGroupGetPreDefinedRolesGet200Response, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
request := NewRequest("GET", "/v5_0/userGroups/roles", true)
out := &ScgUserGroupGetPreDefinedRolesGet200Response{}
httpResponse, _, err := u.client.Ensure(ctx, request, 200, out)
return httpResponse, out, err
}
type (
ScgUserGroupGetPermissionItemsOfRoleGet200ResponseListSlice []*ScgUserGroupGetPermissionItemsOfRoleGet200ResponseList
ScgUserGroupGetPermissionItemsOfRoleGet200ResponseListItemsSlice []*ScgUserGroupGetPermissionItemsOfRoleGet200ResponseListItems
ScgUserGroupGetPermissionItemsOfRoleGet200ResponseListItems struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Resource *string `json:"resource,omitempty"`
}
ScgUserGroupGetPermissionItemsOfRoleGet200ResponseListItemsDescriptionSlice []string
ScgUserGroupGetPermissionItemsOfRoleGet200ResponseList struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Items ScgUserGroupGetPermissionItemsOfRoleGet200ResponseListItemsSlice `json:"items,omitempty"`
ItemsDescription ScgUserGroupGetPermissionItemsOfRoleGet200ResponseListItemsDescriptionSlice `json:"itemsDescription,omitempty"`
Resource *string `json:"resource,omitempty"`
}
ScgUserGroupGetPermissionItemsOfRoleGet200Response struct {
Extra *json.RawMessage `json:"extra,omitempty"`
FirstIndex *int `json:"firstIndex,omitempty"`
HasMore *bool `json:"hasMore,omitempty"`
List ScgUserGroupGetPermissionItemsOfRoleGet200ResponseListSlice `json:"list,omitempty"`
TotalCount *int `json:"totalCount,omitempty"`
}
)
// ScgUserGroupGetPermissionItemsOfRoleGet: Get permission items of role
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - role (string)
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - *ScgUserGroupGetPermissionItemsOfRoleGet200Response
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupGetPermissionItemsOfRoleGet(ctx context.Context, role string) (*http.Response, *ScgUserGroupGetPermissionItemsOfRoleGet200Response, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
err = validators.StrNotEmpty(role)
if nil != err {
return nil, nil, fmt.Errorf("parameter \"role\" failed validation check: %s", err)
}
request := NewRequest("GET", "/v5_0/userGroups/roles/{role}/permissions", true)
request.SetPathParameter("role", role)
out := &ScgUserGroupGetPermissionItemsOfRoleGet200Response{}
httpResponse, _, err := u.client.Ensure(ctx, request, 200, out)
return httpResponse, out, err
}
type (
ScgUserGroupDeleteScgUserGroupDelete204Response struct {
ID *string `json:"id,omitempty"`
}
)
// ScgUserGroupDeleteScgUserGroupDelete: Delete SCG user group
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - userGroupId (string)
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - *ScgUserGroupDeleteScgUserGroupDelete204Response
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupDeleteScgUserGroupDelete(ctx context.Context, userGroupId string) (*http.Response, *ScgUserGroupDeleteScgUserGroupDelete204Response, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
err = validators.StrNotEmpty(userGroupId)
if nil != err {
return nil, nil, fmt.Errorf("parameter \"userGroupId\" failed validation check: %s", err)
}
request := NewRequest("DELETE", "/v5_0/userGroups/{userGroupId}", true)
request.SetPathParameter("userGroupId", userGroupId)
out := &ScgUserGroupDeleteScgUserGroupDelete204Response{}
httpResponse, _, err := u.client.Ensure(ctx, request, 204, out)
return httpResponse, out, err
}
type (
ScgUserGroupGetScgUserGroupGet200ResponsePermissionsSlice []*ScgUserGroupGetScgUserGroupGet200ResponsePermissions
ScgUserGroupGetScgUserGroupGet200ResponsePermissionsIdsSlice []string
ScgUserGroupGetScgUserGroupGet200ResponsePermissions struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Ids ScgUserGroupGetScgUserGroupGet200ResponsePermissionsIdsSlice `json:"ids,omitempty"`
Resource *string `json:"resource,omitempty"`
}
ScgUserGroupGetScgUserGroupGet200ResponseResourceGroupsSlice []*ScgUserGroupGetScgUserGroupGet200ResponseResourceGroups
ScgUserGroupGetScgUserGroupGet200ResponseResourceGroups struct {
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
}
ScgUserGroupGetScgUserGroupGet200ResponseUsersSlice []*ScgUserGroupGetScgUserGroupGet200ResponseUsers
ScgUserGroupGetScgUserGroupGet200ResponseUsers struct {
CompanyName *string `json:"companyName,omitempty"`
CreateDateTime *int `json:"createDateTime,omitempty"`
CreatorID *string `json:"creatorId,omitempty"`
CreatorUsername *string `json:"creatorUsername,omitempty"`
DomainID *string `json:"domainId,omitempty"`
Email *string `json:"email,omitempty"`
Enabled *int `json:"enabled,omitempty"`
ID *string `json:"id,omitempty"`
ModifiedDateTime *int `json:"modifiedDateTime,omitempty"`
ModifierID *string `json:"modifierId,omitempty"`
ModifierUsername *string `json:"modifierUsername,omitempty"`
Passphrase *string `json:"passphrase,omitempty"`
Phone *string `json:"phone,omitempty"`
RealName *string `json:"realName,omitempty"`
TenantUUID *string `json:"tenantUUID,omitempty"`
Title *string `json:"title,omitempty"`
UserName *string `json:"userName,omitempty"`
}
ScgUserGroupGetScgUserGroupGet200Response struct {
CreateDateTime *int `json:"createDateTime,omitempty"`
CreatorID *string `json:"creatorId,omitempty"`
CreatorUsername *string `json:"creatorUsername,omitempty"`
Description *string `json:"description,omitempty"`
DomainID *string `json:"domainId,omitempty"`
ID *string `json:"id,omitempty"`
ModifiedDateTime *int `json:"modifiedDateTime,omitempty"`
ModifierID *string `json:"modifierId,omitempty"`
ModifierUsername *string `json:"modifierUsername,omitempty"`
Name *string `json:"name,omitempty"`
Permissions ScgUserGroupGetScgUserGroupGet200ResponsePermissionsSlice `json:"permissions,omitempty"`
ResourceGroups ScgUserGroupGetScgUserGroupGet200ResponseResourceGroupsSlice `json:"resourceGroups,omitempty"`
Role *string `json:"role,omitempty"`
TenantID *string `json:"tenantId,omitempty"`
Users ScgUserGroupGetScgUserGroupGet200ResponseUsersSlice `json:"users,omitempty"`
}
)
// ScgUserGroupGetScgUserGroupGet: Get SCG user group
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - userGroupId (string)
//
// Optional Parameter Map:
// - includeUsers (string)
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - *ScgUserGroupGetScgUserGroupGet200Response
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupGetScgUserGroupGet(ctx context.Context, userGroupId string, optionalParams map[string]string) (*http.Response, *ScgUserGroupGetScgUserGroupGet200Response, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
err = validators.StrNotEmpty(userGroupId)
if nil != err {
return nil, nil, fmt.Errorf("parameter \"userGroupId\" failed validation check: %s", err)
}
request := NewRequest("GET", "/v5_0/userGroups/{userGroupId}", true)
request.SetPathParameter("userGroupId", userGroupId)
request.SetQueryParameter("includeUsers", optionalParams["includeUsers"])
out := &ScgUserGroupGetScgUserGroupGet200Response{}
httpResponse, _, err := u.client.Ensure(ctx, request, 200, out)
return httpResponse, out, err
}
type (
ScgUserGroupUpdateUserGroupsPatchRequestPermissionsSlice []*ScgUserGroupUpdateUserGroupsPatchRequestPermissions
ScgUserGroupUpdateUserGroupsPatchRequestPermissions struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Resource *string `json:"resource,omitempty"`
}
ScgUserGroupUpdateUserGroupsPatchRequestResourceGroupsSlice []*ScgUserGroupUpdateUserGroupsPatchRequestResourceGroups
ScgUserGroupUpdateUserGroupsPatchRequestResourceGroups struct {
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
}
ScgUserGroupUpdateUserGroupsPatchRequestUsersSlice []*ScgUserGroupUpdateUserGroupsPatchRequestUsers
ScgUserGroupUpdateUserGroupsPatchRequestUsers struct {
CompanyName interface{} `json:"companyName,omitempty"`
DomainID *string `json:"domainId,omitempty"`
Email *string `json:"email,omitempty"`
Enabled *int `json:"enabled,omitempty"`
ID *string `json:"id,omitempty"`
Passphrase interface{} `json:"passphrase,omitempty"`
Phone interface{} `json:"phone,omitempty"`
RealName *string `json:"realName,omitempty"`
TenantUUID *string `json:"tenantUUID,omitempty"`
Title interface{} `json:"title,omitempty"`
UserName *string `json:"userName,omitempty"`
}
ScgUserGroupUpdateUserGroupsPatchRequest struct {
Description *string `json:"description,omitempty"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Permissions ScgUserGroupUpdateUserGroupsPatchRequestPermissionsSlice `json:"permissions,omitempty"`
ResourceGroups ScgUserGroupUpdateUserGroupsPatchRequestResourceGroupsSlice `json:"resourceGroups,omitempty"`
Role *string `json:"role,omitempty"`
Users ScgUserGroupUpdateUserGroupsPatchRequestUsersSlice `json:"users,omitempty"`
}
)
// ScgUserGroupUpdateUserGroupsPatch: Update user groups
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - userGroupId (string)
// - requestBody: *ScgUserGroupUpdateUserGroupsPatchRequest
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - []byte: Any bytes to be found in response body
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupUpdateUserGroupsPatch(ctx context.Context, userGroupId string, requestBody *ScgUserGroupUpdateUserGroupsPatchRequest) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
err = validators.StrNotEmpty(userGroupId)
if nil != err {
return nil, nil, fmt.Errorf("parameter \"userGroupId\" failed validation check: %s", err)
}
request := NewRequest("PATCH", "/v5_0/userGroups/{userGroupId}", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
request.SetPathParameter("userGroupId", userGroupId)
return u.client.Ensure(ctx, request, 204, nil)
}
type (
ScgUserGroupUpdatePermissionsOfUserGroupsPatchRequestSlice []*ScgUserGroupUpdatePermissionsOfUserGroupsPatchRequest
ScgUserGroupUpdatePermissionsOfUserGroupsPatchRequestIdsSlice []string
ScgUserGroupUpdatePermissionsOfUserGroupsPatchRequest struct {
Access *string `json:"access,omitempty"`
Display *string `json:"display,omitempty"`
Ids ScgUserGroupUpdatePermissionsOfUserGroupsPatchRequestIdsSlice `json:"ids,omitempty"`
Resource *string `json:"resource,omitempty"`
}
)
// ScgUserGroupUpdatePermissionsOfUserGroupsPatch: Update permissions of user groups
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - userGroupId (string)
// - requestBody: *ScgUserGroupUpdatePermissionsOfUserGroupsPatchRequestSlice
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - []byte: Any bytes to be found in response body
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupUpdatePermissionsOfUserGroupsPatch(ctx context.Context, userGroupId string, requestBody ScgUserGroupUpdatePermissionsOfUserGroupsPatchRequestSlice) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
err = validators.StrNotEmpty(userGroupId)
if nil != err {
return nil, nil, fmt.Errorf("parameter \"userGroupId\" failed validation check: %s", err)
}
request := NewRequest("PATCH", "/v5_0/userGroups/{userGroupId}/permissions", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
request.SetPathParameter("userGroupId", userGroupId)
return u.client.Ensure(ctx, request, 204, nil)
}
type (
ScgUserGroupUpdatePermissionScopeOfUserGroupsPatchRequestSlice []*ScgUserGroupUpdatePermissionScopeOfUserGroupsPatchRequest
ScgUserGroupUpdatePermissionScopeOfUserGroupsPatchRequest struct {
ID *string `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
}
)
// ScgUserGroupUpdatePermissionScopeOfUserGroupsPatch: Update permission scope of user groups
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - userGroupId (string)
// - requestBody: *ScgUserGroupUpdatePermissionScopeOfUserGroupsPatchRequestSlice
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - []byte: Any bytes to be found in response body
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupUpdatePermissionScopeOfUserGroupsPatch(ctx context.Context, userGroupId string, requestBody ScgUserGroupUpdatePermissionScopeOfUserGroupsPatchRequestSlice) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
err = validators.StrNotEmpty(userGroupId)
if nil != err {
return nil, nil, fmt.Errorf("parameter \"userGroupId\" failed validation check: %s", err)
}
request := NewRequest("PATCH", "/v5_0/userGroups/{userGroupId}/resourceGroups", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
request.SetPathParameter("userGroupId", userGroupId)
return u.client.Ensure(ctx, request, 204, nil)
}
type (
ScgUserGroupUpdateUserListOfUserGroupsPatchRequestSlice []*ScgUserGroupUpdateUserListOfUserGroupsPatchRequest
ScgUserGroupUpdateUserListOfUserGroupsPatchRequest struct {
CompanyName *string `json:"companyName,omitempty"`
CreateDateTime *int `json:"createDateTime,omitempty"`
CreatorID *string `json:"creatorId,omitempty"`
CreatorUsername *string `json:"creatorUsername,omitempty"`
DomainID *string `json:"domainId,omitempty"`
Email *string `json:"email,omitempty"`
Enabled *int `json:"enabled,omitempty"`
ID *string `json:"id,omitempty"`
ModifiedDateTime *int `json:"modifiedDateTime,omitempty"`
ModifierID *string `json:"modifierId,omitempty"`
ModifierUsername *string `json:"modifierUsername,omitempty"`
Passphrase *string `json:"passphrase,omitempty"`
Phone *string `json:"phone,omitempty"`
RealName *string `json:"realName,omitempty"`
TenantUUID *string `json:"tenantUUID,omitempty"`
Title *string `json:"title,omitempty"`
UserName *string `json:"userName,omitempty"`
}
)
// ScgUserGroupUpdateUserListOfUserGroupsPatch: Update user list of user groups
//
// Required Parameters:
// - ctx (context.Context): Context to use for this request
// - userGroupId (string)
// - requestBody: *ScgUserGroupUpdateUserListOfUserGroupsPatchRequestSlice
//
// Returns:
// - *http.Response: HTTP Response or nil on error
// - []byte: Any bytes to be found in response body
// - error: Error seen or nil if none
func (u *UserGroupsAPI) ScgUserGroupUpdateUserListOfUserGroupsPatch(ctx context.Context, userGroupId string, requestBody ScgUserGroupUpdateUserListOfUserGroupsPatchRequestSlice) (*http.Response, []byte, error) {
if ctx == nil {
return nil, nil, errors.New("user context cannot be nil")
}
var err error
err = validators.StrNotEmpty(userGroupId)
if nil != err {
return nil, nil, fmt.Errorf("parameter \"userGroupId\" failed validation check: %s", err)
}
request := NewRequest("PATCH", "/v5_0/userGroups/{userGroupId}/users", true)
err = request.SetBodyModel(requestBody)
if err != nil {
return nil, nil, err
}
request.SetPathParameter("userGroupId", userGroupId)
return u.client.Ensure(ctx, request, 204, nil)
}