baiducloud-python-sdk-cloudassistant 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_cloudassistant/__init__.py +5 -0
- baiducloud_python_sdk_cloudassistant/api/__init__.py +0 -0
- baiducloud_python_sdk_cloudassistant/api/cloudassistant_client.py +418 -0
- baiducloud_python_sdk_cloudassistant/models/__init__.py +54 -0
- baiducloud_python_sdk_cloudassistant/models/action.py +164 -0
- baiducloud_python_sdk_cloudassistant/models/action_filter.py +100 -0
- baiducloud_python_sdk_cloudassistant/models/action_index.py +74 -0
- baiducloud_python_sdk_cloudassistant/models/action_list_request.py +99 -0
- baiducloud_python_sdk_cloudassistant/models/action_list_response.py +94 -0
- baiducloud_python_sdk_cloudassistant/models/action_log_request.py +76 -0
- baiducloud_python_sdk_cloudassistant/models/action_log_response.py +94 -0
- baiducloud_python_sdk_cloudassistant/models/action_page.py +84 -0
- baiducloud_python_sdk_cloudassistant/models/action_run.py +130 -0
- baiducloud_python_sdk_cloudassistant/models/action_run_list_request.py +143 -0
- baiducloud_python_sdk_cloudassistant/models/action_run_list_response.py +94 -0
- baiducloud_python_sdk_cloudassistant/models/action_run_page.py +84 -0
- baiducloud_python_sdk_cloudassistant/models/action_run_request.py +101 -0
- baiducloud_python_sdk_cloudassistant/models/action_run_response.py +93 -0
- baiducloud_python_sdk_cloudassistant/models/agent.py +76 -0
- baiducloud_python_sdk_cloudassistant/models/batch_get_agent_request.py +61 -0
- baiducloud_python_sdk_cloudassistant/models/batch_get_agent_response.py +94 -0
- baiducloud_python_sdk_cloudassistant/models/child_run.py +135 -0
- baiducloud_python_sdk_cloudassistant/models/command.py +135 -0
- baiducloud_python_sdk_cloudassistant/models/command_filter.py +74 -0
- baiducloud_python_sdk_cloudassistant/models/create_action_request.py +105 -0
- baiducloud_python_sdk_cloudassistant/models/create_action_response.py +94 -0
- baiducloud_python_sdk_cloudassistant/models/delete_action_request.py +58 -0
- baiducloud_python_sdk_cloudassistant/models/delete_action_response.py +85 -0
- baiducloud_python_sdk_cloudassistant/models/execution.py +20 -0
- baiducloud_python_sdk_cloudassistant/models/file_upload.py +151 -0
- baiducloud_python_sdk_cloudassistant/models/get_action_request.py +64 -0
- baiducloud_python_sdk_cloudassistant/models/get_action_response.py +94 -0
- baiducloud_python_sdk_cloudassistant/models/get_action_run_request.py +88 -0
- baiducloud_python_sdk_cloudassistant/models/get_action_run_response.py +94 -0
- baiducloud_python_sdk_cloudassistant/models/host.py +58 -0
- baiducloud_python_sdk_cloudassistant/models/id.py +19 -0
- baiducloud_python_sdk_cloudassistant/models/instance_type.py +19 -0
- baiducloud_python_sdk_cloudassistant/models/keyword_type.py +19 -0
- baiducloud_python_sdk_cloudassistant/models/log.py +58 -0
- baiducloud_python_sdk_cloudassistant/models/log_result.py +84 -0
- baiducloud_python_sdk_cloudassistant/models/os.py +19 -0
- baiducloud_python_sdk_cloudassistant/models/output.py +82 -0
- baiducloud_python_sdk_cloudassistant/models/parameter.py +82 -0
- baiducloud_python_sdk_cloudassistant/models/scope.py +19 -0
- baiducloud_python_sdk_cloudassistant/models/state.py +20 -0
- baiducloud_python_sdk_cloudassistant/models/statistics.py +66 -0
- baiducloud_python_sdk_cloudassistant/models/tag.py +66 -0
- baiducloud_python_sdk_cloudassistant/models/target.py +106 -0
- baiducloud_python_sdk_cloudassistant/models/target_import.py +66 -0
- baiducloud_python_sdk_cloudassistant/models/target_selector.py +78 -0
- baiducloud_python_sdk_cloudassistant/models/target_selector_type.py +21 -0
- baiducloud_python_sdk_cloudassistant/models/type.py +19 -0
- baiducloud_python_sdk_cloudassistant/models/update_action_request.py +105 -0
- baiducloud_python_sdk_cloudassistant/models/update_action_response.py +85 -0
- baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/RECORD +59 -0
- baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateActionResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_cloudassistant.models.action_index import ActionIndex
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CreateActionResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
CreateActionResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, request_id=None, code=None, message=None, success=None, result=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize CreateActionResponse response.
|
|
17
|
+
|
|
18
|
+
:param request_id: 请求id
|
|
19
|
+
:type request_id: str (optional)
|
|
20
|
+
|
|
21
|
+
:param code: 响应状态,成功为success
|
|
22
|
+
:type code: str (optional)
|
|
23
|
+
|
|
24
|
+
:param message: 错误信息
|
|
25
|
+
:type message: str (optional)
|
|
26
|
+
|
|
27
|
+
:param success: 请求是否处理成功
|
|
28
|
+
:type success: bool (optional)
|
|
29
|
+
|
|
30
|
+
:param result: result field
|
|
31
|
+
:type result: ActionIndex (optional)
|
|
32
|
+
"""
|
|
33
|
+
super().__init__()
|
|
34
|
+
self.request_id = request_id
|
|
35
|
+
self.code = code
|
|
36
|
+
self.message = message
|
|
37
|
+
self.success = success
|
|
38
|
+
self.result = result
|
|
39
|
+
|
|
40
|
+
def to_dict(self):
|
|
41
|
+
"""
|
|
42
|
+
Convert the response instance to a dictionary representation.
|
|
43
|
+
|
|
44
|
+
Includes metadata from the parent BceResponse class.
|
|
45
|
+
Nested model objects are recursively converted to dictionaries.
|
|
46
|
+
|
|
47
|
+
:return: Dictionary representation of the response
|
|
48
|
+
:rtype: dict
|
|
49
|
+
"""
|
|
50
|
+
_map = super().to_dict()
|
|
51
|
+
if _map is not None:
|
|
52
|
+
return _map
|
|
53
|
+
result = dict()
|
|
54
|
+
if self.metadata is not None:
|
|
55
|
+
result['metadata'] = dict(self.metadata)
|
|
56
|
+
if self.request_id is not None:
|
|
57
|
+
result['requestId'] = self.request_id
|
|
58
|
+
if self.code is not None:
|
|
59
|
+
result['code'] = self.code
|
|
60
|
+
if self.message is not None:
|
|
61
|
+
result['message'] = self.message
|
|
62
|
+
if self.success is not None:
|
|
63
|
+
result['success'] = self.success
|
|
64
|
+
if self.result is not None:
|
|
65
|
+
result['result'] = self.result.to_dict()
|
|
66
|
+
return result
|
|
67
|
+
|
|
68
|
+
def from_dict(self, m):
|
|
69
|
+
"""
|
|
70
|
+
Populate the response instance from a dictionary.
|
|
71
|
+
|
|
72
|
+
Nested dictionaries are recursively converted to model objects.
|
|
73
|
+
|
|
74
|
+
:param m: Dictionary containing response data
|
|
75
|
+
:type m: dict
|
|
76
|
+
|
|
77
|
+
:return: Self reference for method chaining
|
|
78
|
+
:rtype: CreateActionResponse
|
|
79
|
+
|
|
80
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
81
|
+
:raises ValueError: If nested model conversion fails
|
|
82
|
+
"""
|
|
83
|
+
m = m or dict()
|
|
84
|
+
if m.get('requestId') is not None:
|
|
85
|
+
self.request_id = m.get('requestId')
|
|
86
|
+
if m.get('code') is not None:
|
|
87
|
+
self.code = m.get('code')
|
|
88
|
+
if m.get('message') is not None:
|
|
89
|
+
self.message = m.get('message')
|
|
90
|
+
if m.get('success') is not None:
|
|
91
|
+
self.success = m.get('success')
|
|
92
|
+
if m.get('result') is not None:
|
|
93
|
+
self.result = ActionIndex().from_dict(m.get('result'))
|
|
94
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteActionRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteActionRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for DeleteActionRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DeleteActionRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param id: id parameter
|
|
20
|
+
:type id: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.id = 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: DeleteActionRequest
|
|
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('id') is not None:
|
|
57
|
+
self.id = m.get('id')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteActionResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteActionResponse(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
DeleteActionResponse
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, request_id=None, code=None, message=None, success=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize DeleteActionResponse response.
|
|
16
|
+
|
|
17
|
+
:param request_id: 请求id
|
|
18
|
+
:type request_id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param code: 响应状态,成功为success
|
|
21
|
+
:type code: str (optional)
|
|
22
|
+
|
|
23
|
+
:param message: 错误信息
|
|
24
|
+
:type message: str (optional)
|
|
25
|
+
|
|
26
|
+
:param success: 请求是否处理成功
|
|
27
|
+
:type success: bool (optional)
|
|
28
|
+
"""
|
|
29
|
+
super().__init__()
|
|
30
|
+
self.request_id = request_id
|
|
31
|
+
self.code = code
|
|
32
|
+
self.message = message
|
|
33
|
+
self.success = success
|
|
34
|
+
|
|
35
|
+
def to_dict(self):
|
|
36
|
+
"""
|
|
37
|
+
Convert the response instance to a dictionary representation.
|
|
38
|
+
|
|
39
|
+
Includes metadata from the parent BceResponse class.
|
|
40
|
+
Nested model objects are recursively converted to dictionaries.
|
|
41
|
+
|
|
42
|
+
:return: Dictionary representation of the response
|
|
43
|
+
:rtype: dict
|
|
44
|
+
"""
|
|
45
|
+
_map = super().to_dict()
|
|
46
|
+
if _map is not None:
|
|
47
|
+
return _map
|
|
48
|
+
result = dict()
|
|
49
|
+
if self.metadata is not None:
|
|
50
|
+
result['metadata'] = dict(self.metadata)
|
|
51
|
+
if self.request_id is not None:
|
|
52
|
+
result['requestId'] = self.request_id
|
|
53
|
+
if self.code is not None:
|
|
54
|
+
result['code'] = self.code
|
|
55
|
+
if self.message is not None:
|
|
56
|
+
result['message'] = self.message
|
|
57
|
+
if self.success is not None:
|
|
58
|
+
result['success'] = self.success
|
|
59
|
+
return result
|
|
60
|
+
|
|
61
|
+
def from_dict(self, m):
|
|
62
|
+
"""
|
|
63
|
+
Populate the response instance from a dictionary.
|
|
64
|
+
|
|
65
|
+
Nested dictionaries are recursively converted to model objects.
|
|
66
|
+
|
|
67
|
+
:param m: Dictionary containing response data
|
|
68
|
+
:type m: dict
|
|
69
|
+
|
|
70
|
+
:return: Self reference for method chaining
|
|
71
|
+
:rtype: DeleteActionResponse
|
|
72
|
+
|
|
73
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
74
|
+
:raises ValueError: If nested model conversion fails
|
|
75
|
+
"""
|
|
76
|
+
m = m or dict()
|
|
77
|
+
if m.get('requestId') is not None:
|
|
78
|
+
self.request_id = m.get('requestId')
|
|
79
|
+
if m.get('code') is not None:
|
|
80
|
+
self.code = m.get('code')
|
|
81
|
+
if m.get('message') is not None:
|
|
82
|
+
self.message = m.get('message')
|
|
83
|
+
if m.get('success') is not None:
|
|
84
|
+
self.success = m.get('success')
|
|
85
|
+
return self
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Execution information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Execution:
|
|
7
|
+
"""
|
|
8
|
+
Enum class for Execution
|
|
9
|
+
Allowed values: SAVE, RUN, SAVE_AND_RUN
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
SAVE = 'SAVE'
|
|
13
|
+
RUN = 'RUN'
|
|
14
|
+
SAVE_AND_RUN = 'SAVE_AND_RUN'
|
|
15
|
+
|
|
16
|
+
@staticmethod
|
|
17
|
+
def is_valid(value):
|
|
18
|
+
"""Check if the value is valid for this enum"""
|
|
19
|
+
valid_values = ['SAVE', 'RUN', 'SAVE_AND_RUN']
|
|
20
|
+
return value in valid_values
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"""
|
|
2
|
+
FileUpload information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FileUpload(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
FileUpload
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self,
|
|
15
|
+
os=None,
|
|
16
|
+
content=None,
|
|
17
|
+
filename=None,
|
|
18
|
+
filepath=None,
|
|
19
|
+
bos_bucket_name=None,
|
|
20
|
+
bos_file_path=None,
|
|
21
|
+
bos_etag=None,
|
|
22
|
+
user=None,
|
|
23
|
+
group=None,
|
|
24
|
+
mode=None,
|
|
25
|
+
overwrite=None,
|
|
26
|
+
):
|
|
27
|
+
"""
|
|
28
|
+
Initialize FileUpload instance.
|
|
29
|
+
|
|
30
|
+
:param os: 操作系统。枚举值:LINUX,WINDOWS
|
|
31
|
+
:type os: str (optional)
|
|
32
|
+
|
|
33
|
+
:param content: 文件内容
|
|
34
|
+
:type content: str (optional)
|
|
35
|
+
|
|
36
|
+
:param filename: 文件名称
|
|
37
|
+
:type filename: str (optional)
|
|
38
|
+
|
|
39
|
+
:param filepath: 目标路径
|
|
40
|
+
:type filepath: str (optional)
|
|
41
|
+
|
|
42
|
+
:param bos_bucket_name: bos桶名称
|
|
43
|
+
:type bos_bucket_name: str (optional)
|
|
44
|
+
|
|
45
|
+
:param bos_file_path: bos文件路径
|
|
46
|
+
:type bos_file_path: str (optional)
|
|
47
|
+
|
|
48
|
+
:param bos_etag: 文件唯一标识符
|
|
49
|
+
:type bos_etag: str (optional)
|
|
50
|
+
|
|
51
|
+
:param user: 用户,仅Linux文件上传需要
|
|
52
|
+
:type user: str (optional)
|
|
53
|
+
|
|
54
|
+
:param group: 用户组,仅Linux文件上传需要
|
|
55
|
+
:type group: str (optional)
|
|
56
|
+
|
|
57
|
+
:param mode: 文件权限,仅Linux文件上传需要
|
|
58
|
+
:type mode: str (optional)
|
|
59
|
+
|
|
60
|
+
:param overwrite: 是否覆盖目标路径下的同名文件
|
|
61
|
+
:type overwrite: bool (optional)
|
|
62
|
+
"""
|
|
63
|
+
super().__init__()
|
|
64
|
+
self.os = os
|
|
65
|
+
self.content = content
|
|
66
|
+
self.filename = filename
|
|
67
|
+
self.filepath = filepath
|
|
68
|
+
self.bos_bucket_name = bos_bucket_name
|
|
69
|
+
self.bos_file_path = bos_file_path
|
|
70
|
+
self.bos_etag = bos_etag
|
|
71
|
+
self.user = user
|
|
72
|
+
self.group = group
|
|
73
|
+
self.mode = mode
|
|
74
|
+
self.overwrite = overwrite
|
|
75
|
+
|
|
76
|
+
def to_dict(self):
|
|
77
|
+
"""
|
|
78
|
+
Convert the model instance to a dictionary representation.
|
|
79
|
+
|
|
80
|
+
Nested model objects are recursively converted to dictionaries.
|
|
81
|
+
|
|
82
|
+
:return: Dictionary representation of the model
|
|
83
|
+
:rtype: dict
|
|
84
|
+
"""
|
|
85
|
+
_map = super().to_dict()
|
|
86
|
+
if _map is not None:
|
|
87
|
+
return _map
|
|
88
|
+
result = dict()
|
|
89
|
+
if self.os is not None:
|
|
90
|
+
result['os'] = self.os
|
|
91
|
+
if self.content is not None:
|
|
92
|
+
result['content'] = self.content
|
|
93
|
+
if self.filename is not None:
|
|
94
|
+
result['filename'] = self.filename
|
|
95
|
+
if self.filepath is not None:
|
|
96
|
+
result['filepath'] = self.filepath
|
|
97
|
+
if self.bos_bucket_name is not None:
|
|
98
|
+
result['bosBucketName'] = self.bos_bucket_name
|
|
99
|
+
if self.bos_file_path is not None:
|
|
100
|
+
result['bosFilePath'] = self.bos_file_path
|
|
101
|
+
if self.bos_etag is not None:
|
|
102
|
+
result['bosEtag'] = self.bos_etag
|
|
103
|
+
if self.user is not None:
|
|
104
|
+
result['user'] = self.user
|
|
105
|
+
if self.group is not None:
|
|
106
|
+
result['group'] = self.group
|
|
107
|
+
if self.mode is not None:
|
|
108
|
+
result['mode'] = self.mode
|
|
109
|
+
if self.overwrite is not None:
|
|
110
|
+
result['overwrite'] = self.overwrite
|
|
111
|
+
return result
|
|
112
|
+
|
|
113
|
+
def from_dict(self, m):
|
|
114
|
+
"""
|
|
115
|
+
Populate the model instance from a dictionary.
|
|
116
|
+
|
|
117
|
+
Nested dictionaries are recursively converted to model objects.
|
|
118
|
+
|
|
119
|
+
:param m: Dictionary containing model data
|
|
120
|
+
:type m: dict
|
|
121
|
+
|
|
122
|
+
:return: Self reference for method chaining
|
|
123
|
+
:rtype: FileUpload
|
|
124
|
+
|
|
125
|
+
:raises TypeError: If input is not a dictionary type
|
|
126
|
+
:raises ValueError: If nested model conversion fails
|
|
127
|
+
"""
|
|
128
|
+
m = m or dict()
|
|
129
|
+
if m.get('os') is not None:
|
|
130
|
+
self.os = m.get('os')
|
|
131
|
+
if m.get('content') is not None:
|
|
132
|
+
self.content = m.get('content')
|
|
133
|
+
if m.get('filename') is not None:
|
|
134
|
+
self.filename = m.get('filename')
|
|
135
|
+
if m.get('filepath') is not None:
|
|
136
|
+
self.filepath = m.get('filepath')
|
|
137
|
+
if m.get('bosBucketName') is not None:
|
|
138
|
+
self.bos_bucket_name = m.get('bosBucketName')
|
|
139
|
+
if m.get('bosFilePath') is not None:
|
|
140
|
+
self.bos_file_path = m.get('bosFilePath')
|
|
141
|
+
if m.get('bosEtag') is not None:
|
|
142
|
+
self.bos_etag = m.get('bosEtag')
|
|
143
|
+
if m.get('user') is not None:
|
|
144
|
+
self.user = m.get('user')
|
|
145
|
+
if m.get('group') is not None:
|
|
146
|
+
self.group = m.get('group')
|
|
147
|
+
if m.get('mode') is not None:
|
|
148
|
+
self.mode = m.get('mode')
|
|
149
|
+
if m.get('overwrite') is not None:
|
|
150
|
+
self.overwrite = m.get('overwrite')
|
|
151
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for GetActionRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GetActionRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for GetActionRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, id, locale=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize GetActionRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param id: id parameter
|
|
20
|
+
:type id: str (required)
|
|
21
|
+
|
|
22
|
+
:param locale: locale parameter
|
|
23
|
+
:type locale: str (optional)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.id = id
|
|
27
|
+
self.locale = locale
|
|
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: GetActionRequest
|
|
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('id') is not None:
|
|
61
|
+
self.id = m.get('id')
|
|
62
|
+
if m.get('locale') is not None:
|
|
63
|
+
self.locale = m.get('locale')
|
|
64
|
+
return self
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for GetActionResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_cloudassistant.models.action import Action
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class GetActionResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
GetActionResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, request_id=None, code=None, message=None, success=None, result=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize GetActionResponse response.
|
|
17
|
+
|
|
18
|
+
:param request_id: 请求id
|
|
19
|
+
:type request_id: str (optional)
|
|
20
|
+
|
|
21
|
+
:param code: 响应状态,成功为success
|
|
22
|
+
:type code: str (optional)
|
|
23
|
+
|
|
24
|
+
:param message: 错误信息
|
|
25
|
+
:type message: str (optional)
|
|
26
|
+
|
|
27
|
+
:param success: 请求是否处理成功
|
|
28
|
+
:type success: bool (optional)
|
|
29
|
+
|
|
30
|
+
:param result: result field
|
|
31
|
+
:type result: Action (optional)
|
|
32
|
+
"""
|
|
33
|
+
super().__init__()
|
|
34
|
+
self.request_id = request_id
|
|
35
|
+
self.code = code
|
|
36
|
+
self.message = message
|
|
37
|
+
self.success = success
|
|
38
|
+
self.result = result
|
|
39
|
+
|
|
40
|
+
def to_dict(self):
|
|
41
|
+
"""
|
|
42
|
+
Convert the response instance to a dictionary representation.
|
|
43
|
+
|
|
44
|
+
Includes metadata from the parent BceResponse class.
|
|
45
|
+
Nested model objects are recursively converted to dictionaries.
|
|
46
|
+
|
|
47
|
+
:return: Dictionary representation of the response
|
|
48
|
+
:rtype: dict
|
|
49
|
+
"""
|
|
50
|
+
_map = super().to_dict()
|
|
51
|
+
if _map is not None:
|
|
52
|
+
return _map
|
|
53
|
+
result = dict()
|
|
54
|
+
if self.metadata is not None:
|
|
55
|
+
result['metadata'] = dict(self.metadata)
|
|
56
|
+
if self.request_id is not None:
|
|
57
|
+
result['requestId'] = self.request_id
|
|
58
|
+
if self.code is not None:
|
|
59
|
+
result['code'] = self.code
|
|
60
|
+
if self.message is not None:
|
|
61
|
+
result['message'] = self.message
|
|
62
|
+
if self.success is not None:
|
|
63
|
+
result['success'] = self.success
|
|
64
|
+
if self.result is not None:
|
|
65
|
+
result['result'] = self.result.to_dict()
|
|
66
|
+
return result
|
|
67
|
+
|
|
68
|
+
def from_dict(self, m):
|
|
69
|
+
"""
|
|
70
|
+
Populate the response instance from a dictionary.
|
|
71
|
+
|
|
72
|
+
Nested dictionaries are recursively converted to model objects.
|
|
73
|
+
|
|
74
|
+
:param m: Dictionary containing response data
|
|
75
|
+
:type m: dict
|
|
76
|
+
|
|
77
|
+
:return: Self reference for method chaining
|
|
78
|
+
:rtype: GetActionResponse
|
|
79
|
+
|
|
80
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
81
|
+
:raises ValueError: If nested model conversion fails
|
|
82
|
+
"""
|
|
83
|
+
m = m or dict()
|
|
84
|
+
if m.get('requestId') is not None:
|
|
85
|
+
self.request_id = m.get('requestId')
|
|
86
|
+
if m.get('code') is not None:
|
|
87
|
+
self.code = m.get('code')
|
|
88
|
+
if m.get('message') is not None:
|
|
89
|
+
self.message = m.get('message')
|
|
90
|
+
if m.get('success') is not None:
|
|
91
|
+
self.success = m.get('success')
|
|
92
|
+
if m.get('result') is not None:
|
|
93
|
+
self.result = Action().from_dict(m.get('result'))
|
|
94
|
+
return self
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for GetActionRunRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GetActionRunRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for GetActionRunRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, id, with_log=None, page_no=None, page_size=None, child_run_state=None, locale=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize GetActionRunRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param id: id parameter
|
|
20
|
+
:type id: str (required)
|
|
21
|
+
|
|
22
|
+
:param with_log: with_log parameter
|
|
23
|
+
:type with_log: str (optional)
|
|
24
|
+
|
|
25
|
+
:param page_no: page_no parameter
|
|
26
|
+
:type page_no: int (optional)
|
|
27
|
+
|
|
28
|
+
:param page_size: page_size parameter
|
|
29
|
+
:type page_size: int (optional)
|
|
30
|
+
|
|
31
|
+
:param child_run_state: child_run_state parameter
|
|
32
|
+
:type child_run_state: str (optional)
|
|
33
|
+
|
|
34
|
+
:param locale: locale parameter
|
|
35
|
+
:type locale: str (optional)
|
|
36
|
+
"""
|
|
37
|
+
super().__init__()
|
|
38
|
+
self.id = id
|
|
39
|
+
self.with_log = with_log
|
|
40
|
+
self.page_no = page_no
|
|
41
|
+
self.page_size = page_size
|
|
42
|
+
self.child_run_state = child_run_state
|
|
43
|
+
self.locale = locale
|
|
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
|
+
return result
|
|
59
|
+
|
|
60
|
+
def from_dict(self, m):
|
|
61
|
+
"""
|
|
62
|
+
Populate the request entity from a dictionary.
|
|
63
|
+
|
|
64
|
+
Nested dictionaries are recursively converted to model objects.
|
|
65
|
+
|
|
66
|
+
:param m: Dictionary containing request data
|
|
67
|
+
:type m: dict
|
|
68
|
+
|
|
69
|
+
:return: Self reference for method chaining
|
|
70
|
+
:rtype: GetActionRunRequest
|
|
71
|
+
|
|
72
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
73
|
+
:raises ValueError: If nested model conversion fails
|
|
74
|
+
"""
|
|
75
|
+
m = m or dict()
|
|
76
|
+
if m.get('id') is not None:
|
|
77
|
+
self.id = m.get('id')
|
|
78
|
+
if m.get('withLog') is not None:
|
|
79
|
+
self.with_log = m.get('withLog')
|
|
80
|
+
if m.get('pageNo') is not None:
|
|
81
|
+
self.page_no = m.get('pageNo')
|
|
82
|
+
if m.get('pageSize') is not None:
|
|
83
|
+
self.page_size = m.get('pageSize')
|
|
84
|
+
if m.get('childRunState') is not None:
|
|
85
|
+
self.child_run_state = m.get('childRunState')
|
|
86
|
+
if m.get('locale') is not None:
|
|
87
|
+
self.locale = m.get('locale')
|
|
88
|
+
return self
|