baiducloud-python-sdk-aihc 0.0.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.
- baiducloud_python_sdk_aihc/__init__.py +5 -0
- baiducloud_python_sdk_aihc/api/__init__.py +0 -0
- baiducloud_python_sdk_aihc/api/aihc_client.py +643 -0
- baiducloud_python_sdk_aihc/models/__init__.py +39 -0
- baiducloud_python_sdk_aihc/models/create_a_dataset_v2_request.py +147 -0
- baiducloud_python_sdk_aihc/models/create_a_dataset_v2_response.py +61 -0
- baiducloud_python_sdk_aihc/models/create_a_model_v2_request.py +101 -0
- baiducloud_python_sdk_aihc/models/create_a_model_v2_response.py +61 -0
- baiducloud_python_sdk_aihc/models/create_dataset_version_v2_request.py +82 -0
- baiducloud_python_sdk_aihc/models/create_dataset_version_v2_response.py +61 -0
- baiducloud_python_sdk_aihc/models/dataset.py +200 -0
- baiducloud_python_sdk_aihc/models/dataset_version_entry.py +98 -0
- baiducloud_python_sdk_aihc/models/delete_dataset_v2_request.py +58 -0
- baiducloud_python_sdk_aihc/models/delete_dataset_version_v2_request.py +64 -0
- baiducloud_python_sdk_aihc/models/delete_model_v2_request.py +58 -0
- baiducloud_python_sdk_aihc/models/delete_model_version_v2_request.py +64 -0
- baiducloud_python_sdk_aihc/models/get_a_list_of_model_versions_v2_request.py +70 -0
- baiducloud_python_sdk_aihc/models/get_a_list_of_model_versions_v2_response.py +70 -0
- baiducloud_python_sdk_aihc/models/get_dataset_details_v2_request.py +58 -0
- baiducloud_python_sdk_aihc/models/get_dataset_details_v2_response.py +211 -0
- baiducloud_python_sdk_aihc/models/get_dataset_version_details_v2_request.py +64 -0
- baiducloud_python_sdk_aihc/models/get_dataset_version_details_v2_response.py +193 -0
- baiducloud_python_sdk_aihc/models/get_model_details_v2_request.py +58 -0
- baiducloud_python_sdk_aihc/models/get_model_details_v2_response.py +155 -0
- baiducloud_python_sdk_aihc/models/get_model_list_v2_request.py +64 -0
- baiducloud_python_sdk_aihc/models/get_model_list_v2_response.py +70 -0
- baiducloud_python_sdk_aihc/models/get_model_version_details_v2_request.py +64 -0
- baiducloud_python_sdk_aihc/models/get_model_version_details_v2_response.py +155 -0
- baiducloud_python_sdk_aihc/models/model.py +160 -0
- baiducloud_python_sdk_aihc/models/model_version_entry.py +115 -0
- baiducloud_python_sdk_aihc/models/modify_dataset_v2_request.py +108 -0
- baiducloud_python_sdk_aihc/models/modify_the_model_v2_request.py +74 -0
- baiducloud_python_sdk_aihc/models/new_model_version_v2_request.py +98 -0
- baiducloud_python_sdk_aihc/models/new_model_version_v2_response.py +61 -0
- baiducloud_python_sdk_aihc/models/permission_entry.py +74 -0
- baiducloud_python_sdk_aihc/models/retrieve_the_dataset_list_v2_request.py +84 -0
- baiducloud_python_sdk_aihc/models/retrieve_the_dataset_list_v2_response.py +70 -0
- baiducloud_python_sdk_aihc/models/retrieve_the_dataset_version_list_v2_request.py +70 -0
- baiducloud_python_sdk_aihc/models/retrieve_the_dataset_version_list_v2_response.py +70 -0
- baiducloud_python_sdk_aihc-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_aihc-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_aihc-0.0.1.dist-info/RECORD +44 -0
- baiducloud_python_sdk_aihc-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_aihc-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ModelVersionEntry information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ModelVersionEntry(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
ModelVersionEntry
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self,
|
|
15
|
+
id=None,
|
|
16
|
+
version=None,
|
|
17
|
+
source=None,
|
|
18
|
+
storage_bucket=None,
|
|
19
|
+
storage_path=None,
|
|
20
|
+
model_metrics=None,
|
|
21
|
+
description=None,
|
|
22
|
+
):
|
|
23
|
+
"""
|
|
24
|
+
Initialize ModelVersionEntry instance.
|
|
25
|
+
|
|
26
|
+
:param id: 否
|
|
27
|
+
:type id: str (optional)
|
|
28
|
+
|
|
29
|
+
:param version: 否
|
|
30
|
+
:type version: str (optional)
|
|
31
|
+
|
|
32
|
+
:param source: 是
|
|
33
|
+
:type source: str (optional)
|
|
34
|
+
|
|
35
|
+
:param storage_bucket: 是
|
|
36
|
+
:type storage_bucket: str (optional)
|
|
37
|
+
|
|
38
|
+
:param storage_path: 是
|
|
39
|
+
:type storage_path: str (optional)
|
|
40
|
+
|
|
41
|
+
:param model_metrics: 否
|
|
42
|
+
:type model_metrics: str (optional)
|
|
43
|
+
|
|
44
|
+
:param description: 否
|
|
45
|
+
:type description: str (optional)
|
|
46
|
+
"""
|
|
47
|
+
super().__init__()
|
|
48
|
+
self.id = id
|
|
49
|
+
self.version = version
|
|
50
|
+
self.source = source
|
|
51
|
+
self.storage_bucket = storage_bucket
|
|
52
|
+
self.storage_path = storage_path
|
|
53
|
+
self.model_metrics = model_metrics
|
|
54
|
+
self.description = description
|
|
55
|
+
|
|
56
|
+
def to_dict(self):
|
|
57
|
+
"""
|
|
58
|
+
Convert the model instance to a dictionary representation.
|
|
59
|
+
|
|
60
|
+
Nested model objects are recursively converted to dictionaries.
|
|
61
|
+
|
|
62
|
+
:return: Dictionary representation of the model
|
|
63
|
+
:rtype: dict
|
|
64
|
+
"""
|
|
65
|
+
_map = super().to_dict()
|
|
66
|
+
if _map is not None:
|
|
67
|
+
return _map
|
|
68
|
+
result = dict()
|
|
69
|
+
if self.id is not None:
|
|
70
|
+
result['id'] = self.id
|
|
71
|
+
if self.version is not None:
|
|
72
|
+
result['version'] = self.version
|
|
73
|
+
if self.source is not None:
|
|
74
|
+
result['source'] = self.source
|
|
75
|
+
if self.storage_bucket is not None:
|
|
76
|
+
result['storageBucket'] = self.storage_bucket
|
|
77
|
+
if self.storage_path is not None:
|
|
78
|
+
result['storagePath'] = self.storage_path
|
|
79
|
+
if self.model_metrics is not None:
|
|
80
|
+
result['modelMetrics'] = self.model_metrics
|
|
81
|
+
if self.description is not None:
|
|
82
|
+
result['description'] = self.description
|
|
83
|
+
return result
|
|
84
|
+
|
|
85
|
+
def from_dict(self, m):
|
|
86
|
+
"""
|
|
87
|
+
Populate the model instance from a dictionary.
|
|
88
|
+
|
|
89
|
+
Nested dictionaries are recursively converted to model objects.
|
|
90
|
+
|
|
91
|
+
:param m: Dictionary containing model data
|
|
92
|
+
:type m: dict
|
|
93
|
+
|
|
94
|
+
:return: Self reference for method chaining
|
|
95
|
+
:rtype: ModelVersionEntry
|
|
96
|
+
|
|
97
|
+
:raises TypeError: If input is not a dictionary type
|
|
98
|
+
:raises ValueError: If nested model conversion fails
|
|
99
|
+
"""
|
|
100
|
+
m = m or dict()
|
|
101
|
+
if m.get('id') is not None:
|
|
102
|
+
self.id = m.get('id')
|
|
103
|
+
if m.get('version') is not None:
|
|
104
|
+
self.version = m.get('version')
|
|
105
|
+
if m.get('source') is not None:
|
|
106
|
+
self.source = m.get('source')
|
|
107
|
+
if m.get('storageBucket') is not None:
|
|
108
|
+
self.storage_bucket = m.get('storageBucket')
|
|
109
|
+
if m.get('storagePath') is not None:
|
|
110
|
+
self.storage_path = m.get('storagePath')
|
|
111
|
+
if m.get('modelMetrics') is not None:
|
|
112
|
+
self.model_metrics = m.get('modelMetrics')
|
|
113
|
+
if m.get('description') is not None:
|
|
114
|
+
self.description = m.get('description')
|
|
115
|
+
return self
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ModifyDatasetV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
from baiducloud_python_sdk_aihc.models.permission_entry import PermissionEntry
|
|
7
|
+
from baiducloud_python_sdk_aihc.models.permission_entry import PermissionEntry
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ModifyDatasetV2Request(AbstractModel):
|
|
11
|
+
"""
|
|
12
|
+
Request entity for ModifyDatasetV2Request operation.
|
|
13
|
+
|
|
14
|
+
This class encapsulates all parameters for the API request.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def __init__(
|
|
18
|
+
self,
|
|
19
|
+
dataset_id,
|
|
20
|
+
name=None,
|
|
21
|
+
description=None,
|
|
22
|
+
visibility_scope=None,
|
|
23
|
+
visibility_user=None,
|
|
24
|
+
visibility_group=None,
|
|
25
|
+
):
|
|
26
|
+
"""
|
|
27
|
+
Initialize ModifyDatasetV2Request request entity.
|
|
28
|
+
|
|
29
|
+
:param dataset_id: dataset_id parameter
|
|
30
|
+
:type dataset_id: str (required)
|
|
31
|
+
|
|
32
|
+
:param name: 数据集名称
|
|
33
|
+
:type name: str (optional)
|
|
34
|
+
|
|
35
|
+
:param description: 描述
|
|
36
|
+
:type description: str (optional)
|
|
37
|
+
|
|
38
|
+
:param visibility_scope: visibility_scope parameter
|
|
39
|
+
:type visibility_scope: str (optional)
|
|
40
|
+
|
|
41
|
+
:param visibility_user: visibility_user parameter
|
|
42
|
+
:type visibility_user: List[PermissionEntry] (optional)
|
|
43
|
+
|
|
44
|
+
:param visibility_group: visibility_group parameter
|
|
45
|
+
:type visibility_group: List[PermissionEntry] (optional)
|
|
46
|
+
"""
|
|
47
|
+
super().__init__()
|
|
48
|
+
self.dataset_id = dataset_id
|
|
49
|
+
self.name = name
|
|
50
|
+
self.description = description
|
|
51
|
+
self.visibility_scope = visibility_scope
|
|
52
|
+
self.visibility_user = visibility_user
|
|
53
|
+
self.visibility_group = visibility_group
|
|
54
|
+
|
|
55
|
+
def to_dict(self):
|
|
56
|
+
"""
|
|
57
|
+
Convert the request entity to a dictionary representation.
|
|
58
|
+
|
|
59
|
+
Nested model objects are recursively converted to dictionaries.
|
|
60
|
+
|
|
61
|
+
:return: Dictionary representation of the request
|
|
62
|
+
:rtype: dict
|
|
63
|
+
"""
|
|
64
|
+
_map = super().to_dict()
|
|
65
|
+
if _map is not None:
|
|
66
|
+
return _map
|
|
67
|
+
result = dict()
|
|
68
|
+
if self.name is not None:
|
|
69
|
+
result['name'] = self.name
|
|
70
|
+
if self.description is not None:
|
|
71
|
+
result['description'] = self.description
|
|
72
|
+
if self.visibility_scope is not None:
|
|
73
|
+
result['visibilityScope'] = self.visibility_scope
|
|
74
|
+
if self.visibility_user is not None:
|
|
75
|
+
result['visibilityUser'] = [i.to_dict() for i in self.visibility_user]
|
|
76
|
+
if self.visibility_group is not None:
|
|
77
|
+
result['visibilityGroup'] = [i.to_dict() for i in self.visibility_group]
|
|
78
|
+
return result
|
|
79
|
+
|
|
80
|
+
def from_dict(self, m):
|
|
81
|
+
"""
|
|
82
|
+
Populate the request entity from a dictionary.
|
|
83
|
+
|
|
84
|
+
Nested dictionaries are recursively converted to model objects.
|
|
85
|
+
|
|
86
|
+
:param m: Dictionary containing request data
|
|
87
|
+
:type m: dict
|
|
88
|
+
|
|
89
|
+
:return: Self reference for method chaining
|
|
90
|
+
:rtype: ModifyDatasetV2Request
|
|
91
|
+
|
|
92
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
93
|
+
:raises ValueError: If nested model conversion fails
|
|
94
|
+
"""
|
|
95
|
+
m = m or dict()
|
|
96
|
+
if m.get('datasetId') is not None:
|
|
97
|
+
self.dataset_id = m.get('datasetId')
|
|
98
|
+
if m.get('name') is not None:
|
|
99
|
+
self.name = m.get('name')
|
|
100
|
+
if m.get('description') is not None:
|
|
101
|
+
self.description = m.get('description')
|
|
102
|
+
if m.get('visibilityScope') is not None:
|
|
103
|
+
self.visibility_scope = m.get('visibilityScope')
|
|
104
|
+
if m.get('visibilityUser') is not None:
|
|
105
|
+
self.visibility_user = [PermissionEntry().from_dict(i) for i in m.get('visibilityUser')]
|
|
106
|
+
if m.get('visibilityGroup') is not None:
|
|
107
|
+
self.visibility_group = [PermissionEntry().from_dict(i) for i in m.get('visibilityGroup')]
|
|
108
|
+
return self
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ModifyTheModelV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ModifyTheModelV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ModifyTheModelV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, model_id, name, description):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ModifyTheModelV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param model_id: model_id parameter
|
|
20
|
+
:type model_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param name: 模型名称
|
|
23
|
+
:type name: str (required)
|
|
24
|
+
|
|
25
|
+
:param description: 描述
|
|
26
|
+
:type description: str (required)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.model_id = model_id
|
|
30
|
+
self.name = name
|
|
31
|
+
self.description = description
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
"""
|
|
35
|
+
Convert the request entity to a dictionary representation.
|
|
36
|
+
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the request
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
if self.name is not None:
|
|
47
|
+
result['name'] = self.name
|
|
48
|
+
if self.description is not None:
|
|
49
|
+
result['description'] = self.description
|
|
50
|
+
return result
|
|
51
|
+
|
|
52
|
+
def from_dict(self, m):
|
|
53
|
+
"""
|
|
54
|
+
Populate the request entity from a dictionary.
|
|
55
|
+
|
|
56
|
+
Nested dictionaries are recursively converted to model objects.
|
|
57
|
+
|
|
58
|
+
:param m: Dictionary containing request data
|
|
59
|
+
:type m: dict
|
|
60
|
+
|
|
61
|
+
:return: Self reference for method chaining
|
|
62
|
+
:rtype: ModifyTheModelV2Request
|
|
63
|
+
|
|
64
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
65
|
+
:raises ValueError: If nested model conversion fails
|
|
66
|
+
"""
|
|
67
|
+
m = m or dict()
|
|
68
|
+
if m.get('modelId') is not None:
|
|
69
|
+
self.model_id = m.get('modelId')
|
|
70
|
+
if m.get('name') is not None:
|
|
71
|
+
self.name = m.get('name')
|
|
72
|
+
if m.get('description') is not None:
|
|
73
|
+
self.description = m.get('description')
|
|
74
|
+
return self
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for NewModelVersionV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class NewModelVersionV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for NewModelVersionV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, model_id, storage_bucket, storage_path, source, description=None, model_metrics=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize NewModelVersionV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param model_id: model_id parameter
|
|
20
|
+
:type model_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param storage_bucket: 模型存储的BOS桶
|
|
23
|
+
:type storage_bucket: str (required)
|
|
24
|
+
|
|
25
|
+
:param storage_path: BOS桶中的存储路径
|
|
26
|
+
:type storage_path: str (required)
|
|
27
|
+
|
|
28
|
+
:param description: 描述
|
|
29
|
+
:type description: str (optional)
|
|
30
|
+
|
|
31
|
+
:param source: 该版本模型的来源UserUpload:用户上传
|
|
32
|
+
:type source: str (required)
|
|
33
|
+
|
|
34
|
+
:param model_metrics: model_metrics parameter
|
|
35
|
+
:type model_metrics: str (optional)
|
|
36
|
+
"""
|
|
37
|
+
super().__init__()
|
|
38
|
+
self.model_id = model_id
|
|
39
|
+
self.storage_bucket = storage_bucket
|
|
40
|
+
self.storage_path = storage_path
|
|
41
|
+
self.description = description
|
|
42
|
+
self.source = source
|
|
43
|
+
self.model_metrics = model_metrics
|
|
44
|
+
|
|
45
|
+
def to_dict(self):
|
|
46
|
+
"""
|
|
47
|
+
Convert the request entity to a dictionary representation.
|
|
48
|
+
|
|
49
|
+
Nested model objects are recursively converted to dictionaries.
|
|
50
|
+
|
|
51
|
+
:return: Dictionary representation of the request
|
|
52
|
+
:rtype: dict
|
|
53
|
+
"""
|
|
54
|
+
_map = super().to_dict()
|
|
55
|
+
if _map is not None:
|
|
56
|
+
return _map
|
|
57
|
+
result = dict()
|
|
58
|
+
if self.storage_bucket is not None:
|
|
59
|
+
result['storageBucket'] = self.storage_bucket
|
|
60
|
+
if self.storage_path is not None:
|
|
61
|
+
result['storagePath'] = self.storage_path
|
|
62
|
+
if self.description is not None:
|
|
63
|
+
result['description'] = self.description
|
|
64
|
+
if self.source is not None:
|
|
65
|
+
result['source'] = self.source
|
|
66
|
+
if self.model_metrics is not None:
|
|
67
|
+
result['modelMetrics'] = self.model_metrics
|
|
68
|
+
return result
|
|
69
|
+
|
|
70
|
+
def from_dict(self, m):
|
|
71
|
+
"""
|
|
72
|
+
Populate the request entity from a dictionary.
|
|
73
|
+
|
|
74
|
+
Nested dictionaries are recursively converted to model objects.
|
|
75
|
+
|
|
76
|
+
:param m: Dictionary containing request data
|
|
77
|
+
:type m: dict
|
|
78
|
+
|
|
79
|
+
:return: Self reference for method chaining
|
|
80
|
+
:rtype: NewModelVersionV2Request
|
|
81
|
+
|
|
82
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
83
|
+
:raises ValueError: If nested model conversion fails
|
|
84
|
+
"""
|
|
85
|
+
m = m or dict()
|
|
86
|
+
if m.get('modelId') is not None:
|
|
87
|
+
self.model_id = m.get('modelId')
|
|
88
|
+
if m.get('storageBucket') is not None:
|
|
89
|
+
self.storage_bucket = m.get('storageBucket')
|
|
90
|
+
if m.get('storagePath') is not None:
|
|
91
|
+
self.storage_path = m.get('storagePath')
|
|
92
|
+
if m.get('description') is not None:
|
|
93
|
+
self.description = m.get('description')
|
|
94
|
+
if m.get('source') is not None:
|
|
95
|
+
self.source = m.get('source')
|
|
96
|
+
if m.get('modelMetrics') is not None:
|
|
97
|
+
self.model_metrics = m.get('modelMetrics')
|
|
98
|
+
return self
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for NewModelVersionV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class NewModelVersionV2Response(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
NewModelVersionV2Response
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize NewModelVersionV2Response response.
|
|
16
|
+
|
|
17
|
+
:param id: 模型版本ID
|
|
18
|
+
:type id: str (optional)
|
|
19
|
+
"""
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.id = id
|
|
22
|
+
|
|
23
|
+
def to_dict(self):
|
|
24
|
+
"""
|
|
25
|
+
Convert the response instance to a dictionary representation.
|
|
26
|
+
|
|
27
|
+
Includes metadata from the parent BceResponse class.
|
|
28
|
+
Nested model objects are recursively converted to dictionaries.
|
|
29
|
+
|
|
30
|
+
:return: Dictionary representation of the response
|
|
31
|
+
:rtype: dict
|
|
32
|
+
"""
|
|
33
|
+
_map = super().to_dict()
|
|
34
|
+
if _map is not None:
|
|
35
|
+
return _map
|
|
36
|
+
result = dict()
|
|
37
|
+
if self.metadata is not None:
|
|
38
|
+
result['metadata'] = dict(self.metadata)
|
|
39
|
+
if self.id is not None:
|
|
40
|
+
result['id'] = self.id
|
|
41
|
+
return result
|
|
42
|
+
|
|
43
|
+
def from_dict(self, m):
|
|
44
|
+
"""
|
|
45
|
+
Populate the response instance from a dictionary.
|
|
46
|
+
|
|
47
|
+
Nested dictionaries are recursively converted to model objects.
|
|
48
|
+
|
|
49
|
+
:param m: Dictionary containing response data
|
|
50
|
+
:type m: dict
|
|
51
|
+
|
|
52
|
+
:return: Self reference for method chaining
|
|
53
|
+
:rtype: NewModelVersionV2Response
|
|
54
|
+
|
|
55
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
56
|
+
:raises ValueError: If nested model conversion fails
|
|
57
|
+
"""
|
|
58
|
+
m = m or dict()
|
|
59
|
+
if m.get('id') is not None:
|
|
60
|
+
self.id = m.get('id')
|
|
61
|
+
return self
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
PermissionEntry information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PermissionEntry(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
PermissionEntry
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, id=None, name=None, permission=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize PermissionEntry instance.
|
|
16
|
+
|
|
17
|
+
:param id: 是
|
|
18
|
+
:type id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param name: 是
|
|
21
|
+
:type name: str (optional)
|
|
22
|
+
|
|
23
|
+
:param permission: 是
|
|
24
|
+
:type permission: str (optional)
|
|
25
|
+
"""
|
|
26
|
+
super().__init__()
|
|
27
|
+
self.id = id
|
|
28
|
+
self.name = name
|
|
29
|
+
self.permission = permission
|
|
30
|
+
|
|
31
|
+
def to_dict(self):
|
|
32
|
+
"""
|
|
33
|
+
Convert the model instance to a dictionary representation.
|
|
34
|
+
|
|
35
|
+
Nested model objects are recursively converted to dictionaries.
|
|
36
|
+
|
|
37
|
+
:return: Dictionary representation of the model
|
|
38
|
+
:rtype: dict
|
|
39
|
+
"""
|
|
40
|
+
_map = super().to_dict()
|
|
41
|
+
if _map is not None:
|
|
42
|
+
return _map
|
|
43
|
+
result = dict()
|
|
44
|
+
if self.id is not None:
|
|
45
|
+
result['id'] = self.id
|
|
46
|
+
if self.name is not None:
|
|
47
|
+
result['name'] = self.name
|
|
48
|
+
if self.permission is not None:
|
|
49
|
+
result['permission'] = self.permission
|
|
50
|
+
return result
|
|
51
|
+
|
|
52
|
+
def from_dict(self, m):
|
|
53
|
+
"""
|
|
54
|
+
Populate the model instance from a dictionary.
|
|
55
|
+
|
|
56
|
+
Nested dictionaries are recursively converted to model objects.
|
|
57
|
+
|
|
58
|
+
:param m: Dictionary containing model data
|
|
59
|
+
:type m: dict
|
|
60
|
+
|
|
61
|
+
:return: Self reference for method chaining
|
|
62
|
+
:rtype: PermissionEntry
|
|
63
|
+
|
|
64
|
+
:raises TypeError: If input is not a dictionary type
|
|
65
|
+
:raises ValueError: If nested model conversion fails
|
|
66
|
+
"""
|
|
67
|
+
m = m or dict()
|
|
68
|
+
if m.get('id') is not None:
|
|
69
|
+
self.id = m.get('id')
|
|
70
|
+
if m.get('name') is not None:
|
|
71
|
+
self.name = m.get('name')
|
|
72
|
+
if m.get('permission') is not None:
|
|
73
|
+
self.permission = m.get('permission')
|
|
74
|
+
return self
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for RetrieveTheDatasetListV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RetrieveTheDatasetListV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for RetrieveTheDatasetListV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self, storage_type=None, storage_instances=None, import_format=None, page_number=None, page_size=None
|
|
17
|
+
):
|
|
18
|
+
"""
|
|
19
|
+
Initialize RetrieveTheDatasetListV2Request request entity.
|
|
20
|
+
|
|
21
|
+
:param storage_type: storage_type parameter
|
|
22
|
+
:type storage_type: str (optional)
|
|
23
|
+
|
|
24
|
+
:param storage_instances: storage_instances parameter
|
|
25
|
+
:type storage_instances: str (optional)
|
|
26
|
+
|
|
27
|
+
:param import_format: import_format parameter
|
|
28
|
+
:type import_format: str (optional)
|
|
29
|
+
|
|
30
|
+
:param page_number: page_number parameter
|
|
31
|
+
:type page_number: int (optional)
|
|
32
|
+
|
|
33
|
+
:param page_size: page_size parameter
|
|
34
|
+
:type page_size: int (optional)
|
|
35
|
+
"""
|
|
36
|
+
super().__init__()
|
|
37
|
+
self.storage_type = storage_type
|
|
38
|
+
self.storage_instances = storage_instances
|
|
39
|
+
self.import_format = import_format
|
|
40
|
+
self.page_number = page_number
|
|
41
|
+
self.page_size = page_size
|
|
42
|
+
|
|
43
|
+
def to_dict(self):
|
|
44
|
+
"""
|
|
45
|
+
Convert the request entity to a dictionary representation.
|
|
46
|
+
|
|
47
|
+
Nested model objects are recursively converted to dictionaries.
|
|
48
|
+
|
|
49
|
+
:return: Dictionary representation of the request
|
|
50
|
+
:rtype: dict
|
|
51
|
+
"""
|
|
52
|
+
_map = super().to_dict()
|
|
53
|
+
if _map is not None:
|
|
54
|
+
return _map
|
|
55
|
+
result = dict()
|
|
56
|
+
return result
|
|
57
|
+
|
|
58
|
+
def from_dict(self, m):
|
|
59
|
+
"""
|
|
60
|
+
Populate the request entity from a dictionary.
|
|
61
|
+
|
|
62
|
+
Nested dictionaries are recursively converted to model objects.
|
|
63
|
+
|
|
64
|
+
:param m: Dictionary containing request data
|
|
65
|
+
:type m: dict
|
|
66
|
+
|
|
67
|
+
:return: Self reference for method chaining
|
|
68
|
+
:rtype: RetrieveTheDatasetListV2Request
|
|
69
|
+
|
|
70
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
71
|
+
:raises ValueError: If nested model conversion fails
|
|
72
|
+
"""
|
|
73
|
+
m = m or dict()
|
|
74
|
+
if m.get('storageType') is not None:
|
|
75
|
+
self.storage_type = m.get('storageType')
|
|
76
|
+
if m.get('storageInstances') is not None:
|
|
77
|
+
self.storage_instances = m.get('storageInstances')
|
|
78
|
+
if m.get('importFormat') is not None:
|
|
79
|
+
self.import_format = m.get('importFormat')
|
|
80
|
+
if m.get('pageNumber') is not None:
|
|
81
|
+
self.page_number = m.get('pageNumber')
|
|
82
|
+
if m.get('pageSize') is not None:
|
|
83
|
+
self.page_size = m.get('pageSize')
|
|
84
|
+
return self
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for RetrieveTheDatasetListV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_aihc.models.dataset import Dataset
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class RetrieveTheDatasetListV2Response(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
RetrieveTheDatasetListV2Response
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, total_count=None, datasets=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize RetrieveTheDatasetListV2Response response.
|
|
17
|
+
|
|
18
|
+
:param total_count: 数据集总数
|
|
19
|
+
:type total_count: int (optional)
|
|
20
|
+
|
|
21
|
+
:param datasets: 数据集列表
|
|
22
|
+
:type datasets: List[Dataset] (optional)
|
|
23
|
+
"""
|
|
24
|
+
super().__init__()
|
|
25
|
+
self.total_count = total_count
|
|
26
|
+
self.datasets = datasets
|
|
27
|
+
|
|
28
|
+
def to_dict(self):
|
|
29
|
+
"""
|
|
30
|
+
Convert the response instance to a dictionary representation.
|
|
31
|
+
|
|
32
|
+
Includes metadata from the parent BceResponse class.
|
|
33
|
+
Nested model objects are recursively converted to dictionaries.
|
|
34
|
+
|
|
35
|
+
:return: Dictionary representation of the response
|
|
36
|
+
:rtype: dict
|
|
37
|
+
"""
|
|
38
|
+
_map = super().to_dict()
|
|
39
|
+
if _map is not None:
|
|
40
|
+
return _map
|
|
41
|
+
result = dict()
|
|
42
|
+
if self.metadata is not None:
|
|
43
|
+
result['metadata'] = dict(self.metadata)
|
|
44
|
+
if self.total_count is not None:
|
|
45
|
+
result['totalCount'] = self.total_count
|
|
46
|
+
if self.datasets is not None:
|
|
47
|
+
result['datasets'] = [i.to_dict() for i in self.datasets]
|
|
48
|
+
return result
|
|
49
|
+
|
|
50
|
+
def from_dict(self, m):
|
|
51
|
+
"""
|
|
52
|
+
Populate the response instance from a dictionary.
|
|
53
|
+
|
|
54
|
+
Nested dictionaries are recursively converted to model objects.
|
|
55
|
+
|
|
56
|
+
:param m: Dictionary containing response data
|
|
57
|
+
:type m: dict
|
|
58
|
+
|
|
59
|
+
:return: Self reference for method chaining
|
|
60
|
+
:rtype: RetrieveTheDatasetListV2Response
|
|
61
|
+
|
|
62
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
63
|
+
:raises ValueError: If nested model conversion fails
|
|
64
|
+
"""
|
|
65
|
+
m = m or dict()
|
|
66
|
+
if m.get('totalCount') is not None:
|
|
67
|
+
self.total_count = m.get('totalCount')
|
|
68
|
+
if m.get('datasets') is not None:
|
|
69
|
+
self.datasets = [Dataset().from_dict(i) for i in m.get('datasets')]
|
|
70
|
+
return self
|