daytona_api_client 0.26.0a11__py3-none-any.whl → 0.26.0rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of daytona_api_client might be problematic. Click here for more details.

Files changed (24) hide show
  1. daytona_api_client/__init__.py +0 -1
  2. daytona_api_client/api/toolbox_api.py +12 -13
  3. daytona_api_client/models/__init__.py +0 -1
  4. daytona_api_client/models/create_audit_log.py +2 -2
  5. daytona_api_client/models/create_sandbox.py +5 -1
  6. daytona_api_client/models/sandbox.py +5 -1
  7. daytona_api_client/models/sandbox_state.py +1 -1
  8. daytona_api_client/models/session_execute_response.py +3 -5
  9. daytona_api_client/models/workspace.py +5 -1
  10. {daytona_api_client-0.26.0a11.dist-info → daytona_api_client-0.26.0rc1.dist-info}/METADATA +1 -1
  11. {daytona_api_client-0.26.0a11.dist-info → daytona_api_client-0.26.0rc1.dist-info}/RECORD +14 -24
  12. daytona_api_client/models/account_provider_dto.py +0 -101
  13. daytona_api_client/models/build_snapshot.py +0 -118
  14. daytona_api_client/models/download_files.py +0 -101
  15. daytona_api_client/models/get_build_logs400_response.py +0 -101
  16. daytona_api_client/models/session_command_logs_response.py +0 -103
  17. daytona_api_client/models/upload_file.py +0 -101
  18. daytona_api_client/models/upload_file_dto.py +0 -101
  19. daytona_api_client/models/upload_file_request_file.py +0 -159
  20. daytona_api_client/models/upload_files_multi_request_files_inner.py +0 -101
  21. daytona_api_client/models/volume.py +0 -133
  22. {daytona_api_client-0.26.0a11.dist-info → daytona_api_client-0.26.0rc1.dist-info}/WHEEL +0 -0
  23. {daytona_api_client-0.26.0a11.dist-info → daytona_api_client-0.26.0rc1.dist-info}/licenses/LICENSE +0 -0
  24. {daytona_api_client-0.26.0a11.dist-info → daytona_api_client-0.26.0rc1.dist-info}/top_level.txt +0 -0
@@ -140,7 +140,6 @@ from daytona_api_client.models.sandbox_volume import SandboxVolume
140
140
  from daytona_api_client.models.screenshot_response import ScreenshotResponse
141
141
  from daytona_api_client.models.search_files_response import SearchFilesResponse
142
142
  from daytona_api_client.models.session import Session
143
- from daytona_api_client.models.session_command_logs_response import SessionCommandLogsResponse
144
143
  from daytona_api_client.models.session_execute_request import SessionExecuteRequest
145
144
  from daytona_api_client.models.session_execute_response import SessionExecuteResponse
146
145
  from daytona_api_client.models.set_snapshot_general_status_dto import SetSnapshotGeneralStatusDto
@@ -70,7 +70,6 @@ from daytona_api_client.models.replace_result import ReplaceResult
70
70
  from daytona_api_client.models.screenshot_response import ScreenshotResponse
71
71
  from daytona_api_client.models.search_files_response import SearchFilesResponse
72
72
  from daytona_api_client.models.session import Session
73
- from daytona_api_client.models.session_command_logs_response import SessionCommandLogsResponse
74
73
  from daytona_api_client.models.session_execute_request import SessionExecuteRequest
75
74
  from daytona_api_client.models.session_execute_response import SessionExecuteResponse
76
75
  from daytona_api_client.models.windows_response import WindowsResponse
@@ -5991,7 +5990,7 @@ class ToolboxApi:
5991
5990
  session_id: StrictStr,
5992
5991
  command_id: StrictStr,
5993
5992
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
5994
- follow: Annotated[Optional[StrictBool], Field(description="Whether to stream the logs")] = None,
5993
+ follow: Optional[StrictBool] = None,
5995
5994
  _request_timeout: Union[
5996
5995
  None,
5997
5996
  Annotated[StrictFloat, Field(gt=0)],
@@ -6004,7 +6003,7 @@ class ToolboxApi:
6004
6003
  _content_type: Optional[StrictStr] = None,
6005
6004
  _headers: Optional[Dict[StrictStr, Any]] = None,
6006
6005
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6007
- ) -> SessionCommandLogsResponse:
6006
+ ) -> str:
6008
6007
  """Get command logs
6009
6008
 
6010
6009
  Get logs for a specific command in a session
@@ -6017,7 +6016,7 @@ class ToolboxApi:
6017
6016
  :type command_id: str
6018
6017
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
6019
6018
  :type x_daytona_organization_id: str
6020
- :param follow: Whether to stream the logs
6019
+ :param follow:
6021
6020
  :type follow: bool
6022
6021
  :param _request_timeout: timeout setting for this request. If one
6023
6022
  number provided, it will be total request
@@ -6054,7 +6053,7 @@ class ToolboxApi:
6054
6053
  )
6055
6054
 
6056
6055
  _response_types_map: Dict[str, Optional[str]] = {
6057
- '200': "SessionCommandLogsResponse",
6056
+ '200': "str",
6058
6057
  }
6059
6058
  response_data = self.api_client.call_api(
6060
6059
  *_param,
@@ -6074,7 +6073,7 @@ class ToolboxApi:
6074
6073
  session_id: StrictStr,
6075
6074
  command_id: StrictStr,
6076
6075
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
6077
- follow: Annotated[Optional[StrictBool], Field(description="Whether to stream the logs")] = None,
6076
+ follow: Optional[StrictBool] = None,
6078
6077
  _request_timeout: Union[
6079
6078
  None,
6080
6079
  Annotated[StrictFloat, Field(gt=0)],
@@ -6087,7 +6086,7 @@ class ToolboxApi:
6087
6086
  _content_type: Optional[StrictStr] = None,
6088
6087
  _headers: Optional[Dict[StrictStr, Any]] = None,
6089
6088
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6090
- ) -> ApiResponse[SessionCommandLogsResponse]:
6089
+ ) -> ApiResponse[str]:
6091
6090
  """Get command logs
6092
6091
 
6093
6092
  Get logs for a specific command in a session
@@ -6100,7 +6099,7 @@ class ToolboxApi:
6100
6099
  :type command_id: str
6101
6100
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
6102
6101
  :type x_daytona_organization_id: str
