daytona_api_client 0.21.3a0__py3-none-any.whl → 0.21.5a0__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.5a0.dist-info}/METADATA +1 -1
  104. daytona_api_client-0.21.5a0.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.5a0.dist-info}/WHEEL +0 -0
  107. {daytona_api_client-0.21.3a0.dist-info → daytona_api_client-0.21.5a0.dist-info}/top_level.txt +0 -0
@@ -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 SandboxVolume(BaseModel):
28
27
  """
29
28
  SandboxVolume
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  volume_id: StrictStr = Field(description="The ID of the volume", alias="volumeId")
33
31
  mount_path: StrictStr = Field(description="The mount path for the volume", alias="mountPath")
34
32
  additional_properties: Dict[str, Any] = {}
@@ -40,6 +38,7 @@ class SandboxVolume(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 SandboxVolume(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 SandboxVolume(BaseModel):
92
89
  if not isinstance(obj, dict):
93
90
  return cls.model_validate(obj)
94
91
 
95
- _obj = cls.model_validate({"volumeId": obj.get("volumeId"), "mountPath": obj.get("mountPath")})
92
+ _obj = cls.model_validate({
93
+ "volumeId": obj.get("volumeId"),
94
+ "mountPath": obj.get("mountPath")
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
+
@@ -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 SearchFilesResponse(BaseModel):
28
27
  """
29
28
  SearchFilesResponse
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  files: List[StrictStr]
33
31
  additional_properties: Dict[str, Any] = {}
34
32
  __properties: ClassVar[List[str]] = ["files"]
@@ -39,6 +37,7 @@ class SearchFilesResponse(BaseModel):
39
37
  protected_namespaces=(),
40
38
  )
41
39
 
40
+
42
41
  def to_str(self) -> str:
43
42
  """Returns the string representation of the model using alias"""
44
43
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -64,11 +63,9 @@ class SearchFilesResponse(BaseModel):
64
63
  are ignored.
65
64
  * Fields in `self.additional_properties` are added to the output dict.
66
65
  """
67
- excluded_fields: Set[str] = set(
68
- [
69
- "additional_properties",
70
- ]
71
- )
66
+ excluded_fields: Set[str] = set([
67
+ "additional_properties",
68
+ ])
72
69
 
73
70
  _dict = self.model_dump(
74
71
  by_alias=True,
@@ -91,10 +88,14 @@ class SearchFilesResponse(BaseModel):
91
88
  if not isinstance(obj, dict):
92
89
  return cls.model_validate(obj)
93
90
 
94
- _obj = cls.model_validate({"files": obj.get("files")})
91
+ _obj = cls.model_validate({
92
+ "files": obj.get("files")
93
+ })
95
94
  # store additional fields in additional_properties
96
95
  for _key in obj.keys():
97
96
  if _key not in cls.__properties:
98
97
  _obj.additional_properties[_key] = obj.get(_key)
99
98
 
100
99
  return _obj
100
+
101
+
@@ -24,12 +24,10 @@ from daytona_api_client.models.command import Command
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
27
-
28
27
  class Session(BaseModel):
29
28
  """
30
29
  Session
31
- """ # noqa: E501
32
-
30
+ """ # noqa: E501
33
31
  session_id: StrictStr = Field(description="The ID of the session", alias="sessionId")
34
32
  commands: Optional[List[Command]] = Field(description="The list of commands executed in this session")
35
33
  additional_properties: Dict[str, Any] = {}
@@ -41,6 +39,7 @@ class Session(BaseModel):
41
39
  protected_namespaces=(),
42
40
  )
43
41
 
42
+
44
43
  def to_str(self) -> str:
45
44
  """Returns the string representation of the model using alias"""
46
45
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -66,11 +65,9 @@ class Session(BaseModel):
66
65
  are ignored.
67
66
  * Fields in `self.additional_properties` are added to the output dict.
