diff --git a/src/sfapi_client/_models/__init__.py b/src/sfapi_client/_models/__init__.py index bc88910..31e20cc 100644 --- a/src/sfapi_client/_models/__init__.py +++ b/src/sfapi_client/_models/__init__.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: -# filename: https://api-dev.nersc.gov/api/v1.2/openapi.json -# timestamp: 2024-07-18T15:58:27+00:00 +# filename: https://api.nersc.gov/api/v1.2/openapi.json +# timestamp: 2025-01-23T19:49:01+00:00 from __future__ import annotations @@ -85,15 +85,12 @@ class Note(BaseModel): timestamp: Optional[datetime] = Field(None, title="Timestamp") -class Outage(BaseModel): - name: str = Field(..., title="Name") - start_at: Optional[datetime] = Field(None, title="Start At") - end_at: Optional[datetime] = Field(None, title="End At") - description: Optional[str] = Field(None, title="Description") - notes: Optional[str] = Field(None, title="Notes") - status: Optional[str] = Field(None, title="Status") - swo: Optional[str] = Field(None, title="Swo") - update_at: Optional[datetime] = Field(None, title="Update At") +class OutageStatusValue(str, Enum): + Active = "Active" + Cancelled = "Cancelled" + Completed = "Completed" + Extended = "Extended" + Planned = "Planned" class PublicHost(str, Enum): @@ -126,14 +123,11 @@ class StorageStats(BaseModel): files_used: Optional[float] = Field(None, title="Files Used") -class Task(BaseModel): - id: str = Field(..., title="Id") - status: Optional[str] = Field(..., title="Status") - result: Optional[str] = Field(..., title="Result") - - -class Tasks(BaseModel): - tasks: Optional[List[Task]] = Field(None, title="Tasks") +class TaskStatus(str, Enum): + new = "new" + completed = "completed" + cancelled = "cancelled" + failed = "failed" class UserInfo(BaseModel): @@ -214,6 +208,17 @@ class JobOutput(BaseModel): error: Optional[str] = Field(None, title="Error") +class Outage(BaseModel): + name: str = Field(..., title="Name") + start_at: Optional[datetime] = Field(None, title="Start At") + end_at: Optional[datetime] = Field(None, title="End At") + description: Optional[str] = Field(None, title="Description") + notes: Optional[str] = Field(None, title="Notes") + status: Optional[OutageStatusValue] = None + swo: Optional[str] = Field(None, title="Swo") + update_at: Optional[datetime] = Field(None, title="Update At") + + class ProjectStats(BaseModel): id: int = Field(..., title="Id") description: str = Field(..., title="Description") @@ -250,6 +255,16 @@ class QueueOutput(BaseModel): error: Optional[str] = Field(None, title="Error") +class Task(BaseModel): + id: str = Field(..., title="Id") + status: Optional[TaskStatus] + result: Optional[str] = Field(..., title="Result") + + +class Tasks(BaseModel): + tasks: Optional[List[Task]] = Field(..., title="Tasks") + + class TransferResult(BaseModel): task_id: str = Field(..., title="Task Id") status: AppRoutersStorageModelsStatus