cogbox_toolbox_api_client 0.190.1__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.
Files changed (116) hide show
  1. cogbox_toolbox_api_client/__init__.py +386 -0
  2. cogbox_toolbox_api_client/api/__init__.py +46 -0
  3. cogbox_toolbox_api_client/api/computer_use_api.py +9075 -0
  4. cogbox_toolbox_api_client/api/file_system_api.py +3583 -0
  5. cogbox_toolbox_api_client/api/git_api.py +2969 -0
  6. cogbox_toolbox_api_client/api/info_api.py +773 -0
  7. cogbox_toolbox_api_client/api/interpreter_api.py +1075 -0
  8. cogbox_toolbox_api_client/api/lsp_api.py +1971 -0
  9. cogbox_toolbox_api_client/api/port_api.py +543 -0
  10. cogbox_toolbox_api_client/api/process_api.py +4865 -0
  11. cogbox_toolbox_api_client/api/server_api.py +298 -0
  12. cogbox_toolbox_api_client/api_client.py +809 -0
  13. cogbox_toolbox_api_client/api_response.py +21 -0
  14. cogbox_toolbox_api_client/configuration.py +626 -0
  15. cogbox_toolbox_api_client/exceptions.py +218 -0
  16. cogbox_toolbox_api_client/models/__init__.py +224 -0
  17. cogbox_toolbox_api_client/models/accessibility_bounds.py +108 -0
  18. cogbox_toolbox_api_client/models/accessibility_invoke_request.py +104 -0
  19. cogbox_toolbox_api_client/models/accessibility_node_request.py +102 -0
  20. cogbox_toolbox_api_client/models/accessibility_nodes_response.py +112 -0
  21. cogbox_toolbox_api_client/models/accessibility_set_value_request.py +104 -0
  22. cogbox_toolbox_api_client/models/accessibility_tree_response.py +108 -0
  23. cogbox_toolbox_api_client/models/chart.py +132 -0
  24. cogbox_toolbox_api_client/models/chart_element.py +134 -0
  25. cogbox_toolbox_api_client/models/code_run_artifacts.py +110 -0
  26. cogbox_toolbox_api_client/models/code_run_request.py +110 -0
  27. cogbox_toolbox_api_client/models/code_run_response.py +110 -0
  28. cogbox_toolbox_api_client/models/command.py +106 -0
  29. cogbox_toolbox_api_client/models/completion_context.py +104 -0
  30. cogbox_toolbox_api_client/models/completion_item.py +114 -0
  31. cogbox_toolbox_api_client/models/completion_list.py +112 -0
  32. cogbox_toolbox_api_client/models/computer_use_accessibility_node.py +129 -0
  33. cogbox_toolbox_api_client/models/computer_use_start_response.py +117 -0
  34. cogbox_toolbox_api_client/models/computer_use_status_response.py +102 -0
  35. cogbox_toolbox_api_client/models/computer_use_stop_response.py +117 -0
  36. cogbox_toolbox_api_client/models/create_context_request.py +104 -0
  37. cogbox_toolbox_api_client/models/create_session_request.py +102 -0
  38. cogbox_toolbox_api_client/models/display_info.py +112 -0
  39. cogbox_toolbox_api_client/models/display_info_response.py +110 -0
  40. cogbox_toolbox_api_client/models/execute_request.py +108 -0
  41. cogbox_toolbox_api_client/models/execute_response.py +104 -0
  42. cogbox_toolbox_api_client/models/file_info.py +118 -0
  43. cogbox_toolbox_api_client/models/file_status.py +109 -0
  44. cogbox_toolbox_api_client/models/files_download_request.py +102 -0
  45. cogbox_toolbox_api_client/models/find_accessibility_nodes_request.py +114 -0
  46. cogbox_toolbox_api_client/models/git_add_request.py +104 -0
  47. cogbox_toolbox_api_client/models/git_branch_request.py +104 -0
  48. cogbox_toolbox_api_client/models/git_checkout_request.py +104 -0
  49. cogbox_toolbox_api_client/models/git_clone_request.py +114 -0
  50. cogbox_toolbox_api_client/models/git_commit_info.py +110 -0
  51. cogbox_toolbox_api_client/models/git_commit_request.py +110 -0
  52. cogbox_toolbox_api_client/models/git_commit_response.py +102 -0
  53. cogbox_toolbox_api_client/models/git_delete_branch_request.py +104 -0
  54. cogbox_toolbox_api_client/models/git_repo_request.py +106 -0
  55. cogbox_toolbox_api_client/models/git_status.py +118 -0
  56. cogbox_toolbox_api_client/models/initialize_request.py +102 -0
  57. cogbox_toolbox_api_client/models/interpreter_context.py +110 -0
  58. cogbox_toolbox_api_client/models/is_port_in_use_response.py +102 -0
  59. cogbox_toolbox_api_client/models/keyboard_hotkey_request.py +102 -0
  60. cogbox_toolbox_api_client/models/keyboard_press_request.py +104 -0
  61. cogbox_toolbox_api_client/models/keyboard_type_request.py +104 -0
  62. cogbox_toolbox_api_client/models/list_branch_response.py +102 -0
  63. cogbox_toolbox_api_client/models/list_contexts_response.py +110 -0
  64. cogbox_toolbox_api_client/models/list_recordings_response.py +110 -0
  65. cogbox_toolbox_api_client/models/lsp_completion_params.py +118 -0
  66. cogbox_toolbox_api_client/models/lsp_document_request.py +106 -0
  67. cogbox_toolbox_api_client/models/lsp_location.py +108 -0
  68. cogbox_toolbox_api_client/models/lsp_position.py +104 -0
  69. cogbox_toolbox_api_client/models/lsp_range.py +111 -0
  70. cogbox_toolbox_api_client/models/lsp_server_request.py +104 -0
  71. cogbox_toolbox_api_client/models/lsp_symbol.py +110 -0
  72. cogbox_toolbox_api_client/models/match.py +106 -0
  73. cogbox_toolbox_api_client/models/mouse_click_request.py +108 -0
  74. cogbox_toolbox_api_client/models/mouse_click_response.py +104 -0
  75. cogbox_toolbox_api_client/models/mouse_drag_request.py +110 -0
  76. cogbox_toolbox_api_client/models/mouse_drag_response.py +104 -0
  77. cogbox_toolbox_api_client/models/mouse_move_request.py +104 -0
  78. cogbox_toolbox_api_client/models/mouse_position_response.py +104 -0
  79. cogbox_toolbox_api_client/models/mouse_scroll_request.py +109 -0
  80. cogbox_toolbox_api_client/models/port_list.py +102 -0
  81. cogbox_toolbox_api_client/models/position.py +104 -0
  82. cogbox_toolbox_api_client/models/process_errors_response.py +104 -0
  83. cogbox_toolbox_api_client/models/process_logs_response.py +104 -0
  84. cogbox_toolbox_api_client/models/process_restart_response.py +104 -0
  85. cogbox_toolbox_api_client/models/process_status.py +108 -0
  86. cogbox_toolbox_api_client/models/process_status_response.py +104 -0
  87. cogbox_toolbox_api_client/models/pty_create_request.py +112 -0
  88. cogbox_toolbox_api_client/models/pty_create_response.py +102 -0
  89. cogbox_toolbox_api_client/models/pty_list_response.py +110 -0
  90. cogbox_toolbox_api_client/models/pty_resize_request.py +105 -0
  91. cogbox_toolbox_api_client/models/pty_session_info.py +116 -0
  92. cogbox_toolbox_api_client/models/recording.py +116 -0
  93. cogbox_toolbox_api_client/models/replace_request.py +106 -0
  94. cogbox_toolbox_api_client/models/replace_result.py +106 -0
  95. cogbox_toolbox_api_client/models/screenshot_response.py +110 -0
  96. cogbox_toolbox_api_client/models/scroll_response.py +102 -0
  97. cogbox_toolbox_api_client/models/search_files_response.py +102 -0
  98. cogbox_toolbox_api_client/models/session.py +112 -0
  99. cogbox_toolbox_api_client/models/session_command_logs_response.py +106 -0
  100. cogbox_toolbox_api_client/models/session_execute_request.py +108 -0
  101. cogbox_toolbox_api_client/models/session_execute_response.py +110 -0
  102. cogbox_toolbox_api_client/models/session_send_input_request.py +102 -0
  103. cogbox_toolbox_api_client/models/start_recording_request.py +102 -0
  104. cogbox_toolbox_api_client/models/status.py +48 -0
  105. cogbox_toolbox_api_client/models/stop_recording_request.py +102 -0
  106. cogbox_toolbox_api_client/models/user_home_dir_response.py +102 -0
  107. cogbox_toolbox_api_client/models/window_info.py +114 -0
  108. cogbox_toolbox_api_client/models/windows_response.py +110 -0
  109. cogbox_toolbox_api_client/models/work_dir_response.py +102 -0
  110. cogbox_toolbox_api_client/py.typed +0 -0
  111. cogbox_toolbox_api_client/rest.py +263 -0
  112. cogbox_toolbox_api_client-0.190.1.dist-info/METADATA +251 -0
  113. cogbox_toolbox_api_client-0.190.1.dist-info/RECORD +116 -0
  114. cogbox_toolbox_api_client-0.190.1.dist-info/WHEEL +5 -0
  115. cogbox_toolbox_api_client-0.190.1.dist-info/licenses/LICENSE +190 -0
  116. cogbox_toolbox_api_client-0.190.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,108 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Cogbox Toolbox API