68
67
  """
69
- excluded_fields: Set[str] = set(
70
- [
71
- "additional_properties",
72
- ]
73
- )
68
+ excluded_fields: Set[str] = set([
69
+ "additional_properties",
70
+ ])
74
71
 
75
72
  _dict = self.model_dump(
76
73
  by_alias=True,
@@ -83,7 +80,7 @@ class Session(BaseModel):
83
80
  for _item_commands in self.commands:
84
81
  if _item_commands:
85
82
  _items.append(_item_commands.to_dict())
86
- _dict["commands"] = _items
83
+ _dict['commands'] = _items
87
84
  # puts key-value pairs in additional_properties in the top level
88
85
  if self.additional_properties is not None:
89
86
  for _key, _value in self.additional_properties.items():
@@ -92,7 +89,7 @@ class Session(BaseModel):
92
89
  # set to None if commands (nullable) is None
93
90
  # and model_fields_set contains the field
94
91
  if self.commands is None and "commands" in self.model_fields_set:
95
- _dict["commands"] = None
92
+ _dict['commands'] = None
96
93
 
97
94
  return _dict
98
95
 
@@ -105,17 +102,15 @@ class Session(BaseModel):
105
102
  if not isinstance(obj, dict):
106
103
  return cls.model_validate(obj)
107
104
 
108
- _obj = cls.model_validate(
109
- {
110
- "sessionId": obj.get("sessionId"),
111
- "commands": [Command.from_dict(_item) for _item in obj["commands"]]
112
- if obj.get("commands") is not None
113
- else None,
114
- }
115
- )
105
+ _obj = cls.model_validate({
106
+ "sessionId": obj.get("sessionId"),
107
+ "commands": [Command.from_dict(_item) for _item in obj["commands"]] if obj.get("commands") is not None else None
108
+ })
116
109
  # store additional fields in additional_properties
117
110
  for _key in obj.keys():
118
111
  if _key not in cls.__properties:
119
112
  _obj.additional_properties[_key] = obj.get(_key)
120
113
 
121
114
  return _obj
115
+
116
+
@@ -23,21 +23,13 @@ from typing import Any, ClassVar, Dict, List, Optional
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
-
27
26
  class SessionExecuteRequest(BaseModel):
28
27
  """
29
28
  SessionExecuteRequest
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  command: StrictStr = Field(description="The command to execute")
33
- run_async: Optional[StrictBool] = Field(
34
- default=None, description="Whether to execute the command asynchronously", alias="runAsync"
35
- )
36
- var_async: Optional[StrictBool] = Field(
37
- default=None,
38
- description="Deprecated: Use runAsync instead. Whether to execute the command asynchronously",
39
- alias="async",
40
- )
31
+ run_async: Optional[StrictBool] = Field(default=None, description="Whether to execute the command asynchronously", alias="runAsync")
32
+ var_async: Optional[StrictBool] = Field(default=None, description="Deprecated: Use runAsync instead. Whether to execute the command asynchronously", alias="async")
41
33
  additional_properties: Dict[str, Any] = {}
42
34
  __properties: ClassVar[List[str]] = ["command", "runAsync", "async"]
43
35
 
@@ -47,6 +39,7 @@ class SessionExecuteRequest(BaseModel):
47
39
  protected_namespaces=(),
48
40
  )
49
41
 
42
+
50
43
  def to_str(self) -> str:
51
44
  """Returns the string representation of the model using alias"""
52
45
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -72,11 +65,9 @@ class SessionExecuteRequest(BaseModel):
72
65
  are ignored.
73
66
  * Fields in `self.additional_properties` are added to the output dict.