6103
- :param follow: Whether to stream the logs
6102
+ :param follow:
6104
6103
  :type follow: bool
6105
6104
  :param _request_timeout: timeout setting for this request. If one
6106
6105
  number provided, it will be total request
@@ -6137,7 +6136,7 @@ class ToolboxApi:
6137
6136
  )
6138
6137
 
6139
6138
  _response_types_map: Dict[str, Optional[str]] = {
6140
- '200': "SessionCommandLogsResponse",
6139
+ '200': "str",
6141
6140
  }
6142
6141
  response_data = self.api_client.call_api(
6143
6142
  *_param,
@@ -6157,7 +6156,7 @@ class ToolboxApi:
6157
6156
  session_id: StrictStr,
6158
6157
  command_id: StrictStr,
6159
6158
  x_daytona_organization_id: Annotated[Optional[StrictStr], Field(description="Use with JWT to specify the organization ID")] = None,
6160
- follow: Annotated[Optional[StrictBool], Field(description="Whether to stream the logs")] = None,
6159
+ follow: Optional[StrictBool] = None,
6161
6160
  _request_timeout: Union[
6162
6161
  None,
6163
6162
  Annotated[StrictFloat, Field(gt=0)],
@@ -6183,7 +6182,7 @@ class ToolboxApi:
6183
6182
  :type command_id: str
6184
6183
  :param x_daytona_organization_id: Use with JWT to specify the organization ID
6185
6184
  :type x_daytona_organization_id: str
6186
- :param follow: Whether to stream the logs
6185
+ :param follow:
6187
6186
  :type follow: bool
6188
6187
  :param _request_timeout: timeout setting for this request. If one
6189
6188
  number provided, it will be total request
@@ -6220,7 +6219,7 @@ class ToolboxApi:
6220
6219
  )
6221
6220
 
6222
6221
  _response_types_map: Dict[str, Optional[str]] = {
6223
- '200': "SessionCommandLogsResponse",
6222
+ '200': "str",
6224
6223
  }
6225
6224
  response_data = self.api_client.call_api(
6226
6225
  *_param,
@@ -6279,7 +6278,7 @@ class ToolboxApi:
6279
6278
  if 'Accept' not in _header_params:
6280
6279
  _header_params['Accept'] = self.api_client.select_header_accept(
6281
6280
  [
6282
- 'application/json'
6281
+ 'text/plain'
6283
6282
  ]
6284
6283
  )
6285
6284
 
@@ -111,7 +111,6 @@ from daytona_api_client.models.sandbox_volume import SandboxVolume
111
111
  from daytona_api_client.models.screenshot_response import ScreenshotResponse
112
112
  from daytona_api_client.models.search_files_response import SearchFilesResponse
113
113
  from daytona_api_client.models.session import Session
114
- from daytona_api_client.models.session_command_logs_response import SessionCommandLogsResponse
115
114
  from daytona_api_client.models.session_execute_request import SessionExecuteRequest
116
115
  from daytona_api_client.models.session_execute_response import SessionExecuteResponse
117
116
  from daytona_api_client.models.set_snapshot_general_status_dto import SetSnapshotGeneralStatusDto
@@ -39,8 +39,8 @@ class CreateAuditLog(BaseModel):
39
39
  @field_validator('action')
40
40
  def action_validate_enum(cls, value):
41
41
  """Validates the enum"""
42
- if value not in set(['create', 'read', 'update', 'delete', 'login', 'set_default', 'update_role', 'update_assigned_roles', 'update_quota', 'suspend', 'unsuspend', 'accept', 'decline', 'link_account', 'unlink_account', 'leave_organization', 'regenerate_key_pair', 'update_scheduling', 'start', 'stop', 'replace_labels', 'create_backup', 'update_public_status', 'set_auto_stop_interval', 'set_auto_archive_interval', 'set_auto_delete_interval', 'archive', 'get_port_preview_url', 'set_general_status', 'activate', 'deactivate', 'toolbox_delete_file', 'toolbox_download_file', 'toolbox_create_folder', 'toolbox_move_file', 'toolbox_set_file_permissions', 'toolbox_replace_in_files', 'toolbox_upload_file', 'toolbox_bulk_upload_files', 'toolbox_git_add_files', 'toolbox_git_create_branch', 'toolbox_git_delete_branch', 'toolbox_git_clone_repository', 'toolbox_git_commit_changes', 'toolbox_git_pull_changes', 'toolbox_git_push_changes', 'toolbox_git_checkout_branch', 'toolbox_execute_command', 'toolbox_create_session', 'toolbox_session_execute_command', 'toolbox_delete_session', 'toolbox_computer_use_start', 'toolbox_computer_use_stop', 'toolbox_computer_use_restart_process']):
43
- raise ValueError("must be one of enum values ('create', 'read', 'update', 'delete', 'login', 'set_default', 'update_role', 'update_assigned_roles', 'update_quota', 'suspend', 'unsuspend', 'accept', 'decline', 'link_account', 'unlink_account', 'leave_organization', 'regenerate_key_pair', 'update_scheduling', 'start', 'stop', 'replace_labels', 'create_backup', 'update_public_status', 'set_auto_stop_interval', 'set_auto_archive_interval', 'set_auto_delete_interval', 'archive', 'get_port_preview_url', 'set_general_status', 'activate', 'deactivate', 'toolbox_delete_file', 'toolbox_download_file', 'toolbox_create_folder', 'toolbox_move_file', 'toolbox_set_file_permissions', 'toolbox_replace_in_files', 'toolbox_upload_file', 'toolbox_bulk_upload_files', 'toolbox_git_add_files', 'toolbox_git_create_branch', 'toolbox_git_delete_branch', 'toolbox_git_clone_repository', 'toolbox_git_commit_changes', 'toolbox_git_pull_changes', 'toolbox_git_push_changes', 'toolbox_git_checkout_branch', 'toolbox_execute_command', 'toolbox_create_session', 'toolbox_session_execute_command', 'toolbox_delete_session', 'toolbox_computer_use_start', 'toolbox_computer_use_stop', 'toolbox_computer_use_restart_process')")
42
+ if value not in set(['create', 'read', 'update', 'delete', 'login', 'set_default', 'update_role', 'update_assigned_roles', 'update_quota', 'suspend', 'unsuspend', 'accept', 'decline', 'link_account', 'unlink_account', 'leave_organization', 'regenerate_key_pair', 'update_scheduling', 'start', 'stop', 'replace_labels', 'create_backup', 'update_public_status', 'set_auto_stop_interval', 'set_auto_archive_interval', 'set_auto_delete_interval', 'archive', 'get_port_preview_url', 'set_general_status', 'activate', 'deactivate', 'update_network_settings', 'toolbox_delete_file', 'toolbox_download_file', 'toolbox_create_folder', 'toolbox_move_file', 'toolbox_set_file_permissions', 'toolbox_replace_in_files', 'toolbox_upload_file', 'toolbox_bulk_upload_files', 'toolbox_git_add_files', 'toolbox_git_create_branch', 'toolbox_git_delete_branch', 'toolbox_git_clone_repository', 'toolbox_git_commit_changes', 'toolbox_git_pull_changes', 'toolbox_git_push_changes', 'toolbox_git_checkout_branch', 'toolbox_execute_command', 'toolbox_create_session', 'toolbox_session_execute_command', 'toolbox_delete_session', 'toolbox_computer_use_start', 'toolbox_computer_use_stop', 'toolbox_computer_use_restart_process']):
43
+ raise ValueError("must be one of enum values ('create', 'read', 'update', 'delete', 'login', 'set_default', 'update_role', 'update_assigned_roles', 'update_quota', 'suspend', 'unsuspend', 'accept', 'decline', 'link_account', 'unlink_account', 'leave_organization', 'regenerate_key_pair', 'update_scheduling', 'start', 'stop', 'replace_labels', 'create_backup', 'update_public_status', 'set_auto_stop_interval', 'set_auto_archive_interval', 'set_auto_delete_interval', 'archive', 'get_port_preview_url', 'set_general_status', 'activate', 'deactivate', 'update_network_settings', 'toolbox_delete_file', 'toolbox_download_file', 'toolbox_create_folder', 'toolbox_move_file', 'toolbox_set_file_permissions', 'toolbox_replace_in_files', 'toolbox_upload_file', 'toolbox_bulk_upload_files', 'toolbox_git_add_files', 'toolbox_git_create_branch', 'toolbox_git_delete_branch', 'toolbox_git_clone_repository', 'toolbox_git_commit_changes', 'toolbox_git_pull_changes', 'toolbox_git_push_changes', 'toolbox_git_checkout_branch', 'toolbox_execute_command', 'toolbox_create_session', 'toolbox_session_execute_command', 'toolbox_delete_session', 'toolbox_computer_use_start', 'toolbox_computer_use_stop', 'toolbox_computer_use_restart_process')")
44
44
  return value
45
45
 
46
46
  @field_validator('target_type')
@@ -34,6 +34,8 @@ class CreateSandbox(BaseModel):
34
34
  env: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variables for the sandbox")
35
35
  labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Labels for the sandbox")
36
36
  public: Optional[StrictBool] = Field(default=None, description="Whether the sandbox http preview is publicly accessible")
37
+ network_block_all: Optional[StrictBool] = Field(default=None, description="Whether to block all network access for the sandbox", alias="networkBlockAll")
38
+ network_allow_list: Optional[StrictStr] = Field(default=None, description="Comma-separated list of allowed CIDR network addresses for the sandbox", alias="networkAllowList")
37
39
  var_class: Optional[StrictStr] = Field(default=None, description="The sandbox class type", alias="class")
38
40
  target: Optional[StrictStr] = Field(default=None, description="The target (region) where the sandbox will be created")
39
41
  cpu: Optional[StrictInt] = Field(default=None, description="CPU cores allocated to the sandbox")
@@ -46,7 +48,7 @@ class CreateSandbox(BaseModel):
46
48
  volumes: Optional[List[SandboxVolume]] = Field(default=None, description="Array of volumes to attach to the sandbox")
47
49
  build_info: Optional[CreateBuildInfo] = Field(default=None, description="Build information for the sandbox", alias="buildInfo")
48
50
  additional_properties: Dict[str, Any] = {}
49
- __properties: ClassVar[List[str]] = ["snapshot", "user", "env", "labels", "public", "class", "target", "cpu", "gpu", "memory", "disk", "autoStopInterval", "autoArchiveInterval", "autoDeleteInterval", "volumes", "buildInfo"]
51
+ __properties: ClassVar[List[str]] = ["snapshot", "user", "env", "labels", "public", "networkBlockAll", "networkAllowList", "class", "target", "cpu", "gpu", "memory", "disk", "autoStopInterval", "autoArchiveInterval", "autoDeleteInterval", "volumes", "buildInfo"]
50
52
 
51
53
  @field_validator('var_class')
52
54
  def var_class_validate_enum(cls, value):
@@ -131,6 +133,8 @@ class CreateSandbox(BaseModel):
131
133
  "env": obj.get("env"),
132
134
  "labels": obj.get("labels"),
133
135
  "public": obj.get("public"),
136
+ "networkBlockAll": obj.get("networkBlockAll"),
137
+ "networkAllowList": obj.get("networkAllowList"),
134
138
  "class": obj.get("class"),
135
139
  "target": obj.get("target"),
136
140
  "cpu": obj.get("cpu"),
@@ -38,6 +38,8 @@ class Sandbox(BaseModel):
38
38
  env: Dict[str, StrictStr] = Field(description="Environment variables for the sandbox")
39
39
  labels: Dict[str, StrictStr] = Field(description="Labels for the sandbox")
40
40
  public: StrictBool = Field(description="Whether the sandbox http preview is public")
41
+ network_block_all: StrictBool = Field(description="Whether to block all network access for the sandbox", alias="networkBlockAll")
42
+ network_allow_list: Optional[StrictStr] = Field(default=None, description="Comma-separated list of allowed CIDR network addresses for the sandbox", alias="networkAllowList")
41
43
  target: StrictStr = Field(description="The target environment for the sandbox")
42
44
  cpu: Union[StrictFloat, StrictInt] = Field(description="The CPU quota for the sandbox")
43
45
  gpu: Union[StrictFloat, StrictInt] = Field(description="The GPU quota for the sandbox")
@@ -59,7 +61,7 @@ class Sandbox(BaseModel):
59
61
  var_class: Optional[StrictStr] = Field(default=None, description="The class of the sandbox", alias="class")
60
62
  daemon_version: Optional[StrictStr] = Field(default=None, description="The version of the daemon running in the sandbox", alias="daemonVersion")
61
63
  additional_properties: Dict[str, Any] = {}
62
- __properties: ClassVar[List[str]] = ["id", "organizationId", "snapshot", "user", "env", "labels", "public", "target", "cpu", "gpu", "memory", "disk", "state", "desiredState", "errorReason", "backupState", "backupCreatedAt", "autoStopInterval", "autoArchiveInterval", "autoDeleteInterval", "runnerDomain", "volumes", "buildInfo", "createdAt", "updatedAt", "class", "daemonVersion"]
64
+ __properties: ClassVar[List[str]] = ["id", "organizationId", "snapshot", "user", "env", "labels", "public", "networkBlockAll", "networkAllowList", "target", "cpu", "gpu", "memory", "disk", "state", "desiredState", "errorReason", "backupState", "backupCreatedAt", "autoStopInterval", "autoArchiveInterval", "autoDeleteInterval", "runnerDomain", "volumes", "buildInfo", "createdAt", "updatedAt", "class", "daemonVersion"]
63
65
 
64
66
  @field_validator('backup_state')
65
67
  def backup_state_validate_enum(cls, value):
@@ -156,6 +158,8 @@ class Sandbox(BaseModel):
156
158
  "env": obj.get("env"),
157
159
  "labels": obj.get("labels"),
158
160
  "public": obj.get("public"),
161
+ "networkBlockAll": obj.get("networkBlockAll"),
162
+ "networkAllowList": obj.get("networkAllowList"),
159
163
  "target": obj.get("target"),
160
164
  "cpu": obj.get("cpu"),
161
165
  "gpu": obj.get("gpu"),
@@ -41,8 +41,8 @@ class SandboxState(str, Enum):
41
41
  BUILDING_SNAPSHOT = 'building_snapshot'
42
42
  UNKNOWN = 'unknown'
43
43
  PULLING_SNAPSHOT = 'pulling_snapshot'
44
- ARCHIVING = 'archiving'
45
44
  ARCHIVED = 'archived'
45
+ ARCHIVING = 'archiving'
46
46
 
47
47
  @classmethod
48
48
  def from_json(cls, json_str: str) -> Self:
@@ -28,11 +28,10 @@ class SessionExecuteResponse(BaseModel):
28
28
  SessionExecuteResponse
29
29
  """ # noqa: E501
30
30
  cmd_id: Optional[StrictStr] = Field(default=None, description="The ID of the executed command", alias="cmdId")
31
- stdout: Optional[StrictStr] = Field(default=None, description="The stdout of the executed command")
32
- stderr: Optional[StrictStr] = Field(default=None, description="The stderr of the executed command")
31
+ output: Optional[StrictStr] = Field(default=None, description="The output of the executed command")
33
32
  exit_code: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The exit code of the executed command", alias="exitCode")
34
33
  additional_properties: Dict[str, Any] = {}
35
- __properties: ClassVar[List[str]] = ["cmdId", "stdout", "stderr", "exitCode"]
34
+ __properties: ClassVar[List[str]] = ["cmdId", "output", "exitCode"]
36
35
 
37
36
  model_config = ConfigDict(
38
37
  populate_by_name=True,
@@ -93,8 +92,7 @@ class SessionExecuteResponse(BaseModel):
93
92
 
94
93
  _obj = cls.model_validate({
95
94
  "cmdId": obj.get("cmdId"),
96
- "stdout": obj.get("stdout"),
97
- "stderr": obj.get("stderr"),
95
+ "output": obj.get("output"),
98
96
  "exitCode": obj.get("exitCode")
99
97
  })
100
98
  # store additional fields in additional_properties
@@ -39,6 +39,8 @@ class Workspace(BaseModel):
39
39
  env: Dict[str, StrictStr] = Field(description="Environment variables for the sandbox")
40
40
  labels: Dict[str, StrictStr] = Field(description="Labels for the sandbox")
41
41
  public: StrictBool = Field(description="Whether the sandbox http preview is public")
42
+ network_block_all: StrictBool = Field(description="Whether to block all network access for the sandbox", alias="networkBlockAll")
43
+ network_allow_list: Optional[StrictStr] = Field(default=None, description="Comma-separated list of allowed CIDR network addresses for the sandbox", alias="networkAllowList")
42
44
  target: StrictStr = Field(description="The target environment for the sandbox")
43
45
  cpu: Union[StrictFloat, StrictInt] = Field(description="The CPU quota for the sandbox")
44
46
  gpu: Union[StrictFloat, StrictInt] = Field(description="The GPU quota for the sandbox")
@@ -65,7 +67,7 @@ class Workspace(BaseModel):
65
67
  snapshot_created_at: Optional[StrictStr] = Field(default=None, description="The creation timestamp of the last snapshot", alias="snapshotCreatedAt")
66
68
  info: Optional[SandboxInfo] = Field(default=None, description="Additional information about the sandbox")
67
69
  additional_properties: Dict[str, Any] = {}
68
- __properties: ClassVar[List[str]] = ["id", "organizationId", "snapshot", "user", "env", "labels", "public", "target", "cpu", "gpu", "memory", "disk", "state", "desiredState", "errorReason", "backupState", "backupCreatedAt", "autoStopInterval", "autoArchiveInterval", "autoDeleteInterval", "runnerDomain", "volumes", "buildInfo", "createdAt", "updatedAt", "class", "daemonVersion", "name", "image", "snapshotState", "snapshotCreatedAt", "info"]
70
+ __properties: ClassVar[List[str]] = ["id", "organizationId", "snapshot", "user", "env", "labels", "public", "networkBlockAll", "networkAllowList", "target", "cpu", "gpu", "memory", "disk", "state", "desiredState", "errorReason", "backupState", "backupCreatedAt", "autoStopInterval", "autoArchiveInterval", "autoDeleteInterval", "runnerDomain", "volumes", "buildInfo", "createdAt", "updatedAt", "class", "daemonVersion", "name", "image", "snapshotState", "snapshotCreatedAt", "info"]
69
71
 
70
72
  @field_validator('backup_state')
71
73
  def backup_state_validate_enum(cls, value):
@@ -175,6 +177,8 @@ class Workspace(BaseModel):
175
177
  "env": obj.get("env"),
176
178
  "labels": obj.get("labels"),
177
179
  "public": obj.get("public"),
180
+ "networkBlockAll": obj.get("networkBlockAll"),
181
+ "networkAllowList": obj.get("networkAllowList"),
178
182
  "target": obj.get("target"),
179
183
  "cpu": obj.get("cpu"),
180
184
  "gpu": obj.get("gpu"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: daytona_api_client
3
- Version: 0.26.0a11
3
+ Version: 0.26.0rc1
4
4
  Summary: Daytona
5
5
  Home-page:
6
6
  Author: Daytona Platforms Inc.
@@ -1,4 +1,4 @@
1
- daytona_api_client/__init__.py,sha256=tJUrnA_kecx063xnpuGbeSJgzR5RwBPDqnjTnB586zQ,10259
1
+ daytona_api_client/__init__.py,sha256=hQHxKI9Jx7vhpnUFMs9TlZlfIGqDMEwyN-0u8Ef0YfQ,10164
2
2
  daytona_api_client/api_client.py,sha256=9EKcRsveS2okE5kTbp212LVTY6LJATDZEqA8Rj77vXY,27455
3
3
  daytona_api_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
4
  daytona_api_client/configuration.py,sha256=Dz7AXjEZ4BCCCUoGQZLfXUTtuH1PUuo3KrlwLO5Dlsk,18241
@@ -15,18 +15,16 @@ daytona_api_client/api/preview_api.py,sha256=_cYR0xaBKtYBFUKIRezvR0d6swN7yKkmVkJ
15
15
  daytona_api_client/api/runners_api.py,sha256=kl74Mg19G71Kcj9dNK9xeJCaZ2upk4z-DS7Ul70n-Ww,49018
16
16
  daytona_api_client/api/sandbox_api.py,sha256=HIcVHneL_fcHF867FMb5kou9zXDKhZvTWKlowr59Zb4,175269
17
17
  daytona_api_client/api/snapshots_api.py,sha256=rt0h_XOyGay-JEaqw69-JqiJEq0GbG1U-MKJtg3Ez0c,103174
18
- daytona_api_client/api/toolbox_api.py,sha256=x_R0OcCpLdUYRS6ejGLFM5wOd6OrmE6mr8znRdBKrtc,720571
18
+ daytona_api_client/api/toolbox_api.py,sha256=izj9K1CqTATLepFrFqrgJ0rAZ3TlBXYlcuXkZij1EPQ,720094
19
19
  daytona_api_client/api/users_api.py,sha256=KR4cw2mfRp06QV2b0UXXQ1Jcx59TyuS0c7yGRr2Sodk,86402
20
20
  daytona_api_client/api/volumes_api.py,sha256=N9kxZzhfaZxC_YQ-Vi1QksoTIzqp_dFADywgQup1oSk,56613
21
21
  daytona_api_client/api/workspace_api.py,sha256=mjn4jlTtMbKfuqxcr9goo-01RJX-hFjVLT1rF8K5uKI,169328
22
- daytona_api_client/models/__init__.py,sha256=ERoqPdaJuWWIuk5xO1aNnW07fVnXA4coppZeJIsWjVw,8880
22
+ daytona_api_client/models/__init__.py,sha256=6tOqBwIma5R5Hn0ihlH37vfnJFUZIdgbelQ7XS8auzk,8785
23
23
  daytona_api_client/models/account_provider.py,sha256=yKJ_dMGnxGalNYuVTmo4CoFHpj1PIssSE1rnUaQeOKY,3154
24
- daytona_api_client/models/account_provider_dto.py,sha256=__7634O02yfv49jLLzvadJlF1YodOeZmWzjZKUmtd2Y,3154
25
24
  daytona_api_client/models/api_key_list.py,sha256=LwEm8q2SjDOGa04S0kkk4GRbZPvrpVJ-4Ju1dgcp0b8,5005
26
25
  daytona_api_client/models/api_key_response.py,sha256=XWqJdKTMp1w8uoUpmeKn0tKeXeImTJElnTvLunZGX5Y,4611
27
26
  daytona_api_client/models/audit_log.py,sha256=sEOzYMbo8D525RhvlbizaiDjcC9fKo0-v2LbkXyxC6A,4689
28
27
  daytona_api_client/models/build_info.py,sha256=5mPYDwHA3pQ4fPbNuE3kC9DYUmebIncqc4Fj2BQR1ZQ,3735
29
- daytona_api_client/models/build_snapshot.py,sha256=Sz3O8H7xwIMHwrlbeQhxHNDHidbk_-2b7NtHYedoSGU,4272
30
28
  daytona_api_client/models/command.py,sha256=BSsm6JDZ3gX7EfhFMzhsgv_r1q4ycJmN4ba0d2qFoBg,3403
31
29
  daytona_api_client/models/completion_context.py,sha256=ulDPkPYnVGiBMzcTDdyGrq9sPwb4ZYECJ8XvC9-rrvc,3330
32
30
  daytona_api_client/models/completion_item.py,sha256=fnIhRNLvf0jaB_RXpS28QQyB1DvUMvFl7YLh49r88pk,3803
@@ -36,7 +34,7 @@ daytona_api_client/models/computer_use_start_response.py,sha256=9VYe5UMBU-0EpGaw
36
34
  daytona_api_client/models/computer_use_status_response.py,sha256=P2dNSx1Ot-szu4y5gk1GCEJixCxsXrVnMNetxeYMh54,3489
37
35
  daytona_api_client/models/computer_use_stop_response.py,sha256=FUpPYsIMPXqCGKYqdvVozjHHthg5j0o8NOMCYXjp5lY,3332
38
36
  daytona_api_client/models/create_api_key.py,sha256=GFv3d-rA2Mbr9UhP-0O0DKm-gvln_JSGFJjMyoSAc8A,4351
39
- daytona_api_client/models/create_audit_log.py,sha256=w6wUGpqj0UROd7GqLPXto_3hsN660WEfobFF-zX-hpg,6863
37
+ daytona_api_client/models/create_audit_log.py,sha256=wWI3XbgOEBmjeljAzP-R5HJ9v3xpsiQ1uSQuBYwQNM8,6917
40
38
  daytona_api_client/models/create_build_info.py,sha256=hepmmgcZn199sgLksLm3ksJNSv-XLSgqL2BPdFnNAdg,3402
41
39
  daytona_api_client/models/create_docker_registry.py,sha256=dyWgwtTu6RcbGgXyosFbwtvPJ55FjuK0duof-jK9o7Q,4337
42
40
  daytona_api_client/models/create_linked_account.py,sha256=ar_cK_7Ep9iQ6zKeYDEMhQ5m3jc5EuomXj9SpdtWtSE,3289
@@ -45,7 +43,7 @@ daytona_api_client/models/create_organization_invitation.py,sha256=U5uLVrI3b5kfV
45
43
  daytona_api_client/models/create_organization_quota.py,sha256=HERVvV6pRerMtV05dPTwEec82HcSJ_tKFpEcYfLlLrQ,4716
46
44
  daytona_api_client/models/create_organization_role.py,sha256=vQai9U9x82hVCfRCotP1UKtaDz3yehtHxOqVEIhG_Ds,4069
47
45
  daytona_api_client/models/create_runner.py,sha256=vbNmuFuefPIdhatTu6qALi8GUT0AyP6quf-ZhL1jzdc,4530
48
- daytona_api_client/models/create_sandbox.py,sha256=ZGEBbWleGnxbfm8WbDjzoN77rwzCvYGPUG78dTiCV6k,7076
46
+ daytona_api_client/models/create_sandbox.py,sha256=Fpw-r_W4Navki333EBbSjqK2YRrjvWgiwnzV-WhyUzo,7571
49
47
  daytona_api_client/models/create_session_request.py,sha256=8Zv23ZXzrW6v2GmygwTUz5bTugAikCT-T8eHwwYRLxc,3136
50
48
  daytona_api_client/models/create_snapshot.py,sha256=WGea9750qOcwwAjSjFRYFhlA3H0m5SUotrGgJm3z6Is,4768
51
49
  daytona_api_client/models/create_user.py,sha256=__5zKvbJCtB44mALgvZBPlYghxlcdPUjLCDiIITKJiM,4390
@@ -53,13 +51,11 @@ daytona_api_client/models/create_volume.py,sha256=ClRnZzdkEWMIGlGbOix4pbhki7IcKP
53
51
  daytona_api_client/models/create_workspace.py,sha256=Gu60Pe7tkpiObaZbABenpRPpPduI47RwbcgFJrvCCr0,7082
54
52
  daytona_api_client/models/display_info_response.py,sha256=ScbtgcWdnqxoVf1UtqolCsDR908Be4VFTyEBaXT_bvc,3142
55
53
  daytona_api_client/models/docker_registry.py,sha256=ZvO8zbXkgoQBrIogjBkGWlHnnRwd7CCq_DbdG92o6N4,4326
56
- daytona_api_client/models/download_files.py,sha256=kOoubSJieTxqPoRECwDGtMpYZyDdXoMNybJWZ6Rek7Q,3094
57
54
  daytona_api_client/models/empty_response.py,sha256=pzQ97N0yWuJfgQ-iLXAaI8wTsLUBFyAbBQtCveYNnho,3097
58
55
  daytona_api_client/models/execute_request.py,sha256=pqLiipYbNty2zaiQNfhc9B1zZwQPeqaBtwwlAIEdakU,3401
59
56
  daytona_api_client/models/execute_response.py,sha256=fj3cyel-sUbHO61VebQM5j4RHT17k2GEHgNDThicvj8,3261
60
57
  daytona_api_client/models/file_info.py,sha256=XjAMg_C64Or2UqYeABmkupuL91x_lQ_lwEVrt6I8oQY,3624
61
58
  daytona_api_client/models/file_status.py,sha256=FlYS6S_BXaGg-svQ5KXee_iEC-QlBsYLjghvSSXXZao,3231
62
- daytona_api_client/models/get_build_logs400_response.py,sha256=nMU-8fitLwNYQqQFu7SXqbKBeGYtKl3CnY48IYlsDO0,3240
63
59
  daytona_api_client/models/git_add_request.py,sha256=goBcduXYh5TVK-IzXagQdsRm6j1O_Iu67RcGDdo2NDU,3156
64
60
  daytona_api_client/models/git_branch_request.py,sha256=5xA1566ZIeeQoLItu9PXH0lQbxFjyWstTELlvuMbapU,3093
65
61
  daytona_api_client/models/git_checkout_request.py,sha256=cNy-DCFoICt3B1RSbhxCTYELKO1pRrC0kGcCXedH0s8,3109
@@ -115,19 +111,18 @@ daytona_api_client/models/runner.py,sha256=1IfxPT2n-jmHW3yrtO1gHYmofyX9Lktvn6uP0
115
111
  daytona_api_client/models/runner_region.py,sha256=Lkxx3kYTx8m4w3ntEiaOafMrUknhtNMfk00oD92kXZE,716
116
112
  daytona_api_client/models/runner_snapshot_dto.py,sha256=ZBv1j3_4huI-z4GWbCqxOOT85OSyNYX3FHVAHQU6rbo,3447
117
113
  daytona_api_client/models/runner_state.py,sha256=_cGjUiDdFZtUQjPc76YKgawOdxV1BDq0ehyKqWFMjD4,819
118
- daytona_api_client/models/sandbox.py,sha256=D3RxrYjaj4k8fccqvqF6eWd37HvQ6Z_jsokLe9kspNQ,9444
114
+ daytona_api_client/models/sandbox.py,sha256=gJu6wT5iPE2Pl5lVrTFUxxCqL-49UpbXdAS-Li13uvQ,9915
119
115
  daytona_api_client/models/sandbox_class.py,sha256=Suwn9F4jLgtEdLtCWV86PpCtcfZ653h4bMYrmzrwBBc,731
120
116
  daytona_api_client/models/sandbox_desired_state.py,sha256=BHvsm7h8ydWf5e48D7eFGRL9tD8vt7eMBMguZ1GChbc,818
121
117
  daytona_api_client/models/sandbox_info.py,sha256=u8wFXAS36AyRIwEfcPphUEBxjOLmtZTvYAq4aoeCJsU,3493
122
118
  daytona_api_client/models/sandbox_labels.py,sha256=szanqeO42NwBygvKOq8EZtp6-ExERvumB42II24maUY,3091
123
- daytona_api_client/models/sandbox_state.py,sha256=PDvt8EowYJrte0vov6MQafNEU9XaHGLS7xTgpRPybqY,1136
119
+ daytona_api_client/models/sandbox_state.py,sha256=a3niQChUHt9p-l4Jd2Qio6t6iP6Ic5iBk1G8_ttpGIU,1136
124
120
  daytona_api_client/models/sandbox_volume.py,sha256=R-cNh7LCK6IWjEcAXA6bS_JVkmd54X6tCcAEtJtijKE,3260
125
121
  daytona_api_client/models/screenshot_response.py,sha256=n-K-Zpk92a3tFY665fcNDJQxDF80YOhLHVzDRbAl_aE,3621
126
122
  daytona_api_client/models/search_files_response.py,sha256=3m7itQRgoeqJ8I6PyW-BbRthN5oLEP4pMr4HZsB8uqU,3050
127
123
  daytona_api_client/models/session.py,sha256=dg-bsVQRCgL7bIMUYXCufpJfF_QYfLLc88cwDfZKfcE,3944
128
- daytona_api_client/models/session_command_logs_response.py,sha256=4-nfnZUkCRHn2n5_DDDMyyoH2ieBzRcVjU7ka7kuVE8,3254
129
124
  daytona_api_client/models/session_execute_request.py,sha256=_okMRsfmRsIeUe9tUSg06doA9t_FtzPJmh0_IV3Yw4c,3545
130
- daytona_api_client/models/session_execute_response.py,sha256=IDOtQigdtudUv38VJVl0tVXP6L-0y38UCmY3Z2Uc3R8,3713
125
+ daytona_api_client/models/session_execute_response.py,sha256=_TYkpP7y3HKGYRKUPS1PxXlWQKl2iHOqeYP6jwNR48Q,3558
131
126
  daytona_api_client/models/set_snapshot_general_status_dto.py,sha256=d1qZ9B51JmiJAYpCvUgiYgB40Ckj_0ubx9Jse9QMkmQ,3148
132
127
  daytona_api_client/models/snapshot_dto.py,sha256=eTX3vGw5K0RhjFkNKSo_VcNl28ehB0ZjlEh9TSu_RYY,6051
133
128
  daytona_api_client/models/snapshot_state.py,sha256=hVEXEtoHEfE0jd5cF-979GTSKGYZnY6tiIQBU1Ww-9o,975
@@ -139,20 +134,15 @@ daytona_api_client/models/update_organization_invitation.py,sha256=_98DviKjGYq1h
139
134
  daytona_api_client/models/update_organization_member_role.py,sha256=-B8wsTJgQSkQTiYqD0nuc8yUXRRzIX5U0z5z94CTc5Q,3401
140
135
  daytona_api_client/models/update_organization_quota.py,sha256=qfwgYkEKBJHhksdhbC0_LZUt5fBBFehQdtfq5seFSGc,6830
141
136
  daytona_api_client/models/update_organization_role.py,sha256=-Z8oRpO3ebQRtlzMaeYKyfyNiFARD76kGvY_9-mF4os,4069
142
- daytona_api_client/models/upload_file.py,sha256=N2HcKVDWE127cAHXa-D1asMaMBhCOYD7eAXnFxmrnx0,3102
143
- daytona_api_client/models/upload_file_dto.py,sha256=l9Fl0Pw-58mwz0vWUkC7JJ9X1YX4IX2wRHX29ttjs78,3114
144
- daytona_api_client/models/upload_file_request_file.py,sha256=Ge_t-zpwCKTv6CCR5DQK3J5FDTYD6OHqZ9A-5pziEY0,5810
145
- daytona_api_client/models/upload_files_multi_request_files_inner.py,sha256=2YePDzX-ewGOj8UHlplb7q85e6f4nrDcQUttzjbPxxM,3228
146
137
  daytona_api_client/models/usage_overview.py,sha256=OvQ7AS-BvkGeVDtlV2eo9sBAZt1jRmJqPUHJCT4F6bU,4126
147
138
  daytona_api_client/models/user.py,sha256=sXLeH2Rivv_Jls4rGcv3ihfX9B7-4pCZqk_JrSGBGmI,4060
148
139
  daytona_api_client/models/user_public_key.py,sha256=Y0_O7Sq8NP3XzCdKJJj7iTavEY8ytcBAf0Q3qOnJhbQ,3150
149
- daytona_api_client/models/volume.py,sha256=asBdm16e6uaBZKs00f-TMYVRVHyJaNuZquxdYSMcqEo,4465
150
140
  daytona_api_client/models/volume_dto.py,sha256=NL6A6xpc9liR_zlVZKGCoHLlz6r4LAHrMW2uL0TClnI,4594
151
141
  daytona_api_client/models/volume_state.py,sha256=AaOsyPygY58fquvIkrwFndsXMrG0dCYcGKd8HRZhulg,848
152
142
  daytona_api_client/models/windows_response.py,sha256=1fW2GYVSjFbipfQupU2MjfhUlcEyawzwtnWnwGngsFs,3295
153
- daytona_api_client/models/workspace.py,sha256=9ORG3s149qLI_7RSAAPf7j6WR1AZAgpkS37BFWQJ1Qk,11017
154
- daytona_api_client-0.26.0a11.dist-info/licenses/LICENSE,sha256=Qrw_9vreBpJ9mUMcB5B7ALDecZHgRciuOqS0BPfpihc,10752
155
- daytona_api_client-0.26.0a11.dist-info/METADATA,sha256=QhKLh9npSzj30j7uXLh_rwpXzHwaN7bpdwSE1yX8mVM,621
156
- daytona_api_client-0.26.0a11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
157
- daytona_api_client-0.26.0a11.dist-info/top_level.txt,sha256=sDZKAfxKnAQYvOLS9vAOx88EYH3wV5Wx897pODDupuE,19
158
- daytona_api_client-0.26.0a11.dist-info/RECORD,,
143
+ daytona_api_client/models/workspace.py,sha256=uwAStXOLrVJzbxdTfPZokrcMr4Dp4ghgH8V5fy5r0gY,11488
144
+ daytona_api_client-0.26.0rc1.dist-info/licenses/LICENSE,sha256=Qrw_9vreBpJ9mUMcB5B7ALDecZHgRciuOqS0BPfpihc,10752
145
+ daytona_api_client-0.26.0rc1.dist-info/METADATA,sha256=mevXdlL0NMhPzKJgQ6SUTKBSYvxo6GRvmuD1aQa2iUw,621
146
+ daytona_api_client-0.26.0rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
147
+ daytona_api_client-0.26.0rc1.dist-info/top_level.txt,sha256=sDZKAfxKnAQYvOLS9vAOx88EYH3wV5Wx897pODDupuE,19
148
+ daytona_api_client-0.26.0rc1.dist-info/RECORD,,
@@ -1,101 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Daytona
5
-
6
- Daytona AI platform API Docs
7
-
8
- The version of the OpenAPI document: 1.0
9
- Contact: support@daytona.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
- from typing import Any, ClassVar, Dict, List
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
-
27
- class AccountProviderDto(BaseModel):
28
- """
29
- AccountProviderDto
30
- """ # noqa: E501
31
-
32
- provider: StrictStr
33
- display_name: StrictStr = Field(alias="displayName")
34
- additional_properties: Dict[str, Any] = {}
35
- __properties: ClassVar[List[str]] = ["provider", "displayName"]
36
-
37
- model_config = ConfigDict(
38
- populate_by_name=True,
39
- validate_assignment=True,
40
- protected_namespaces=(),
41
- )
42
-
43
- def to_str(self) -> str:
44
- """Returns the string representation of the model using alias"""
45
- return pprint.pformat(self.model_dump(by_alias=True))
46
-
47
- def to_json(self) -> str:
48
- """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
-
52
- @classmethod
53
- def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of AccountProviderDto from a JSON string"""
55
- return cls.from_dict(json.loads(json_str))
56
-
57
- def to_dict(self) -> Dict[str, Any]:
58
- """Return the dictionary representation of the model using alias.
59
-
60
- This has the following differences from calling pydantic's
61
- `self.model_dump(by_alias=True)`:
62
-
63
- * `None` is only added to the output dict for nullable fields that
64
- were set at model initialization. Other fields with value `None`
65
- are ignored.
66
- * Fields in `self.additional_properties` are added to the output dict.
67
- """
68
- excluded_fields: Set[str] = set(
69
- [
70
- "additional_properties",
71
- ]
72
- )
73
-
74
- _dict = self.model_dump(
75
- by_alias=True,
76
- exclude=excluded_fields,
77
- exclude_none=True,
78
- )
79
- # puts key-value pairs in additional_properties in the top level
80
- if self.additional_properties is not None:
81
- for _key, _value in self.additional_properties.items():
82
- _dict[_key] = _value
83
-
84
- return _dict
85
-
86
- @classmethod
87
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
- """Create an instance of AccountProviderDto from a dict"""
89
- if obj is None:
90
- return None
91
-
92
- if not isinstance(obj, dict):
93
- return cls.model_validate(obj)
94
-
95
- _obj = cls.model_validate({"provider": obj.get("provider"), "displayName": obj.get("displayName")})
96
- # store additional fields in additional_properties
97
- for _key in obj.keys():
98
- if _key not in cls.__properties:
99
- _obj.additional_properties[_key] = obj.get(_key)
100
-
101
- return _obj
@@ -1,118 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Daytona
5
-
6
- Daytona AI platform API Docs
7
-
8
- The version of the OpenAPI document: 1.0
9
- Contact: support@daytona.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from daytona_api_client.models.create_build_info import CreateBuildInfo
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
-
28
- class BuildSnapshot(BaseModel):
29
- """
30
- BuildSnapshot
31
- """ # noqa: E501
32
-
33
- name: StrictStr = Field(description="The name of the snapshot to build")
34
- cpu: Optional[StrictInt] = Field(default=None, description="CPU cores allocated to the resulting sandbox")
35
- gpu: Optional[StrictInt] = Field(default=None, description="GPU units allocated to the resulting sandbox")
36
- memory: Optional[StrictInt] = Field(default=None, description="Memory allocated to the resulting sandbox in GB")
37
- disk: Optional[StrictInt] = Field(default=None, description="Disk space allocated to the sandbox in GB")
38
- build_info: CreateBuildInfo = Field(description="Build information for the snapshot", alias="buildInfo")
39
- additional_properties: Dict[str, Any] = {}
40
- __properties: ClassVar[List[str]] = ["name", "cpu", "gpu", "memory", "disk", "buildInfo"]
41
-
42
- model_config = ConfigDict(
43
- populate_by_name=True,
44
- validate_assignment=True,
45
- protected_namespaces=(),
46
- )
47
-
48
- def to_str(self) -> str:
49
- """Returns the string representation of the model using alias"""
50
- return pprint.pformat(self.model_dump(by_alias=True))
51
-
52
- def to_json(self) -> str:
53
- """Returns the JSON representation of the model using alias"""
54
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
- return json.dumps(self.to_dict())
56
-
57
- @classmethod
58
- def from_json(cls, json_str: str) -> Optional[Self]:
59
- """Create an instance of BuildSnapshot from a JSON string"""
60
- return cls.from_dict(json.loads(json_str))
61
-
62
- def to_dict(self) -> Dict[str, Any]:
63
- """Return the dictionary representation of the model using alias.
64
-
65
- This has the following differences from calling pydantic's
66
- `self.model_dump(by_alias=True)`:
67
-
68
- * `None` is only added to the output dict for nullable fields that
69
- were set at model initialization. Other fields with value `None`
70
- are ignored.
71
- * Fields in `self.additional_properties` are added to the output dict.
72
- """
73
- excluded_fields: Set[str] = set(
74
- [
75
- "additional_properties",
76
- ]
77
- )
78
-
79
- _dict = self.model_dump(
80
- by_alias=True,
81
- exclude=excluded_fields,
82
- exclude_none=True,
83
- )
84
- # override the default output from pydantic by calling `to_dict()` of build_info
85
- if self.build_info:
86
- _dict["buildInfo"] = self.build_info.to_dict()
87
- # puts key-value pairs in additional_properties in the top level
88
- if self.additional_properties is not None:
89
- for _key, _value in self.additional_properties.items():
90
- _dict[_key] = _value
91
-
92
- return _dict
93
-
94
- @classmethod
95
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
- """Create an instance of BuildSnapshot from a dict"""
97
- if obj is None:
98
- return None
99
-
100
- if not isinstance(obj, dict):
101
- return cls.model_validate(obj)
102
-
103
- _obj = cls.model_validate(
104
- {
105
- "name": obj.get("name"),
106
- "cpu": obj.get("cpu"),
107
- "gpu": obj.get("gpu"),
108
- "memory": obj.get("memory"),
109
- "disk": obj.get("disk"),
110
- "buildInfo": CreateBuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None,
111
- }
112
- )
113
- # store additional fields in additional_properties
114
- for _key in obj.keys():
115
- if _key not in cls.__properties:
116
- _obj.additional_properties[_key] = obj.get(_key)
117
-
118
- return _obj