from typing import List, Union from pydantic import BaseModel class CoordinatesPayload(BaseModel): coords: Union[str, List[List[float]]] state: str duration: int delay : int