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.
Files changed (59) hide show
  1. baiducloud_python_sdk_cloudassistant/__init__.py +5 -0
  2. baiducloud_python_sdk_cloudassistant/api/__init__.py +0 -0
  3. baiducloud_python_sdk_cloudassistant/api/cloudassistant_client.py +418 -0
  4. baiducloud_python_sdk_cloudassistant/models/__init__.py +54 -0
  5. baiducloud_python_sdk_cloudassistant/models/action.py +164 -0
  6. baiducloud_python_sdk_cloudassistant/models/action_filter.py +100 -0
  7. baiducloud_python_sdk_cloudassistant/models/action_index.py +74 -0
  8. baiducloud_python_sdk_cloudassistant/models/action_list_request.py +99 -0
  9. baiducloud_python_sdk_cloudassistant/models/action_list_response.py +94 -0
  10. baiducloud_python_sdk_cloudassistant/models/action_log_request.py +76 -0
  11. baiducloud_python_sdk_cloudassistant/models/action_log_response.py +94 -0
  12. baiducloud_python_sdk_cloudassistant/models/action_page.py +84 -0
  13. baiducloud_python_sdk_cloudassistant/models/action_run.py +130 -0
  14. baiducloud_python_sdk_cloudassistant/models/action_run_list_request.py +143 -0
  15. baiducloud_python_sdk_cloudassistant/models/action_run_list_response.py +94 -0
  16. baiducloud_python_sdk_cloudassistant/models/action_run_page.py +84 -0
  17. baiducloud_python_sdk_cloudassistant/models/action_run_request.py +101 -0
  18. baiducloud_python_sdk_cloudassistant/models/action_run_response.py +93 -0
  19. baiducloud_python_sdk_cloudassistant/models/agent.py +76 -0
  20. baiducloud_python_sdk_cloudassistant/models/batch_get_agent_request.py +61 -0
  21. baiducloud_python_sdk_cloudassistant/models/batch_get_agent_response.py +94 -0
  22. baiducloud_python_sdk_cloudassistant/models/child_run.py +135 -0
  23. baiducloud_python_sdk_cloudassistant/models/command.py +135 -0
  24. baiducloud_python_sdk_cloudassistant/models/command_filter.py +74 -0
  25. baiducloud_python_sdk_cloudassistant/models/create_action_request.py +105 -0
  26. baiducloud_python_sdk_cloudassistant/models/create_action_response.py +94 -0
  27. baiducloud_python_sdk_cloudassistant/models/delete_action_request.py +58 -0
  28. baiducloud_python_sdk_cloudassistant/models/delete_action_response.py +85 -0
  29. baiducloud_python_sdk_cloudassistant/models/execution.py +20 -0
  30. baiducloud_python_sdk_cloudassistant/models/file_upload.py +151 -0
  31. baiducloud_python_sdk_cloudassistant/models/get_action_request.py +64 -0
  32. baiducloud_python_sdk_cloudassistant/models/get_action_response.py +94 -0
  33. baiducloud_python_sdk_cloudassistant/models/get_action_run_request.py +88 -0
  34. baiducloud_python_sdk_cloudassistant/models/get_action_run_response.py +94 -0
  35. baiducloud_python_sdk_cloudassistant/models/host.py +58 -0
  36. baiducloud_python_sdk_cloudassistant/models/id.py +19 -0
  37. baiducloud_python_sdk_cloudassistant/models/instance_type.py +19 -0
  38. baiducloud_python_sdk_cloudassistant/models/keyword_type.py +19 -0
  39. baiducloud_python_sdk_cloudassistant/models/log.py +58 -0
  40. baiducloud_python_sdk_cloudassistant/models/log_result.py +84 -0
  41. baiducloud_python_sdk_cloudassistant/models/os.py +19 -0
  42. baiducloud_python_sdk_cloudassistant/models/output.py +82 -0
  43. baiducloud_python_sdk_cloudassistant/models/parameter.py +82 -0
  44. baiducloud_python_sdk_cloudassistant/models/scope.py +19 -0
  45. baiducloud_python_sdk_cloudassistant/models/state.py +20 -0
  46. baiducloud_python_sdk_cloudassistant/models/statistics.py +66 -0
  47. baiducloud_python_sdk_cloudassistant/models/tag.py +66 -0
  48. baiducloud_python_sdk_cloudassistant/models/target.py +106 -0
  49. baiducloud_python_sdk_cloudassistant/models/target_import.py +66 -0
  50. baiducloud_python_sdk_cloudassistant/models/target_selector.py +78 -0
  51. baiducloud_python_sdk_cloudassistant/models/target_selector_type.py +21 -0
  52. baiducloud_python_sdk_cloudassistant/models/type.py +19 -0
  53. baiducloud_python_sdk_cloudassistant/models/update_action_request.py +105 -0
  54. baiducloud_python_sdk_cloudassistant/models/update_action_response.py +85 -0
  55. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/LICENSE +177 -0
  56. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/METADATA +76 -0
  57. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/RECORD +59 -0
  58. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/WHEEL +5 -0
  59. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,94 @@
