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,200 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Dataset information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_aihc.models.permission_entry import PermissionEntry
|
|
8
|
+
|
|
9
|
+
from baiducloud_python_sdk_aihc.models.permission_entry import PermissionEntry
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Dataset(AbstractModel):
|
|
13
|
+
"""
|
|
14
|
+
Dataset
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def __init__(
|
|
18
|
+
self,
|
|
19
|
+
id=None,
|
|
20
|
+
name=None,
|
|
21
|
+
storage_type=None,
|
|
22
|
+
storage_instance=None,
|
|
23
|
+
import_format=None,
|
|
24
|
+
description=None,
|
|
25
|
+
owner=None,
|
|
26
|
+
owner_name=None,
|
|
27
|
+
visibility_scope=None,
|
|
28
|
+
visibility_user=None,
|
|
29
|
+
visibility_group=None,
|
|
30
|
+
permission=None,
|
|
31
|
+
latest_version_id=None,
|
|
32
|
+
latest_version=None,
|
|
33
|
+
created_at=None,
|
|
34
|
+
updated_at=None,
|
|
35
|
+
):
|
|
36
|
+
"""
|
|
37
|
+
Initialize Dataset instance.
|
|
38
|
+
|
|
39
|
+
:param id: 是
|
|
40
|
+
:type id: str (optional)
|
|
41
|
+
|
|
42
|
+
:param name: 是
|
|
43
|
+
:type name: str (optional)
|
|
44
|
+
|
|
45
|
+
:param storage_type: 是
|
|
46
|
+
:type storage_type: str (optional)
|
|
47
|
+
|
|
48
|
+
:param storage_instance: 是
|
|
49
|
+
:type storage_instance: str (optional)
|
|
50
|
+
|
|
51
|
+
:param import_format: 是
|
|
52
|
+
:type import_format: str (optional)
|
|
53
|
+
|
|
54
|
+
:param description: 否
|
|
55
|
+
:type description: str (optional)
|
|
56
|
+
|
|
57
|
+
:param owner: 是
|
|
58
|
+
:type owner: str (optional)
|
|
59
|
+
|
|
60
|
+
:param owner_name: 是
|
|
61
|
+
:type owner_name: str (optional)
|
|
62
|
+
|
|
63
|
+
:param visibility_scope: 是
|
|
64
|
+
:type visibility_scope: str (optional)
|
|
65
|
+
|
|
66
|
+
:param visibility_user: 否
|
|
67
|
+
:type visibility_user: List[PermissionEntry] (optional)
|
|
68
|
+
|
|
69
|
+
:param visibility_group: 否
|
|
70
|
+
:type visibility_group: List[PermissionEntry] (optional)
|
|
71
|
+
|
|
72
|
+
:param permission: 是
|
|
73
|
+
:type permission: str (optional)
|
|
74
|
+
|
|
75
|
+
:param latest_version_id: 否
|
|
76
|
+
:type latest_version_id: str (optional)
|
|
77
|
+
|
|
78
|
+
:param latest_version: 否
|
|
79
|
+
:type latest_version: str (optional)
|
|
80
|
+
|
|
81
|
+
:param created_at: 是
|
|
82
|
+
:type created_at: str (optional)
|
|
83
|
+
|
|
84
|
+
:param updated_at: 是
|
|
85
|
+
:type updated_at: str (optional)
|
|
86
|
+
"""
|
|
87
|
+
super().__init__()
|
|
88
|
+
self.id = id
|
|
89
|
+
self.name = name
|
|
90
|
+
self.storage_type = storage_type
|
|
91
|
+
self.storage_instance = storage_instance
|
|
92
|
+
self.import_format = import_format
|
|
93
|
+
self.description = description
|
|
94
|
+
self.owner = owner
|
|
95
|
+
self.owner_name = owner_name
|
|
96
|
+
self.visibility_scope = visibility_scope
|
|
97
|
+
self.visibility_user = visibility_user
|
|
98
|
+
self.visibility_group = visibility_group
|
|
99
|
+
self.permission = permission
|
|
100
|
+
self.latest_version_id = latest_version_id
|
|
101
|
+
self.latest_version = latest_version
|
|
102
|
+
self.created_at = created_at
|
|
103
|
+
self.updated_at = updated_at
|
|
104
|
+
|
|
105
|
+
def to_dict(self):
|
|
106
|
+
"""
|
|
107
|
+
Convert the model instance to a dictionary representation.
|
|
108
|
+
|
|
109
|
+
Nested model objects are recursively converted to dictionaries.
|
|
110
|
+
|
|
111
|
+
:return: Dictionary representation of the model
|
|
112
|
+
:rtype: dict
|
|
113
|
+
"""
|
|
114
|
+
_map = super().to_dict()
|
|
115
|
+
if _map is not None:
|
|
116
|
+
return _map
|
|
117
|
+
result = dict()
|
|
118
|
+
if self.id is not None:
|
|
119
|
+
result['id'] = self.id
|
|
120
|
+
if self.name is not None:
|
|
121
|
+
result['name'] = self.name
|
|
122
|
+
if self.storage_type is not None:
|
|
123
|
+
result['storageType'] = self.storage_type
|
|
124
|
+
if self.storage_instance is not None:
|
|
125
|
+
result['storageInstance'] = self.storage_instance
|
|
126
|
+
if self.import_format is not None:
|
|
127
|
+
result['importFormat'] = self.import_format
|
|
128
|
+
if self.description is not None:
|
|
129
|
+
result['description'] = self.description
|
|
130
|
+
if self.owner is not None:
|
|
131
|
+
result['owner'] = self.owner
|
|
132
|
+
if self.owner_name is not None:
|
|
133
|
+
result['ownerName'] = self.owner_name
|
|
134
|
+
if self.visibility_scope is not None:
|
|
135
|
+
result['visibilityScope'] = self.visibility_scope
|
|
136
|
+
if self.visibility_user is not None:
|
|
137
|
+
result['visibilityUser'] = [i.to_dict() for i in self.visibility_user]
|
|
138
|
+
if self.visibility_group is not None:
|
|
139
|
+
result['visibilityGroup'] = [i.to_dict() for i in self.visibility_group]
|
|
140
|
+
if self.permission is not None:
|
|
141
|
+
result['permission'] = self.permission
|
|
142
|
+
if self.latest_version_id is not None:
|
|
143
|
+
result['latestVersionId'] = self.latest_version_id
|
|
144
|
+
if self.latest_version is not None:
|
|
145
|
+
result['latestVersion'] = self.latest_version
|
|
146
|
+
if self.created_at is not None:
|
|
147
|
+
result['createdAt'] = self.created_at
|
|
148
|
+
if self.updated_at is not None:
|
|
149
|
+
result['updatedAt'] = self.updated_at
|
|
150
|
+
return result
|
|
151
|
+
|
|
152
|
+
def from_dict(self, m):
|
|
153
|
+
"""
|
|
154
|
+
Populate the model instance from a dictionary.
|
|
155
|
+
|
|
156
|
+
Nested dictionaries are recursively converted to model objects.
|
|
157
|
+
|
|
158
|
+
:param m: Dictionary containing model data
|
|
159
|
+
:type m: dict
|
|
160
|
+
|
|
161
|
+
:return: Self reference for method chaining
|
|
162
|
+
:rtype: Dataset
|
|
163
|
+
|
|
164
|
+
:raises TypeError: If input is not a dictionary type
|
|
165
|
+
:raises ValueError: If nested model conversion fails
|
|
166
|
+
"""
|
|
167
|
+
m = m or dict()
|
|
168
|
+
if m.get('id') is not None:
|
|
169
|
+
self.id = m.get('id')
|
|
170
|
+
if m.get('name') is not None:
|
|
171
|
+
self.name = m.get('name')
|
|
172
|
+
if m.get('storageType') is not None:
|
|
173
|
+
self.storage_type = m.get('storageType')
|
|
174
|
+
if m.get('storageInstance') is not None:
|
|
175
|
+
self.storage_instance = m.get('storageInstance')
|
|
176
|
+
if m.get('importFormat') is not None:
|
|
177
|
+
self.import_format = m.get('importFormat')
|
|
178
|
+
if m.get('description') is not None:
|
|
179
|
+
self.description = m.get('description')
|
|
180
|
+
if m.get('owner') is not None:
|
|
181
|
+
self.owner = m.get('owner')
|
|
182
|
+
if m.get('ownerName') is not None:
|
|
183
|
+
self.owner_name = m.get('ownerName')
|
|
184
|
+
if m.get('visibilityScope') is not None:
|
|
185
|
+
self.visibility_scope = m.get('visibilityScope')
|
|
186
|
+
if m.get('visibilityUser') is not None:
|
|
187
|
+
self.visibility_user = [PermissionEntry().from_dict(i) for i in m.get('visibilityUser')]
|
|
188
|
+
if m.get('visibilityGroup') is not None:
|
|
189
|
+
self.visibility_group = [PermissionEntry().from_dict(i) for i in m.get('visibilityGroup')]
|
|
190
|
+
if m.get('permission') is not None:
|
|
191
|
+
self.permission = m.get('permission')
|
|
192
|
+
if m.get('latestVersionId') is not None:
|
|
193
|
+
self.latest_version_id = m.get('latestVersionId')
|
|
194
|
+
if m.get('latestVersion') is not None:
|
|
195
|
+
self.latest_version = m.get('latestVersion')
|
|
196
|
+
if m.get('createdAt') is not None:
|
|
197
|
+
self.created_at = m.get('createdAt')
|
|
198
|
+
if m.get('updatedAt') is not None:
|
|
199
|
+
self.updated_at = m.get('updatedAt')
|
|
200
|
+
return self
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DatasetVersionEntry information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DatasetVersionEntry(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
DatasetVersionEntry
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, id=None, version=None, description=None, storage_path=None, mount_path=None, create_user=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize DatasetVersionEntry instance.
|
|
16
|
+
|
|
17
|
+
:param id: 否
|
|
18
|
+
:type id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param version: 否
|
|
21
|
+
:type version: str (optional)
|
|
22
|
+
|
|
23
|
+
:param description: 否
|
|
24
|
+
:type description: str (optional)
|
|
25
|
+
|
|
26
|
+
:param storage_path: 是
|
|
27
|
+
:type storage_path: str (optional)
|
|
28
|
+
|
|
29
|
+
:param mount_path: 是
|
|
30
|
+
:type mount_path: str (optional)
|
|
31
|
+
|
|
32
|
+
:param create_user: 否
|
|
33
|
+
:type create_user: str (optional)
|
|
34
|
+
"""
|
|
35
|
+
super().__init__()
|
|
36
|
+
self.id = id
|
|
37
|
+
self.version = version
|
|
38
|
+
self.description = description
|
|
39
|
+
self.storage_path = storage_path
|
|
40
|
+
self.mount_path = mount_path
|
|
41
|
+
self.create_user = create_user
|
|
42
|
+
|
|
43
|
+
def to_dict(self):
|
|
44
|
+
"""
|
|
45
|
+
Convert the model instance to a dictionary representation.
|
|
46
|
+
|
|
47
|
+
Nested model objects are recursively converted to dictionaries.
|
|
48
|
+
|
|
49
|
+
:return: Dictionary representation of the model
|
|
50
|
+
:rtype: dict
|
|
51
|
+
"""
|
|
52
|
+
_map = super().to_dict()
|
|
53
|
+
if _map is not None:
|
|
54
|
+
return _map
|
|
55
|
+
result = dict()
|
|
56
|
+
if self.id is not None:
|
|
57
|
+
result['id'] = self.id
|
|
58
|
+
if self.version is not None:
|
|
59
|
+
result['version'] = self.version
|
|
60
|
+
if self.description is not None:
|
|
61
|
+
result['description'] = self.description
|
|
62
|
+
if self.storage_path is not None:
|
|
63
|
+
result['storagePath'] = self.storage_path
|
|
64
|
+
if self.mount_path is not None:
|
|
65
|
+
result['mountPath'] = self.mount_path
|
|
66
|
+
if self.create_user is not None:
|
|
67
|
+
result['createUser'] = self.create_user
|
|
68
|
+
return result
|
|
69
|
+
|
|
70
|
+
def from_dict(self, m):
|
|
71
|
+
"""
|
|
72
|
+
Populate the model instance from a dictionary.
|
|
73
|
+
|
|
74
|
+
Nested dictionaries are recursively converted to model objects.
|
|
75
|
+
|
|
76
|
+
:param m: Dictionary containing model data
|
|
77
|
+
:type m: dict
|
|
78
|
+
|
|
79
|
+
:return: Self reference for method chaining
|
|
80
|
+
:rtype: DatasetVersionEntry
|
|
81
|
+
|
|
82
|
+
:raises TypeError: If input is not a dictionary type
|
|
83
|
+
:raises ValueError: If nested model conversion fails
|
|
84
|
+
"""
|
|
85
|
+
m = m or dict()
|
|
86
|
+
if m.get('id') is not None:
|
|
87
|
+
self.id = m.get('id')
|
|
88
|
+
if m.get('version') is not None:
|
|
89
|
+
self.version = m.get('version')
|
|
90
|
+
if m.get('description') is not None:
|
|
91
|
+
self.description = m.get('description')
|
|
92
|
+
if m.get('storagePath') is not None:
|
|
93
|
+
self.storage_path = m.get('storagePath')
|
|
94
|
+
if m.get('mountPath') is not None:
|
|
95
|
+
self.mount_path = m.get('mountPath')
|
|
96
|
+
if m.get('createUser') is not None:
|
|
97
|
+
self.create_user = m.get('createUser')
|
|
98
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteDatasetV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteDatasetV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for DeleteDatasetV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, dataset_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DeleteDatasetV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param dataset_id: dataset_id parameter
|
|
20
|
+
:type dataset_id: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.dataset_id = dataset_id
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: DeleteDatasetV2Request
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('datasetId') is not None:
|
|
57
|
+
self.dataset_id = m.get('datasetId')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteDatasetVersionV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteDatasetVersionV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for DeleteDatasetVersionV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, dataset_id, version_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DeleteDatasetVersionV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param dataset_id: dataset_id parameter
|
|
20
|
+
:type dataset_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param version_id: version_id parameter
|
|
23
|
+
:type version_id: str (required)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.dataset_id = dataset_id
|
|
27
|
+
self.version_id = version_id
|
|
28
|
+
|
|
29
|
+
def to_dict(self):
|
|
30
|
+
"""
|
|
31
|
+
Convert the request entity to a dictionary representation.
|
|
32
|
+
|
|
33
|
+
Nested model objects are recursively converted to dictionaries.
|
|
34
|
+
|
|
35
|
+
:return: Dictionary representation of the request
|
|
36
|
+
:rtype: dict
|
|
37
|
+
"""
|
|
38
|
+
_map = super().to_dict()
|
|
39
|
+
if _map is not None:
|
|
40
|
+
return _map
|
|
41
|
+
result = dict()
|
|
42
|
+
return result
|
|
43
|
+
|
|
44
|
+
def from_dict(self, m):
|
|
45
|
+
"""
|
|
46
|
+
Populate the request entity from a dictionary.
|
|
47
|
+
|
|
48
|
+
Nested dictionaries are recursively converted to model objects.
|
|
49
|
+
|
|
50
|
+
:param m: Dictionary containing request data
|
|
51
|
+
:type m: dict
|
|
52
|
+
|
|
53
|
+
:return: Self reference for method chaining
|
|
54
|
+
:rtype: DeleteDatasetVersionV2Request
|
|
55
|
+
|
|
56
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
57
|
+
:raises ValueError: If nested model conversion fails
|
|
58
|
+
"""
|
|
59
|
+
m = m or dict()
|
|
60
|
+
if m.get('datasetId') is not None:
|
|
61
|
+
self.dataset_id = m.get('datasetId')
|
|
62
|
+
if m.get('versionId') is not None:
|
|
63
|
+
self.version_id = m.get('versionId')
|
|
64
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteModelV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteModelV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for DeleteModelV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, model_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DeleteModelV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param model_id: model_id parameter
|
|
20
|
+
:type model_id: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.model_id = model_id
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: DeleteModelV2Request
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('modelId') is not None:
|
|
57
|
+
self.model_id = m.get('modelId')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteModelVersionV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteModelVersionV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for DeleteModelVersionV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, model_id, version_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DeleteModelVersionV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param model_id: model_id parameter
|
|
20
|
+
:type model_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param version_id: version_id parameter
|
|
23
|
+
:type version_id: str (required)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.model_id = model_id
|
|
27
|
+
self.version_id = version_id
|
|
28
|
+
|
|
29
|
+
def to_dict(self):
|
|
30
|
+
"""
|
|
31
|
+
Convert the request entity to a dictionary representation.
|
|
32
|
+
|
|
33
|
+
Nested model objects are recursively converted to dictionaries.
|
|
34
|
+
|
|
35
|
+
:return: Dictionary representation of the request
|
|
36
|
+
:rtype: dict
|
|
37
|
+
"""
|
|
38
|
+
_map = super().to_dict()
|
|
39
|
+
if _map is not None:
|
|
40
|
+
return _map
|
|
41
|
+
result = dict()
|
|
42
|
+
return result
|
|
43
|
+
|
|
44
|
+
def from_dict(self, m):
|
|
45
|
+
"""
|
|
46
|
+
Populate the request entity from a dictionary.
|
|
47
|
+
|
|
48
|
+
Nested dictionaries are recursively converted to model objects.
|
|
49
|
+
|
|
50
|
+
:param m: Dictionary containing request data
|
|
51
|
+
:type m: dict
|
|
52
|
+
|
|
53
|
+
:return: Self reference for method chaining
|
|
54
|
+
:rtype: DeleteModelVersionV2Request
|
|
55
|
+
|
|
56
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
57
|
+
:raises ValueError: If nested model conversion fails
|
|
58
|
+
"""
|
|
59
|
+
m = m or dict()
|
|
60
|
+
if m.get('modelId') is not None:
|
|
61
|
+
self.model_id = m.get('modelId')
|
|
62
|
+
if m.get('versionId') is not None:
|
|
63
|
+
self.version_id = m.get('versionId')
|
|
64
|
+
return self
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for GetAListOfModelVersionsV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GetAListOfModelVersionsV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for GetAListOfModelVersionsV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, model_id, page_number=None, page_size=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize GetAListOfModelVersionsV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param model_id: model_id parameter
|
|
20
|
+
:type model_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param page_number: page_number parameter
|
|
23
|
+
:type page_number: int (optional)
|
|
24
|
+
|
|
25
|
+
:param page_size: page_size parameter
|
|
26
|
+
:type page_size: int (optional)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.model_id = model_id
|
|
30
|
+
self.page_number = page_number
|
|
31
|
+
self.page_size = page_size
|
|
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
|
+
return result
|
|
47
|
+
|
|
48
|
+
def from_dict(self, m):
|
|
49
|
+
"""
|
|
50
|
+
Populate the request entity from a dictionary.
|
|
51
|
+
|
|
52
|
+
Nested dictionaries are recursively converted to model objects.
|
|
53
|
+
|
|
54
|
+
:param m: Dictionary containing request data
|
|
55
|
+
:type m: dict
|
|
56
|
+
|
|
57
|
+
:return: Self reference for method chaining
|
|
58
|
+
:rtype: GetAListOfModelVersionsV2Request
|
|
59
|
+
|
|
60
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
61
|
+
:raises ValueError: If nested model conversion fails
|
|
62
|
+
"""
|
|
63
|
+
m = m or dict()
|
|
64
|
+
if m.get('modelId') is not None:
|
|
65
|
+
self.model_id = m.get('modelId')
|
|
66
|
+
if m.get('pageNumber') is not None:
|
|
67
|
+
self.page_number = m.get('pageNumber')
|
|
68
|
+
if m.get('pageSize') is not None:
|
|
69
|
+
self.page_size = m.get('pageSize')
|
|
70
|
+
return self
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for GetAListOfModelVersionsV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_aihc.models.model_version_entry import ModelVersionEntry
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class GetAListOfModelVersionsV2Response(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
GetAListOfModelVersionsV2Response
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, total_count=None, versions=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize GetAListOfModelVersionsV2Response response.
|
|
17
|
+
|
|
18
|
+
:param total_count: 模型版本总数
|
|
19
|
+
:type total_count: int (optional)
|
|
20
|
+
|
|
21
|
+
:param versions: 模型版本列表
|
|
22
|
+
:type versions: List[ModelVersionEntry] (optional)
|
|
23
|
+
"""
|
|
24
|
+
super().__init__()
|
|
25
|
+
self.total_count = total_count
|
|
26
|
+
self.versions = versions
|
|
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.versions is not None:
|
|
47
|
+
result['versions'] = [i.to_dict() for i in self.versions]
|
|
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: GetAListOfModelVersionsV2Response
|
|
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('versions') is not None:
|
|
69
|
+
self.versions = [ModelVersionEntry().from_dict(i) for i in m.get('versions')]
|
|
70
|
+
return self
|