cogbox_toolbox_api_client_async 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.
- cogbox_toolbox_api_client_async/__init__.py +386 -0
- cogbox_toolbox_api_client_async/api/__init__.py +46 -0
- cogbox_toolbox_api_client_async/api/computer_use_api.py +9075 -0
- cogbox_toolbox_api_client_async/api/file_system_api.py +3583 -0
- cogbox_toolbox_api_client_async/api/git_api.py +2969 -0
- cogbox_toolbox_api_client_async/api/info_api.py +773 -0
- cogbox_toolbox_api_client_async/api/interpreter_api.py +1075 -0
- cogbox_toolbox_api_client_async/api/lsp_api.py +1971 -0
- cogbox_toolbox_api_client_async/api/port_api.py +543 -0
- cogbox_toolbox_api_client_async/api/process_api.py +4865 -0
- cogbox_toolbox_api_client_async/api/server_api.py +298 -0
- cogbox_toolbox_api_client_async/api_client.py +812 -0
- cogbox_toolbox_api_client_async/api_response.py +21 -0
- cogbox_toolbox_api_client_async/configuration.py +624 -0
- cogbox_toolbox_api_client_async/exceptions.py +218 -0
- cogbox_toolbox_api_client_async/models/__init__.py +224 -0
- cogbox_toolbox_api_client_async/models/accessibility_bounds.py +108 -0
- cogbox_toolbox_api_client_async/models/accessibility_invoke_request.py +104 -0
- cogbox_toolbox_api_client_async/models/accessibility_node_request.py +102 -0
- cogbox_toolbox_api_client_async/models/accessibility_nodes_response.py +112 -0
- cogbox_toolbox_api_client_async/models/accessibility_set_value_request.py +104 -0
- cogbox_toolbox_api_client_async/models/accessibility_tree_response.py +108 -0
- cogbox_toolbox_api_client_async/models/chart.py +132 -0
- cogbox_toolbox_api_client_async/models/chart_element.py +134 -0
- cogbox_toolbox_api_client_async/models/code_run_artifacts.py +110 -0
- cogbox_toolbox_api_client_async/models/code_run_request.py +110 -0
- cogbox_toolbox_api_client_async/models/code_run_response.py +110 -0
- cogbox_toolbox_api_client_async/models/command.py +106 -0
- cogbox_toolbox_api_client_async/models/completion_context.py +104 -0
- cogbox_toolbox_api_client_async/models/completion_item.py +114 -0
- cogbox_toolbox_api_client_async/models/completion_list.py +112 -0
- cogbox_toolbox_api_client_async/models/computer_use_accessibility_node.py +129 -0
- cogbox_toolbox_api_client_async/models/computer_use_start_response.py +117 -0
- cogbox_toolbox_api_client_async/models/computer_use_status_response.py +102 -0
- cogbox_toolbox_api_client_async/models/computer_use_stop_response.py +117 -0
- cogbox_toolbox_api_client_async/models/create_context_request.py +104 -0
- cogbox_toolbox_api_client_async/models/create_session_request.py +102 -0
- cogbox_toolbox_api_client_async/models/display_info.py +112 -0
- cogbox_toolbox_api_client_async/models/display_info_response.py +110 -0
- cogbox_toolbox_api_client_async/models/execute_request.py +108 -0
- cogbox_toolbox_api_client_async/models/execute_response.py +104 -0
- cogbox_toolbox_api_client_async/models/file_info.py +118 -0
- cogbox_toolbox_api_client_async/models/file_status.py +109 -0
- cogbox_toolbox_api_client_async/models/files_download_request.py +102 -0
- cogbox_toolbox_api_client_async/models/find_accessibility_nodes_request.py +114 -0
- cogbox_toolbox_api_client_async/models/git_add_request.py +104 -0
- cogbox_toolbox_api_client_async/models/git_branch_request.py +104 -0
- cogbox_toolbox_api_client_async/models/git_checkout_request.py +104 -0
- cogbox_toolbox_api_client_async/models/git_clone_request.py +114 -0
- cogbox_toolbox_api_client_async/models/git_commit_info.py +110 -0
- cogbox_toolbox_api_client_async/models/git_commit_request.py +110 -0
- cogbox_toolbox_api_client_async/models/git_commit_response.py +102 -0
- cogbox_toolbox_api_client_async/models/git_delete_branch_request.py +104 -0
- cogbox_toolbox_api_client_async/models/git_repo_request.py +106 -0
- cogbox_toolbox_api_client_async/models/git_status.py +118 -0
- cogbox_toolbox_api_client_async/models/initialize_request.py +102 -0
- cogbox_toolbox_api_client_async/models/interpreter_context.py +110 -0
- cogbox_toolbox_api_client_async/models/is_port_in_use_response.py +102 -0
- cogbox_toolbox_api_client_async/models/keyboard_hotkey_request.py +102 -0
- cogbox_toolbox_api_client_async/models/keyboard_press_request.py +104 -0
- cogbox_toolbox_api_client_async/models/keyboard_type_request.py +104 -0
- cogbox_toolbox_api_client_async/models/list_branch_response.py +102 -0
- cogbox_toolbox_api_client_async/models/list_contexts_response.py +110 -0
- cogbox_toolbox_api_client_async/models/list_recordings_response.py +110 -0
- cogbox_toolbox_api_client_async/models/lsp_completion_params.py +118 -0
- cogbox_toolbox_api_client_async/models/lsp_document_request.py +106 -0
- cogbox_toolbox_api_client_async/models/lsp_location.py +108 -0
- cogbox_toolbox_api_client_async/models/lsp_position.py +104 -0
- cogbox_toolbox_api_client_async/models/lsp_range.py +111 -0
- cogbox_toolbox_api_client_async/models/lsp_server_request.py +104 -0
- cogbox_toolbox_api_client_async/models/lsp_symbol.py +110 -0
- cogbox_toolbox_api_client_async/models/match.py +106 -0
- cogbox_toolbox_api_client_async/models/mouse_click_request.py +108 -0
- cogbox_toolbox_api_client_async/models/mouse_click_response.py +104 -0
- cogbox_toolbox_api_client_async/models/mouse_drag_request.py +110 -0
- cogbox_toolbox_api_client_async/models/mouse_drag_response.py +104 -0
- cogbox_toolbox_api_client_async/models/mouse_move_request.py +104 -0
- cogbox_toolbox_api_client_async/models/mouse_position_response.py +104 -0
- cogbox_toolbox_api_client_async/models/mouse_scroll_request.py +109 -0
- cogbox_toolbox_api_client_async/models/port_list.py +102 -0
- cogbox_toolbox_api_client_async/models/position.py +104 -0
- cogbox_toolbox_api_client_async/models/process_errors_response.py +104 -0
- cogbox_toolbox_api_client_async/models/process_logs_response.py +104 -0
- cogbox_toolbox_api_client_async/models/process_restart_response.py +104 -0
- cogbox_toolbox_api_client_async/models/process_status.py +108 -0
- cogbox_toolbox_api_client_async/models/process_status_response.py +104 -0
- cogbox_toolbox_api_client_async/models/pty_create_request.py +112 -0
- cogbox_toolbox_api_client_async/models/pty_create_response.py +102 -0
- cogbox_toolbox_api_client_async/models/pty_list_response.py +110 -0
- cogbox_toolbox_api_client_async/models/pty_resize_request.py +105 -0
- cogbox_toolbox_api_client_async/models/pty_session_info.py +116 -0
- cogbox_toolbox_api_client_async/models/recording.py +116 -0
- cogbox_toolbox_api_client_async/models/replace_request.py +106 -0
- cogbox_toolbox_api_client_async/models/replace_result.py +106 -0
- cogbox_toolbox_api_client_async/models/screenshot_response.py +110 -0
- cogbox_toolbox_api_client_async/models/scroll_response.py +102 -0
- cogbox_toolbox_api_client_async/models/search_files_response.py +102 -0
- cogbox_toolbox_api_client_async/models/session.py +112 -0
- cogbox_toolbox_api_client_async/models/session_command_logs_response.py +106 -0
- cogbox_toolbox_api_client_async/models/session_execute_request.py +108 -0
- cogbox_toolbox_api_client_async/models/session_execute_response.py +110 -0
- cogbox_toolbox_api_client_async/models/session_send_input_request.py +102 -0
- cogbox_toolbox_api_client_async/models/start_recording_request.py +102 -0
- cogbox_toolbox_api_client_async/models/status.py +48 -0
- cogbox_toolbox_api_client_async/models/stop_recording_request.py +102 -0
- cogbox_toolbox_api_client_async/models/user_home_dir_response.py +102 -0
- cogbox_toolbox_api_client_async/models/window_info.py +114 -0
- cogbox_toolbox_api_client_async/models/windows_response.py +110 -0
- cogbox_toolbox_api_client_async/models/work_dir_response.py +102 -0
- cogbox_toolbox_api_client_async/py.typed +0 -0
- cogbox_toolbox_api_client_async/rest.py +226 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/METADATA +20 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/RECORD +116 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/WHEEL +5 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/licenses/LICENSE +190 -0
- cogbox_toolbox_api_client_async-0.190.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,102 @@
|
|
|
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 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 SearchFilesResponse(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
SearchFilesResponse
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
files: List[StrictStr]
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["files"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
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
|
+
return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of SearchFilesResponse from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
"additional_properties",
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# puts key-value pairs in additional_properties in the top level
|
|
77
|
+
if self.additional_properties is not None:
|
|
78
|
+
for _key, _value in self.additional_properties.items():
|
|
79
|
+
_dict[_key] = _value
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of SearchFilesResponse from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"files": obj.get("files")
|
|
94
|
+
})
|
|
95
|
+
# store additional fields in additional_properties
|
|
96
|
+
for _key in obj.keys():
|
|
97
|
+
if _key not in cls.__properties:
|
|
98
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
99
|
+
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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 cogbox_toolbox_api_client_async.models.command import Command
|
|
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 Session(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
Session
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
commands: List[Command]
|
|
34
|
+
session_id: StrictStr = Field(serialization_alias="sessionId")
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["commands", "sessionId"]
|
|
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 Session 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 each item in commands (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.commands:
|
|
81
|
+
for _item_commands in self.commands:
|
|
82
|
+
if _item_commands:
|
|
83
|
+
_items.append(_item_commands.to_dict())
|
|
84
|
+
_dict['commands'] = _items
|
|
85
|
+
# puts key-value pairs in additional_properties in the top level
|
|
86
|
+
if self.additional_properties is not None:
|
|
87
|
+
for _key, _value in self.additional_properties.items():
|
|
88
|
+
_dict[_key] = _value
|
|
89
|
+
|
|
90
|
+
return _dict
|
|
91
|
+
|
|
92
|
+
@classmethod
|
|
93
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
94
|
+
"""Create an instance of Session from a dict"""
|
|
95
|
+
if obj is None:
|
|
96
|
+
return None
|
|
97
|
+
|
|
98
|
+
if not isinstance(obj, dict):
|
|
99
|
+
return cls.model_validate(obj)
|
|
100
|
+
|
|
101
|
+
_obj = cls.model_validate({
|
|
102
|
+
"commands": [Command.from_dict(_item) for _item in obj["commands"]] if obj.get("commands") is not None else None,
|
|
103
|
+
"session_id": obj.get("sessionId")
|
|
104
|
+
})
|
|
105
|
+
# store additional fields in additional_properties
|
|
106
|
+
for _key in obj.keys():
|
|
107
|
+
if _key not in cls.__properties:
|
|
108
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
109
|
+
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -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, 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 SessionCommandLogsResponse(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
SessionCommandLogsResponse
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
output: StrictStr
|
|
33
|
+
stderr: StrictStr
|
|
34
|
+
stdout: StrictStr
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["output", "stderr", "stdout"]
|
|
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 SessionCommandLogsResponse 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 SessionCommandLogsResponse 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
|
+
"output": obj.get("output"),
|
|
96
|
+
"stderr": obj.get("stderr"),
|
|
97
|
+
"stdout": obj.get("stdout")
|
|
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
|
+
|
|
@@ -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, Field, StrictBool, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
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 SessionExecuteRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
SessionExecuteRequest
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
var_async: Optional[StrictBool] = Field(default=None, serialization_alias="async")
|
|
33
|
+
command: StrictStr
|
|
34
|
+
run_async: Optional[StrictBool] = Field(default=None, serialization_alias="runAsync")
|
|
35
|
+
suppress_input_echo: Optional[StrictBool] = Field(default=None, serialization_alias="suppressInputEcho")
|
|
36
|
+
additional_properties: Dict[str, Any] = {}
|
|
37
|
+
__properties: ClassVar[List[str]] = ["async", "command", "runAsync", "suppressInputEcho"]
|
|
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 SessionExecuteRequest 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
|
+
# 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 SessionExecuteRequest 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({
|
|
96
|
+
"var_async": obj.get("async"),
|
|
97
|
+
"command": obj.get("command"),
|
|
98
|
+
"run_async": obj.get("runAsync"),
|
|
99
|
+
"suppress_input_echo": obj.get("suppressInputEcho")
|
|
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,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, Field, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
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 SessionExecuteResponse(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
SessionExecuteResponse
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
cmd_id: StrictStr = Field(serialization_alias="cmdId")
|
|
33
|
+
exit_code: Optional[StrictInt] = Field(default=None, serialization_alias="exitCode")
|
|
34
|
+
output: Optional[StrictStr] = None
|
|
35
|
+
stderr: Optional[StrictStr] = None
|
|
36
|
+
stdout: Optional[StrictStr] = None
|
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
|
38
|
+
__properties: ClassVar[List[str]] = ["cmdId", "exitCode", "output", "stderr", "stdout"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of SessionExecuteResponse from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
"additional_properties",
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# puts key-value pairs in additional_properties in the top level
|
|
81
|
+
if self.additional_properties is not None:
|
|
82
|
+
for _key, _value in self.additional_properties.items():
|
|
83
|
+
_dict[_key] = _value
|
|
84
|
+
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of SessionExecuteResponse from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"cmd_id": obj.get("cmdId"),
|
|
98
|
+
"exit_code": obj.get("exitCode"),
|
|
99
|
+
"output": obj.get("output"),
|
|
100
|
+
"stderr": obj.get("stderr"),
|
|
101
|
+
"stdout": obj.get("stdout")
|
|
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,102 @@
|
|
|
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 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 SessionSendInputRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
SessionSendInputRequest
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
data: StrictStr
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
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
|
+
return _JSON_ADAPTER.dump_json(self.to_dict()).decode()
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of SessionSendInputRequest from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
"additional_properties",
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# puts key-value pairs in additional_properties in the top level
|
|
77
|
+
if self.additional_properties is not None:
|
|
78
|
+
for _key, _value in self.additional_properties.items():
|
|
79
|
+
_dict[_key] = _value
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of SessionSendInputRequest from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"data": obj.get("data")
|
|
94
|
+
})
|
|
95
|
+
# store additional fields in additional_properties
|
|
96
|
+
for _key in obj.keys():
|
|
97
|
+
if _key not in cls.__properties:
|
|
98
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
99
|
+
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|