5
+
6
+ Cogbox Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Cogbox API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Cogbox Cloud: `https://proxy.cogbox.pazity.com/toolbox/{sandboxId}`.
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from cogbox_toolbox_api_client.models.lsp_range import LspRange
23
+ from pydantic import TypeAdapter
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ _JSON_ADAPTER = TypeAdapter(Dict[str, Any])
28
+
29
+ class LspLocation(BaseModel):
30
+ """
31
+ LspLocation
32
+ """ # noqa: E501
33
+ range: LspRange
34
+ uri: StrictStr
35
+ additional_properties: Dict[str, Any] = {}
36
+ __properties: ClassVar[List[str]] = ["range", "uri"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of LspLocation from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ * Fields in `self.additional_properties` are added to the output dict.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ "additional_properties",
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of range
79
+ if self.range:
80
+ _dict['range'] = self.range.to_dict()
81
+ # puts key-value pairs in additional_properties in the top level
82
+ if self.additional_properties is not None:
83
+ for _key, _value in self.additional_properties.items():
84
+ _dict[_key] = _value
85
+
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of LspLocation from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "range": LspRange.from_dict(obj["range"]) if obj.get("range") is not None else None,
99
+ "uri": obj.get("uri")
100
+ })
101
+ # store additional fields in additional_properties
102
+ for _key in obj.keys():
103
+ if _key not in cls.__properties:
104
+ _obj.additional_properties[_key] = obj.get(_key)
105
+
106
+ return _obj
107
+
108
+
@@ -0,0 +1,104 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Cogbox Toolbox API
5
+
6
+ Cogbox Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Cogbox API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Cogbox Cloud: `https://proxy.cogbox.pazity.com/toolbox/{sandboxId}`.
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictInt
21
+ from typing import Any, ClassVar, Dict, List
22
+ from pydantic import TypeAdapter
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ _JSON_ADAPTER = TypeAdapter(Dict[str, Any])
27
+
28
+ class LspPosition(BaseModel):
29
+ """
30
+ LspPosition
31
+ """ # noqa: E501
32
+ character: StrictInt
33
+ line: StrictInt
34
+ additional_properties: Dict[str, Any] = {}
35
+ __properties: ClassVar[List[str]] = ["character", "line"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of LspPosition 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
+ "additional_properties",
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # puts key-value pairs in additional_properties in the top level
78
+ if self.additional_properties is not None:
79
+ for _key, _value in self.additional_properties.items():
80
+ _dict[_key] = _value
81
+
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of LspPosition from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "character": obj.get("character"),
95
+ "line": obj.get("line")
96
+ })
97
+ # store additional fields in additional_properties
98
+ for _key in obj.keys():
99
+ if _key not in cls.__properties:
100
+ _obj.additional_properties[_key] = obj.get(_key)
101
+
102
+ return _obj
103
+
104
+
@@ -0,0 +1,111 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Cogbox Toolbox API
5
+
6
+ Cogbox Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Cogbox API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Cogbox Cloud: `https://proxy.cogbox.pazity.com/toolbox/{sandboxId}`.
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List
22
+ from cogbox_toolbox_api_client.models.lsp_position import LspPosition
23
+ from pydantic import TypeAdapter
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ _JSON_ADAPTER = TypeAdapter(Dict[str, Any])
28
+
29
+ class LspRange(BaseModel):
30
+ """
31
+ LspRange
32
+ """ # noqa: E501
33
+ end: LspPosition
34
+ start: LspPosition
35
+ additional_properties: Dict[str, Any] = {}
36
+ __properties: ClassVar[List[str]] = ["end", "start"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of LspRange from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ * Fields in `self.additional_properties` are added to the output dict.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ "additional_properties",
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of end
79
+ if self.end:
80
+ _dict['end'] = self.end.to_dict()
81
+ # override the default output from pydantic by calling `to_dict()` of start
82
+ if self.start:
83
+ _dict['start'] = self.start.to_dict()
84
+ # puts key-value pairs in additional_properties in the top level
85
+ if self.additional_properties is not None:
86
+ for _key, _value in self.additional_properties.items():
87
+ _dict[_key] = _value
88
+
89
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of LspRange from a dict"""
94
+ if obj is None:
95
+ return None
96
+
97
+ if not isinstance(obj, dict):
98
+ return cls.model_validate(obj)
99
+
100
+ _obj = cls.model_validate({
101
+ "end": LspPosition.from_dict(obj["end"]) if obj.get("end") is not None else None,
102
+ "start": LspPosition.from_dict(obj["start"]) if obj.get("start") is not None else None
103
+ })
104
+ # store additional fields in additional_properties
105
+ for _key in obj.keys():
106
+ if _key not in cls.__properties:
107
+ _obj.additional_properties[_key] = obj.get(_key)
108
+
109
+ return _obj
110
+
111
+
@@ -0,0 +1,104 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Cogbox Toolbox API
5
+
6
+ Cogbox Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Cogbox API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Cogbox Cloud: `https://proxy.cogbox.pazity.com/toolbox/{sandboxId}`.
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from pydantic import TypeAdapter
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ _JSON_ADAPTER = TypeAdapter(Dict[str, Any])
27
+
28
+ class LspServerRequest(BaseModel):
29
+ """
30
+ LspServerRequest
31
+ """ # noqa: E501
32
+ language_id: StrictStr = Field(serialization_alias="languageId")
33
+ path_to_project: StrictStr = Field(serialization_alias="pathToProject")
34
+ additional_properties: Dict[str, Any] = {}
35
+ __properties: ClassVar[List[str]] = ["languageId", "pathToProject"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of LspServerRequest 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
+ "additional_properties",
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # puts key-value pairs in additional_properties in the top level
78
+ if self.additional_properties is not None:
79
+ for _key, _value in self.additional_properties.items():
80
+ _dict[_key] = _value
81
+
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of LspServerRequest from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "language_id": obj.get("languageId"),
95
+ "path_to_project": obj.get("pathToProject")
96
+ })
97
+ # store additional fields in additional_properties
98
+ for _key in obj.keys():
99
+ if _key not in cls.__properties:
100
+ _obj.additional_properties[_key] = obj.get(_key)
101
+
102
+ return _obj
103
+
104
+
@@ -0,0 +1,110 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Cogbox Toolbox API
5
+
6
+ Cogbox Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Cogbox API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Cogbox Cloud: `https://proxy.cogbox.pazity.com/toolbox/{sandboxId}`.
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from cogbox_toolbox_api_client.models.lsp_location import LspLocation
23
+ from pydantic import TypeAdapter
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ _JSON_ADAPTER = TypeAdapter(Dict[str, Any])
28
+
29
+ class LspSymbol(BaseModel):
30
+ """
31
+ LspSymbol
32
+ """ # noqa: E501
33
+ kind: StrictInt
34
+ location: LspLocation
35
+ name: StrictStr
36
+ additional_properties: Dict[str, Any] = {}
37
+ __properties: ClassVar[List[str]] = ["kind", "location", "name"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of LspSymbol from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ * Fields in `self.additional_properties` are added to the output dict.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ "additional_properties",
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ # override the default output from pydantic by calling `to_dict()` of location
80
+ if self.location:
81
+ _dict['location'] = self.location.to_dict()
82
+ # puts key-value pairs in additional_properties in the top level
83
+ if self.additional_properties is not None:
84
+ for _key, _value in self.additional_properties.items():
85
+ _dict[_key] = _value
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
+ """Create an instance of LspSymbol from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return cls.model_validate(obj)
97
+
98
+ _obj = cls.model_validate({
99
+ "kind": obj.get("kind"),
100
+ "location": LspLocation.from_dict(obj["location"]) if obj.get("location") is not None else None,
101
+ "name": obj.get("name")
102
+ })
103
+ # store additional fields in additional_properties
104
+ for _key in obj.keys():
105
+ if _key not in cls.__properties:
106
+ _obj.additional_properties[_key] = obj.get(_key)
107
+
108
+ return _obj
109
+
110
+
@@ -0,0 +1,106 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Cogbox Toolbox API
5
+
6
+ Cogbox Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Cogbox API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Cogbox Cloud: `https://proxy.cogbox.pazity.com/toolbox/{sandboxId}`.
7
+
8
+ The version of the OpenAPI document: v0.0.0-dev
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from pydantic import TypeAdapter
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ _JSON_ADAPTER = TypeAdapter(Dict[str, Any])
27
+
28
+ class Match(BaseModel):
29
+ """
30
+ Match
31
+ """ # noqa: E501
32
+ content: StrictStr
33
+ file: StrictStr
34
+ line: StrictInt
35
+ additional_properties: Dict[str, Any] = {}
36
+ __properties: ClassVar[List[str]] = ["content", "file", "line"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of Match from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ * Fields in `self.additional_properties` are added to the output dict.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ "additional_properties",
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # puts key-value pairs in additional_properties in the top level
79
+ if self.additional_properties is not None:
80
+ for _key, _value in self.additional_properties.items():
81
+ _dict[_key] = _value
82
+
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of Match from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "content": obj.get("content"),
96
+ "file": obj.get("file"),
97
+ "line": obj.get("line")
98
+ })
99
+ # store additional fields in additional_properties
100
+ for _key in obj.keys():
101
+ if _key not in cls.__properties:
102
+ _obj.additional_properties[_key] = obj.get(_key)
103
+
104
+ return _obj
105
+
106
+