74
67
  """
75
- excluded_fields: Set[str] = set(
76
- [
77
- "additional_properties",
78
- ]
79
- )
68
+ excluded_fields: Set[str] = set([
69
+ "additional_properties",
70
+ ])
80
71
 
81
72
  _dict = self.model_dump(
82
73
  by_alias=True,
@@ -99,12 +90,16 @@ class SessionExecuteRequest(BaseModel):
99
90
  if not isinstance(obj, dict):
100
91
  return cls.model_validate(obj)
101
92
 
102
- _obj = cls.model_validate(
103
- {"command": obj.get("command"), "runAsync": obj.get("runAsync"), "async": obj.get("async")}
104
- )
93
+ _obj = cls.model_validate({
94
+ "command": obj.get("command"),
95
+ "runAsync": obj.get("runAsync"),
96
+ "async": obj.get("async")
97
+ })
105
98
  # store additional fields in additional_properties
106
99
  for _key in obj.keys():
107
100
  if _key not in cls.__properties:
108
101
  _obj.additional_properties[_key] = obj.get(_key)
109
102
 
110
103
  return _obj
104
+
105
+
@@ -23,17 +23,13 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
26
-
27
26
  class SessionExecuteResponse(BaseModel):
28
27
  """
29
28
  SessionExecuteResponse
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  cmd_id: Optional[StrictStr] = Field(default=None, description="The ID of the executed command", alias="cmdId")
33
31
  output: Optional[StrictStr] = Field(default=None, description="The output of the executed command")
34
- exit_code: Optional[Union[StrictFloat, StrictInt]] = Field(
35
- default=None, description="The exit code of the executed command", alias="exitCode"
36
- )
32
+ exit_code: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The exit code of the executed command", alias="exitCode")
37
33
  additional_properties: Dict[str, Any] = {}
38
34
  __properties: ClassVar[List[str]] = ["cmdId", "output", "exitCode"]
39
35
 
@@ -43,6 +39,7 @@ class SessionExecuteResponse(BaseModel):
43
39
  protected_namespaces=(),
44
40
  )
45
41
 
42
+
46
43
  def to_str(self) -> str:
47
44
  """Returns the string representation of the model using alias"""
48
45
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -68,11 +65,9 @@ class SessionExecuteResponse(BaseModel):
68
65
  are ignored.
69
66
  * Fields in `self.additional_properties` are added to the output dict.
70
67
  """
71
- excluded_fields: Set[str] = set(
72
- [
73
- "additional_properties",
74
- ]
75
- )
68
+ excluded_fields: Set[str] = set([
69
+ "additional_properties",
70
+ ])
76
71
 
77
72
  _dict = self.model_dump(
78
73
  by_alias=True,
@@ -95,12 +90,16 @@ class SessionExecuteResponse(BaseModel):
95
90
  if not isinstance(obj, dict):
96
91
  return cls.model_validate(obj)
97
92
 
98
- _obj = cls.model_validate(
99
- {"cmdId": obj.get("cmdId"), "output": obj.get("output"), "exitCode": obj.get("exitCode")}
100
- )
93
+ _obj = cls.model_validate({
94
+ "cmdId": obj.get("cmdId"),
95
+ "output": obj.get("output"),
96
+ "exitCode": obj.get("exitCode")
97
+ })
101
98
  # store additional fields in additional_properties
102
99
  for _key in obj.keys():
103
100
  if _key not in cls.__properties:
104
101
  _obj.additional_properties[_key] = obj.get(_key)
105
102
 
106
103
  return _obj
104
+
105
+
@@ -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 SetSnapshotGeneralStatusDto(BaseModel):
28
27
  """
29
28
  SetSnapshotGeneralStatusDto
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  general: StrictBool = Field(description="Whether the snapshot is general")
33
31
  additional_properties: Dict[str, Any] = {}
34
32
  __properties: ClassVar[List[str]] = ["general"]
@@ -39,6 +37,7 @@ class SetSnapshotGeneralStatusDto(BaseModel):
39
37
  protected_namespaces=(),
40
38
  )
41
39
 
40
+
42
41
  def to_str(self) -> str:
43
42
  """Returns the string representation of the model using alias"""
44
43
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -64,11 +63,9 @@ class SetSnapshotGeneralStatusDto(BaseModel):
64
63
  are ignored.
65
64
  * Fields in `self.additional_properties` are added to the output dict.
