-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmodel_app_enum.go
227 lines (206 loc) · 9.37 KB
/
model_app_enum.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
/*
authentik
Making authentication simple.
API version: 2024.12.2
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"encoding/json"
"fmt"
)
// AppEnum the model 'AppEnum'
type AppEnum string
// List of AppEnum
const (
APPENUM_TENANTS AppEnum = "authentik.tenants"
APPENUM_ADMIN AppEnum = "authentik.admin"
APPENUM_API AppEnum = "authentik.api"
APPENUM_CRYPTO AppEnum = "authentik.crypto"
APPENUM_FLOWS AppEnum = "authentik.flows"
APPENUM_OUTPOSTS AppEnum = "authentik.outposts"
APPENUM_POLICIES_DUMMY AppEnum = "authentik.policies.dummy"
APPENUM_POLICIES_EVENT_MATCHER AppEnum = "authentik.policies.event_matcher"
APPENUM_POLICIES_EXPIRY AppEnum = "authentik.policies.expiry"
APPENUM_POLICIES_EXPRESSION AppEnum = "authentik.policies.expression"
APPENUM_POLICIES_GEOIP AppEnum = "authentik.policies.geoip"
APPENUM_POLICIES_PASSWORD AppEnum = "authentik.policies.password"
APPENUM_POLICIES_REPUTATION AppEnum = "authentik.policies.reputation"
APPENUM_POLICIES AppEnum = "authentik.policies"
APPENUM_PROVIDERS_LDAP AppEnum = "authentik.providers.ldap"
APPENUM_PROVIDERS_OAUTH2 AppEnum = "authentik.providers.oauth2"
APPENUM_PROVIDERS_PROXY AppEnum = "authentik.providers.proxy"
APPENUM_PROVIDERS_RADIUS AppEnum = "authentik.providers.radius"
APPENUM_PROVIDERS_SAML AppEnum = "authentik.providers.saml"
APPENUM_PROVIDERS_SCIM AppEnum = "authentik.providers.scim"
APPENUM_RBAC AppEnum = "authentik.rbac"
APPENUM_RECOVERY AppEnum = "authentik.recovery"
APPENUM_SOURCES_KERBEROS AppEnum = "authentik.sources.kerberos"
APPENUM_SOURCES_LDAP AppEnum = "authentik.sources.ldap"
APPENUM_SOURCES_OAUTH AppEnum = "authentik.sources.oauth"
APPENUM_SOURCES_PLEX AppEnum = "authentik.sources.plex"
APPENUM_SOURCES_SAML AppEnum = "authentik.sources.saml"
APPENUM_SOURCES_SCIM AppEnum = "authentik.sources.scim"
APPENUM_STAGES_AUTHENTICATOR AppEnum = "authentik.stages.authenticator"
APPENUM_STAGES_AUTHENTICATOR_DUO AppEnum = "authentik.stages.authenticator_duo"
APPENUM_STAGES_AUTHENTICATOR_SMS AppEnum = "authentik.stages.authenticator_sms"
APPENUM_STAGES_AUTHENTICATOR_STATIC AppEnum = "authentik.stages.authenticator_static"
APPENUM_STAGES_AUTHENTICATOR_TOTP AppEnum = "authentik.stages.authenticator_totp"
APPENUM_STAGES_AUTHENTICATOR_VALIDATE AppEnum = "authentik.stages.authenticator_validate"
APPENUM_STAGES_AUTHENTICATOR_WEBAUTHN AppEnum = "authentik.stages.authenticator_webauthn"
APPENUM_STAGES_CAPTCHA AppEnum = "authentik.stages.captcha"
APPENUM_STAGES_CONSENT AppEnum = "authentik.stages.consent"
APPENUM_STAGES_DENY AppEnum = "authentik.stages.deny"
APPENUM_STAGES_DUMMY AppEnum = "authentik.stages.dummy"
APPENUM_STAGES_EMAIL AppEnum = "authentik.stages.email"
APPENUM_STAGES_IDENTIFICATION AppEnum = "authentik.stages.identification"
APPENUM_STAGES_INVITATION AppEnum = "authentik.stages.invitation"
APPENUM_STAGES_PASSWORD AppEnum = "authentik.stages.password"
APPENUM_STAGES_PROMPT AppEnum = "authentik.stages.prompt"
APPENUM_STAGES_REDIRECT AppEnum = "authentik.stages.redirect"
APPENUM_STAGES_USER_DELETE AppEnum = "authentik.stages.user_delete"
APPENUM_STAGES_USER_LOGIN AppEnum = "authentik.stages.user_login"
APPENUM_STAGES_USER_LOGOUT AppEnum = "authentik.stages.user_logout"
APPENUM_STAGES_USER_WRITE AppEnum = "authentik.stages.user_write"
APPENUM_BRANDS AppEnum = "authentik.brands"
APPENUM_BLUEPRINTS AppEnum = "authentik.blueprints"
APPENUM_CORE AppEnum = "authentik.core"
APPENUM_ENTERPRISE AppEnum = "authentik.enterprise"
APPENUM_ENTERPRISE_AUDIT AppEnum = "authentik.enterprise.audit"
APPENUM_ENTERPRISE_PROVIDERS_GOOGLE_WORKSPACE AppEnum = "authentik.enterprise.providers.google_workspace"
APPENUM_ENTERPRISE_PROVIDERS_MICROSOFT_ENTRA AppEnum = "authentik.enterprise.providers.microsoft_entra"
APPENUM_ENTERPRISE_PROVIDERS_RAC AppEnum = "authentik.enterprise.providers.rac"
APPENUM_ENTERPRISE_STAGES_AUTHENTICATOR_ENDPOINT_GDTC AppEnum = "authentik.enterprise.stages.authenticator_endpoint_gdtc"
APPENUM_ENTERPRISE_STAGES_SOURCE AppEnum = "authentik.enterprise.stages.source"
APPENUM_EVENTS AppEnum = "authentik.events"
)
// All allowed values of AppEnum enum
var AllowedAppEnumEnumValues = []AppEnum{
"authentik.tenants",
"authentik.admin",
"authentik.api",
"authentik.crypto",
"authentik.flows",
"authentik.outposts",
"authentik.policies.dummy",
"authentik.policies.event_matcher",
"authentik.policies.expiry",
"authentik.policies.expression",
"authentik.policies.geoip",
"authentik.policies.password",
"authentik.policies.reputation",
"authentik.policies",
"authentik.providers.ldap",
"authentik.providers.oauth2",
"authentik.providers.proxy",
"authentik.providers.radius",
"authentik.providers.saml",
"authentik.providers.scim",
"authentik.rbac",
"authentik.recovery",
"authentik.sources.kerberos",
"authentik.sources.ldap",
"authentik.sources.oauth",
"authentik.sources.plex",
"authentik.sources.saml",
"authentik.sources.scim",
"authentik.stages.authenticator",
"authentik.stages.authenticator_duo",
"authentik.stages.authenticator_sms",
"authentik.stages.authenticator_static",
"authentik.stages.authenticator_totp",
"authentik.stages.authenticator_validate",
"authentik.stages.authenticator_webauthn",
"authentik.stages.captcha",
"authentik.stages.consent",
"authentik.stages.deny",
"authentik.stages.dummy",
"authentik.stages.email",
"authentik.stages.identification",
"authentik.stages.invitation",
"authentik.stages.password",
"authentik.stages.prompt",
"authentik.stages.redirect",
"authentik.stages.user_delete",
"authentik.stages.user_login",
"authentik.stages.user_logout",
"authentik.stages.user_write",
"authentik.brands",
"authentik.blueprints",
"authentik.core",
"authentik.enterprise",
"authentik.enterprise.audit",
"authentik.enterprise.providers.google_workspace",
"authentik.enterprise.providers.microsoft_entra",
"authentik.enterprise.providers.rac",
"authentik.enterprise.stages.authenticator_endpoint_gdtc",
"authentik.enterprise.stages.source",
"authentik.events",
}
func (v *AppEnum) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := AppEnum(value)
for _, existing := range AllowedAppEnumEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid AppEnum", value)
}
// NewAppEnumFromValue returns a pointer to a valid AppEnum
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewAppEnumFromValue(v string) (*AppEnum, error) {
ev := AppEnum(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for AppEnum: valid values are %v", v, AllowedAppEnumEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v AppEnum) IsValid() bool {
for _, existing := range AllowedAppEnumEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to AppEnum value
func (v AppEnum) Ptr() *AppEnum {
return &v
}
type NullableAppEnum struct {
value *AppEnum
isSet bool
}
func (v NullableAppEnum) Get() *AppEnum {
return v.value
}
func (v *NullableAppEnum) Set(val *AppEnum) {
v.value = val
v.isSet = true
}
func (v NullableAppEnum) IsSet() bool {
return v.isSet
}
func (v *NullableAppEnum) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAppEnum(val *AppEnum) *NullableAppEnum {
return &NullableAppEnum{value: val, isSet: true}
}
func (v NullableAppEnum) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAppEnum) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}