30 lines
668 B
Python
30 lines
668 B
Python
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class HealthResponse(BaseModel):
|
|
status: str = "ok"
|
|
|
|
|
|
class SimulationStartRequest(BaseModel):
|
|
scenario: str | None = None
|
|
weather: str | None = None
|
|
time_period: str | None = None
|
|
max_speed_kmh: int | None = Field(default=None, ge=0, le=300)
|
|
duration_minutes: int | None = Field(default=None, ge=1, le=360)
|
|
driver: str | None = None
|
|
extra: dict[str, Any] = Field(default_factory=dict)
|
|
|
|
|
|
class SimulationStartResponse(BaseModel):
|
|
simulation_id: str
|
|
|
|
|
|
class SimulationStopResponse(BaseModel):
|
|
simulation_id: str
|
|
status: str
|
|
|