66
65
  """
67
- excluded_fields: Set[str] = set(
68
- [
69
- "additional_properties",
70
- ]
71
- )
66
+ excluded_fields: Set[str] = set([
67
+ "additional_properties",
68
+ ])
72
69
 
73
70
  _dict = self.model_dump(
74
71
  by_alias=True,
@@ -91,10 +88,14 @@ class SetSnapshotGeneralStatusDto(BaseModel):
91
88
  if not isinstance(obj, dict):
92
89
  return cls.model_validate(obj)
93
90
 
94
- _obj = cls.model_validate({"general": obj.get("general")})
91
+ _obj = cls.model_validate({
92
+ "general": obj.get("general")
93
+ })
95
94
  # store additional fields in additional_properties
96
95
  for _key in obj.keys():
97
96
  if _key not in cls.__properties:
98
97
  _obj.additional_properties[_key] = obj.get(_key)
99
98
 
100
99
  return _obj
100
+
101
+
@@ -26,12 +26,10 @@ from daytona_api_client.models.snapshot_state import SnapshotState
26
26
  from typing import Optional, Set
27
27
  from typing_extensions import Self
28
28
 
29
-
30
29
  class SnapshotDto(BaseModel):
31
30
  """
32
31
  SnapshotDto
33
- """ # noqa: E501
34
-
32
+ """ # noqa: E501
35
33
  id: StrictStr
36
34
  organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId")
37
35
  general: StrictBool
@@ -49,30 +47,9 @@ class SnapshotDto(BaseModel):
49
47
  created_at: datetime = Field(alias="createdAt")
50
48
  updated_at: datetime = Field(alias="updatedAt")
51
49
  last_used_at: Optional[datetime] = Field(alias="lastUsedAt")
52
- build_info: Optional[BuildInfo] = Field(
53
- default=None, description="Build information for the snapshot", alias="buildInfo"
54
- )
50
+ build_info: Optional[BuildInfo] = Field(default=None, description="Build information for the snapshot", alias="buildInfo")
55
51
  additional_properties: Dict[str, Any] = {}
56
- __properties: ClassVar[List[str]] = [
57
- "id",
58
- "organizationId",
59
- "general",
60
- "name",
61
- "imageName",
62
- "enabled",
63
- "state",
64
- "size",
65
- "entrypoint",
66
- "cpu",
67
- "gpu",
68
- "mem",
69
- "disk",
70
- "errorReason",
71
- "createdAt",
72
- "updatedAt",
73
- "lastUsedAt",
74
- "buildInfo",
75
- ]
52
+ __properties: ClassVar[List[str]] = ["id", "organizationId", "general", "name", "imageName", "enabled", "state", "size", "entrypoint", "cpu", "gpu", "mem", "disk", "errorReason", "createdAt", "updatedAt", "lastUsedAt", "buildInfo"]
76
53
 
77
54
  model_config = ConfigDict(
78
55
  populate_by_name=True,
@@ -80,6 +57,7 @@ class SnapshotDto(BaseModel):
80
57
  protected_namespaces=(),
81
58
  )
82
59
 
60
+
83
61
  def to_str(self) -> str:
84
62
  """Returns the string representation of the model using alias"""
85
63
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -105,11 +83,9 @@ class SnapshotDto(BaseModel):
105
83
  are ignored.
106
84
  * Fields in `self.additional_properties` are added to the output dict.
