/
user.go
623 lines (522 loc) · 24.3 KB
/
user.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
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.
// Database Management API
//
// Use the Database Management API to perform tasks such as obtaining performance and resource usage metrics
// for a fleet of Managed Databases or a specific Managed Database, creating Managed Database Groups, and
// running a SQL job on a Managed Database or Managed Database Group.
//
package databasemanagement
import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// User The summary of a specific user resource.
type User struct {
// The name of the User.
Name *string `mandatory:"true" json:"name"`
// The status of the user account.
Status UserStatusEnum `mandatory:"true" json:"status"`
// The default tablespace for data.
DefaultTablespace *string `mandatory:"true" json:"defaultTablespace"`
// The name of the default tablespace for temporary tables or the name of a tablespace group.
TempTablespace *string `mandatory:"true" json:"tempTablespace"`
// The date and time the user was created.
TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
// The profile name of the user.
Profile *string `mandatory:"true" json:"profile"`
// The date the account was locked, if the status of the account is LOCKED.
TimeLocked *common.SDKTime `mandatory:"false" json:"timeLocked"`
// The date and time of the expiration of the user account.
TimeExpiring *common.SDKTime `mandatory:"false" json:"timeExpiring"`
// The default local temporary tablespace for the user.
LocalTempTablespace *string `mandatory:"false" json:"localTempTablespace"`
// The initial resource consumer group for the User.
ConsumerGroup *string `mandatory:"false" json:"consumerGroup"`
// The external name of the user.
ExternalName *string `mandatory:"false" json:"externalName"`
// The list of existing versions of the password hashes (also known as "verifiers") for the account.
PasswordVersions *string `mandatory:"false" json:"passwordVersions"`
// Indicates whether editions have been enabled for the corresponding user (Y) or not (N).
EditionsEnabled UserEditionsEnabledEnum `mandatory:"false" json:"editionsEnabled,omitempty"`
// The authentication mechanism for the user.
Authentication UserAuthenticationEnum `mandatory:"false" json:"authentication,omitempty"`
// Indicates whether a user can connect directly (N) or whether the account can only be proxied (Y) by users who have proxy privileges
// for this account (that is, by users who have been granted the "connect through" privilege for this account).
ProxyConnect UserProxyConnectEnum `mandatory:"false" json:"proxyConnect,omitempty"`
// Indicates whether a given user is common(Y) or local(N).
Common UserCommonEnum `mandatory:"false" json:"common,omitempty"`
// The date and time of the last user login.
// This column is not populated when a user connects to the database with administrative privileges, that is, AS { SYSASM | SYSBACKUP | SYSDBA | SYSDG | SYSOPER | SYSRAC | SYSKM }.
TimeLastLogin *common.SDKTime `mandatory:"false" json:"timeLastLogin"`
// Indicates whether the user was created and is maintained by Oracle-supplied scripts (such as catalog.sql or catproc.sql).
OracleMaintained UserOracleMaintainedEnum `mandatory:"false" json:"oracleMaintained,omitempty"`
// Indicates whether the user definition is inherited from another container (YES) or not (NO).
Inherited UserInheritedEnum `mandatory:"false" json:"inherited,omitempty"`
// The default collation for the user schema.
DefaultCollation *string `mandatory:"false" json:"defaultCollation"`
// Indicates whether the user is a common user created by an implicit application (YES) or not (NO).
Implicit UserImplicitEnum `mandatory:"false" json:"implicit,omitempty"`
// In a sharded database, indicates whether the user is created with shard DDL enabled (YES) or not (NO).
AllShared UserAllSharedEnum `mandatory:"false" json:"allShared,omitempty"`
// In a federated sharded database, indicates whether the user is an external shard user (YES) or not (NO).
ExternalShared UserExternalSharedEnum `mandatory:"false" json:"externalShared,omitempty"`
// The date and time when the user password was last set.
// This column is populated only when the value of the AUTHENTICATION_TYPE column is PASSWORD. Otherwise, this column is null.
TimePasswordChanged *common.SDKTime `mandatory:"false" json:"timePasswordChanged"`
}
func (m User) String() string {
return common.PointerString(m)
}
// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m User) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if _, ok := GetMappingUserStatusEnum(string(m.Status)); !ok && m.Status != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetUserStatusEnumStringValues(), ",")))
}
if _, ok := GetMappingUserEditionsEnabledEnum(string(m.EditionsEnabled)); !ok && m.EditionsEnabled != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EditionsEnabled: %s. Supported values are: %s.", m.EditionsEnabled, strings.Join(GetUserEditionsEnabledEnumStringValues(), ",")))
}
if _, ok := GetMappingUserAuthenticationEnum(string(m.Authentication)); !ok && m.Authentication != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Authentication: %s. Supported values are: %s.", m.Authentication, strings.Join(GetUserAuthenticationEnumStringValues(), ",")))
}
if _, ok := GetMappingUserProxyConnectEnum(string(m.ProxyConnect)); !ok && m.ProxyConnect != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ProxyConnect: %s. Supported values are: %s.", m.ProxyConnect, strings.Join(GetUserProxyConnectEnumStringValues(), ",")))
}
if _, ok := GetMappingUserCommonEnum(string(m.Common)); !ok && m.Common != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Common: %s. Supported values are: %s.", m.Common, strings.Join(GetUserCommonEnumStringValues(), ",")))
}
if _, ok := GetMappingUserOracleMaintainedEnum(string(m.OracleMaintained)); !ok && m.OracleMaintained != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OracleMaintained: %s. Supported values are: %s.", m.OracleMaintained, strings.Join(GetUserOracleMaintainedEnumStringValues(), ",")))
}
if _, ok := GetMappingUserInheritedEnum(string(m.Inherited)); !ok && m.Inherited != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Inherited: %s. Supported values are: %s.", m.Inherited, strings.Join(GetUserInheritedEnumStringValues(), ",")))
}
if _, ok := GetMappingUserImplicitEnum(string(m.Implicit)); !ok && m.Implicit != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Implicit: %s. Supported values are: %s.", m.Implicit, strings.Join(GetUserImplicitEnumStringValues(), ",")))
}
if _, ok := GetMappingUserAllSharedEnum(string(m.AllShared)); !ok && m.AllShared != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AllShared: %s. Supported values are: %s.", m.AllShared, strings.Join(GetUserAllSharedEnumStringValues(), ",")))
}
if _, ok := GetMappingUserExternalSharedEnum(string(m.ExternalShared)); !ok && m.ExternalShared != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExternalShared: %s. Supported values are: %s.", m.ExternalShared, strings.Join(GetUserExternalSharedEnumStringValues(), ",")))
}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
// UserStatusEnum Enum with underlying type: string
type UserStatusEnum string
// Set of constants representing the allowable values for UserStatusEnum
const (
UserStatusOpen UserStatusEnum = "OPEN"
UserStatusExpired UserStatusEnum = "EXPIRED"
UserStatusExpiredGrace UserStatusEnum = "EXPIRED_GRACE"
UserStatusLocked UserStatusEnum = "LOCKED"
UserStatusLockedTimed UserStatusEnum = "LOCKED_TIMED"
UserStatusExpiredAndLocked UserStatusEnum = "EXPIRED_AND_LOCKED"
UserStatusExpiredGraceAndLocked UserStatusEnum = "EXPIRED_GRACE_AND_LOCKED"
UserStatusExpiredAndLockedTimed UserStatusEnum = "EXPIRED_AND_LOCKED_TIMED"
UserStatusExpiredGraceAndLockedTimed UserStatusEnum = "EXPIRED_GRACE_AND_LOCKED_TIMED"
UserStatusOpenAndInRollover UserStatusEnum = "OPEN_AND_IN_ROLLOVER"
UserStatusExpiredAndInRollover UserStatusEnum = "EXPIRED_AND_IN_ROLLOVER"
UserStatusLockedAndInRollover UserStatusEnum = "LOCKED_AND_IN_ROLLOVER"
UserStatusExpiredAndLockedAndInRollover UserStatusEnum = "EXPIRED_AND_LOCKED_AND_IN_ROLLOVER"
UserStatusLockedTimedAndInRollover UserStatusEnum = "LOCKED_TIMED_AND_IN_ROLLOVER"
UserStatusExpiredAndLockedTimedAndInRol UserStatusEnum = "EXPIRED_AND_LOCKED_TIMED_AND_IN_ROL"
)
var mappingUserStatusEnum = map[string]UserStatusEnum{
"OPEN": UserStatusOpen,
"EXPIRED": UserStatusExpired,
"EXPIRED_GRACE": UserStatusExpiredGrace,
"LOCKED": UserStatusLocked,
"LOCKED_TIMED": UserStatusLockedTimed,
"EXPIRED_AND_LOCKED": UserStatusExpiredAndLocked,
"EXPIRED_GRACE_AND_LOCKED": UserStatusExpiredGraceAndLocked,
"EXPIRED_AND_LOCKED_TIMED": UserStatusExpiredAndLockedTimed,
"EXPIRED_GRACE_AND_LOCKED_TIMED": UserStatusExpiredGraceAndLockedTimed,
"OPEN_AND_IN_ROLLOVER": UserStatusOpenAndInRollover,
"EXPIRED_AND_IN_ROLLOVER": UserStatusExpiredAndInRollover,
"LOCKED_AND_IN_ROLLOVER": UserStatusLockedAndInRollover,
"EXPIRED_AND_LOCKED_AND_IN_ROLLOVER": UserStatusExpiredAndLockedAndInRollover,
"LOCKED_TIMED_AND_IN_ROLLOVER": UserStatusLockedTimedAndInRollover,
"EXPIRED_AND_LOCKED_TIMED_AND_IN_ROL": UserStatusExpiredAndLockedTimedAndInRol,
}
var mappingUserStatusEnumLowerCase = map[string]UserStatusEnum{
"open": UserStatusOpen,
"expired": UserStatusExpired,
"expired_grace": UserStatusExpiredGrace,
"locked": UserStatusLocked,
"locked_timed": UserStatusLockedTimed,
"expired_and_locked": UserStatusExpiredAndLocked,
"expired_grace_and_locked": UserStatusExpiredGraceAndLocked,
"expired_and_locked_timed": UserStatusExpiredAndLockedTimed,
"expired_grace_and_locked_timed": UserStatusExpiredGraceAndLockedTimed,
"open_and_in_rollover": UserStatusOpenAndInRollover,
"expired_and_in_rollover": UserStatusExpiredAndInRollover,
"locked_and_in_rollover": UserStatusLockedAndInRollover,
"expired_and_locked_and_in_rollover": UserStatusExpiredAndLockedAndInRollover,
"locked_timed_and_in_rollover": UserStatusLockedTimedAndInRollover,
"expired_and_locked_timed_and_in_rol": UserStatusExpiredAndLockedTimedAndInRol,
}
// GetUserStatusEnumValues Enumerates the set of values for UserStatusEnum
func GetUserStatusEnumValues() []UserStatusEnum {
values := make([]UserStatusEnum, 0)
for _, v := range mappingUserStatusEnum {
values = append(values, v)
}
return values
}
// GetUserStatusEnumStringValues Enumerates the set of values in String for UserStatusEnum
func GetUserStatusEnumStringValues() []string {
return []string{
"OPEN",
"EXPIRED",
"EXPIRED_GRACE",
"LOCKED",
"LOCKED_TIMED",
"EXPIRED_AND_LOCKED",
"EXPIRED_GRACE_AND_LOCKED",
"EXPIRED_AND_LOCKED_TIMED",
"EXPIRED_GRACE_AND_LOCKED_TIMED",
"OPEN_AND_IN_ROLLOVER",
"EXPIRED_AND_IN_ROLLOVER",
"LOCKED_AND_IN_ROLLOVER",
"EXPIRED_AND_LOCKED_AND_IN_ROLLOVER",
"LOCKED_TIMED_AND_IN_ROLLOVER",
"EXPIRED_AND_LOCKED_TIMED_AND_IN_ROL",
}
}
// GetMappingUserStatusEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserStatusEnum(val string) (UserStatusEnum, bool) {
enum, ok := mappingUserStatusEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserEditionsEnabledEnum Enum with underlying type: string
type UserEditionsEnabledEnum string
// Set of constants representing the allowable values for UserEditionsEnabledEnum
const (
UserEditionsEnabledYes UserEditionsEnabledEnum = "YES"
UserEditionsEnabledNo UserEditionsEnabledEnum = "NO"
)
var mappingUserEditionsEnabledEnum = map[string]UserEditionsEnabledEnum{
"YES": UserEditionsEnabledYes,
"NO": UserEditionsEnabledNo,
}
var mappingUserEditionsEnabledEnumLowerCase = map[string]UserEditionsEnabledEnum{
"yes": UserEditionsEnabledYes,
"no": UserEditionsEnabledNo,
}
// GetUserEditionsEnabledEnumValues Enumerates the set of values for UserEditionsEnabledEnum
func GetUserEditionsEnabledEnumValues() []UserEditionsEnabledEnum {
values := make([]UserEditionsEnabledEnum, 0)
for _, v := range mappingUserEditionsEnabledEnum {
values = append(values, v)
}
return values
}
// GetUserEditionsEnabledEnumStringValues Enumerates the set of values in String for UserEditionsEnabledEnum
func GetUserEditionsEnabledEnumStringValues() []string {
return []string{
"YES",
"NO",
}
}
// GetMappingUserEditionsEnabledEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserEditionsEnabledEnum(val string) (UserEditionsEnabledEnum, bool) {
enum, ok := mappingUserEditionsEnabledEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserAuthenticationEnum Enum with underlying type: string
type UserAuthenticationEnum string
// Set of constants representing the allowable values for UserAuthenticationEnum
const (
UserAuthenticationNone UserAuthenticationEnum = "NONE"
UserAuthenticationExternal UserAuthenticationEnum = "EXTERNAL"
UserAuthenticationGlobal UserAuthenticationEnum = "GLOBAL"
UserAuthenticationPassword UserAuthenticationEnum = "PASSWORD"
)
var mappingUserAuthenticationEnum = map[string]UserAuthenticationEnum{
"NONE": UserAuthenticationNone,
"EXTERNAL": UserAuthenticationExternal,
"GLOBAL": UserAuthenticationGlobal,
"PASSWORD": UserAuthenticationPassword,
}
var mappingUserAuthenticationEnumLowerCase = map[string]UserAuthenticationEnum{
"none": UserAuthenticationNone,
"external": UserAuthenticationExternal,
"global": UserAuthenticationGlobal,
"password": UserAuthenticationPassword,
}
// GetUserAuthenticationEnumValues Enumerates the set of values for UserAuthenticationEnum
func GetUserAuthenticationEnumValues() []UserAuthenticationEnum {
values := make([]UserAuthenticationEnum, 0)
for _, v := range mappingUserAuthenticationEnum {
values = append(values, v)
}
return values
}
// GetUserAuthenticationEnumStringValues Enumerates the set of values in String for UserAuthenticationEnum
func GetUserAuthenticationEnumStringValues() []string {
return []string{
"NONE",
"EXTERNAL",
"GLOBAL",
"PASSWORD",
}
}
// GetMappingUserAuthenticationEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserAuthenticationEnum(val string) (UserAuthenticationEnum, bool) {
enum, ok := mappingUserAuthenticationEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserProxyConnectEnum Enum with underlying type: string
type UserProxyConnectEnum string
// Set of constants representing the allowable values for UserProxyConnectEnum
const (
UserProxyConnectYes UserProxyConnectEnum = "YES"
UserProxyConnectNo UserProxyConnectEnum = "NO"
)
var mappingUserProxyConnectEnum = map[string]UserProxyConnectEnum{
"YES": UserProxyConnectYes,
"NO": UserProxyConnectNo,
}
var mappingUserProxyConnectEnumLowerCase = map[string]UserProxyConnectEnum{
"yes": UserProxyConnectYes,
"no": UserProxyConnectNo,
}
// GetUserProxyConnectEnumValues Enumerates the set of values for UserProxyConnectEnum
func GetUserProxyConnectEnumValues() []UserProxyConnectEnum {
values := make([]UserProxyConnectEnum, 0)
for _, v := range mappingUserProxyConnectEnum {
values = append(values, v)
}
return values
}
// GetUserProxyConnectEnumStringValues Enumerates the set of values in String for UserProxyConnectEnum
func GetUserProxyConnectEnumStringValues() []string {
return []string{
"YES",
"NO",
}
}
// GetMappingUserProxyConnectEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserProxyConnectEnum(val string) (UserProxyConnectEnum, bool) {
enum, ok := mappingUserProxyConnectEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserCommonEnum Enum with underlying type: string
type UserCommonEnum string
// Set of constants representing the allowable values for UserCommonEnum
const (
UserCommonYes UserCommonEnum = "YES"
UserCommonNo UserCommonEnum = "NO"
)
var mappingUserCommonEnum = map[string]UserCommonEnum{
"YES": UserCommonYes,
"NO": UserCommonNo,
}
var mappingUserCommonEnumLowerCase = map[string]UserCommonEnum{
"yes": UserCommonYes,
"no": UserCommonNo,
}
// GetUserCommonEnumValues Enumerates the set of values for UserCommonEnum
func GetUserCommonEnumValues() []UserCommonEnum {
values := make([]UserCommonEnum, 0)
for _, v := range mappingUserCommonEnum {
values = append(values, v)
}
return values
}
// GetUserCommonEnumStringValues Enumerates the set of values in String for UserCommonEnum
func GetUserCommonEnumStringValues() []string {
return []string{
"YES",
"NO",
}
}
// GetMappingUserCommonEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserCommonEnum(val string) (UserCommonEnum, bool) {
enum, ok := mappingUserCommonEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserOracleMaintainedEnum Enum with underlying type: string
type UserOracleMaintainedEnum string
// Set of constants representing the allowable values for UserOracleMaintainedEnum
const (
UserOracleMaintainedYes UserOracleMaintainedEnum = "YES"
UserOracleMaintainedNo UserOracleMaintainedEnum = "NO"
)
var mappingUserOracleMaintainedEnum = map[string]UserOracleMaintainedEnum{
"YES": UserOracleMaintainedYes,
"NO": UserOracleMaintainedNo,
}
var mappingUserOracleMaintainedEnumLowerCase = map[string]UserOracleMaintainedEnum{
"yes": UserOracleMaintainedYes,
"no": UserOracleMaintainedNo,
}
// GetUserOracleMaintainedEnumValues Enumerates the set of values for UserOracleMaintainedEnum
func GetUserOracleMaintainedEnumValues() []UserOracleMaintainedEnum {
values := make([]UserOracleMaintainedEnum, 0)
for _, v := range mappingUserOracleMaintainedEnum {
values = append(values, v)
}
return values
}
// GetUserOracleMaintainedEnumStringValues Enumerates the set of values in String for UserOracleMaintainedEnum
func GetUserOracleMaintainedEnumStringValues() []string {
return []string{
"YES",
"NO",
}
}
// GetMappingUserOracleMaintainedEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserOracleMaintainedEnum(val string) (UserOracleMaintainedEnum, bool) {
enum, ok := mappingUserOracleMaintainedEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserInheritedEnum Enum with underlying type: string
type UserInheritedEnum string
// Set of constants representing the allowable values for UserInheritedEnum
const (
UserInheritedYes UserInheritedEnum = "YES"
UserInheritedNo UserInheritedEnum = "NO"
)
var mappingUserInheritedEnum = map[string]UserInheritedEnum{
"YES": UserInheritedYes,
"NO": UserInheritedNo,
}
var mappingUserInheritedEnumLowerCase = map[string]UserInheritedEnum{
"yes": UserInheritedYes,
"no": UserInheritedNo,
}
// GetUserInheritedEnumValues Enumerates the set of values for UserInheritedEnum
func GetUserInheritedEnumValues() []UserInheritedEnum {
values := make([]UserInheritedEnum, 0)
for _, v := range mappingUserInheritedEnum {
values = append(values, v)
}
return values
}
// GetUserInheritedEnumStringValues Enumerates the set of values in String for UserInheritedEnum
func GetUserInheritedEnumStringValues() []string {
return []string{
"YES",
"NO",
}
}
// GetMappingUserInheritedEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserInheritedEnum(val string) (UserInheritedEnum, bool) {
enum, ok := mappingUserInheritedEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserImplicitEnum Enum with underlying type: string
type UserImplicitEnum string
// Set of constants representing the allowable values for UserImplicitEnum
const (
UserImplicitYes UserImplicitEnum = "YES"
UserImplicitNo UserImplicitEnum = "NO"
)
var mappingUserImplicitEnum = map[string]UserImplicitEnum{
"YES": UserImplicitYes,
"NO": UserImplicitNo,
}
var mappingUserImplicitEnumLowerCase = map[string]UserImplicitEnum{
"yes": UserImplicitYes,
"no": UserImplicitNo,
}
// GetUserImplicitEnumValues Enumerates the set of values for UserImplicitEnum
func GetUserImplicitEnumValues() []UserImplicitEnum {
values := make([]UserImplicitEnum, 0)
for _, v := range mappingUserImplicitEnum {
values = append(values, v)
}
return values
}
// GetUserImplicitEnumStringValues Enumerates the set of values in String for UserImplicitEnum
func GetUserImplicitEnumStringValues() []string {
return []string{
"YES",
"NO",
}
}
// GetMappingUserImplicitEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserImplicitEnum(val string) (UserImplicitEnum, bool) {
enum, ok := mappingUserImplicitEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserAllSharedEnum Enum with underlying type: string
type UserAllSharedEnum string
// Set of constants representing the allowable values for UserAllSharedEnum
const (
UserAllSharedYes UserAllSharedEnum = "YES"
UserAllSharedNo UserAllSharedEnum = "NO"
)
var mappingUserAllSharedEnum = map[string]UserAllSharedEnum{
"YES": UserAllSharedYes,
"NO": UserAllSharedNo,
}
var mappingUserAllSharedEnumLowerCase = map[string]UserAllSharedEnum{
"yes": UserAllSharedYes,
"no": UserAllSharedNo,
}
// GetUserAllSharedEnumValues Enumerates the set of values for UserAllSharedEnum
func GetUserAllSharedEnumValues() []UserAllSharedEnum {
values := make([]UserAllSharedEnum, 0)
for _, v := range mappingUserAllSharedEnum {
values = append(values, v)
}
return values
}
// GetUserAllSharedEnumStringValues Enumerates the set of values in String for UserAllSharedEnum
func GetUserAllSharedEnumStringValues() []string {
return []string{
"YES",
"NO",
}
}
// GetMappingUserAllSharedEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserAllSharedEnum(val string) (UserAllSharedEnum, bool) {
enum, ok := mappingUserAllSharedEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// UserExternalSharedEnum Enum with underlying type: string
type UserExternalSharedEnum string
// Set of constants representing the allowable values for UserExternalSharedEnum
const (
UserExternalSharedYes UserExternalSharedEnum = "YES"
UserExternalSharedNo UserExternalSharedEnum = "NO"
)
var mappingUserExternalSharedEnum = map[string]UserExternalSharedEnum{
"YES": UserExternalSharedYes,
"NO": UserExternalSharedNo,
}
var mappingUserExternalSharedEnumLowerCase = map[string]UserExternalSharedEnum{
"yes": UserExternalSharedYes,
"no": UserExternalSharedNo,
}
// GetUserExternalSharedEnumValues Enumerates the set of values for UserExternalSharedEnum
func GetUserExternalSharedEnumValues() []UserExternalSharedEnum {
values := make([]UserExternalSharedEnum, 0)
for _, v := range mappingUserExternalSharedEnum {
values = append(values, v)
}
return values
}
// GetUserExternalSharedEnumStringValues Enumerates the set of values in String for UserExternalSharedEnum
func GetUserExternalSharedEnumStringValues() []string {
return []string{
"YES",
"NO",
}
}
// GetMappingUserExternalSharedEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingUserExternalSharedEnum(val string) (UserExternalSharedEnum, bool) {
enum, ok := mappingUserExternalSharedEnumLowerCase[strings.ToLower(val)]
return enum, ok
}