daytona_api_client 0.21.3a0__py3-none-any.whl → 0.21.4a4__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 (107) hide show
  1. daytona_api_client/api/__init__.py +1 -0
  2. daytona_api_client/api/api_keys_api.py +328 -171
  3. daytona_api_client/api/docker_registry_api.py +463 -239
  4. daytona_api_client/api/object_storage_api.py +63 -33
  5. daytona_api_client/api/organizations_api.py +1582 -612
  6. daytona_api_client/api/preview_api.py +175 -71
  7. daytona_api_client/api/runners_api.py +195 -67
  8. daytona_api_client/api/sandbox_api.py +909 -499
  9. daytona_api_client/api/snapshots_api.py +482 -253
  10. daytona_api_client/api/toolbox_api.py +2684 -1410
  11. daytona_api_client/api/users_api.py +526 -184
  12. daytona_api_client/api/volumes_api.py +332 -180
  13. daytona_api_client/api/workspace_api.py +909 -499
  14. daytona_api_client/api_client.py +192 -90
  15. daytona_api_client/api_response.py +3 -2
  16. daytona_api_client/configuration.py +52 -55
  17. daytona_api_client/exceptions.py +16 -15
  18. daytona_api_client/models/account_provider.py +11 -9
  19. daytona_api_client/models/api_key_list.py +21 -40
  20. daytona_api_client/models/api_key_response.py +19 -38
  21. daytona_api_client/models/build_info.py +15 -22
  22. daytona_api_client/models/command.py +13 -12
  23. daytona_api_client/models/completion_context.py +11 -11
  24. daytona_api_client/models/completion_item.py +17 -28
  25. daytona_api_client/models/completion_list.py +12 -17
  26. daytona_api_client/models/create_api_key.py +17 -32
  27. daytona_api_client/models/create_build_info.py +13 -17
  28. daytona_api_client/models/create_docker_registry.py +18 -21
  29. daytona_api_client/models/create_linked_account.py +11 -9
  30. daytona_api_client/models/create_organization.py +10 -9
  31. daytona_api_client/models/create_organization_invitation.py +17 -24
  32. daytona_api_client/models/create_organization_quota.py +19 -32
  33. daytona_api_client/models/create_organization_role.py +15 -28
  34. daytona_api_client/models/create_runner.py +26 -41
  35. daytona_api_client/models/create_sandbox.py +39 -76
  36. daytona_api_client/models/create_session_request.py +10 -9
  37. daytona_api_client/models/create_snapshot.py +22 -39
  38. daytona_api_client/models/create_user.py +19 -26
  39. daytona_api_client/models/create_volume.py +10 -9
  40. daytona_api_client/models/create_workspace.py +38 -73
  41. daytona_api_client/models/docker_registry.py +21 -33
  42. daytona_api_client/models/execute_request.py +13 -12
  43. daytona_api_client/models/execute_response.py +11 -9
  44. daytona_api_client/models/file_info.py +17 -20
  45. daytona_api_client/models/file_status.py +13 -16
  46. daytona_api_client/models/git_add_request.py +11 -9
  47. daytona_api_client/models/git_branch_request.py +11 -9
  48. daytona_api_client/models/git_checkout_request.py +11 -9
  49. daytona_api_client/models/git_clone_request.py +15 -18
  50. daytona_api_client/models/git_commit_info.py +14 -17
  51. daytona_api_client/models/git_commit_request.py +13 -16
  52. daytona_api_client/models/git_commit_response.py +10 -9
  53. daytona_api_client/models/git_delete_branch_request.py +11 -9
  54. daytona_api_client/models/git_repo_request.py +12 -11
  55. daytona_api_client/models/git_status.py +15 -20
  56. daytona_api_client/models/list_branch_response.py +10 -9
  57. daytona_api_client/models/lsp_completion_params.py +16 -19
  58. daytona_api_client/models/lsp_document_request.py +12 -11
  59. daytona_api_client/models/lsp_location.py +12 -12
  60. daytona_api_client/models/lsp_server_request.py +11 -9
  61. daytona_api_client/models/lsp_symbol.py +13 -16
  62. daytona_api_client/models/match.py +12 -9
  63. daytona_api_client/models/organization.py +20 -34
  64. daytona_api_client/models/organization_invitation.py +27 -44
  65. daytona_api_client/models/organization_role.py +21 -46
  66. daytona_api_client/models/organization_suspension.py +11 -9
  67. daytona_api_client/models/organization_user.py +22 -36
  68. daytona_api_client/models/paginated_snapshots_dto.py +14 -19
  69. daytona_api_client/models/port_preview_url.py +11 -9
  70. daytona_api_client/models/position.py +11 -9
  71. daytona_api_client/models/project_dir_response.py +10 -9
  72. daytona_api_client/models/range.py +13 -16
  73. daytona_api_client/models/registry_push_access_dto.py +15 -18
  74. daytona_api_client/models/replace_request.py +12 -11
  75. daytona_api_client/models/replace_result.py +12 -9
  76. daytona_api_client/models/sandbox.py +49 -95
  77. daytona_api_client/models/sandbox_info.py +13 -18
  78. daytona_api_client/models/sandbox_labels.py +10 -9
  79. daytona_api_client/models/sandbox_state.py +18 -16
  80. daytona_api_client/models/sandbox_volume.py +11 -9
  81. daytona_api_client/models/search_files_response.py +10 -9
  82. daytona_api_client/models/session.py +13 -18
  83. daytona_api_client/models/session_execute_request.py +14 -19
  84. daytona_api_client/models/session_execute_response.py +13 -14
  85. daytona_api_client/models/set_snapshot_general_status_dto.py +10 -9
  86. daytona_api_client/models/snapshot_dto.py +34 -58
  87. daytona_api_client/models/snapshot_state.py +12 -10
  88. daytona_api_client/models/storage_access_dto.py +16 -26
  89. daytona_api_client/models/toggle_state.py +10 -9
  90. daytona_api_client/models/update_assigned_organization_roles.py +10 -9
  91. daytona_api_client/models/update_docker_registry.py +12 -11
  92. daytona_api_client/models/update_organization_invitation.py +15 -16
  93. daytona_api_client/models/update_organization_member_role.py +12 -11
  94. daytona_api_client/models/update_organization_quota.py +28 -41
  95. daytona_api_client/models/update_organization_role.py +15 -28
  96. daytona_api_client/models/usage_overview.py +17 -28
  97. daytona_api_client/models/user.py +14 -19
  98. daytona_api_client/models/user_public_key.py +11 -9
  99. daytona_api_client/models/volume_dto.py +20 -32
  100. daytona_api_client/models/volume_state.py +9 -7
  101. daytona_api_client/models/workspace.py +58 -113
  102. daytona_api_client/rest.py +77 -26
  103. {daytona_api_client-0.21.3a0.dist-info → daytona_api_client-0.21.4a4.dist-info}/METADATA +1 -1
  104. daytona_api_client-0.21.4a4.dist-info/RECORD +117 -0
  105. daytona_api_client-0.21.3a0.dist-info/RECORD +0 -117
  106. {daytona_api_client-0.21.3a0.dist-info → daytona_api_client-0.21.4a4.dist-info}/WHEEL +0 -0
  107. {daytona_api_client-0.21.3a0.dist-info → daytona_api_client-0.21.4a4.dist-info}/top_level.txt +0 -0
