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,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="CreatePlatformRoleBindingRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CreatePlatformRoleBindingRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
username (str):
|
|
17
|
+
platform_role (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
username: str
|
|
21
|
+
platform_role: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
username = self.username
|
|
26
|
+
|
|
27
|
+
platform_role = self.platform_role
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"username": username,
|
|
34
|
+
"platform_role": platform_role,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
username = d.pop("username")
|
|
44
|
+
|
|
45
|
+
platform_role = d.pop("platform_role")
|
|
46
|
+
|
|
47
|
+
create_platform_role_binding_request = cls(
|
|
48
|
+
username=username,
|
|
49
|
+
platform_role=platform_role,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
create_platform_role_binding_request.additional_properties = d
|
|
53
|
+
return create_platform_role_binding_request
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="DatasetAddRequest")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class DatasetAddRequest:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
source (str): from_singledata/from_upload
|
|
19
|
+
source_singledata_uuids (list[str] | None | Unset): from_list
|
|
20
|
+
source_files (list[str] | None | Unset): from_upload
|
|
21
|
+
process_check (bool | Unset): from_upload Default: True.
|
|
22
|
+
merged_datasets (list[str] | None | Unset): from_merge
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
source: str
|
|
26
|
+
source_singledata_uuids: list[str] | None | Unset = UNSET
|
|
27
|
+
source_files: list[str] | None | Unset = UNSET
|
|
28
|
+
process_check: bool | Unset = True
|
|
29
|
+
merged_datasets: list[str] | None | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
source = self.source
|
|
34
|
+
|
|
35
|
+
source_singledata_uuids: list[str] | None | Unset
|
|
36
|
+
if isinstance(self.source_singledata_uuids, Unset):
|
|
37
|
+
source_singledata_uuids = UNSET
|
|
38
|
+
elif isinstance(self.source_singledata_uuids, list):
|
|
39
|
+
source_singledata_uuids = self.source_singledata_uuids
|
|
40
|
+
|
|
41
|
+
else:
|
|
42
|
+
source_singledata_uuids = self.source_singledata_uuids
|
|
43
|
+
|
|
44
|
+
source_files: list[str] | None | Unset
|
|
45
|
+
if isinstance(self.source_files, Unset):
|
|
46
|
+
source_files = UNSET
|
|
47
|
+
elif isinstance(self.source_files, list):
|
|
48
|
+
source_files = self.source_files
|
|
49
|
+
|
|
50
|
+
else:
|
|
51
|
+
source_files = self.source_files
|
|
52
|
+
|
|
53
|
+
process_check = self.process_check
|
|
54
|
+
|
|
55
|
+
merged_datasets: list[str] | None | Unset
|
|
56
|
+
if isinstance(self.merged_datasets, Unset):
|
|
57
|
+
merged_datasets = UNSET
|
|
58
|
+
elif isinstance(self.merged_datasets, list):
|
|
59
|
+
merged_datasets = self.merged_datasets
|
|
60
|
+
|
|
61
|
+
else:
|
|
62
|
+
merged_datasets = self.merged_datasets
|
|
63
|
+
|
|
64
|
+
field_dict: dict[str, Any] = {}
|
|
65
|
+
field_dict.update(self.additional_properties)
|
|
66
|
+
field_dict.update(
|
|
67
|
+
{
|
|
68
|
+
"source": source,
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
if source_singledata_uuids is not UNSET:
|
|
72
|
+
field_dict["source_singledata_uuids"] = source_singledata_uuids
|
|
73
|
+
if source_files is not UNSET:
|
|
74
|
+
field_dict["source_files"] = source_files
|
|
75
|
+
if process_check is not UNSET:
|
|
76
|
+
field_dict["process_check"] = process_check
|
|
77
|
+
if merged_datasets is not UNSET:
|
|
78
|
+
field_dict["merged_datasets"] = merged_datasets
|
|
79
|
+
|
|
80
|
+
return field_dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
84
|
+
d = dict(src_dict)
|
|
85
|
+
source = d.pop("source")
|
|
86
|
+
|
|
87
|
+
def _parse_source_singledata_uuids(data: object) -> list[str] | None | Unset:
|
|
88
|
+
if data is None:
|
|
89
|
+
return data
|
|
90
|
+
if isinstance(data, Unset):
|
|
91
|
+
return data
|
|
92
|
+
try:
|
|
93
|
+
if not isinstance(data, list):
|
|
94
|
+
raise TypeError()
|
|
95
|
+
source_singledata_uuids_type_0 = cast(list[str], data)
|
|
96
|
+
|
|
97
|
+
return source_singledata_uuids_type_0
|
|
98
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
99
|
+
pass
|
|
100
|
+
return cast(list[str] | None | Unset, data)
|
|
101
|
+
|
|
102
|
+
source_singledata_uuids = _parse_source_singledata_uuids(d.pop("source_singledata_uuids", UNSET))
|
|
103
|
+
|
|
104
|
+
def _parse_source_files(data: object) -> list[str] | None | Unset:
|
|
105
|
+
if data is None:
|
|
106
|
+
return data
|
|
107
|
+
if isinstance(data, Unset):
|
|
108
|
+
return data
|
|
109
|
+
try:
|
|
110
|
+
if not isinstance(data, list):
|
|
111
|
+
raise TypeError()
|
|
112
|
+
source_files_type_0 = cast(list[str], data)
|
|
113
|
+
|
|
114
|
+
return source_files_type_0
|
|
115
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
116
|
+
pass
|
|
117
|
+
return cast(list[str] | None | Unset, data)
|
|
118
|
+
|
|
119
|
+
source_files = _parse_source_files(d.pop("source_files", UNSET))
|
|
120
|
+
|
|
121
|
+
process_check = d.pop("process_check", UNSET)
|
|
122
|
+
|
|
123
|
+
def _parse_merged_datasets(data: object) -> list[str] | None | Unset:
|
|
124
|
+
if data is None:
|
|
125
|
+
return data
|
|
126
|
+
if isinstance(data, Unset):
|
|
127
|
+
return data
|
|
128
|
+
try:
|
|
129
|
+
if not isinstance(data, list):
|
|
130
|
+
raise TypeError()
|
|
131
|
+
merged_datasets_type_0 = cast(list[str], data)
|
|
132
|
+
|
|
133
|
+
return merged_datasets_type_0
|
|
134
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
135
|
+
pass
|
|
136
|
+
return cast(list[str] | None | Unset, data)
|
|
137
|
+
|
|
138
|
+
merged_datasets = _parse_merged_datasets(d.pop("merged_datasets", UNSET))
|
|
139
|
+
|
|
140
|
+
dataset_add_request = cls(
|
|
141
|
+
source=source,
|
|
142
|
+
source_singledata_uuids=source_singledata_uuids,
|
|
143
|
+
source_files=source_files,
|
|
144
|
+
process_check=process_check,
|
|
145
|
+
merged_datasets=merged_datasets,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
dataset_add_request.additional_properties = d
|
|
149
|
+
return dataset_add_request
|
|
150
|
+
|
|
151
|
+
@property
|
|
152
|
+
def additional_keys(self) -> list[str]:
|
|
153
|
+
return list(self.additional_properties.keys())
|
|
154
|
+
|
|
155
|
+
def __getitem__(self, key: str) -> Any:
|
|
156
|
+
return self.additional_properties[key]
|
|
157
|
+
|
|
158
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
159
|
+
self.additional_properties[key] = value
|
|
160
|
+
|
|
161
|
+
def __delitem__(self, key: str) -> None:
|
|
162
|
+
del self.additional_properties[key]
|
|
163
|
+
|
|
164
|
+
def __contains__(self, key: str) -> bool:
|
|
165
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="DatasetCreateRequest")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class DatasetCreateRequest:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
create_type (str): 创建类型: from_list, from_upload, from_dataset, from_merge, empty
|
|
19
|
+
creator (str): 创建人
|
|
20
|
+
alias (None | str | Unset): 别名
|
|
21
|
+
description (None | str | Unset): 描述
|
|
22
|
+
label (None | str | Unset): 标签
|
|
23
|
+
source_singledata_uuids (list[str] | None | Unset): from_list/from_dataset
|
|
24
|
+
source_dataset_uuid (None | str | Unset): from_dataset
|
|
25
|
+
source_files (list[str] | None | Unset): from_upload/from_dataset
|
|
26
|
+
process_check (bool | Unset): from_upload/from_dataset Default: True.
|
|
27
|
+
merged_datasets (list[str] | None | Unset): from_merge
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
create_type: str
|
|
31
|
+
creator: str
|
|
32
|
+
alias: None | str | Unset = UNSET
|
|
33
|
+
description: None | str | Unset = UNSET
|
|
34
|
+
label: None | str | Unset = UNSET
|
|
35
|
+
source_singledata_uuids: list[str] | None | Unset = UNSET
|
|
36
|
+
source_dataset_uuid: None | str | Unset = UNSET
|
|
37
|
+
source_files: list[str] | None | Unset = UNSET
|
|
38
|
+
process_check: bool | Unset = True
|
|
39
|
+
merged_datasets: list[str] | None | Unset = UNSET
|
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
41
|
+
|
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
|
43
|
+
create_type = self.create_type
|
|
44
|
+
|
|
45
|
+
creator = self.creator
|
|
46
|
+
|
|
47
|
+
alias: None | str | Unset
|
|
48
|
+
if isinstance(self.alias, Unset):
|
|
49
|
+
alias = UNSET
|
|
50
|
+
else:
|
|
51
|
+
alias = self.alias
|
|
52
|
+
|
|
53
|
+
description: None | str | Unset
|
|
54
|
+
if isinstance(self.description, Unset):
|
|
55
|
+
description = UNSET
|
|
56
|
+
else:
|
|
57
|
+
description = self.description
|
|
58
|
+
|
|
59
|
+
label: None | str | Unset
|
|
60
|
+
if isinstance(self.label, Unset):
|
|
61
|
+
label = UNSET
|
|
62
|
+
else:
|
|
63
|
+
label = self.label
|
|
64
|
+
|
|
65
|
+
source_singledata_uuids: list[str] | None | Unset
|
|
66
|
+
if isinstance(self.source_singledata_uuids, Unset):
|
|
67
|
+
source_singledata_uuids = UNSET
|
|
68
|
+
elif isinstance(self.source_singledata_uuids, list):
|
|
69
|
+
source_singledata_uuids = self.source_singledata_uuids
|
|
70
|
+
|
|
71
|
+
else:
|
|
72
|
+
source_singledata_uuids = self.source_singledata_uuids
|
|
73
|
+
|
|
74
|
+
source_dataset_uuid: None | str | Unset
|
|
75
|
+
if isinstance(self.source_dataset_uuid, Unset):
|
|
76
|
+
source_dataset_uuid = UNSET
|
|
77
|
+
else:
|
|
78
|
+
source_dataset_uuid = self.source_dataset_uuid
|
|
79
|
+
|
|
80
|
+
source_files: list[str] | None | Unset
|
|
81
|
+
if isinstance(self.source_files, Unset):
|
|
82
|
+
source_files = UNSET
|
|
83
|
+
elif isinstance(self.source_files, list):
|
|
84
|
+
source_files = self.source_files
|
|
85
|
+
|
|
86
|
+
else:
|
|
87
|
+
source_files = self.source_files
|
|
88
|
+
|
|
89
|
+
process_check = self.process_check
|
|
90
|
+
|
|
91
|
+
merged_datasets: list[str] | None | Unset
|
|
92
|
+
if isinstance(self.merged_datasets, Unset):
|
|
93
|
+
merged_datasets = UNSET
|
|
94
|
+
elif isinstance(self.merged_datasets, list):
|
|
95
|
+
merged_datasets = self.merged_datasets
|
|
96
|
+
|
|
97
|
+
else:
|
|
98
|
+
merged_datasets = self.merged_datasets
|
|
99
|
+
|
|
100
|
+
field_dict: dict[str, Any] = {}
|
|
101
|
+
field_dict.update(self.additional_properties)
|
|
102
|
+
field_dict.update(
|
|
103
|
+
{
|
|
104
|
+
"create_type": create_type,
|
|
105
|
+
"creator": creator,
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
if alias is not UNSET:
|
|
109
|
+
field_dict["alias"] = alias
|
|
110
|
+
if description is not UNSET:
|
|
111
|
+
field_dict["description"] = description
|
|
112
|
+
if label is not UNSET:
|
|
113
|
+
field_dict["label"] = label
|
|
114
|
+
if source_singledata_uuids is not UNSET:
|
|
115
|
+
field_dict["source_singledata_uuids"] = source_singledata_uuids
|
|
116
|
+
if source_dataset_uuid is not UNSET:
|
|
117
|
+
field_dict["source_dataset_uuid"] = source_dataset_uuid
|
|
118
|
+
if source_files is not UNSET:
|
|
119
|
+
field_dict["source_files"] = source_files
|
|
120
|
+
if process_check is not UNSET:
|
|
121
|
+
field_dict["process_check"] = process_check
|
|
122
|
+
if merged_datasets is not UNSET:
|
|
123
|
+
field_dict["merged_datasets"] = merged_datasets
|
|
124
|
+
|
|
125
|
+
return field_dict
|
|
126
|
+
|
|
127
|
+
@classmethod
|
|
128
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
129
|
+
d = dict(src_dict)
|
|
130
|
+
create_type = d.pop("create_type")
|
|
131
|
+
|
|
132
|
+
creator = d.pop("creator")
|
|
133
|
+
|
|
134
|
+
def _parse_alias(data: object) -> None | str | Unset:
|
|
135
|
+
if data is None:
|
|
136
|
+
return data
|
|
137
|
+
if isinstance(data, Unset):
|
|
138
|
+
return data
|
|
139
|
+
return cast(None | str | Unset, data)
|
|
140
|
+
|
|
141
|
+
alias = _parse_alias(d.pop("alias", UNSET))
|
|
142
|
+
|
|
143
|
+
def _parse_description(data: object) -> None | str | Unset:
|
|
144
|
+
if data is None:
|
|
145
|
+
return data
|
|
146
|
+
if isinstance(data, Unset):
|
|
147
|
+
return data
|
|
148
|
+
return cast(None | str | Unset, data)
|
|
149
|
+
|
|
150
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
151
|
+
|
|
152
|
+
def _parse_label(data: object) -> None | str | Unset:
|
|
153
|
+
if data is None:
|
|
154
|
+
return data
|
|
155
|
+
if isinstance(data, Unset):
|
|
156
|
+
return data
|
|
157
|
+
return cast(None | str | Unset, data)
|
|
158
|
+
|
|
159
|
+
label = _parse_label(d.pop("label", UNSET))
|
|
160
|
+
|
|
161
|
+
def _parse_source_singledata_uuids(data: object) -> list[str] | None | Unset:
|
|
162
|
+
if data is None:
|
|
163
|
+
return data
|
|
164
|
+
if isinstance(data, Unset):
|
|
165
|
+
return data
|
|
166
|
+
try:
|
|
167
|
+
if not isinstance(data, list):
|
|
168
|
+
raise TypeError()
|
|
169
|
+
source_singledata_uuids_type_0 = cast(list[str], data)
|
|
170
|
+
|
|
171
|
+
return source_singledata_uuids_type_0
|
|
172
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
173
|
+
pass
|
|
174
|
+
return cast(list[str] | None | Unset, data)
|
|
175
|
+
|
|
176
|
+
source_singledata_uuids = _parse_source_singledata_uuids(d.pop("source_singledata_uuids", UNSET))
|
|
177
|
+
|
|
178
|
+
def _parse_source_dataset_uuid(data: object) -> None | str | Unset:
|
|
179
|
+
if data is None:
|
|
180
|
+
return data
|
|
181
|
+
if isinstance(data, Unset):
|
|
182
|
+
return data
|
|
183
|
+
return cast(None | str | Unset, data)
|
|
184
|
+
|
|
185
|
+
source_dataset_uuid = _parse_source_dataset_uuid(d.pop("source_dataset_uuid", UNSET))
|
|
186
|
+
|
|
187
|
+
def _parse_source_files(data: object) -> list[str] | None | Unset:
|
|
188
|
+
if data is None:
|
|
189
|
+
return data
|
|
190
|
+
if isinstance(data, Unset):
|
|
191
|
+
return data
|
|
192
|
+
try:
|
|
193
|
+
if not isinstance(data, list):
|
|
194
|
+
raise TypeError()
|
|
195
|
+
source_files_type_0 = cast(list[str], data)
|
|
196
|
+
|
|
197
|
+
return source_files_type_0
|
|
198
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
199
|
+
pass
|
|
200
|
+
return cast(list[str] | None | Unset, data)
|
|
201
|
+
|
|
202
|
+
source_files = _parse_source_files(d.pop("source_files", UNSET))
|
|
203
|
+
|
|
204
|
+
process_check = d.pop("process_check", UNSET)
|
|
205
|
+
|
|
206
|
+
def _parse_merged_datasets(data: object) -> list[str] | None | Unset:
|
|
207
|
+
if data is None:
|
|
208
|
+
return data
|
|
209
|
+
if isinstance(data, Unset):
|
|
210
|
+
return data
|
|
211
|
+
try:
|
|
212
|
+
if not isinstance(data, list):
|
|
213
|
+
raise TypeError()
|
|
214
|
+
merged_datasets_type_0 = cast(list[str], data)
|
|
215
|
+
|
|
216
|
+
return merged_datasets_type_0
|
|
217
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
218
|
+
pass
|
|
219
|
+
return cast(list[str] | None | Unset, data)
|
|
220
|
+
|
|
221
|
+
merged_datasets = _parse_merged_datasets(d.pop("merged_datasets", UNSET))
|
|
222
|
+
|
|
223
|
+
dataset_create_request = cls(
|
|
224
|
+
create_type=create_type,
|
|
225
|
+
creator=creator,
|
|
226
|
+
alias=alias,
|
|
227
|
+
description=description,
|
|
228
|
+
label=label,
|
|
229
|
+
source_singledata_uuids=source_singledata_uuids,
|
|
230
|
+
source_dataset_uuid=source_dataset_uuid,
|
|
231
|
+
source_files=source_files,
|
|
232
|
+
process_check=process_check,
|
|
233
|
+
merged_datasets=merged_datasets,
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
dataset_create_request.additional_properties = d
|
|
237
|
+
return dataset_create_request
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def additional_keys(self) -> list[str]:
|
|
241
|
+
return list(self.additional_properties.keys())
|
|
242
|
+
|
|
243
|
+
def __getitem__(self, key: str) -> Any:
|
|
244
|
+
return self.additional_properties[key]
|
|
245
|
+
|
|
246
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
247
|
+
self.additional_properties[key] = value
|
|
248
|
+
|
|
249
|
+
def __delitem__(self, key: str) -> None:
|
|
250
|
+
del self.additional_properties[key]
|
|
251
|
+
|
|
252
|
+
def __contains__(self, key: str) -> bool:
|
|
253
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="DatasetFullUpdateRequest")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class DatasetFullUpdateRequest:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
alias (None | str | Unset): 别名
|
|
19
|
+
description (None | str | Unset): 描述
|
|
20
|
+
label (None | str | Unset): 标签
|
|
21
|
+
extra_info (None | str | Unset): 额外信息
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
alias: None | str | Unset = UNSET
|
|
25
|
+
description: None | str | Unset = UNSET
|
|
26
|
+
label: None | str | Unset = UNSET
|
|
27
|
+
extra_info: None | str | Unset = UNSET
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
alias: None | str | Unset
|
|
32
|
+
if isinstance(self.alias, Unset):
|
|
33
|
+
alias = UNSET
|
|
34
|
+
else:
|
|
35
|
+
alias = self.alias
|
|
36
|
+
|
|
37
|
+
description: None | str | Unset
|
|
38
|
+
if isinstance(self.description, Unset):
|
|
39
|
+
description = UNSET
|
|
40
|
+
else:
|
|
41
|
+
description = self.description
|
|
42
|
+
|
|
43
|
+
label: None | str | Unset
|
|
44
|
+
if isinstance(self.label, Unset):
|
|
45
|
+
label = UNSET
|
|
46
|
+
else:
|
|
47
|
+
label = self.label
|
|
48
|
+
|
|
49
|
+
extra_info: None | str | Unset
|
|
50
|
+
if isinstance(self.extra_info, Unset):
|
|
51
|
+
extra_info = UNSET
|
|
52
|
+
else:
|
|
53
|
+
extra_info = self.extra_info
|
|
54
|
+
|
|
55
|
+
field_dict: dict[str, Any] = {}
|
|
56
|
+
field_dict.update(self.additional_properties)
|
|
57
|
+
field_dict.update({})
|
|
58
|
+
if alias is not UNSET:
|
|
59
|
+
field_dict["alias"] = alias
|
|
60
|
+
if description is not UNSET:
|
|
61
|
+
field_dict["description"] = description
|
|
62
|
+
if label is not UNSET:
|
|
63
|
+
field_dict["label"] = label
|
|
64
|
+
if extra_info is not UNSET:
|
|
65
|
+
field_dict["extra_info"] = extra_info
|
|
66
|
+
|
|
67
|
+
return field_dict
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
|
|
73
|
+
def _parse_alias(data: object) -> None | str | Unset:
|
|
74
|
+
if data is None:
|
|
75
|
+
return data
|
|
76
|
+
if isinstance(data, Unset):
|
|
77
|
+
return data
|
|
78
|
+
return cast(None | str | Unset, data)
|
|
79
|
+
|
|
80
|
+
alias = _parse_alias(d.pop("alias", UNSET))
|
|
81
|
+
|
|
82
|
+
def _parse_description(data: object) -> None | str | Unset:
|
|
83
|
+
if data is None:
|
|
84
|
+
return data
|
|
85
|
+
if isinstance(data, Unset):
|
|
86
|
+
return data
|
|
87
|
+
return cast(None | str | Unset, data)
|
|
88
|
+
|
|
89
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
90
|
+
|
|
91
|
+
def _parse_label(data: object) -> None | str | Unset:
|
|
92
|
+
if data is None:
|
|
93
|
+
return data
|
|
94
|
+
if isinstance(data, Unset):
|
|
95
|
+
return data
|
|
96
|
+
return cast(None | str | Unset, data)
|
|
97
|
+
|
|
98
|
+
label = _parse_label(d.pop("label", UNSET))
|
|
99
|
+
|
|
100
|
+
def _parse_extra_info(data: object) -> None | str | Unset:
|
|
101
|
+
if data is None:
|
|
102
|
+
return data
|
|
103
|
+
if isinstance(data, Unset):
|
|
104
|
+
return data
|
|
105
|
+
return cast(None | str | Unset, data)
|
|
106
|
+
|
|
107
|
+
extra_info = _parse_extra_info(d.pop("extra_info", UNSET))
|
|
108
|
+
|
|
109
|
+
dataset_full_update_request = cls(
|
|
110
|
+
alias=alias,
|
|
111
|
+
description=description,
|
|
112
|
+
label=label,
|
|
113
|
+
extra_info=extra_info,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
dataset_full_update_request.additional_properties = d
|
|
117
|
+
return dataset_full_update_request
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def additional_keys(self) -> list[str]:
|
|
121
|
+
return list(self.additional_properties.keys())
|
|
122
|
+
|
|
123
|
+
def __getitem__(self, key: str) -> Any:
|
|
124
|
+
return self.additional_properties[key]
|
|
125
|
+
|
|
126
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
127
|
+
self.additional_properties[key] = value
|
|
128
|
+
|
|
129
|
+
def __delitem__(self, key: str) -> None:
|
|
130
|
+
del self.additional_properties[key]
|
|
131
|
+
|
|
132
|
+
def __contains__(self, key: str) -> bool:
|
|
133
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="DatasetReduceRequest")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class DatasetReduceRequest:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
source_singledata_uuids (list[str] | None | Unset): singledata uuids to remove
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
source_singledata_uuids: list[str] | None | Unset = UNSET
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
source_singledata_uuids: list[str] | None | Unset
|
|
26
|
+
if isinstance(self.source_singledata_uuids, Unset):
|
|
27
|
+
source_singledata_uuids = UNSET
|
|
28
|
+
elif isinstance(self.source_singledata_uuids, list):
|
|
29
|
+
source_singledata_uuids = self.source_singledata_uuids
|
|
30
|
+
|
|
31
|
+
else:
|
|
32
|
+
source_singledata_uuids = self.source_singledata_uuids
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update({})
|
|
37
|
+
if source_singledata_uuids is not UNSET:
|
|
38
|
+
field_dict["source_singledata_uuids"] = source_singledata_uuids
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
44
|
+
d = dict(src_dict)
|
|
45
|
+
|
|
46
|
+
def _parse_source_singledata_uuids(data: object) -> list[str] | None | Unset:
|
|
47
|
+
if data is None:
|
|
48
|
+
return data
|
|
49
|
+
if isinstance(data, Unset):
|
|
50
|
+
return data
|
|
51
|
+
try:
|
|
52
|
+
if not isinstance(data, list):
|
|
53
|
+
raise TypeError()
|
|
54
|
+
source_singledata_uuids_type_0 = cast(list[str], data)
|
|
55
|
+
|
|
56
|
+
return source_singledata_uuids_type_0
|
|
57
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
58
|
+
pass
|
|
59
|
+
return cast(list[str] | None | Unset, data)
|
|
60
|
+
|
|
61
|
+
source_singledata_uuids = _parse_source_singledata_uuids(d.pop("source_singledata_uuids", UNSET))
|
|
62
|
+
|
|
63
|
+
dataset_reduce_request = cls(
|
|
64
|
+
source_singledata_uuids=source_singledata_uuids,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
dataset_reduce_request.additional_properties = d
|
|
68
|
+
return dataset_reduce_request
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def additional_keys(self) -> list[str]:
|
|
72
|
+
return list(self.additional_properties.keys())
|
|
73
|
+
|
|
74
|
+
def __getitem__(self, key: str) -> Any:
|
|
75
|
+
return self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
78
|
+
self.additional_properties[key] = value
|
|
79
|
+
|
|
80
|
+
def __delitem__(self, key: str) -> None:
|
|
81
|
+
del self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __contains__(self, key: str) -> bool:
|
|
84
|
+
return key in self.additional_properties
|