-
Notifications
You must be signed in to change notification settings - Fork 80
/
privilege_name.go
100 lines (90 loc) · 3.6 KB
/
privilege_name.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
// 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.
// Data Safe API
//
// APIs for using Oracle Data Safe.
//
package datasafe
import (
"strings"
)
// PrivilegeNameEnum Enum with underlying type: string
type PrivilegeNameEnum string
// Set of constants representing the allowable values for PrivilegeNameEnum
const (
PrivilegeNameSelect PrivilegeNameEnum = "SELECT"
PrivilegeNameUpdate PrivilegeNameEnum = "UPDATE"
PrivilegeNameInsert PrivilegeNameEnum = "INSERT"
PrivilegeNameDelete PrivilegeNameEnum = "DELETE"
PrivilegeNameRead PrivilegeNameEnum = "READ"
PrivilegeNameOwner PrivilegeNameEnum = "OWNER"
PrivilegeNameIndex PrivilegeNameEnum = "INDEX"
PrivilegeNameSelectAnyTable PrivilegeNameEnum = "SELECT_ANY_TABLE"
PrivilegeNameUpdateAnyTable PrivilegeNameEnum = "UPDATE_ANY_TABLE"
PrivilegeNameInsertAnyTable PrivilegeNameEnum = "INSERT_ANY_TABLE"
PrivilegeNameDeleteAnyTable PrivilegeNameEnum = "DELETE_ANY_TABLE"
PrivilegeNameReadAnyTable PrivilegeNameEnum = "READ_ANY_TABLE"
PrivilegeNameCreateAnyIndex PrivilegeNameEnum = "CREATE_ANY_INDEX"
)
var mappingPrivilegeNameEnum = map[string]PrivilegeNameEnum{
"SELECT": PrivilegeNameSelect,
"UPDATE": PrivilegeNameUpdate,
"INSERT": PrivilegeNameInsert,
"DELETE": PrivilegeNameDelete,
"READ": PrivilegeNameRead,
"OWNER": PrivilegeNameOwner,
"INDEX": PrivilegeNameIndex,
"SELECT_ANY_TABLE": PrivilegeNameSelectAnyTable,
"UPDATE_ANY_TABLE": PrivilegeNameUpdateAnyTable,
"INSERT_ANY_TABLE": PrivilegeNameInsertAnyTable,
"DELETE_ANY_TABLE": PrivilegeNameDeleteAnyTable,
"READ_ANY_TABLE": PrivilegeNameReadAnyTable,
"CREATE_ANY_INDEX": PrivilegeNameCreateAnyIndex,
}
var mappingPrivilegeNameEnumLowerCase = map[string]PrivilegeNameEnum{
"select": PrivilegeNameSelect,
"update": PrivilegeNameUpdate,
"insert": PrivilegeNameInsert,
"delete": PrivilegeNameDelete,
"read": PrivilegeNameRead,
"owner": PrivilegeNameOwner,
"index": PrivilegeNameIndex,
"select_any_table": PrivilegeNameSelectAnyTable,
"update_any_table": PrivilegeNameUpdateAnyTable,
"insert_any_table": PrivilegeNameInsertAnyTable,
"delete_any_table": PrivilegeNameDeleteAnyTable,
"read_any_table": PrivilegeNameReadAnyTable,
"create_any_index": PrivilegeNameCreateAnyIndex,
}
// GetPrivilegeNameEnumValues Enumerates the set of values for PrivilegeNameEnum
func GetPrivilegeNameEnumValues() []PrivilegeNameEnum {
values := make([]PrivilegeNameEnum, 0)
for _, v := range mappingPrivilegeNameEnum {
values = append(values, v)
}
return values
}
// GetPrivilegeNameEnumStringValues Enumerates the set of values in String for PrivilegeNameEnum
func GetPrivilegeNameEnumStringValues() []string {
return []string{
"SELECT",
"UPDATE",
"INSERT",
"DELETE",
"READ",
"OWNER",
"INDEX",
"SELECT_ANY_TABLE",
"UPDATE_ANY_TABLE",
"INSERT_ANY_TABLE",
"DELETE_ANY_TABLE",
"READ_ANY_TABLE",
"CREATE_ANY_INDEX",
}
}
// GetMappingPrivilegeNameEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingPrivilegeNameEnum(val string) (PrivilegeNameEnum, bool) {
enum, ok := mappingPrivilegeNameEnumLowerCase[strings.ToLower(val)]
return enum, ok
}