1
+ """
2
+ Request entity for GetActionRunResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_cloudassistant.models.action_run import ActionRun
7
+
8
+
9
+ class GetActionRunResponse(BceResponse):
10
+ """
11
+ GetActionRunResponse
12
+ """
13
+
14
+ def __init__(self, request_id=None, code=None, message=None, success=None, result=None):
15
+ """
16
+ Initialize GetActionRunResponse 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: ActionRun (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: GetActionRunResponse
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 = ActionRun().from_dict(m.get('result'))
94
+ return self
@@ -0,0 +1,58 @@
1
+ """
2
+ Host information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Host(AbstractModel):
9
+ """
10
+ Host
11
+ """
12
+
13
+ def __init__(self, instance_id=None):
14
+ """
15
+ Initialize Host instance.
16
+
17
+ :param instance_id: 实例id,如bcc实例id: i-gVGDt***
18
+ :type instance_id: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.instance_id = instance_id
22
+
23
+ def to_dict(self):
24
+ """
25
+ Convert the model instance to a dictionary representation.
26
+
27
+ Nested model objects are recursively converted to dictionaries.
28
+
29
+ :return: Dictionary representation of the model
30
+ :rtype: dict
31
+ """
32
+ _map = super().to_dict()
33
+ if _map is not None:
34
+ return _map
35
+ result = dict()
36
+ if self.instance_id is not None:
37
+ result['instanceId'] = self.instance_id
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the model instance from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing model data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: Host
51
+
52
+ :raises TypeError: If input is not a dictionary type
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('instanceId') is not None:
57
+ self.instance_id = m.get('instanceId')
58
+ return self
@@ -0,0 +1,19 @@
1
+ """
2
+ Id information
3
+ """
4
+
5
+
6
+ class Id:
7
+ """
8
+ Enum class for Id
9
+ Allowed values: COMMAND, FILE_UPLOAD
10
+ """
11
+
12
+ COMMAND = 'COMMAND'
13
+ FILE_UPLOAD = 'FILE_UPLOAD'
14
+
15
+ @staticmethod
16
+ def is_valid(value):
17
+ """Check if the value is valid for this enum"""
18
+ valid_values = ['COMMAND', 'FILE_UPLOAD']
19
+ return value in valid_values
@@ -0,0 +1,19 @@
1
+ """
2
+ InstanceType information
3
+ """
4
+
5
+
6
+ class InstanceType:
7
+ """
8
+ Enum class for InstanceType
9
+ Allowed values: BCC, BBC
10
+ """
11
+
12
+ BCC = 'BCC'
13
+ BBC = 'BBC'
14
+
15
+ @staticmethod
16
+ def is_valid(value):
17
+ """Check if the value is valid for this enum"""
18
+ valid_values = ['BCC', 'BBC']
19
+ return value in valid_values
@@ -0,0 +1,19 @@
1
+ """
2
+ KeywordType information
3
+ """
4
+
5
+
6
+ class KeywordType:
7
+ """
8
+ Enum class for KeywordType
9
+ Allowed values: INSTANCEID, INTERNALIP
10
+ """
11
+
12
+ INSTANCEID = 'instanceId'
13
+ INTERNALIP = 'internalIp'
14
+
15
+ @staticmethod
16
+ def is_valid(value):
17
+ """Check if the value is valid for this enum"""
18
+ valid_values = ['instanceId', 'internalIp']
19
+ return value in valid_values
@@ -0,0 +1,58 @@
1
+ """
2
+ Log information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Log(AbstractModel):
9
+ """
10
+ Log
11
+ """
12
+
13
+ def __init__(self, msg=None):
14
+ """
15
+ Initialize Log instance.
16
+
17
+ :param msg: 命令执行日志
18
+ :type msg: str (optional)
19
+ """
20
+ super().__init__()
21
+ self.msg = msg
22
+
23
+ def to_dict(self):
24
+ """
25
+ Convert the model instance to a dictionary representation.
26
+
27
+ Nested model objects are recursively converted to dictionaries.
28
+
29
+ :return: Dictionary representation of the model
30
+ :rtype: dict
31
+ """
32
+ _map = super().to_dict()
33
+ if _map is not None:
34
+ return _map
35
+ result = dict()
36
+ if self.msg is not None:
37
+ result['msg'] = self.msg
38
+ return result
39
+
40
+ def from_dict(self, m):
41
+ """
42
+ Populate the model instance from a dictionary.
43
+
44
+ Nested dictionaries are recursively converted to model objects.
45
+
46
+ :param m: Dictionary containing model data
47
+ :type m: dict
48
+
49
+ :return: Self reference for method chaining
50
+ :rtype: Log
51
+
52
+ :raises TypeError: If input is not a dictionary type
53
+ :raises ValueError: If nested model conversion fails
54
+ """
55
+ m = m or dict()
56
+ if m.get('msg') is not None:
57
+ self.msg = m.get('msg')
58
+ return self
@@ -0,0 +1,84 @@
1
+ """
2
+ LogResult information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+ from baiducloud_python_sdk_cloudassistant.models.log import Log
8
+
9
+
10
+ class LogResult(AbstractModel):
11
+ """
12
+ LogResult
13
+ """
14
+
15
+ def __init__(self, logs=None, next_cursor=None, state=None, child_id=None):
16
+ """
17
+ Initialize LogResult instance.
18
+
19
+ :param logs: 日志内容,顺序排列
20
+ :type logs: List[Log] (optional)
21
+
22
+ :param next_cursor: next_cursor attribute
23
+ :type next_cursor: int (optional)
24
+
25
+ :param state: 子执行状态。枚举值:FAILED(执行失败),RUNNING(执行中),SUCCESS(执行完成)
26
+ :type state: str (optional)
27
+
28
+ :param child_id: 子执行id
29
+ :type child_id: str (optional)
30
+ """
31
+ super().__init__()
32
+ self.logs = logs
33
+ self.next_cursor = next_cursor
34
+ self.state = state
35
+ self.child_id = child_id
36
+
37
+ def to_dict(self):
38
+ """
39
+ Convert the model instance to a dictionary representation.
40
+
41
+ Nested model objects are recursively converted to dictionaries.
42
+
43
+ :return: Dictionary representation of the model
44
+ :rtype: dict
45
+ """
46
+ _map = super().to_dict()
47
+ if _map is not None:
48
+ return _map
49
+ result = dict()
50
+ if self.logs is not None:
51
+ result['logs'] = [i.to_dict() for i in self.logs]
52
+ if self.next_cursor is not None:
53
+ result['nextCursor'] = self.next_cursor
54
+ if self.state is not None:
55
+ result['state'] = self.state
56
+ if self.child_id is not None:
57
+ result['childId'] = self.child_id
58
+ return result
59
+
60
+ def from_dict(self, m):
61
+ """
62
+ Populate the model instance from a dictionary.
63
+
64
+ Nested dictionaries are recursively converted to model objects.
65
+
66
+ :param m: Dictionary containing model data
67
+ :type m: dict
68
+
69
+ :return: Self reference for method chaining
70
+ :rtype: LogResult
71
+
72
+ :raises TypeError: If input is not a dictionary type
73
+ :raises ValueError: If nested model conversion fails
74
+ """
75
+ m = m or dict()
76
+ if m.get('logs') is not None:
77
+ self.logs = [Log().from_dict(i) for i in m.get('logs')]
78
+ if m.get('nextCursor') is not None:
79
+ self.next_cursor = m.get('nextCursor')
80
+ if m.get('state') is not None:
81
+ self.state = m.get('state')
82
+ if m.get('childId') is not None:
83
+ self.child_id = m.get('childId')
84
+ return self
@@ -0,0 +1,19 @@
1
+ """
2
+ Os information
3
+ """
4
+
5
+
6
+ class Os:
7
+ """
8
+ Enum class for Os
9
+ Allowed values: LINUX, WINDOWS
10
+ """
11
+
12
+ LINUX = 'LINUX'
13
+ WINDOWS = 'WINDOWS'
14
+
15
+ @staticmethod
16
+ def is_valid(value):
17
+ """Check if the value is valid for this enum"""
18
+ valid_values = ['LINUX', 'WINDOWS']
19
+ return value in valid_values
@@ -0,0 +1,82 @@
1
+ """
2
+ Output information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Output(AbstractModel):
9
+ """
10
+ Output
11
+ """
12
+
13
+ def __init__(self, exit_code=None, stderr=None, stdout=None, is_truncated=None):
14
+ """
15
+ Initialize Output instance.
16
+
17
+ :param exit_code: 退出码
18
+ :type exit_code: int (optional)
19
+
20
+ :param stderr: 标准错误
21
+ :type stderr: str (optional)
22
+
23
+ :param stdout: 标准输出
24
+ :type stdout: str (optional)
25
+
26
+ :param is_truncated: 标准输出或标准错误是否由于过长(超过4KB)而被截断
27
+ :type is_truncated: bool (optional)
28
+ """
29
+ super().__init__()
30
+ self.exit_code = exit_code
31
+ self.stderr = stderr
32
+ self.stdout = stdout
33
+ self.is_truncated = is_truncated
34
+
35
+ def to_dict(self):
36
+ """
37
+ Convert the model instance to a dictionary representation.
38
+
39
+ Nested model objects are recursively converted to dictionaries.
40
+
41
+ :return: Dictionary representation of the model
42
+ :rtype: dict
43
+ """
44
+ _map = super().to_dict()
45
+ if _map is not None:
46
+ return _map
47
+ result = dict()
48
+ if self.exit_code is not None:
49
+ result['exitCode'] = self.exit_code
50
+ if self.stderr is not None:
51
+ result['stderr'] = self.stderr
52
+ if self.stdout is not None:
53
+ result['stdout'] = self.stdout
54
+ if self.is_truncated is not None:
55
+ result['isTruncated'] = self.is_truncated
56
+ return result
57
+
58
+ def from_dict(self, m):
59
+ """
60
+ Populate the model instance from a dictionary.
61
+
62
+ Nested dictionaries are recursively converted to model objects.
63
+
64
+ :param m: Dictionary containing model data
65
+ :type m: dict
66
+
67
+ :return: Self reference for method chaining
68
+ :rtype: Output
69
+
70
+ :raises TypeError: If input is not a dictionary type
71
+ :raises ValueError: If nested model conversion fails
72
+ """
73
+ m = m or dict()
74
+ if m.get('exitCode') is not None:
75
+ self.exit_code = m.get('exitCode')
76
+ if m.get('stderr') is not None:
77
+ self.stderr = m.get('stderr')
78
+ if m.get('stdout') is not None:
79
+ self.stdout = m.get('stdout')
80
+ if m.get('isTruncated') is not None:
81
+ self.is_truncated = m.get('isTruncated')
82
+ return self
@@ -0,0 +1,82 @@
1
+ """
2
+ Parameter information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Parameter(AbstractModel):
9
+ """
10
+ Parameter
11
+ """
12
+
13
+ def __init__(self, name=None, desc=None, required=None, default_value=None):
14
+ """
15
+ Initialize Parameter instance.
16
+
17
+ :param name: 参数名称
18
+ :type name: str (optional)
19
+
20
+ :param desc: 参数描述
21
+ :type desc: str (optional)
22
+
23
+ :param required: 是否必填
24
+ :type required: bool (optional)
25
+
26
+ :param default_value: 默认值
27
+ :type default_value: str (optional)
28
+ """
29
+ super().__init__()
30
+ self.name = name
31
+ self.desc = desc
32
+ self.required = required
33
+ self.default_value = default_value
34
+
35
+ def to_dict(self):
36
+ """
37
+ Convert the model instance to a dictionary representation.
38
+
39
+ Nested model objects are recursively converted to dictionaries.
40
+
41
+ :return: Dictionary representation of the model
42
+ :rtype: dict
43
+ """
44
+ _map = super().to_dict()
45
+ if _map is not None:
46
+ return _map
47
+ result = dict()
48
+ if self.name is not None:
49
+ result['name'] = self.name
50
+ if self.desc is not None:
51
+ result['desc'] = self.desc
52
+ if self.required is not None:
53
+ result['required'] = self.required
54
+ if self.default_value is not None:
55
+ result['defaultValue'] = self.default_value
56
+ return result
57
+
58
+ def from_dict(self, m):
59
+ """
60
+ Populate the model instance from a dictionary.
61
+
62
+ Nested dictionaries are recursively converted to model objects.
63
+
64
+ :param m: Dictionary containing model data
65
+ :type m: dict
66
+
67
+ :return: Self reference for method chaining
68
+ :rtype: Parameter
69
+
70
+ :raises TypeError: If input is not a dictionary type
71
+ :raises ValueError: If nested model conversion fails
72
+ """
73
+ m = m or dict()
74
+ if m.get('name') is not None:
75
+ self.name = m.get('name')
76
+ if m.get('desc') is not None:
77
+ self.desc = m.get('desc')
78
+ if m.get('required') is not None:
79
+ self.required = m.get('required')
80
+ if m.get('defaultValue') is not None:
81
+ self.default_value = m.get('defaultValue')
82
+ return self
@@ -0,0 +1,19 @@
1
+ """
2
+ Scope information
3
+ """
4
+
5
+
6
+ class Scope:
7
+ """
8
+ Enum class for Scope
9
+ Allowed values: INDIVIDUAL, GLOBAL
10
+ """
11
+
12
+ INDIVIDUAL = 'INDIVIDUAL'
13
+ GLOBAL = 'GLOBAL'
14
+
15
+ @staticmethod
16
+ def is_valid(value):
17
+ """Check if the value is valid for this enum"""
18
+ valid_values = ['INDIVIDUAL', 'GLOBAL']
19
+ return value in valid_values
@@ -0,0 +1,20 @@
1
+ """
2
+ State information
3
+ """
4
+
5
+
6
+ class State:
7
+ """
8
+ Enum class for State
9
+ Allowed values: FAILED, RUNNING, SUCCESS
10
+ """
11
+
12
+ FAILED = 'FAILED'
13
+ RUNNING = 'RUNNING'
14
+ SUCCESS = 'SUCCESS'
15
+
16
+ @staticmethod
17
+ def is_valid(value):
18
+ """Check if the value is valid for this enum"""
19
+ valid_values = ['FAILED', 'RUNNING', 'SUCCESS']
20
+ return value in valid_values
@@ -0,0 +1,66 @@
1
+ """
2
+ Statistics information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Statistics(AbstractModel):
9
+ """
10
+ Statistics
11
+ """
12
+
13
+ def __init__(self, total_target_count=None, failed_target_count=None):
14
+ """
15
+ Initialize Statistics instance.
16
+
17
+ :param total_target_count: 执行的实例总数
18
+ :type total_target_count: int (optional)
19
+
20
+ :param failed_target_count: 已失败的执行实例总数
21
+ :type failed_target_count: int (optional)
22
+ """
23
+ super().__init__()
24
+ self.total_target_count = total_target_count
25
+ self.failed_target_count = failed_target_count
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.total_target_count is not None:
41
+ result['totalTargetCount'] = self.total_target_count
42
+ if self.failed_target_count is not None:
43
+ result['failedTargetCount'] = self.failed_target_count
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: Statistics
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('totalTargetCount') is not None:
63
+ self.total_target_count = m.get('totalTargetCount')
64
+ if m.get('failedTargetCount') is not None:
65
+ self.failed_target_count = m.get('failedTargetCount')
66
+ return self