baiducloud-python-sdk-bls 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_bls/__init__.py +5 -0
- baiducloud_python_sdk_bls/api/__init__.py +0 -0
- baiducloud_python_sdk_bls/api/bls_client.py +378 -0
- baiducloud_python_sdk_bls/models/__init__.py +33 -0
- baiducloud_python_sdk_bls/models/bucket.py +66 -0
- baiducloud_python_sdk_bls/models/create_project_request.py +68 -0
- baiducloud_python_sdk_bls/models/create_project_response.py +78 -0
- baiducloud_python_sdk_bls/models/dataset_scan_info.py +68 -0
- baiducloud_python_sdk_bls/models/delete_project_request.py +58 -0
- baiducloud_python_sdk_bls/models/delete_project_response.py +77 -0
- baiducloud_python_sdk_bls/models/describe_project_request.py +58 -0
- baiducloud_python_sdk_bls/models/describe_project_response.py +86 -0
- baiducloud_python_sdk_bls/models/list_project_request.py +100 -0
- baiducloud_python_sdk_bls/models/list_project_response.py +86 -0
- baiducloud_python_sdk_bls/models/log_record.py +66 -0
- baiducloud_python_sdk_bls/models/log_tag.py +66 -0
- baiducloud_python_sdk_bls/models/project.py +115 -0
- baiducloud_python_sdk_bls/models/project_list_result.py +112 -0
- baiducloud_python_sdk_bls/models/project_result.py +60 -0
- baiducloud_python_sdk_bls/models/pull_log_record_request.py +96 -0
- baiducloud_python_sdk_bls/models/pull_log_record_response.py +86 -0
- baiducloud_python_sdk_bls/models/push_log_record_request.py +98 -0
- baiducloud_python_sdk_bls/models/push_log_record_response.py +69 -0
- baiducloud_python_sdk_bls/models/query_log_histogram_request.py +88 -0
- baiducloud_python_sdk_bls/models/query_log_histogram_response.py +71 -0
- baiducloud_python_sdk_bls/models/query_log_record_request.py +131 -0
- baiducloud_python_sdk_bls/models/query_log_record_response.py +79 -0
- baiducloud_python_sdk_bls/models/result_set.py +82 -0
- baiducloud_python_sdk_bls/models/search_info.py +74 -0
- baiducloud_python_sdk_bls/models/search_statistic.py +84 -0
- baiducloud_python_sdk_bls/models/statistics.py +74 -0
- baiducloud_python_sdk_bls/models/update_project_request.py +68 -0
- baiducloud_python_sdk_bls/models/update_project_response.py +77 -0
- baiducloud_python_sdk_bls-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_bls-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_bls-0.0.1.dist-info/RECORD +38 -0
- baiducloud_python_sdk_bls-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_bls-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DatasetScanInfo information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_bls.models.statistics import Statistics
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DatasetScanInfo(AbstractModel):
|
|
11
|
+
"""
|
|
12
|
+
DatasetScanInfo
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, statistics=None, is_truncated=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DatasetScanInfo instance.
|
|
18
|
+
|
|
19
|
+
:param statistics: statistics attribute
|
|
20
|
+
:type statistics: Statistics (optional)
|
|
21
|
+
|
|
22
|
+
:param is_truncated: 是否截断
|
|
23
|
+
:type is_truncated: bool (optional)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.statistics = statistics
|
|
27
|
+
self.is_truncated = is_truncated
|
|
28
|
+
|
|
29
|
+
def to_dict(self):
|
|
30
|
+
"""
|
|
31
|
+
Convert the model instance to a dictionary representation.
|
|
32
|
+
|
|
33
|
+
Nested model objects are recursively converted to dictionaries.
|
|
34
|
+
|
|
35
|
+
:return: Dictionary representation of the model
|
|
36
|
+
:rtype: dict
|
|
37
|
+
"""
|
|
38
|
+
_map = super().to_dict()
|
|
39
|
+
if _map is not None:
|
|
40
|
+
return _map
|
|
41
|
+
result = dict()
|
|
42
|
+
if self.statistics is not None:
|
|
43
|
+
result['statistics'] = self.statistics.to_dict()
|
|
44
|
+
if self.is_truncated is not None:
|
|
45
|
+
result['isTruncated'] = self.is_truncated
|
|
46
|
+
return result
|
|
47
|
+
|
|
48
|
+
def from_dict(self, m):
|
|
49
|
+
"""
|
|
50
|
+
Populate the model instance from a dictionary.
|
|
51
|
+
|
|
52
|
+
Nested dictionaries are recursively converted to model objects.
|
|
53
|
+
|
|
54
|
+
:param m: Dictionary containing model data
|
|
55
|
+
:type m: dict
|
|
56
|
+
|
|
57
|
+
:return: Self reference for method chaining
|
|
58
|
+
:rtype: DatasetScanInfo
|
|
59
|
+
|
|
60
|
+
:raises TypeError: If input is not a dictionary type
|
|
61
|
+
:raises ValueError: If nested model conversion fails
|
|
62
|
+
"""
|
|
63
|
+
m = m or dict()
|
|
64
|
+
if m.get('statistics') is not None:
|
|
65
|
+
self.statistics = Statistics().from_dict(m.get('statistics'))
|
|
66
|
+
if m.get('isTruncated') is not None:
|
|
67
|
+
self.is_truncated = m.get('isTruncated')
|
|
68
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteProjectRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteProjectRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for DeleteProjectRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, uuid):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DeleteProjectRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param uuid: uuid parameter
|
|
20
|
+
:type uuid: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.uuid = uuid
|
|
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: DeleteProjectRequest
|
|
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('uuid') is not None:
|
|
57
|
+
self.uuid = m.get('uuid')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteProjectResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteProjectResponse(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
DeleteProjectResponse
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, success=None, code=None, message=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize DeleteProjectResponse response.
|
|
16
|
+
|
|
17
|
+
:param success: 请求是否成功
|
|
18
|
+
:type success: bool (optional)
|
|
19
|
+
|
|
20
|
+
:param code: 请求码,成功为OK,错误为具体的错误码
|
|
21
|
+
:type code: str (optional)
|
|
22
|
+
|
|
23
|
+
:param message: 请求成功为空,失败为具体的错误信息
|
|
24
|
+
:type message: str (optional)
|
|
25
|
+
"""
|
|
26
|
+
super().__init__()
|
|
27
|
+
self.success = success
|
|
28
|
+
self.code = code
|
|
29
|
+
self.message = message
|
|
30
|
+
|
|
31
|
+
def to_dict(self):
|
|
32
|
+
"""
|
|
33
|
+
Convert the response instance to a dictionary representation.
|
|
34
|
+
|
|
35
|
+
Includes metadata from the parent BceResponse class.
|
|
36
|
+
Nested model objects are recursively converted to dictionaries.
|
|
37
|
+
|
|
38
|
+
:return: Dictionary representation of the response
|
|
39
|
+
:rtype: dict
|
|
40
|
+
"""
|
|
41
|
+
_map = super().to_dict()
|
|
42
|
+
if _map is not None:
|
|
43
|
+
return _map
|
|
44
|
+
result = dict()
|
|
45
|
+
if self.metadata is not None:
|
|
46
|
+
result['metadata'] = dict(self.metadata)
|
|
47
|
+
if self.success is not None:
|
|
48
|
+
result['success'] = self.success
|
|
49
|
+
if self.code is not None:
|
|
50
|
+
result['code'] = self.code
|
|
51
|
+
if self.message is not None:
|
|
52
|
+
result['message'] = self.message
|
|
53
|
+
return result
|
|
54
|
+
|
|
55
|
+
def from_dict(self, m):
|
|
56
|
+
"""
|
|
57
|
+
Populate the response instance from a dictionary.
|
|
58
|
+
|
|
59
|
+
Nested dictionaries are recursively converted to model objects.
|
|
60
|
+
|
|
61
|
+
:param m: Dictionary containing response data
|
|
62
|
+
:type m: dict
|
|
63
|
+
|
|
64
|
+
:return: Self reference for method chaining
|
|
65
|
+
:rtype: DeleteProjectResponse
|
|
66
|
+
|
|
67
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
68
|
+
:raises ValueError: If nested model conversion fails
|
|
69
|
+
"""
|
|
70
|
+
m = m or dict()
|
|
71
|
+
if m.get('success') is not None:
|
|
72
|
+
self.success = m.get('success')
|
|
73
|
+
if m.get('code') is not None:
|
|
74
|
+
self.code = m.get('code')
|
|
75
|
+
if m.get('message') is not None:
|
|
76
|
+
self.message = m.get('message')
|
|
77
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DescribeProjectRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DescribeProjectRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for DescribeProjectRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, uuid):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DescribeProjectRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param uuid: uuid parameter
|
|
20
|
+
:type uuid: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.uuid = uuid
|
|
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: DescribeProjectRequest
|
|
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('uuid') is not None:
|
|
57
|
+
self.uuid = m.get('uuid')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DescribeProjectResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_bls.models.project_result import ProjectResult
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DescribeProjectResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
DescribeProjectResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, success=None, code=None, message=None, result=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize DescribeProjectResponse response.
|
|
17
|
+
|
|
18
|
+
:param success: 请求是否成功
|
|
19
|
+
:type success: bool (optional)
|
|
20
|
+
|
|
21
|
+
:param code: 请求码,成功为OK,错误为具体的错误码
|
|
22
|
+
:type code: str (optional)
|
|
23
|
+
|
|
24
|
+
:param message: 请求成功为空,失败为具体的错误信息
|
|
25
|
+
:type message: str (optional)
|
|
26
|
+
|
|
27
|
+
:param result: result field
|
|
28
|
+
:type result: ProjectResult (optional)
|
|
29
|
+
"""
|
|
30
|
+
super().__init__()
|
|
31
|
+
self.success = success
|
|
32
|
+
self.code = code
|
|
33
|
+
self.message = message
|
|
34
|
+
self.result = result
|
|
35
|
+
|
|
36
|
+
def to_dict(self):
|
|
37
|
+
"""
|
|
38
|
+
Convert the response instance to a dictionary representation.
|
|
39
|
+
|
|
40
|
+
Includes metadata from the parent BceResponse class.
|
|
41
|
+
Nested model objects are recursively converted to dictionaries.
|
|
42
|
+
|
|
43
|
+
:return: Dictionary representation of the response
|
|
44
|
+
:rtype: dict
|
|
45
|
+
"""
|
|
46
|
+
_map = super().to_dict()
|
|
47
|
+
if _map is not None:
|
|
48
|
+
return _map
|
|
49
|
+
result = dict()
|
|
50
|
+
if self.metadata is not None:
|
|
51
|
+
result['metadata'] = dict(self.metadata)
|
|
52
|
+
if self.success is not None:
|
|
53
|
+
result['success'] = self.success
|
|
54
|
+
if self.code is not None:
|
|
55
|
+
result['code'] = self.code
|
|
56
|
+
if self.message is not None:
|
|
57
|
+
result['message'] = self.message
|
|
58
|
+
if self.result is not None:
|
|
59
|
+
result['result'] = self.result.to_dict()
|
|
60
|
+
return result
|
|
61
|
+
|
|
62
|
+
def from_dict(self, m):
|
|
63
|
+
"""
|
|
64
|
+
Populate the response instance from a dictionary.
|
|
65
|
+
|
|
66
|
+
Nested dictionaries are recursively converted to model objects.
|
|
67
|
+
|
|
68
|
+
:param m: Dictionary containing response data
|
|
69
|
+
:type m: dict
|
|
70
|
+
|
|
71
|
+
:return: Self reference for method chaining
|
|
72
|
+
:rtype: DescribeProjectResponse
|
|
73
|
+
|
|
74
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
75
|
+
:raises ValueError: If nested model conversion fails
|
|
76
|
+
"""
|
|
77
|
+
m = m or dict()
|
|
78
|
+
if m.get('success') is not None:
|
|
79
|
+
self.success = m.get('success')
|
|
80
|
+
if m.get('code') is not None:
|
|
81
|
+
self.code = m.get('code')
|
|
82
|
+
if m.get('message') is not None:
|
|
83
|
+
self.message = m.get('message')
|
|
84
|
+
if m.get('result') is not None:
|
|
85
|
+
self.result = ProjectResult().from_dict(m.get('result'))
|
|
86
|
+
return self
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListProjectRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListProjectRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListProjectRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, name=None, description=None, order_by=None, order=None, page_no=None, page_size=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListProjectRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param name: 指定筛选日志组名称的关键字
|
|
20
|
+
:type name: str (optional)
|
|
21
|
+
|
|
22
|
+
:param description: 指定筛选日志组描述的关键字
|
|
23
|
+
:type description: str (optional)
|
|
24
|
+
|
|
25
|
+
:param order_by: 排序字段,默认为创建时间,支持createdAt: 创建时间,updatedAt: 修改时间, name: 名称
|
|
26
|
+
:type order_by: str (optional)
|
|
27
|
+
|
|
28
|
+
:param order: 排序顺序,desc为降序,asc为升序,默认为 desc
|
|
29
|
+
:type order: str (optional)
|
|
30
|
+
|
|
31
|
+
:param page_no: 起始页码,默认为 1
|
|
32
|
+
:type page_no: int (optional)
|
|
33
|
+
|
|
34
|
+
:param page_size: 每页显示数据大小,默认为 10
|
|
35
|
+
:type page_size: int (optional)
|
|
36
|
+
"""
|
|
37
|
+
super().__init__()
|
|
38
|
+
self.name = name
|
|
39
|
+
self.description = description
|
|
40
|
+
self.order_by = order_by
|
|
41
|
+
self.order = order
|
|
42
|
+
self.page_no = page_no
|
|
43
|
+
self.page_size = page_size
|
|
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.name is not None:
|
|
59
|
+
result['name'] = self.name
|
|
60
|
+
if self.description is not None:
|
|
61
|
+
result['description'] = self.description
|
|
62
|
+
if self.order_by is not None:
|
|
63
|
+
result['orderBy'] = self.order_by
|
|
64
|
+
if self.order is not None:
|
|
65
|
+
result['order'] = self.order
|
|
66
|
+
if self.page_no is not None:
|
|
67
|
+
result['pageNo'] = self.page_no
|
|
68
|
+
if self.page_size is not None:
|
|
69
|
+
result['pageSize'] = self.page_size
|
|
70
|
+
return result
|
|
71
|
+
|
|
72
|
+
def from_dict(self, m):
|
|
73
|
+
"""
|
|
74
|
+
Populate the request entity from a dictionary.
|
|
75
|
+
|
|
76
|
+
Nested dictionaries are recursively converted to model objects.
|
|
77
|
+
|
|
78
|
+
:param m: Dictionary containing request data
|
|
79
|
+
:type m: dict
|
|
80
|
+
|
|
81
|
+
:return: Self reference for method chaining
|
|
82
|
+
:rtype: ListProjectRequest
|
|
83
|
+
|
|
84
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
85
|
+
:raises ValueError: If nested model conversion fails
|
|
86
|
+
"""
|
|
87
|
+
m = m or dict()
|
|
88
|
+
if m.get('name') is not None:
|
|
89
|
+
self.name = m.get('name')
|
|
90
|
+
if m.get('description') is not None:
|
|
91
|
+
self.description = m.get('description')
|
|
92
|
+
if m.get('orderBy') is not None:
|
|
93
|
+
self.order_by = m.get('orderBy')
|
|
94
|
+
if m.get('order') is not None:
|
|
95
|
+
self.order = m.get('order')
|
|
96
|
+
if m.get('pageNo') is not None:
|
|
97
|
+
self.page_no = m.get('pageNo')
|
|
98
|
+
if m.get('pageSize') is not None:
|
|
99
|
+
self.page_size = m.get('pageSize')
|
|
100
|
+
return self
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListProjectResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_bls.models.project_list_result import ProjectListResult
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListProjectResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListProjectResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, success=None, code=None, message=None, result=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListProjectResponse response.
|
|
17
|
+
|
|
18
|
+
:param success: 请求是否成功
|
|
19
|
+
:type success: bool (optional)
|
|
20
|
+
|
|
21
|
+
:param code: 请求码,成功为OK,错误为具体的错误码
|
|
22
|
+
:type code: str (optional)
|
|
23
|
+
|
|
24
|
+
:param message: 请求成功为空,失败为具体的错误信息
|
|
25
|
+
:type message: str (optional)
|
|
26
|
+
|
|
27
|
+
:param result: result field
|
|
28
|
+
:type result: ProjectListResult (optional)
|
|
29
|
+
"""
|
|
30
|
+
super().__init__()
|
|
31
|
+
self.success = success
|
|
32
|
+
self.code = code
|
|
33
|
+
self.message = message
|
|
34
|
+
self.result = result
|
|
35
|
+
|
|
36
|
+
def to_dict(self):
|
|
37
|
+
"""
|
|
38
|
+
Convert the response instance to a dictionary representation.
|
|
39
|
+
|
|
40
|
+
Includes metadata from the parent BceResponse class.
|
|
41
|
+
Nested model objects are recursively converted to dictionaries.
|
|
42
|
+
|
|
43
|
+
:return: Dictionary representation of the response
|
|
44
|
+
:rtype: dict
|
|
45
|
+
"""
|
|
46
|
+
_map = super().to_dict()
|
|
47
|
+
if _map is not None:
|
|
48
|
+
return _map
|
|
49
|
+
result = dict()
|
|
50
|
+
if self.metadata is not None:
|
|
51
|
+
result['metadata'] = dict(self.metadata)
|
|
52
|
+
if self.success is not None:
|
|
53
|
+
result['success'] = self.success
|
|
54
|
+
if self.code is not None:
|
|
55
|
+
result['code'] = self.code
|
|
56
|
+
if self.message is not None:
|
|
57
|
+
result['message'] = self.message
|
|
58
|
+
if self.result is not None:
|
|
59
|
+
result['result'] = self.result.to_dict()
|
|
60
|
+
return result
|
|
61
|
+
|
|
62
|
+
def from_dict(self, m):
|
|
63
|
+
"""
|
|
64
|
+
Populate the response instance from a dictionary.
|
|
65
|
+
|
|
66
|
+
Nested dictionaries are recursively converted to model objects.
|
|
67
|
+
|
|
68
|
+
:param m: Dictionary containing response data
|
|
69
|
+
:type m: dict
|
|
70
|
+
|
|
71
|
+
:return: Self reference for method chaining
|
|
72
|
+
:rtype: ListProjectResponse
|
|
73
|
+
|
|
74
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
75
|
+
:raises ValueError: If nested model conversion fails
|
|
76
|
+
"""
|
|
77
|
+
m = m or dict()
|
|
78
|
+
if m.get('success') is not None:
|
|
79
|
+
self.success = m.get('success')
|
|
80
|
+
if m.get('code') is not None:
|
|
81
|
+
self.code = m.get('code')
|
|
82
|
+
if m.get('message') is not None:
|
|
83
|
+
self.message = m.get('message')
|
|
84
|
+
if m.get('result') is not None:
|
|
85
|
+
self.result = ProjectListResult().from_dict(m.get('result'))
|
|
86
|
+
return self
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
LogRecord information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class LogRecord(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
LogRecord
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, message=None, timestamp=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize LogRecord instance.
|
|
16
|
+
|
|
17
|
+
:param message: 日志内容
|
|
18
|
+
:type message: str (optional)
|
|
19
|
+
|
|
20
|
+
:param timestamp: 日志时间戳
|
|
21
|
+
:type timestamp: int (optional)
|
|
22
|
+
"""
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.message = message
|
|
25
|
+
self.timestamp = timestamp
|
|
26
|
+
|
|
27
|
+
def to_dict(self):
|
|
28
|
+
"""
|
|
29
|
+
Convert the model instance to a dictionary representation.
|
|
30
|
+
|
|
31
|
+
Nested model objects are recursively converted to dictionaries.
|
|
32
|
+
|
|
33
|
+
:return: Dictionary representation of the model
|
|
34
|
+
:rtype: dict
|
|
35
|
+
"""
|
|
36
|
+
_map = super().to_dict()
|
|
37
|
+
if _map is not None:
|
|
38
|
+
return _map
|
|
39
|
+
result = dict()
|
|
40
|
+
if self.message is not None:
|
|
41
|
+
result['message'] = self.message
|
|
42
|
+
if self.timestamp is not None:
|
|
43
|
+
result['timestamp'] = self.timestamp
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
def from_dict(self, m):
|
|
47
|
+
"""
|
|
48
|
+
Populate the model instance from a dictionary.
|
|
49
|
+
|
|
50
|
+
Nested dictionaries are recursively converted to model objects.
|
|
51
|
+
|
|
52
|
+
:param m: Dictionary containing model data
|
|
53
|
+
:type m: dict
|
|
54
|
+
|
|
55
|
+
:return: Self reference for method chaining
|
|
56
|
+
:rtype: LogRecord
|
|
57
|
+
|
|
58
|
+
:raises TypeError: If input is not a dictionary type
|
|
59
|
+
:raises ValueError: If nested model conversion fails
|
|
60
|
+
"""
|
|
61
|
+
m = m or dict()
|
|
62
|
+
if m.get('message') is not None:
|
|
63
|
+
self.message = m.get('message')
|
|
64
|
+
if m.get('timestamp') is not None:
|
|
65
|
+
self.timestamp = m.get('timestamp')
|
|
66
|
+
return self
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
LogTag information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class LogTag(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
LogTag
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, k=None, v=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize LogTag instance.
|
|
16
|
+
|
|
17
|
+
:param k: 标签键
|
|
18
|
+
:type k: str (optional)
|
|
19
|
+
|
|
20
|
+
:param v: 标签值
|
|
21
|
+
:type v: str (optional)
|
|
22
|
+
"""
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.k = k
|
|
25
|
+
self.v = v
|
|
26
|
+
|
|
27
|
+
def to_dict(self):
|
|
28
|
+
"""
|
|
29
|
+
Convert the model instance to a dictionary representation.
|
|
30
|
+
|
|
31
|
+
Nested model objects are recursively converted to dictionaries.
|
|
32
|
+
|
|
33
|
+
:return: Dictionary representation of the model
|
|
34
|
+
:rtype: dict
|
|
35
|
+
"""
|
|
36
|
+
_map = super().to_dict()
|
|
37
|
+
if _map is not None:
|
|
38
|
+
return _map
|
|
39
|
+
result = dict()
|
|
40
|
+
if self.k is not None:
|
|
41
|
+
result['k'] = self.k
|
|
42
|
+
if self.v is not None:
|
|
43
|
+
result['v'] = self.v
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
def from_dict(self, m):
|
|
47
|
+
"""
|
|
48
|
+
Populate the model instance from a dictionary.
|
|
49
|
+
|
|
50
|
+
Nested dictionaries are recursively converted to model objects.
|
|
51
|
+
|
|
52
|
+
:param m: Dictionary containing model data
|
|
53
|
+
:type m: dict
|
|
54
|
+
|
|
55
|
+
:return: Self reference for method chaining
|
|
56
|
+
:rtype: LogTag
|
|
57
|
+
|
|
58
|
+
:raises TypeError: If input is not a dictionary type
|
|
59
|
+
:raises ValueError: If nested model conversion fails
|
|
60
|
+
"""
|
|
61
|
+
m = m or dict()
|
|
62
|
+
if m.get('k') is not None:
|
|
63
|
+
self.k = m.get('k')
|
|
64
|
+
if m.get('v') is not None:
|
|
65
|
+
self.v = m.get('v')
|
|
66
|
+
return self
|