107
85
  """
108
- excluded_fields: Set[str] = set(
109
- [
110
- "additional_properties",
111
- ]
112
- )
86
+ excluded_fields: Set[str] = set([
87
+ "additional_properties",
88
+ ])
113
89
 
114
90
  _dict = self.model_dump(
115
91
  by_alias=True,
@@ -118,7 +94,7 @@ class SnapshotDto(BaseModel):
118
94
  )
119
95
  # override the default output from pydantic by calling `to_dict()` of build_info
120
96
  if self.build_info:
121
- _dict["buildInfo"] = self.build_info.to_dict()
97
+ _dict['buildInfo'] = self.build_info.to_dict()
122
98
  # puts key-value pairs in additional_properties in the top level
123
99
  if self.additional_properties is not None:
124
100
  for _key, _value in self.additional_properties.items():
@@ -127,22 +103,22 @@ class SnapshotDto(BaseModel):
127
103
  # set to None if size (nullable) is None
128
104
  # and model_fields_set contains the field
129
105
  if self.size is None and "size" in self.model_fields_set:
130
- _dict["size"] = None
106
+ _dict['size'] = None
131
107
 
132
108
  # set to None if entrypoint (nullable) is None
133
109
  # and model_fields_set contains the field
134
110
  if self.entrypoint is None and "entrypoint" in self.model_fields_set:
135
- _dict["entrypoint"] = None
111
+ _dict['entrypoint'] = None
136
112
 
137
113
  # set to None if error_reason (nullable) is None
138
114
  # and model_fields_set contains the field
139
115
  if self.error_reason is None and "error_reason" in self.model_fields_set:
140
- _dict["errorReason"] = None
116
+ _dict['errorReason'] = None
141
117
 
142
118
  # set to None if last_used_at (nullable) is None
143
119
  # and model_fields_set contains the field
144
120
  if self.last_used_at is None and "last_used_at" in self.model_fields_set:
145
- _dict["lastUsedAt"] = None
121
+ _dict['lastUsedAt'] = None
146
122
 
147
123
  return _dict
148
124
 
@@ -155,31 +131,31 @@ class SnapshotDto(BaseModel):
155
131
  if not isinstance(obj, dict):
156
132
  return cls.model_validate(obj)
157
133
 
158
- _obj = cls.model_validate(
159
- {
160
- "id": obj.get("id"),
161
- "organizationId": obj.get("organizationId"),
162
- "general": obj.get("general"),
163
- "name": obj.get("name"),
164
- "imageName": obj.get("imageName"),
165
- "enabled": obj.get("enabled"),
166
- "state": obj.get("state"),
167
- "size": obj.get("size"),
168
- "entrypoint": obj.get("entrypoint"),
169
- "cpu": obj.get("cpu"),
170
- "gpu": obj.get("gpu"),
171
- "mem": obj.get("mem"),
172
- "disk": obj.get("disk"),
173
- "errorReason": obj.get("errorReason"),
174
- "createdAt": obj.get("createdAt"),
175
- "updatedAt": obj.get("updatedAt"),
176
- "lastUsedAt": obj.get("lastUsedAt"),
177
- "buildInfo": BuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None,
178
- }
179
- )
134
+ _obj = cls.model_validate({
135
+ "id": obj.get("id"),
136
+ "organizationId": obj.get("organizationId"),
137
+ "general": obj.get("general"),
138
+ "name": obj.get("name"),
139
+ "imageName": obj.get("imageName"),
140
+ "enabled": obj.get("enabled"),
141
+ "state": obj.get("state"),
142
+ "size": obj.get("size"),
143
+ "entrypoint": obj.get("entrypoint"),
144
+ "cpu": obj.get("cpu"),
145
+ "gpu": obj.get("gpu"),
146
+ "mem": obj.get("mem"),
147
+ "disk": obj.get("disk"),
148
+ "errorReason": obj.get("errorReason"),
149
+ "createdAt": obj.get("createdAt"),
150
+ "updatedAt": obj.get("updatedAt"),
151
+ "lastUsedAt": obj.get("lastUsedAt"),
152
+ "buildInfo": BuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None
153
+ })
180
154
  # store additional fields in additional_properties
181
155
  for _key in obj.keys():
182
156
  if _key not in cls.__properties:
183
157
  _obj.additional_properties[_key] = obj.get(_key)
184
158
 
185
159
  return _obj
160
+
161
+
@@ -27,18 +27,20 @@ class SnapshotState(str, Enum):
27
27
  """
28
28
  allowed enum values
