43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
|
|
# generated by datamodel-codegen:
|
||
|
|
# filename: resource_profile.json
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from enum import StrEnum
|
||
|
|
|
||
|
|
from pydantic import AwareDatetime, BaseModel, ConfigDict, conint, constr
|
||
|
|
|
||
|
|
|
||
|
|
class Type(StrEnum):
|
||
|
|
STORAGE = 'STORAGE'
|
||
|
|
PV = 'PV'
|
||
|
|
EV_CHARGER = 'EV_CHARGER'
|
||
|
|
HVAC = 'HVAC'
|
||
|
|
INDUSTRIAL_LOAD = 'INDUSTRIAL_LOAD'
|
||
|
|
MICROGRID = 'MICROGRID'
|
||
|
|
BASE_STATION = 'BASE_STATION'
|
||
|
|
|
||
|
|
|
||
|
|
class Constraints(BaseModel):
|
||
|
|
model_config = ConfigDict(
|
||
|
|
extra='forbid',
|
||
|
|
)
|
||
|
|
min_duration_min: conint(le=9007199254740991, gt=0) | None
|
||
|
|
recovery_rate_mw_per_min: constr(pattern=r'^-?\d+(\.\d+)?$') | None
|
||
|
|
|
||
|
|
|
||
|
|
class ResourceProfile(BaseModel):
|
||
|
|
model_config = ConfigDict(
|
||
|
|
extra='forbid',
|
||
|
|
)
|
||
|
|
resource_id: constr(min_length=1)
|
||
|
|
name: constr(min_length=1)
|
||
|
|
type: Type
|
||
|
|
rated_power_mw: constr(pattern=r'^-?\d+(\.\d+)?$')
|
||
|
|
certified_adjustable_mw: constr(pattern=r'^-?\d+(\.\d+)?$')
|
||
|
|
confidence: constr(pattern=r'^-?\d+(\.\d+)?$')
|
||
|
|
reliability_score: constr(pattern=r'^-?\d+(\.\d+)?$')
|
||
|
|
constraints: Constraints
|
||
|
|
evidence_refs: list[constr(pattern=r'^[0-9a-f]{64}$')]
|
||
|
|
updated_at: AwareDatetime
|