29 lines
690 B
Python
29 lines
690 B
Python
|
|
# generated by datamodel-codegen:
|
||
|
|
# filename: envelope_change_request.json
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from enum import StrEnum
|
||
|
|
|
||
|
|
from pydantic import AwareDatetime, BaseModel, ConfigDict, constr
|
||
|
|
|
||
|
|
|
||
|
|
class Action(StrEnum):
|
||
|
|
WIDEN = 'WIDEN'
|
||
|
|
NARROW = 'NARROW'
|
||
|
|
SUSPEND = 'SUSPEND'
|
||
|
|
REACTIVATE = 'REACTIVATE'
|
||
|
|
|
||
|
|
|
||
|
|
class EnvelopeChangeRequest(BaseModel):
|
||
|
|
model_config = ConfigDict(
|
||
|
|
extra='forbid',
|
||
|
|
)
|
||
|
|
id: constr(min_length=1)
|
||
|
|
envelope_id: constr(min_length=1)
|
||
|
|
action: Action
|
||
|
|
bounds: dict[str, constr(pattern=r'^-?\d+(\.\d+)?$')]
|
||
|
|
basis: constr(min_length=1)
|
||
|
|
source_finding_id: constr(min_length=1) | None
|
||
|
|
requested_at: AwareDatetime
|