Debian Codegraph @

src/auth0/management/types/rule.py

raw symbols SCIP
1 # This file was auto-generated by Fern from our API Definition.
2
3 import typing
4
5 import pydantic
6 from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
8
9 class Rule(UniversalBaseModel):
10 name: typing.Optional[str] = pydantic.Field(default=None)
11 """
12 Name of this rule.
13 """
14
15 id: typing.Optional[str] = pydantic.Field(default=None)
16 """
17 ID of this rule.
18 """
19
20 enabled: typing.Optional[bool] = pydantic.Field(default=None)
21 """
22 Whether the rule is enabled (true), or disabled (false).
23 """
24
25 script: typing.Optional[str] = pydantic.Field(default=None)
26 """
27 Code to be executed when this rule runs.
28 """
29
30 order: typing.Optional[float] = pydantic.Field(default=None)
31 """
32 Order that this rule should execute in relative to other rules. Lower-valued rules execute first.
33 """
34
35 stage: typing.Optional[str] = pydantic.Field(default=None)
36 """
37 Execution stage of this rule. Can be `login_success`, `login_failure`, or `pre_authorize`.
38 """
39
40 if IS_PYDANTIC_V2:
41 model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
42 else:
43
44 class Config:
45 frozen = True
46 smart_union = True
47 extra = pydantic.Extra.allow