27 lines
571 B
Python
27 lines
571 B
Python
|
|
# generated by datamodel-codegen:
|
||
|
|
# filename: envelope_match.json
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from enum import StrEnum
|
||
|
|
|
||
|
|
from pydantic import AwareDatetime, BaseModel, ConfigDict, constr
|
||
|
|
|
||
|
|
|
||
|
|
class RequiredLevel(StrEnum):
|
||
|
|
L1 = 'L1'
|
||
|
|
L2 = 'L2'
|
||
|
|
L3 = 'L3'
|
||
|
|
|
||
|
|
|
||
|
|
class EnvelopeMatch(BaseModel):
|
||
|
|
model_config = ConfigDict(
|
||
|
|
extra='forbid',
|
||
|
|
)
|
||
|
|
proposal_digest: constr(pattern=r'^[0-9a-f]{64}$')
|
||
|
|
within: bool
|
||
|
|
envelope_id: constr(min_length=1) | None
|
||
|
|
required_level: RequiredLevel
|
||
|
|
reasons: list[str]
|
||
|
|
checked_at: AwareDatetime
|