robodock-cli 0.1.0__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.
- app/__init__.py +1 -0
- app/app.py +14 -0
- app/auth.py +58 -0
- app/task_management.py +97 -0
- config.py +9 -0
- fast_api_client/__init__.py +8 -0
- fast_api_client/api/__init__.py +1 -0
- fast_api_client/api/auth/__init__.py +1 -0
- fast_api_client/api/auth/change_password_api_p_v1_auth_change_password_post.py +172 -0
- fast_api_client/api/auth/forgot_password_api_p_v1_auth_forgot_password_post.py +172 -0
- fast_api_client/api/auth/login_api_p_v1_auth_login_post.py +172 -0
- fast_api_client/api/auth/logout_api_p_v1_auth_logout_post.py +172 -0
- fast_api_client/api/auth/me_api_p_v1_auth_me_get.py +85 -0
- fast_api_client/api/auth/refresh_token_api_p_v1_auth_refresh_post.py +172 -0
- fast_api_client/api/auth/reset_password_api_p_v1_auth_reset_password_post.py +172 -0
- fast_api_client/api/auth/switch_group_api_p_v1_auth_switch_group_post.py +176 -0
- fast_api_client/api/config/__init__.py +1 -0
- fast_api_client/api/config/get_config_api_p_v1_config_get.py +85 -0
- fast_api_client/api/default/__init__.py +1 -0
- fast_api_client/api/default/root_get.py +81 -0
- fast_api_client/api/groups/__init__.py +1 -0
- fast_api_client/api/groups/add_member_api_p_v1_groups_group_id_members_post.py +188 -0
- fast_api_client/api/groups/create_group_api_p_v1_groups_post.py +172 -0
- fast_api_client/api/groups/create_platform_role_binding_api_p_v1_admin_platform_roles_bindings_post.py +172 -0
- fast_api_client/api/groups/delete_group_api_p_v1_groups_group_id_delete.py +167 -0
- fast_api_client/api/groups/delete_platform_role_binding_api_p_v1_admin_platform_roles_bindings_user_id_delete.py +167 -0
- fast_api_client/api/groups/get_group_api_p_v1_groups_group_id_get.py +167 -0
- fast_api_client/api/groups/list_groups_api_p_v1_groups_get.py +85 -0
- fast_api_client/api/groups/list_members_api_p_v1_groups_group_id_members_get.py +167 -0
- fast_api_client/api/groups/list_platform_role_bindings_api_p_v1_admin_platform_roles_bindings_get.py +85 -0
- fast_api_client/api/groups/remove_member_api_p_v1_groups_group_id_members_user_id_delete.py +181 -0
- fast_api_client/api/groups/reset_member_password_api_p_v1_groups_group_id_members_user_id_reset_password_post.py +181 -0
- fast_api_client/api/groups/update_group_api_p_v1_groups_group_id_patch.py +188 -0
- fast_api_client/api/groups/update_member_role_api_p_v1_groups_group_id_members_user_id_patch.py +202 -0
- fast_api_client/api/post_train/__init__.py +1 -0
- fast_api_client/api/post_train/check_patch_duplicate_api_p_v1_singledata_patch_check_post.py +164 -0
- fast_api_client/api/post_train/check_patch_duplicate_batch_api_p_v1_singledata_patch_check_batch_post.py +164 -0
- fast_api_client/api/post_train/create_dataset_api_p_v1_dataset_post.py +172 -0
- fast_api_client/api/post_train/create_patch_upload_api_p_v1_singledata_patch_upload_post.py +164 -0
- fast_api_client/api/post_train/data_ops_overview_api_p_v1_data_ops_overview_get.py +624 -0
- fast_api_client/api/post_train/data_ops_patches_api_p_v1_data_ops_patches_get.py +474 -0
- fast_api_client/api/post_train/delete_dataset_api_p_v1_dataset_dataset_uuid_delete.py +167 -0
- fast_api_client/api/post_train/delete_singledata_api_p_v1_singledata_uuid_delete.py +167 -0
- fast_api_client/api/post_train/delete_singledata_by_patch_api_p_v1_singledata_patch_patch_id_delete.py +167 -0
- fast_api_client/api/post_train/delete_singledata_list_api_p_v1_singledata_delete.py +172 -0
- fast_api_client/api/post_train/download_singledata_api_p_v1_singledata_download_uuid_get.py +167 -0
- fast_api_client/api/post_train/download_singledata_list_api_p_v1_singledata_download_get.py +178 -0
- fast_api_client/api/post_train/get_singledata_api_p_v1_singledata_uuid_get.py +167 -0
- fast_api_client/api/post_train/link_singledata_api_p_v1_singledata_link_post.py +172 -0
- fast_api_client/api/post_train/list_dataset_api_p_v1_dataset_get.py +307 -0
- fast_api_client/api/post_train/list_singledata_api_p_v1_singledata_get.py +737 -0
- fast_api_client/api/post_train/trigger_process_api_p_v1_singledata_trigger_post.py +172 -0
- fast_api_client/api/post_train/unlink_singledata_api_p_v1_singledata_unlink_post.py +172 -0
- fast_api_client/api/post_train/update_dataset_add_api_p_v1_dataset_update_dataset_uuid_post.py +188 -0
- fast_api_client/api/post_train/update_dataset_all_fields_api_p_v1_dataset_uuid_patch.py +188 -0
- fast_api_client/api/post_train/update_dataset_info_api_p_v1_dataset_update_post.py +172 -0
- fast_api_client/api/post_train/update_dataset_reduce_api_p_v1_dataset_reduce_dataset_uuid_post.py +188 -0
- fast_api_client/api/post_train/update_singledata_api_p_v1_singledata_uuid_patch.py +188 -0
- fast_api_client/api/post_train/update_singledata_tag_api_p_v1_singledata_tag_post.py +176 -0
- fast_api_client/api/post_train/update_upload_status_api_p_v1_singledata_upload_status_patch.py +176 -0
- fast_api_client/api/post_train/upload_singledata_api_p_v1_singledata_post.py +172 -0
- fast_api_client/api/post_train/upload_singledata_list_api_p_v1_singledata_list_post.py +172 -0
- fast_api_client/api/task_management/__init__.py +1 -0
- fast_api_client/api/task_management/create_project_api_p_v1_project_project_name_post.py +204 -0
- fast_api_client/api/task_management/create_rl_stage_api_p_v1_run_run_uuid_stage_rl_post.py +180 -0
- fast_api_client/api/task_management/create_run_api_p_v1_run_post.py +172 -0
- fast_api_client/api/task_management/delete_project_api_p_v1_project_uuid_delete.py +159 -0
- fast_api_client/api/task_management/delete_run_api_p_v1_run_uuid_delete.py +159 -0
- fast_api_client/api/task_management/delete_run_stage_api_p_v1_run_run_uuid_stage_stage_name_delete.py +181 -0
- fast_api_client/api/task_management/get_checkpoint_download_url_api_p_v1_run_checkpoint_download_post.py +172 -0
- fast_api_client/api/task_management/get_project_api_p_v1_project_uuid_get.py +159 -0
- fast_api_client/api/task_management/get_run_api_p_v1_run_unique_id_get.py +180 -0
- fast_api_client/api/task_management/get_run_log_info_api_p_v1_run_log_get.py +206 -0
- fast_api_client/api/task_management/get_run_stage_api_p_v1_run_run_uuid_stage_stage_name_get.py +173 -0
- fast_api_client/api/task_management/get_run_status_api_p_v1_run_status_uuid_get.py +159 -0
- fast_api_client/api/task_management/list_projects_api_p_v1_project_get.py +359 -0
- fast_api_client/api/task_management/list_runs_api_p_v1_run_get.py +399 -0
- fast_api_client/api/task_management/open_artifact_api_p_v1_run_artifact_open_post.py +164 -0
- fast_api_client/api/task_management/proxy_argo_log_api_p_v1_run_log_proxy_get.py +85 -0
- fast_api_client/api/task_management/resubmit_run_api_p_v1_run_resubmit_unique_id_post.py +180 -0
- fast_api_client/api/task_management/retry_run_api_p_v1_run_retry_unique_id_post.py +180 -0
- fast_api_client/api/task_management/stop_run_api_p_v1_run_stop_uuid_post.py +159 -0
- fast_api_client/api/task_management/trigger_model_convert_api_p_v1_run_model_convert_trigger_post.py +172 -0
- fast_api_client/api/task_management/update_project_api_p_v1_project_uuid_patch.py +180 -0
- fast_api_client/api/task_management/update_run_api_p_v1_run_unique_id_patch.py +200 -0
- fast_api_client/api/task_mapping/__init__.py +1 -0
- fast_api_client/api/task_mapping/create_task_mapping_api_p_v1_task_mapping_post.py +164 -0
- fast_api_client/api/task_mapping/delete_task_mapping_api_p_v1_task_mapping_task_id_delete.py +159 -0
- fast_api_client/api/task_mapping/get_task_mapping_api_p_v1_task_mapping_task_id_get.py +159 -0
- fast_api_client/api/task_mapping/list_task_mapping_patches_api_p_v1_task_mapping_task_id_patches_get.py +195 -0
- fast_api_client/api/task_mapping/list_task_mappings_api_p_v1_task_mapping_get.py +279 -0
- fast_api_client/api/task_mapping/update_task_mapping_api_p_v1_task_mapping_task_id_patch.py +180 -0
- fast_api_client/client.py +268 -0
- fast_api_client/errors.py +16 -0
- fast_api_client/models/__init__.py +121 -0
- fast_api_client/models/add_member_request.py +89 -0
- fast_api_client/models/artifact_item.py +251 -0
- fast_api_client/models/artifact_item_extra_info_type_0.py +45 -0
- fast_api_client/models/artifact_open_request.py +93 -0
- fast_api_client/models/body_download_singledata_list_api_pv1_singledata_download_get.py +61 -0
- fast_api_client/models/change_password_request.py +69 -0
- fast_api_client/models/checkpoint_download_request.py +69 -0
- fast_api_client/models/create_group_request.py +72 -0
- fast_api_client/models/create_platform_role_binding_request.py +69 -0
- fast_api_client/models/dataset_add_request.py +165 -0
- fast_api_client/models/dataset_create_request.py +253 -0
- fast_api_client/models/dataset_full_update_request.py +133 -0
- fast_api_client/models/dataset_reduce_request.py +84 -0
- fast_api_client/models/dataset_update_request.py +123 -0
- fast_api_client/models/forgot_password_request.py +61 -0
- fast_api_client/models/http_validation_error.py +79 -0
- fast_api_client/models/login_request.py +69 -0
- fast_api_client/models/logout_request.py +61 -0
- fast_api_client/models/model_convert_trigger_request.py +69 -0
- fast_api_client/models/patch_duplicate_batch_item_request.py +69 -0
- fast_api_client/models/patch_duplicate_batch_request.py +75 -0
- fast_api_client/models/patch_duplicate_check_request.py +69 -0
- fast_api_client/models/patch_episode_create_request.py +547 -0
- fast_api_client/models/patch_episode_create_request_lable_info.py +47 -0
- fast_api_client/models/patch_upload_create_request.py +94 -0
- fast_api_client/models/project_create_request.py +174 -0
- fast_api_client/models/project_create_request_default_configs.py +47 -0
- fast_api_client/models/project_update_request.py +175 -0
- fast_api_client/models/project_update_request_default_configs_type_0.py +45 -0
- fast_api_client/models/refresh_request.py +61 -0
- fast_api_client/models/reset_password_request.py +69 -0
- fast_api_client/models/rl_stage_create_request.py +75 -0
- fast_api_client/models/rl_stage_create_request_configs.py +47 -0
- fast_api_client/models/run_create_request.py +243 -0
- fast_api_client/models/run_create_request_configs.py +47 -0
- fast_api_client/models/run_update_request.py +533 -0
- fast_api_client/models/run_update_request_artifacts_type_0.py +45 -0
- fast_api_client/models/run_update_request_configs_type_0.py +45 -0
- fast_api_client/models/run_update_request_stages_type_0_item.py +45 -0
- fast_api_client/models/single_data_create_request.py +189 -0
- fast_api_client/models/single_data_link_request.py +69 -0
- fast_api_client/models/single_data_list_request.py +169 -0
- fast_api_client/models/single_data_tag_request.py +69 -0
- fast_api_client/models/single_data_trigger_request.py +61 -0
- fast_api_client/models/single_data_unlink_request.py +69 -0
- fast_api_client/models/single_data_update_request.py +775 -0
- fast_api_client/models/single_data_update_request_lable_info_type_0.py +45 -0
- fast_api_client/models/stage_artifact_append.py +85 -0
- fast_api_client/models/stage_artifact_append_category.py +10 -0
- fast_api_client/models/switch_group_request.py +61 -0
- fast_api_client/models/task_mapping_create_request.py +111 -0
- fast_api_client/models/task_mapping_update_request.py +93 -0
- fast_api_client/models/update_group_request.py +93 -0
- fast_api_client/models/update_member_request.py +61 -0
- fast_api_client/models/upload_status_request.py +69 -0
- fast_api_client/models/validation_error.py +123 -0
- fast_api_client/models/validation_error_context.py +45 -0
- fast_api_client/py.typed +1 -0
- fast_api_client/types.py +54 -0
- robodock_cli-0.1.0.dist-info/METADATA +97 -0
- robodock_cli-0.1.0.dist-info/RECORD +167 -0
- robodock_cli-0.1.0.dist-info/WHEEL +5 -0
- robodock_cli-0.1.0.dist-info/entry_points.txt +2 -0
- robodock_cli-0.1.0.dist-info/top_level.txt +4 -0
- sdk/__init__.py +1 -0
- sdk/client/__init__.py +1 -0
- sdk/client/auth.py +171 -0
- sdk/client/client.py +9 -0
- sdk/client/task_management.py +29 -0
- sdk/exception.py +95 -0
- sdk/utils/__init__.py +1 -0
- sdk/utils/downloader.py +267 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
task_id: int,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
|
|
17
|
+
_kwargs: dict[str, Any] = {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": "/api/p/v1/task-mapping/{task_id}".format(
|
|
20
|
+
task_id=quote(str(task_id), safe=""),
|
|
21
|
+
),
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return _kwargs
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _parse_response(
|
|
28
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
29
|
+
) -> Any | HTTPValidationError | None:
|
|
30
|
+
if response.status_code == 200:
|
|
31
|
+
response_200 = response.json()
|
|
32
|
+
return response_200
|
|
33
|
+
|
|
34
|
+
if response.status_code == 422:
|
|
35
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
36
|
+
|
|
37
|
+
return response_422
|
|
38
|
+
|
|
39
|
+
if client.raise_on_unexpected_status:
|
|
40
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
41
|
+
else:
|
|
42
|
+
return None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _build_response(
|
|
46
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
47
|
+
) -> Response[Any | HTTPValidationError]:
|
|
48
|
+
return Response(
|
|
49
|
+
status_code=HTTPStatus(response.status_code),
|
|
50
|
+
content=response.content,
|
|
51
|
+
headers=response.headers,
|
|
52
|
+
parsed=_parse_response(client=client, response=response),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def sync_detailed(
|
|
57
|
+
task_id: int,
|
|
58
|
+
*,
|
|
59
|
+
client: AuthenticatedClient,
|
|
60
|
+
) -> Response[Any | HTTPValidationError]:
|
|
61
|
+
"""Get Task Mapping
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
task_id (int):
|
|
65
|
+
|
|
66
|
+
Raises:
|
|
67
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
68
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Response[Any | HTTPValidationError]
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
kwargs = _get_kwargs(
|
|
75
|
+
task_id=task_id,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
response = client.get_httpx_client().request(
|
|
79
|
+
**kwargs,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
return _build_response(client=client, response=response)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def sync(
|
|
86
|
+
task_id: int,
|
|
87
|
+
*,
|
|
88
|
+
client: AuthenticatedClient,
|
|
89
|
+
) -> Any | HTTPValidationError | None:
|
|
90
|
+
"""Get Task Mapping
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
task_id (int):
|
|
94
|
+
|
|
95
|
+
Raises:
|
|
96
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
97
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
Any | HTTPValidationError
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
return sync_detailed(
|
|
104
|
+
task_id=task_id,
|
|
105
|
+
client=client,
|
|
106
|
+
).parsed
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
async def asyncio_detailed(
|
|
110
|
+
task_id: int,
|
|
111
|
+
*,
|
|
112
|
+
client: AuthenticatedClient,
|
|
113
|
+
) -> Response[Any | HTTPValidationError]:
|
|
114
|
+
"""Get Task Mapping
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
task_id (int):
|
|
118
|
+
|
|
119
|
+
Raises:
|
|
120
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
121
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
Response[Any | HTTPValidationError]
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
kwargs = _get_kwargs(
|
|
128
|
+
task_id=task_id,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
132
|
+
|
|
133
|
+
return _build_response(client=client, response=response)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
async def asyncio(
|
|
137
|
+
task_id: int,
|
|
138
|
+
*,
|
|
139
|
+
client: AuthenticatedClient,
|
|
140
|
+
) -> Any | HTTPValidationError | None:
|
|
141
|
+
"""Get Task Mapping
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
task_id (int):
|
|
145
|
+
|
|
146
|
+
Raises:
|
|
147
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
148
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
Any | HTTPValidationError
|
|
152
|
+
"""
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
await asyncio_detailed(
|
|
156
|
+
task_id=task_id,
|
|
157
|
+
client=client,
|
|
158
|
+
)
|
|
159
|
+
).parsed
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
task_id: int,
|
|
15
|
+
*,
|
|
16
|
+
page: int | Unset = 1,
|
|
17
|
+
size: int | Unset = 10,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
params: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
params["page"] = page
|
|
23
|
+
|
|
24
|
+
params["size"] = size
|
|
25
|
+
|
|
26
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
27
|
+
|
|
28
|
+
_kwargs: dict[str, Any] = {
|
|
29
|
+
"method": "get",
|
|
30
|
+
"url": "/api/p/v1/task-mapping/{task_id}/patches".format(
|
|
31
|
+
task_id=quote(str(task_id), safe=""),
|
|
32
|
+
),
|
|
33
|
+
"params": params,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return _kwargs
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _parse_response(
|
|
40
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
41
|
+
) -> Any | HTTPValidationError | None:
|
|
42
|
+
if response.status_code == 200:
|
|
43
|
+
response_200 = response.json()
|
|
44
|
+
return response_200
|
|
45
|
+
|
|
46
|
+
if response.status_code == 422:
|
|
47
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_422
|
|
50
|
+
|
|
51
|
+
if client.raise_on_unexpected_status:
|
|
52
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
53
|
+
else:
|
|
54
|
+
return None
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _build_response(
|
|
58
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
59
|
+
) -> Response[Any | HTTPValidationError]:
|
|
60
|
+
return Response(
|
|
61
|
+
status_code=HTTPStatus(response.status_code),
|
|
62
|
+
content=response.content,
|
|
63
|
+
headers=response.headers,
|
|
64
|
+
parsed=_parse_response(client=client, response=response),
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def sync_detailed(
|
|
69
|
+
task_id: int,
|
|
70
|
+
*,
|
|
71
|
+
client: AuthenticatedClient,
|
|
72
|
+
page: int | Unset = 1,
|
|
73
|
+
size: int | Unset = 10,
|
|
74
|
+
) -> Response[Any | HTTPValidationError]:
|
|
75
|
+
"""List Task Mapping Patches
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
task_id (int):
|
|
79
|
+
page (int | Unset): Default: 1.
|
|
80
|
+
size (int | Unset): Default: 10.
|
|
81
|
+
|
|
82
|
+
Raises:
|
|
83
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
84
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
Response[Any | HTTPValidationError]
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
kwargs = _get_kwargs(
|
|
91
|
+
task_id=task_id,
|
|
92
|
+
page=page,
|
|
93
|
+
size=size,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
response = client.get_httpx_client().request(
|
|
97
|
+
**kwargs,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
return _build_response(client=client, response=response)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def sync(
|
|
104
|
+
task_id: int,
|
|
105
|
+
*,
|
|
106
|
+
client: AuthenticatedClient,
|
|
107
|
+
page: int | Unset = 1,
|
|
108
|
+
size: int | Unset = 10,
|
|
109
|
+
) -> Any | HTTPValidationError | None:
|
|
110
|
+
"""List Task Mapping Patches
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
task_id (int):
|
|
114
|
+
page (int | Unset): Default: 1.
|
|
115
|
+
size (int | Unset): Default: 10.
|
|
116
|
+
|
|
117
|
+
Raises:
|
|
118
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
119
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
Any | HTTPValidationError
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
return sync_detailed(
|
|
126
|
+
task_id=task_id,
|
|
127
|
+
client=client,
|
|
128
|
+
page=page,
|
|
129
|
+
size=size,
|
|
130
|
+
).parsed
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
async def asyncio_detailed(
|
|
134
|
+
task_id: int,
|
|
135
|
+
*,
|
|
136
|
+
client: AuthenticatedClient,
|
|
137
|
+
page: int | Unset = 1,
|
|
138
|
+
size: int | Unset = 10,
|
|
139
|
+
) -> Response[Any | HTTPValidationError]:
|
|
140
|
+
"""List Task Mapping Patches
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
task_id (int):
|
|
144
|
+
page (int | Unset): Default: 1.
|
|
145
|
+
size (int | Unset): Default: 10.
|
|
146
|
+
|
|
147
|
+
Raises:
|
|
148
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
149
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
150
|
+
|
|
151
|
+
Returns:
|
|
152
|
+
Response[Any | HTTPValidationError]
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
kwargs = _get_kwargs(
|
|
156
|
+
task_id=task_id,
|
|
157
|
+
page=page,
|
|
158
|
+
size=size,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
162
|
+
|
|
163
|
+
return _build_response(client=client, response=response)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
async def asyncio(
|
|
167
|
+
task_id: int,
|
|
168
|
+
*,
|
|
169
|
+
client: AuthenticatedClient,
|
|
170
|
+
page: int | Unset = 1,
|
|
171
|
+
size: int | Unset = 10,
|
|
172
|
+
) -> Any | HTTPValidationError | None:
|
|
173
|
+
"""List Task Mapping Patches
|
|
174
|
+
|
|
175
|
+
Args:
|
|
176
|
+
task_id (int):
|
|
177
|
+
page (int | Unset): Default: 1.
|
|
178
|
+
size (int | Unset): Default: 10.
|
|
179
|
+
|
|
180
|
+
Raises:
|
|
181
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
182
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
Any | HTTPValidationError
|
|
186
|
+
"""
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
await asyncio_detailed(
|
|
190
|
+
task_id=task_id,
|
|
191
|
+
client=client,
|
|
192
|
+
page=page,
|
|
193
|
+
size=size,
|
|
194
|
+
)
|
|
195
|
+
).parsed
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
task_id: None | str | Unset = UNSET,
|
|
15
|
+
task_name: None | str | Unset = UNSET,
|
|
16
|
+
init_scene_text: None | str | Unset = UNSET,
|
|
17
|
+
creator: None | str | Unset = UNSET,
|
|
18
|
+
keyword: None | str | Unset = UNSET,
|
|
19
|
+
page: int | Unset = 1,
|
|
20
|
+
size: int | Unset = 10,
|
|
21
|
+
) -> dict[str, Any]:
|
|
22
|
+
|
|
23
|
+
params: dict[str, Any] = {}
|
|
24
|
+
|
|
25
|
+
json_task_id: None | str | Unset
|
|
26
|
+
if isinstance(task_id, Unset):
|
|
27
|
+
json_task_id = UNSET
|
|
28
|
+
else:
|
|
29
|
+
json_task_id = task_id
|
|
30
|
+
params["task_id"] = json_task_id
|
|
31
|
+
|
|
32
|
+
json_task_name: None | str | Unset
|
|
33
|
+
if isinstance(task_name, Unset):
|
|
34
|
+
json_task_name = UNSET
|
|
35
|
+
else:
|
|
36
|
+
json_task_name = task_name
|
|
37
|
+
params["task_name"] = json_task_name
|
|
38
|
+
|
|
39
|
+
json_init_scene_text: None | str | Unset
|
|
40
|
+
if isinstance(init_scene_text, Unset):
|
|
41
|
+
json_init_scene_text = UNSET
|
|
42
|
+
else:
|
|
43
|
+
json_init_scene_text = init_scene_text
|
|
44
|
+
params["init_scene_text"] = json_init_scene_text
|
|
45
|
+
|
|
46
|
+
json_creator: None | str | Unset
|
|
47
|
+
if isinstance(creator, Unset):
|
|
48
|
+
json_creator = UNSET
|
|
49
|
+
else:
|
|
50
|
+
json_creator = creator
|
|
51
|
+
params["creator"] = json_creator
|
|
52
|
+
|
|
53
|
+
json_keyword: None | str | Unset
|
|
54
|
+
if isinstance(keyword, Unset):
|
|
55
|
+
json_keyword = UNSET
|
|
56
|
+
else:
|
|
57
|
+
json_keyword = keyword
|
|
58
|
+
params["keyword"] = json_keyword
|
|
59
|
+
|
|
60
|
+
params["page"] = page
|
|
61
|
+
|
|
62
|
+
params["size"] = size
|
|
63
|
+
|
|
64
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
65
|
+
|
|
66
|
+
_kwargs: dict[str, Any] = {
|
|
67
|
+
"method": "get",
|
|
68
|
+
"url": "/api/p/v1/task-mapping",
|
|
69
|
+
"params": params,
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return _kwargs
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _parse_response(
|
|
76
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
77
|
+
) -> Any | HTTPValidationError | None:
|
|
78
|
+
if response.status_code == 200:
|
|
79
|
+
response_200 = response.json()
|
|
80
|
+
return response_200
|
|
81
|
+
|
|
82
|
+
if response.status_code == 422:
|
|
83
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
84
|
+
|
|
85
|
+
return response_422
|
|
86
|
+
|
|
87
|
+
if client.raise_on_unexpected_status:
|
|
88
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
89
|
+
else:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def _build_response(
|
|
94
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
95
|
+
) -> Response[Any | HTTPValidationError]:
|
|
96
|
+
return Response(
|
|
97
|
+
status_code=HTTPStatus(response.status_code),
|
|
98
|
+
content=response.content,
|
|
99
|
+
headers=response.headers,
|
|
100
|
+
parsed=_parse_response(client=client, response=response),
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def sync_detailed(
|
|
105
|
+
*,
|
|
106
|
+
client: AuthenticatedClient,
|
|
107
|
+
task_id: None | str | Unset = UNSET,
|
|
108
|
+
task_name: None | str | Unset = UNSET,
|
|
109
|
+
init_scene_text: None | str | Unset = UNSET,
|
|
110
|
+
creator: None | str | Unset = UNSET,
|
|
111
|
+
keyword: None | str | Unset = UNSET,
|
|
112
|
+
page: int | Unset = 1,
|
|
113
|
+
size: int | Unset = 10,
|
|
114
|
+
) -> Response[Any | HTTPValidationError]:
|
|
115
|
+
"""List Task Mappings
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
task_id (None | str | Unset):
|
|
119
|
+
task_name (None | str | Unset):
|
|
120
|
+
init_scene_text (None | str | Unset):
|
|
121
|
+
creator (None | str | Unset):
|
|
122
|
+
keyword (None | str | Unset):
|
|
123
|
+
page (int | Unset): Default: 1.
|
|
124
|
+
size (int | Unset): Default: 10.
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Response[Any | HTTPValidationError]
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
kwargs = _get_kwargs(
|
|
135
|
+
task_id=task_id,
|
|
136
|
+
task_name=task_name,
|
|
137
|
+
init_scene_text=init_scene_text,
|
|
138
|
+
creator=creator,
|
|
139
|
+
keyword=keyword,
|
|
140
|
+
page=page,
|
|
141
|
+
size=size,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
response = client.get_httpx_client().request(
|
|
145
|
+
**kwargs,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
return _build_response(client=client, response=response)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def sync(
|
|
152
|
+
*,
|
|
153
|
+
client: AuthenticatedClient,
|
|
154
|
+
task_id: None | str | Unset = UNSET,
|
|
155
|
+
task_name: None | str | Unset = UNSET,
|
|
156
|
+
init_scene_text: None | str | Unset = UNSET,
|
|
157
|
+
creator: None | str | Unset = UNSET,
|
|
158
|
+
keyword: None | str | Unset = UNSET,
|
|
159
|
+
page: int | Unset = 1,
|
|
160
|
+
size: int | Unset = 10,
|
|
161
|
+
) -> Any | HTTPValidationError | None:
|
|
162
|
+
"""List Task Mappings
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
task_id (None | str | Unset):
|
|
166
|
+
task_name (None | str | Unset):
|
|
167
|
+
init_scene_text (None | str | Unset):
|
|
168
|
+
creator (None | str | Unset):
|
|
169
|
+
keyword (None | str | Unset):
|
|
170
|
+
page (int | Unset): Default: 1.
|
|
171
|
+
size (int | Unset): Default: 10.
|
|
172
|
+
|
|
173
|
+
Raises:
|
|
174
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
175
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
176
|
+
|
|
177
|
+
Returns:
|
|
178
|
+
Any | HTTPValidationError
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
return sync_detailed(
|
|
182
|
+
client=client,
|
|
183
|
+
task_id=task_id,
|
|
184
|
+
task_name=task_name,
|
|
185
|
+
init_scene_text=init_scene_text,
|
|
186
|
+
creator=creator,
|
|
187
|
+
keyword=keyword,
|
|
188
|
+
page=page,
|
|
189
|
+
size=size,
|
|
190
|
+
).parsed
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
async def asyncio_detailed(
|
|
194
|
+
*,
|
|
195
|
+
client: AuthenticatedClient,
|
|
196
|
+
task_id: None | str | Unset = UNSET,
|
|
197
|
+
task_name: None | str | Unset = UNSET,
|
|
198
|
+
init_scene_text: None | str | Unset = UNSET,
|
|
199
|
+
creator: None | str | Unset = UNSET,
|
|
200
|
+
keyword: None | str | Unset = UNSET,
|
|
201
|
+
page: int | Unset = 1,
|
|
202
|
+
size: int | Unset = 10,
|
|
203
|
+
) -> Response[Any | HTTPValidationError]:
|
|
204
|
+
"""List Task Mappings
|
|
205
|
+
|
|
206
|
+
Args:
|
|
207
|
+
task_id (None | str | Unset):
|
|
208
|
+
task_name (None | str | Unset):
|
|
209
|
+
init_scene_text (None | str | Unset):
|
|
210
|
+
creator (None | str | Unset):
|
|
211
|
+
keyword (None | str | Unset):
|
|
212
|
+
page (int | Unset): Default: 1.
|
|
213
|
+
size (int | Unset): Default: 10.
|
|
214
|
+
|
|
215
|
+
Raises:
|
|
216
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
217
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
218
|
+
|
|
219
|
+
Returns:
|
|
220
|
+
Response[Any | HTTPValidationError]
|
|
221
|
+
"""
|
|
222
|
+
|
|
223
|
+
kwargs = _get_kwargs(
|
|
224
|
+
task_id=task_id,
|
|
225
|
+
task_name=task_name,
|
|
226
|
+
init_scene_text=init_scene_text,
|
|
227
|
+
creator=creator,
|
|
228
|
+
keyword=keyword,
|
|
229
|
+
page=page,
|
|
230
|
+
size=size,
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
234
|
+
|
|
235
|
+
return _build_response(client=client, response=response)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
async def asyncio(
|
|
239
|
+
*,
|
|
240
|
+
client: AuthenticatedClient,
|
|
241
|
+
task_id: None | str | Unset = UNSET,
|
|
242
|
+
task_name: None | str | Unset = UNSET,
|
|
243
|
+
init_scene_text: None | str | Unset = UNSET,
|
|
244
|
+
creator: None | str | Unset = UNSET,
|
|
245
|
+
keyword: None | str | Unset = UNSET,
|
|
246
|
+
page: int | Unset = 1,
|
|
247
|
+
size: int | Unset = 10,
|
|
248
|
+
) -> Any | HTTPValidationError | None:
|
|
249
|
+
"""List Task Mappings
|
|
250
|
+
|
|
251
|
+
Args:
|
|
252
|
+
task_id (None | str | Unset):
|
|
253
|
+
task_name (None | str | Unset):
|
|
254
|
+
init_scene_text (None | str | Unset):
|
|
255
|
+
creator (None | str | Unset):
|
|
256
|
+
keyword (None | str | Unset):
|
|
257
|
+
page (int | Unset): Default: 1.
|
|
258
|
+
size (int | Unset): Default: 10.
|
|
259
|
+
|
|
260
|
+
Raises:
|
|
261
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
262
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
263
|
+
|
|
264
|
+
Returns:
|
|
265
|
+
Any | HTTPValidationError
|
|
266
|
+
"""
|
|
267
|
+
|
|
268
|
+
return (
|
|
269
|
+
await asyncio_detailed(
|
|
270
|
+
client=client,
|
|
271
|
+
task_id=task_id,
|
|
272
|
+
task_name=task_name,
|
|
273
|
+
init_scene_text=init_scene_text,
|
|
274
|
+
creator=creator,
|
|
275
|
+
keyword=keyword,
|
|
276
|
+
page=page,
|
|
277
|
+
size=size,
|
|
278
|
+
)
|
|
279
|
+
).parsed
|