@@ -24,12 +24,10 @@ from daytona_api_client.models.user_public_key import UserPublicKey
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
27
-
28
27
  class User(BaseModel):
29
28
  """
30
29
  User
31
- """ # noqa: E501
32
-
30
+ """ # noqa: E501
33
31
  id: StrictStr = Field(description="User ID")
34
32
  name: StrictStr = Field(description="User name")
35
33
  email: StrictStr = Field(description="User email")
@@ -43,6 +41,7 @@ class User(BaseModel):
43
41
  protected_namespaces=(),
44
42
  )
45
43
 
44
+
46
45
  def to_str(self) -> str:
47
46
  """Returns the string representation of the model using alias"""
48
47
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -68,11 +67,9 @@ class User(BaseModel):
68
67
  are ignored.
69
68
  * Fields in `self.additional_properties` are added to the output dict.
70
69
  """
71
- excluded_fields: Set[str] = set(
72
- [
73
- "additional_properties",
74
- ]
75
- )
70
+ excluded_fields: Set[str] = set([
71
+ "additional_properties",
72
+ ])
76
73
 
77
74
  _dict = self.model_dump(
78
75
  by_alias=True,
@@ -85,7 +82,7 @@ class User(BaseModel):
85
82
  for _item_public_keys in self.public_keys:
86
83
  if _item_public_keys:
87
84
  _items.append(_item_public_keys.to_dict())
88
- _dict["publicKeys"] = _items
85
+ _dict['publicKeys'] = _items
89
86
  # puts key-value pairs in additional_properties in the top level
90
87
  if self.additional_properties is not None:
91
88
  for _key, _value in self.additional_properties.items():
@@ -102,19 +99,17 @@ class User(BaseModel):
102
99
  if not isinstance(obj, dict):
103
100
  return cls.model_validate(obj)
104
101
 
105
- _obj = cls.model_validate(
106
- {
107
- "id": obj.get("id"),
108
- "name": obj.get("name"),
109
- "email": obj.get("email"),
110
- "publicKeys": [UserPublicKey.from_dict(_item) for _item in obj["publicKeys"]]
111
- if obj.get("publicKeys") is not None
112
- else None,
113
- }
114
- )
102
+ _obj = cls.model_validate({
103
+ "id": obj.get("id"),
104
+ "name": obj.get("name"),
105
+ "email": obj.get("email"),
106
+ "publicKeys": [UserPublicKey.from_dict(_item) for _item in obj["publicKeys"]] if obj.get("publicKeys") is not None else None
107
+ })
115
108
  # store additional fields in additional_properties
116
109
  for _key in obj.keys():
117
110
  if _key not in cls.__properties:
118
111
  _obj.additional_properties[_key] = obj.get(_key)
119
112
 
120
113
  return _obj
114
+
115
+
@@ -23,12 +23,10 @@ from typing import Any, ClassVar, Dict, List
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
-
27
26
  class UserPublicKey(BaseModel):
28
27
  """
29
28
  UserPublicKey
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  key: StrictStr = Field(description="Public key")
33
31
  name: StrictStr = Field(description="Key name")
34
32
  additional_properties: Dict[str, Any] = {}
@@ -40,6 +38,7 @@ class UserPublicKey(BaseModel):
40
38
  protected_namespaces=(),
41
39
  )
42
40
 
41
+
43
42
  def to_str(self) -> str:
44
43
  """Returns the string representation of the model using alias"""
45
44
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -65,11 +64,9 @@ class UserPublicKey(BaseModel):
65
64
  are ignored.
66
65
  * Fields in `self.additional_properties` are added to the output dict.
67
66
  """
68
- excluded_fields: Set[str] = set(
69
- [
70
- "additional_properties",
71
- ]
72
- )
67
+ excluded_fields: Set[str] = set([
68
+ "additional_properties",
69
+ ])
73
70
 
74
71
  _dict = self.model_dump(
75
72
  by_alias=True,
@@ -92,10 +89,15 @@ class UserPublicKey(BaseModel):
92
89
  if not isinstance(obj, dict):
93
90
  return cls.model_validate(obj)
94
91
 
95
- _obj = cls.model_validate({"key": obj.get("key"), "name": obj.get("name")})
92
+ _obj = cls.model_validate({
93
+ "key": obj.get("key"),
94
+ "name": obj.get("name")
95
+ })
96
96
  # store additional fields in additional_properties
97
97
  for _key in obj.keys():
98
98
  if _key not in cls.__properties:
99
99
  _obj.additional_properties[_key] = obj.get(_key)
100
100
 
101
101
  return _obj
102
+
103
+
@@ -24,12 +24,10 @@ from daytona_api_client.models.volume_state import VolumeState
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
27
-
28
27
  class VolumeDto(BaseModel):
29
28
  """
30
29
  VolumeDto
31
- """ # noqa: E501
32
-
30
+ """ # noqa: E501
33
31
  id: StrictStr = Field(description="Volume ID")
34
32
  name: StrictStr = Field(description="Volume name")
35
33
  organization_id: StrictStr = Field(description="Organization ID", alias="organizationId")
@@ -39,16 +37,7 @@ class VolumeDto(BaseModel):
39
37
  last_used_at: Optional[StrictStr] = Field(default=None, description="Last used timestamp", alias="lastUsedAt")
40
38
  error_reason: Optional[StrictStr] = Field(description="The error reason of the volume", alias="errorReason")
41
39
  additional_properties: Dict[str, Any] = {}
42
- __properties: ClassVar[List[str]] = [
43
- "id",
44
- "name",
45
- "organizationId",
46
- "state",
47
- "createdAt",
48
- "updatedAt",
49
- "lastUsedAt",
50
- "errorReason",
51
- ]
40
+ __properties: ClassVar[List[str]] = ["id", "name", "organizationId", "state", "createdAt", "updatedAt", "lastUsedAt", "errorReason"]
52
41
 
53
42
  model_config = ConfigDict(
54
43
  populate_by_name=True,
@@ -56,6 +45,7 @@ class VolumeDto(BaseModel):
56
45
  protected_namespaces=(),
57
46
  )
58
47
 
48
+
59
49
  def to_str(self) -> str:
60
50
  """Returns the string representation of the model using alias"""
61
51
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -81,11 +71,9 @@ class VolumeDto(BaseModel):
81
71
  are ignored.
82
72
  * Fields in `self.additional_properties` are added to the output dict.
83
73
  """
84
- excluded_fields: Set[str] = set(
85
- [
86
- "additional_properties",
87
- ]
88
- )
74
+ excluded_fields: Set[str] = set([
75
+ "additional_properties",
76
+ ])
89
77
 
90
78
  _dict = self.model_dump(
91
79
  by_alias=True,
@@ -100,12 +88,12 @@ class VolumeDto(BaseModel):
100
88
  # set to None if last_used_at (nullable) is None
101
89
  # and model_fields_set contains the field
102
90
  if self.last_used_at is None and "last_used_at" in self.model_fields_set:
103
- _dict["lastUsedAt"] = None
91
+ _dict['lastUsedAt'] = None
104
92
 
105
93
  # set to None if error_reason (nullable) is None
106
94
  # and model_fields_set contains the field
107
95
  if self.error_reason is None and "error_reason" in self.model_fields_set:
108
- _dict["errorReason"] = None
96
+ _dict['errorReason'] = None
109
97
 
110
98
  return _dict
111
99
 
@@ -118,21 +106,21 @@ class VolumeDto(BaseModel):
118
106
  if not isinstance(obj, dict):
119
107
  return cls.model_validate(obj)
120
108
 
121
- _obj = cls.model_validate(
122
- {
123
- "id": obj.get("id"),
124
- "name": obj.get("name"),
125
- "organizationId": obj.get("organizationId"),
126
- "state": obj.get("state"),
127
- "createdAt": obj.get("createdAt"),
128
- "updatedAt": obj.get("updatedAt"),
129
- "lastUsedAt": obj.get("lastUsedAt"),
130
- "errorReason": obj.get("errorReason"),
131
- }
132
- )
109
+ _obj = cls.model_validate({
110
+ "id": obj.get("id"),
111
+ "name": obj.get("name"),
112
+ "organizationId": obj.get("organizationId"),
113
+ "state": obj.get("state"),
114
+ "createdAt": obj.get("createdAt"),
115
+ "updatedAt": obj.get("updatedAt"),
116
+ "lastUsedAt": obj.get("lastUsedAt"),
117
+ "errorReason": obj.get("errorReason")
118
+ })
133
119
  # store additional fields in additional_properties
134
120
  for _key in obj.keys():
135
121
  if _key not in cls.__properties:
136
122
  _obj.additional_properties[_key] = obj.get(_key)
137
123
 
138
124
  return _obj
125
+
126
+
@@ -27,15 +27,17 @@ class VolumeState(str, Enum):
27
27
  """
28
28
  allowed enum values
29
29
  """
30
- CREATING = "creating"
31
- READY = "ready"
32
- PENDING_CREATE = "pending_create"
33
- PENDING_DELETE = "pending_delete"
34
- DELETING = "deleting"
35
- DELETED = "deleted"
36
- ERROR = "error"
30
+ CREATING = 'creating'
31
+ READY = 'ready'
32
+ PENDING_CREATE = 'pending_create'
33
+ PENDING_DELETE = 'pending_delete'
34
+ DELETING = 'deleting'
35
+ DELETED = 'deleted'
36
+ ERROR = 'error'
37
37
 
38
38
  @classmethod
39
39
  def from_json(cls, json_str: str) -> Self:
40
40
  """Create an instance of VolumeState from a JSON string"""
41
41
  return cls(json.loads(json_str))
42
+
43
+
@@ -27,12 +27,10 @@ from daytona_api_client.models.sandbox_volume import SandboxVolume
27
27
  from typing import Optional, Set
28
28
  from typing_extensions import Self
29
29
 
30
-
31
30
  class Workspace(BaseModel):
32
31
  """
33
32
  Workspace
34
- """ # noqa: E501
35
-
33
+ """ # noqa: E501
36
34
  id: StrictStr = Field(description="The ID of the sandbox")
37
35
  organization_id: StrictStr = Field(description="The organization ID of the sandbox", alias="organizationId")
38
36
  snapshot: Optional[StrictStr] = Field(default=None, description="The snapshot used for the sandbox")
@@ -46,102 +44,52 @@ class Workspace(BaseModel):
46
44
  memory: Union[StrictFloat, StrictInt] = Field(description="The memory quota for the sandbox")
47
45
  disk: Union[StrictFloat, StrictInt] = Field(description="The disk quota for the sandbox")
48
46
  state: Optional[SandboxState] = Field(default=None, description="The state of the sandbox")
49
- error_reason: Optional[StrictStr] = Field(
50
- default=None, description="The error reason of the sandbox", alias="errorReason"
51
- )
47
+ error_reason: Optional[StrictStr] = Field(default=None, description="The error reason of the sandbox", alias="errorReason")
52
48
  backup_state: Optional[StrictStr] = Field(default=None, description="The state of the backup", alias="backupState")
53
- backup_created_at: Optional[StrictStr] = Field(
54
- default=None, description="The creation timestamp of the last backup", alias="backupCreatedAt"
55
- )
56
- auto_stop_interval: Optional[Union[StrictFloat, StrictInt]] = Field(
57
- default=None, description="Auto-stop interval in minutes (0 means disabled)", alias="autoStopInterval"
58
- )
59
- auto_archive_interval: Optional[Union[StrictFloat, StrictInt]] = Field(
60
- default=None, description="Auto-archive interval in minutes", alias="autoArchiveInterval"
61
- )
62
- runner_domain: Optional[StrictStr] = Field(
63
- default=None, description="The domain name of the runner", alias="runnerDomain"
64
- )
49
+ backup_created_at: Optional[StrictStr] = Field(default=None, description="The creation timestamp of the last backup", alias="backupCreatedAt")
50
+ auto_stop_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Auto-stop interval in minutes (0 means disabled)", alias="autoStopInterval")
51
+ auto_archive_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Auto-archive interval in minutes", alias="autoArchiveInterval")
52
+ runner_domain: Optional[StrictStr] = Field(default=None, description="The domain name of the runner", alias="runnerDomain")
65
53
  volumes: Optional[List[SandboxVolume]] = Field(default=None, description="Array of volumes attached to the sandbox")
66
- build_info: Optional[BuildInfo] = Field(
67
- default=None, description="Build information for the sandbox", alias="buildInfo"
68
- )
69
- created_at: Optional[StrictStr] = Field(
70
- default=None, description="The creation timestamp of the sandbox", alias="createdAt"
71
- )
72
- updated_at: Optional[StrictStr] = Field(
73
- default=None, description="The last update timestamp of the sandbox", alias="updatedAt"
74
- )
54
+ build_info: Optional[BuildInfo] = Field(default=None, description="Build information for the sandbox", alias="buildInfo")
55
+ created_at: Optional[StrictStr] = Field(default=None, description="The creation timestamp of the sandbox", alias="createdAt")
56
+ updated_at: Optional[StrictStr] = Field(default=None, description="The last update timestamp of the sandbox", alias="updatedAt")
75
57
  var_class: Optional[StrictStr] = Field(default=None, description="The class of the sandbox", alias="class")
76
58
  name: StrictStr = Field(description="The name of the workspace")
77
59
  image: Optional[StrictStr] = Field(default=None, description="The image used for the workspace")
78
- snapshot_state: Optional[StrictStr] = Field(
79
- default=None, description="The state of the snapshot", alias="snapshotState"
80
- )
81
- snapshot_created_at: Optional[StrictStr] = Field(
82
- default=None, description="The creation timestamp of the last snapshot", alias="snapshotCreatedAt"
83
- )
60
+ snapshot_state: Optional[StrictStr] = Field(default=None, description="The state of the snapshot", alias="snapshotState")
61
+ snapshot_created_at: Optional[StrictStr] = Field(default=None, description="The creation timestamp of the last snapshot", alias="snapshotCreatedAt")
84
62
  info: Optional[SandboxInfo] = Field(default=None, description="Additional information about the sandbox")
85
63
  additional_properties: Dict[str, Any] = {}
86
- __properties: ClassVar[List[str]] = [
87
- "id",
88
- "organizationId",
89
- "snapshot",
90
- "user",
91
- "env",
92
- "labels",
93
- "public",
94
- "target",
95
- "cpu",
96
- "gpu",
97
- "memory",
98
- "disk",
99
- "state",
100
- "errorReason",
101
- "backupState",
102
- "backupCreatedAt",
103
- "autoStopInterval",
104
- "autoArchiveInterval",
105
- "runnerDomain",
106
- "volumes",
107
- "buildInfo",
108
- "createdAt",
109
- "updatedAt",
110
- "class",
111
- "name",
112
- "image",
113
- "snapshotState",
114
- "snapshotCreatedAt",
115
- "info",
116
- ]
64
+ __properties: ClassVar[List[str]] = ["id", "organizationId", "snapshot", "user", "env", "labels", "public", "target", "cpu", "gpu", "memory", "disk", "state", "errorReason", "backupState", "backupCreatedAt", "autoStopInterval", "autoArchiveInterval", "runnerDomain", "volumes", "buildInfo", "createdAt", "updatedAt", "class", "name", "image", "snapshotState", "snapshotCreatedAt", "info"]
117
65
 
118
- @field_validator("backup_state")
66
+ @field_validator('backup_state')
119
67
  def backup_state_validate_enum(cls, value):
120
68
  """Validates the enum"""
121
69
  if value is None:
122
70
  return value
123
71
 
124
- if value not in set(["None", "Pending", "InProgress", "Completed", "Error"]):
72
+ if value not in set(['None', 'Pending', 'InProgress', 'Completed', 'Error']):
125
73
  raise ValueError("must be one of enum values ('None', 'Pending', 'InProgress', 'Completed', 'Error')")
126
74
  return value
127
75
 
128
- @field_validator("var_class")
76
+ @field_validator('var_class')
129
77
  def var_class_validate_enum(cls, value):
130
78
  """Validates the enum"""
131
79
  if value is None:
132
80
  return value
133
81
 
134
- if value not in set(["small", "medium", "large"]):
82
+ if value not in set(['small', 'medium', 'large']):
135
83
  raise ValueError("must be one of enum values ('small', 'medium', 'large')")
136
84
  return value
137
85
 
138
- @field_validator("snapshot_state")
86
+ @field_validator('snapshot_state')
139
87
  def snapshot_state_validate_enum(cls, value):
140
88
  """Validates the enum"""
141
89
  if value is None:
142
90
  return value
143
91
 
144
- if value not in set(["None", "Pending", "InProgress", "Completed", "Error"]):
92
+ if value not in set(['None', 'Pending', 'InProgress', 'Completed', 'Error']):
145
93
  raise ValueError("must be one of enum values ('None', 'Pending', 'InProgress', 'Completed', 'Error')")
146
94
  return value
147
95
 
@@ -151,6 +99,7 @@ class Workspace(BaseModel):
151
99
  protected_namespaces=(),
152
100
  )
153
101
 
102
+
154
103
  def to_str(self) -> str:
155
104
  """Returns the string representation of the model using alias"""
156
105
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -176,11 +125,9 @@ class Workspace(BaseModel):
176
125
  are ignored.
177
126
  * Fields in `self.additional_properties` are added to the output dict.
178
127
  """
179
- excluded_fields: Set[str] = set(
180
- [
181
- "additional_properties",
182
- ]
183
- )
128
+ excluded_fields: Set[str] = set([
129
+ "additional_properties",
130
+ ])
184
131
 
185
132
  _dict = self.model_dump(
186
133
  by_alias=True,
@@ -193,13 +140,13 @@ class Workspace(BaseModel):
193
140
  for _item_volumes in self.volumes:
194
141
  if _item_volumes:
195
142
  _items.append(_item_volumes.to_dict())
196
- _dict["volumes"] = _items
143
+ _dict['volumes'] = _items
197
144
  # override the default output from pydantic by calling `to_dict()` of build_info
198
145
  if self.build_info:
199
- _dict["buildInfo"] = self.build_info.to_dict()
146
+ _dict['buildInfo'] = self.build_info.to_dict()
200
147
  # override the default output from pydantic by calling `to_dict()` of info
201
148
  if self.info:
202
- _dict["info"] = self.info.to_dict()
149
+ _dict['info'] = self.info.to_dict()
203
150
  # puts key-value pairs in additional_properties in the top level
204
151
  if self.additional_properties is not None:
205
152
  for _key, _value in self.additional_properties.items():
@@ -216,44 +163,42 @@ class Workspace(BaseModel):
216
163
  if not isinstance(obj, dict):
217
164
  return cls.model_validate(obj)
218
165
 
219
- _obj = cls.model_validate(
220
- {
221
- "id": obj.get("id"),
222
- "organizationId": obj.get("organizationId"),
223
- "snapshot": obj.get("snapshot"),
224
- "user": obj.get("user"),
225
- "env": obj.get("env"),
226
- "labels": obj.get("labels"),
227
- "public": obj.get("public"),
228
- "target": obj.get("target"),
229
- "cpu": obj.get("cpu"),
230
- "gpu": obj.get("gpu"),
231
- "memory": obj.get("memory"),
232
- "disk": obj.get("disk"),
233
- "state": obj.get("state"),
234
- "errorReason": obj.get("errorReason"),
235
- "backupState": obj.get("backupState"),
236
- "backupCreatedAt": obj.get("backupCreatedAt"),
237
- "autoStopInterval": obj.get("autoStopInterval"),
238
- "autoArchiveInterval": obj.get("autoArchiveInterval"),
239
- "runnerDomain": obj.get("runnerDomain"),
240
- "volumes": [SandboxVolume.from_dict(_item) for _item in obj["volumes"]]
241
- if obj.get("volumes") is not None
242
- else None,
243
- "buildInfo": BuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None,
244
- "createdAt": obj.get("createdAt"),
245
- "updatedAt": obj.get("updatedAt"),
246
- "class": obj.get("class"),
247
- "name": obj.get("name") if obj.get("name") is not None else "",
248
- "image": obj.get("image"),
249
- "snapshotState": obj.get("snapshotState"),
250
- "snapshotCreatedAt": obj.get("snapshotCreatedAt"),
251
- "info": SandboxInfo.from_dict(obj["info"]) if obj.get("info") is not None else None,
252
- }
253
- )
166
+ _obj = cls.model_validate({
167
+ "id": obj.get("id"),
168
+ "organizationId": obj.get("organizationId"),
169
+ "snapshot": obj.get("snapshot"),
170
+ "user": obj.get("user"),
171
+ "env": obj.get("env"),
172
+ "labels": obj.get("labels"),
173
+ "public": obj.get("public"),
174
+ "target": obj.get("target"),
175
+ "cpu": obj.get("cpu"),
176
+ "gpu": obj.get("gpu"),
177
+ "memory": obj.get("memory"),
178
+ "disk": obj.get("disk"),
179
+ "state": obj.get("state"),
180
+ "errorReason": obj.get("errorReason"),
181
+ "backupState": obj.get("backupState"),
182
+ "backupCreatedAt": obj.get("backupCreatedAt"),
183
+ "autoStopInterval": obj.get("autoStopInterval"),
184
+ "autoArchiveInterval": obj.get("autoArchiveInterval"),
185
+ "runnerDomain": obj.get("runnerDomain"),
186
+ "volumes": [SandboxVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None,
187
+ "buildInfo": BuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None,
188
+ "createdAt": obj.get("createdAt"),
189
+ "updatedAt": obj.get("updatedAt"),
190
+ "class": obj.get("class"),
191
+ "name": obj.get("name") if obj.get("name") is not None else '',
192
+ "image": obj.get("image"),
193
+ "snapshotState": obj.get("snapshotState"),
194
+ "snapshotCreatedAt": obj.get("snapshotCreatedAt"),
195
+ "info": SandboxInfo.from_dict(obj["info"]) if obj.get("info") is not None else None
196
+ })
254
197
  # store additional fields in additional_properties
255
198
  for _key in obj.keys():
256
199
  if _key not in cls.__properties:
257
200
  _obj.additional_properties[_key] = obj.get(_key)
258
201
 
259
202
  return _obj
203
+
204
+