Skip to content

Commit

Permalink
Update models from API
Browse files Browse the repository at this point in the history
  • Loading branch information
cjh1 committed Jan 23, 2025
1 parent aeddb61 commit 78082f2
Showing 1 changed file with 34 additions and 19 deletions.
53 changes: 34 additions & 19 deletions src/sfapi_client/_models/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 78082f2

Please sign in to comment.