29
29
  """
30
- BUILD_PENDING = "build_pending"
31
- BUILDING = "building"
32
- PENDING = "pending"
33
- PULLING = "pulling"
34
- PENDING_VALIDATION = "pending_validation"
35
- VALIDATING = "validating"
36
- ACTIVE = "active"
37
- ERROR = "error"
38
- BUILD_FAILED = "build_failed"
39
- REMOVING = "removing"
30
+ BUILD_PENDING = 'build_pending'
31
+ BUILDING = 'building'
32
+ PENDING = 'pending'
33
+ PULLING = 'pulling'
34
+ PENDING_VALIDATION = 'pending_validation'
35
+ VALIDATING = 'validating'
36
+ ACTIVE = 'active'
37
+ ERROR = 'error'
38
+ BUILD_FAILED = 'build_failed'
39
+ REMOVING = 'removing'
40
40
 
41
41
  @classmethod
42
42
  def from_json(cls, json_str: str) -> Self:
43
43
  """Create an instance of SnapshotState from a JSON string"""
44
44
  return cls(json.loads(json_str))
45
+
46
+
@@ -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 StorageAccessDto(BaseModel):
28
27
  """
29
28
  StorageAccessDto
30
- """ # noqa: E501
31
-
29
+ """ # noqa: E501
32
30
  access_key: StrictStr = Field(description="Access key for storage authentication", alias="accessKey")
33
31
  secret: StrictStr = Field(description="Secret key for storage authentication")
34
32
  session_token: StrictStr = Field(description="Session token for storage authentication", alias="sessionToken")
@@ -36,14 +34,7 @@ class StorageAccessDto(BaseModel):
36
34
  organization_id: StrictStr = Field(description="Organization ID", alias="organizationId")
37
35
  bucket: StrictStr = Field(description="S3 bucket name")
38
36
  additional_properties: Dict[str, Any] = {}
39
- __properties: ClassVar[List[str]] = [
40
- "accessKey",
41
- "secret",
42
- "sessionToken",
43
- "storageUrl",
44
- "organizationId",
45
- "bucket",
46
- ]
37
+ __properties: ClassVar[List[str]] = ["accessKey", "secret", "sessionToken", "storageUrl", "organizationId", "bucket"]
47
38
 
48
39
  model_config = ConfigDict(
49
40
  populate_by_name=True,
@@ -51,6 +42,7 @@ class StorageAccessDto(BaseModel):
51
42
  protected_namespaces=(),
52
43
  )
53
44
 
45
+
54
46
  def to_str(self) -> str:
55
47
  """Returns the string representation of the model using alias"""
56
48
  return pprint.pformat(self.model_dump(by_alias=True))
@@ -76,11 +68,9 @@ class StorageAccessDto(BaseModel):
76
68
  are ignored.
77
69
  * Fields in `self.additional_properties` are added to the output dict.
78
70
  """
79
- excluded_fields: Set[str] = set(
80
- [
81
- "additional_properties",
82
- ]
83
- )
71
+ excluded_fields: Set[str] = set([
72
+ "additional_properties",
73
+ ])
84
74
 
85
75
  _dict = self.model_dump(
86
76
  by_alias=True,
@@ -103,19 +93,19 @@ class StorageAccessDto(BaseModel):
103
93
  if not isinstance(obj, dict):
104
94
  return cls.model_validate(obj)
105
95
 
106
- _obj = cls.model_validate(
107
- {
108
- "accessKey": obj.get("accessKey"),
109
- "secret": obj.get("secret"),
110
- "sessionToken": obj.get("sessionToken"),
111
- "storageUrl": obj.get("storageUrl"),
112
- "organizationId": obj.get("organizationId"),
113
- "bucket": obj.get("bucket"),
114
- }
115
- )
96
+ _obj = cls.model_validate({
97
+ "accessKey": obj.get("accessKey"),
98
+ "secret": obj.get("secret"),
99
+ "sessionToken": obj.get("sessionToken"),
100
+ "storageUrl": obj.get("storageUrl"),
101
+ "organizationId": obj.get("organizationId"),
102
+ "bucket": obj.get("bucket")
103
+ })
116
104
  # store additional fields in additional_properties
117
105
  for _key in obj.keys():
118
106
  if _key not in cls.__properties:
119
107
  _obj.additional_properties[_key] = obj.get(_key)
120
108
 
121
109
  return _obj
110
+
111
+