baiducloud-python-sdk-cprom 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_cprom/__init__.py +5 -0
- baiducloud_python_sdk_cprom/api/__init__.py +0 -0
- baiducloud_python_sdk_cprom/api/cprom_client.py +1197 -0
- baiducloud_python_sdk_cprom/models/__init__.py +90 -0
- baiducloud_python_sdk_cprom/models/bind_cluster_request.py +72 -0
- baiducloud_python_sdk_cprom/models/bind_cluster_response.py +61 -0
- baiducloud_python_sdk_cprom/models/callback_config.py +68 -0
- baiducloud_python_sdk_cprom/models/claim_alert_event_request.py +68 -0
- baiducloud_python_sdk_cprom/models/claim_alert_event_response.py +78 -0
- baiducloud_python_sdk_cprom/models/claim_condition.py +58 -0
- baiducloud_python_sdk_cprom/models/claimed_info.py +82 -0
- baiducloud_python_sdk_cprom/models/create_alert_request.py +142 -0
- baiducloud_python_sdk_cprom/models/create_alert_response.py +61 -0
- baiducloud_python_sdk_cprom/models/create_custom_scrape_task_request.py +72 -0
- baiducloud_python_sdk_cprom/models/create_custom_scrape_task_response.py +61 -0
- baiducloud_python_sdk_cprom/models/create_instance_request.py +117 -0
- baiducloud_python_sdk_cprom/models/create_notification_policy_request.py +149 -0
- baiducloud_python_sdk_cprom/models/create_notification_policy_response.py +61 -0
- baiducloud_python_sdk_cprom/models/create_podmonitor_request.py +98 -0
- baiducloud_python_sdk_cprom/models/create_podmonitor_response.py +61 -0
- baiducloud_python_sdk_cprom/models/create_service_monitor_request.py +98 -0
- baiducloud_python_sdk_cprom/models/create_service_monitor_response.py +61 -0
- baiducloud_python_sdk_cprom/models/delete_alert_request.py +64 -0
- baiducloud_python_sdk_cprom/models/delete_custom_scrape_task_request.py +70 -0
- baiducloud_python_sdk_cprom/models/delete_instance_request.py +64 -0
- baiducloud_python_sdk_cprom/models/delete_notification_policy_request.py +58 -0
- baiducloud_python_sdk_cprom/models/delete_podmonitor_request.py +70 -0
- baiducloud_python_sdk_cprom/models/delete_service_monitor_request.py +70 -0
- baiducloud_python_sdk_cprom/models/endpoint.py +82 -0
- baiducloud_python_sdk_cprom/models/escalate_param.py +78 -0
- baiducloud_python_sdk_cprom/models/event.py +216 -0
- baiducloud_python_sdk_cprom/models/event_claim_detail.py +74 -0
- baiducloud_python_sdk_cprom/models/generate_instance_token_request.py +72 -0
- baiducloud_python_sdk_cprom/models/get_alert_detail_request.py +64 -0
- baiducloud_python_sdk_cprom/models/get_alert_detail_response.py +136 -0
- baiducloud_python_sdk_cprom/models/get_alert_event_detail_request.py +58 -0
- baiducloud_python_sdk_cprom/models/get_alert_event_detail_response.py +218 -0
- baiducloud_python_sdk_cprom/models/get_cluster_bind_status_request.py +58 -0
- baiducloud_python_sdk_cprom/models/get_cluster_bind_status_response.py +77 -0
- baiducloud_python_sdk_cprom/models/get_notification_policy_request.py +58 -0
- baiducloud_python_sdk_cprom/models/get_notification_policy_response.py +167 -0
- baiducloud_python_sdk_cprom/models/label_selector.py +58 -0
- baiducloud_python_sdk_cprom/models/list_alert_events_request.py +159 -0
- baiducloud_python_sdk_cprom/models/list_alert_events_response.py +102 -0
- baiducloud_python_sdk_cprom/models/list_alert_templates_response.py +62 -0
- baiducloud_python_sdk_cprom/models/list_alerts_request.py +82 -0
- baiducloud_python_sdk_cprom/models/list_alerts_response.py +128 -0
- baiducloud_python_sdk_cprom/models/list_bindable_cloud_products_response.py +62 -0
- baiducloud_python_sdk_cprom/models/list_instances_request.py +82 -0
- baiducloud_python_sdk_cprom/models/list_instances_response.py +102 -0
- baiducloud_python_sdk_cprom/models/list_notification_policies_request.py +76 -0
- baiducloud_python_sdk_cprom/models/list_notification_policies_response.py +128 -0
- baiducloud_python_sdk_cprom/models/list_pod_monitors_request.py +110 -0
- baiducloud_python_sdk_cprom/models/list_pod_monitors_response.py +137 -0
- baiducloud_python_sdk_cprom/models/list_related_cloud_products_request.py +58 -0
- baiducloud_python_sdk_cprom/models/list_related_cloud_products_response.py +61 -0
- baiducloud_python_sdk_cprom/models/list_service_monitors_request.py +110 -0
- baiducloud_python_sdk_cprom/models/list_service_monitors_response.py +137 -0
- baiducloud_python_sdk_cprom/models/mentioned_user_config.py +66 -0
- baiducloud_python_sdk_cprom/models/monitor_instance.py +135 -0
- baiducloud_python_sdk_cprom/models/namespace_selector.py +58 -0
- baiducloud_python_sdk_cprom/models/notify_action.py +96 -0
- baiducloud_python_sdk_cprom/models/notify_rule.py +179 -0
- baiducloud_python_sdk_cprom/models/object_meta.py +66 -0
- baiducloud_python_sdk_cprom/models/pod_metrics_endpoint.py +74 -0
- baiducloud_python_sdk_cprom/models/pod_monitor.py +86 -0
- baiducloud_python_sdk_cprom/models/pod_monitor_item.py +92 -0
- baiducloud_python_sdk_cprom/models/pod_monitor_spec.py +80 -0
- baiducloud_python_sdk_cprom/models/remote_read_request.py +90 -0
- baiducloud_python_sdk_cprom/models/remote_read_response.py +127 -0
- baiducloud_python_sdk_cprom/models/remote_write_request.py +90 -0
- baiducloud_python_sdk_cprom/models/repeat_notify_config.py +90 -0
- baiducloud_python_sdk_cprom/models/rule_detail.py +142 -0
- baiducloud_python_sdk_cprom/models/rule_template.py +82 -0
- baiducloud_python_sdk_cprom/models/scope_detail.py +74 -0
- baiducloud_python_sdk_cprom/models/service_monitor.py +86 -0
- baiducloud_python_sdk_cprom/models/service_monitor_endpoint.py +74 -0
- baiducloud_python_sdk_cprom/models/service_monitor_item.py +92 -0
- baiducloud_python_sdk_cprom/models/service_monitor_spec.py +80 -0
- baiducloud_python_sdk_cprom/models/status.py +74 -0
- baiducloud_python_sdk_cprom/models/toggle_pod_monitor_service_request.py +70 -0
- baiducloud_python_sdk_cprom/models/toggle_service_monitor_service_request.py +70 -0
- baiducloud_python_sdk_cprom/models/update_alert_request.py +149 -0
- baiducloud_python_sdk_cprom/models/update_notification_policy_request.py +156 -0
- baiducloud_python_sdk_cprom/models/update_pod_monitor_request.py +87 -0
- baiducloud_python_sdk_cprom/models/update_related_cloud_products_request.py +66 -0
- baiducloud_python_sdk_cprom/models/update_service_monitor_request.py +87 -0
- baiducloud_python_sdk_cprom/models/user.py +90 -0
- baiducloud_python_sdk_cprom/models/user_group.py +74 -0
- baiducloud_python_sdk_cprom/models/webhook_detail.py +102 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/RECORD +95 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Models for cprom SDK.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from .bind_cluster_request import BindClusterRequest
|
|
6
|
+
from .bind_cluster_response import BindClusterResponse
|
|
7
|
+
from .callback_config import CallbackConfig
|
|
8
|
+
from .claim_alert_event_request import ClaimAlertEventRequest
|
|
9
|
+
from .claim_alert_event_response import ClaimAlertEventResponse
|
|
10
|
+
from .claim_condition import ClaimCondition
|
|
11
|
+
from .claimed_info import ClaimedInfo
|
|
12
|
+
from .create_alert_request import CreateAlertRequest
|
|
13
|
+
from .create_alert_response import CreateAlertResponse
|
|
14
|
+
from .create_custom_scrape_task_request import CreateCustomScrapeTaskRequest
|
|
15
|
+
from .create_custom_scrape_task_response import CreateCustomScrapeTaskResponse
|
|
16
|
+
from .create_instance_request import CreateInstanceRequest
|
|
17
|
+
from .create_notification_policy_request import CreateNotificationPolicyRequest
|
|
18
|
+
from .create_notification_policy_response import CreateNotificationPolicyResponse
|
|
19
|
+
from .create_podmonitor_request import CreatePodmonitorRequest
|
|
20
|
+
from .create_podmonitor_response import CreatePodmonitorResponse
|
|
21
|
+
from .create_service_monitor_request import CreateServiceMonitorRequest
|
|
22
|
+
from .create_service_monitor_response import CreateServiceMonitorResponse
|
|
23
|
+
from .endpoint import Endpoint
|
|
24
|
+
from .escalate_param import EscalateParam
|
|
25
|
+
from .event import Event
|
|
26
|
+
from .event_claim_detail import EventClaimDetail
|
|
27
|
+
from .generate_instance_token_request import GenerateInstanceTokenRequest
|
|
28
|
+
from .get_alert_detail_response import GetAlertDetailResponse
|
|
29
|
+
from .get_alert_event_detail_response import GetAlertEventDetailResponse
|
|
30
|
+
from .get_cluster_bind_status_response import GetClusterBindStatusResponse
|
|
31
|
+
from .get_notification_policy_response import GetNotificationPolicyResponse
|
|
32
|
+
from .label_selector import LabelSelector
|
|
33
|
+
from .list_alert_events_response import ListAlertEventsResponse
|
|
34
|
+
from .list_alert_templates_response import ListAlertTemplatesResponse
|
|
35
|
+
from .list_alerts_response import ListAlertsResponse
|
|
36
|
+
from .list_bindable_cloud_products_response import ListBindableCloudProductsResponse
|
|
37
|
+
from .list_instances_response import ListInstancesResponse
|
|
38
|
+
from .list_notification_policies_response import ListNotificationPoliciesResponse
|
|
39
|
+
from .list_pod_monitors_response import ListPodMonitorsResponse
|
|
40
|
+
from .list_related_cloud_products_response import ListRelatedCloudProductsResponse
|
|
41
|
+
from .list_service_monitors_response import ListServiceMonitorsResponse
|
|
42
|
+
from .mentioned_user_config import MentionedUserConfig
|
|
43
|
+
from .monitor_instance import MonitorInstance
|
|
44
|
+
from .namespace_selector import NamespaceSelector
|
|
45
|
+
from .notify_action import NotifyAction
|
|
46
|
+
from .notify_rule import NotifyRule
|
|
47
|
+
from .object_meta import ObjectMeta
|
|
48
|
+
from .pod_metrics_endpoint import PodMetricsEndpoint
|
|
49
|
+
from .pod_monitor import PodMonitor
|
|
50
|
+
from .pod_monitor_item import PodMonitorItem
|
|
51
|
+
from .pod_monitor_spec import PodMonitorSpec
|
|
52
|
+
from .remote_read_request import RemoteReadRequest
|
|
53
|
+
from .remote_read_response import RemoteReadResponse
|
|
54
|
+
from .remote_write_request import RemoteWriteRequest
|
|
55
|
+
from .repeat_notify_config import RepeatNotifyConfig
|
|
56
|
+
from .rule_detail import RuleDetail
|
|
57
|
+
from .rule_template import RuleTemplate
|
|
58
|
+
from .scope_detail import ScopeDetail
|
|
59
|
+
from .service_monitor import ServiceMonitor
|
|
60
|
+
from .service_monitor_endpoint import ServiceMonitorEndpoint
|
|
61
|
+
from .service_monitor_item import ServiceMonitorItem
|
|
62
|
+
from .service_monitor_spec import ServiceMonitorSpec
|
|
63
|
+
from .status import Status
|
|
64
|
+
from .update_alert_request import UpdateAlertRequest
|
|
65
|
+
from .update_notification_policy_request import UpdateNotificationPolicyRequest
|
|
66
|
+
from .update_pod_monitor_request import UpdatePodMonitorRequest
|
|
67
|
+
from .update_related_cloud_products_request import UpdateRelatedCloudProductsRequest
|
|
68
|
+
from .update_service_monitor_request import UpdateServiceMonitorRequest
|
|
69
|
+
from .user import User
|
|
70
|
+
from .user_group import UserGroup
|
|
71
|
+
from .webhook_detail import WebhookDetail
|
|
72
|
+
from .list_service_monitors_request import ListServiceMonitorsRequest
|
|
73
|
+
from .list_alerts_request import ListAlertsRequest
|
|
74
|
+
from .get_alert_detail_request import GetAlertDetailRequest
|
|
75
|
+
from .delete_alert_request import DeleteAlertRequest
|
|
76
|
+
from .list_notification_policies_request import ListNotificationPoliciesRequest
|
|
77
|
+
from .get_notification_policy_request import GetNotificationPolicyRequest
|
|
78
|
+
from .delete_notification_policy_request import DeleteNotificationPolicyRequest
|
|
79
|
+
from .delete_podmonitor_request import DeletePodmonitorRequest
|
|
80
|
+
from .delete_service_monitor_request import DeleteServiceMonitorRequest
|
|
81
|
+
from .list_related_cloud_products_request import ListRelatedCloudProductsRequest
|
|
82
|
+
from .list_instances_request import ListInstancesRequest
|
|
83
|
+
from .delete_instance_request import DeleteInstanceRequest
|
|
84
|
+
from .toggle_pod_monitor_service_request import TogglePodMonitorServiceRequest
|
|
85
|
+
from .toggle_service_monitor_service_request import ToggleServiceMonitorServiceRequest
|
|
86
|
+
from .delete_custom_scrape_task_request import DeleteCustomScrapeTaskRequest
|
|
87
|
+
from .list_alert_events_request import ListAlertEventsRequest
|
|
88
|
+
from .get_alert_event_detail_request import GetAlertEventDetailRequest
|
|
89
|
+
from .list_pod_monitors_request import ListPodMonitorsRequest
|
|
90
|
+
from .get_cluster_bind_status_request import GetClusterBindStatusRequest
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for BindClusterRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BindClusterRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for BindClusterRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, instance_id, action, cluster_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize BindClusterRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param instance_id: instance_id parameter
|
|
20
|
+
:type instance_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param action: action parameter
|
|
23
|
+
:type action: str (required)
|
|
24
|
+
|
|
25
|
+
:param cluster_id: CCE 集群 ID。
|
|
26
|
+
:type cluster_id: str (required)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.instance_id = instance_id
|
|
30
|
+
self.action = action
|
|
31
|
+
self.cluster_id = cluster_id
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
"""
|
|
35
|
+
Convert the request entity to a dictionary representation.
|
|
36
|
+
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the request
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
if self.cluster_id is not None:
|
|
47
|
+
result['clusterId'] = self.cluster_id
|
|
48
|
+
return result
|
|
49
|
+
|
|
50
|
+
def from_dict(self, m):
|
|
51
|
+
"""
|
|
52
|
+
Populate the request entity from a dictionary.
|
|
53
|
+
|
|
54
|
+
Nested dictionaries are recursively converted to model objects.
|
|
55
|
+
|
|
56
|
+
:param m: Dictionary containing request data
|
|
57
|
+
:type m: dict
|
|
58
|
+
|
|
59
|
+
:return: Self reference for method chaining
|
|
60
|
+
:rtype: BindClusterRequest
|
|
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('instanceId') is not None:
|
|
67
|
+
self.instance_id = m.get('instanceId')
|
|
68
|
+
if m.get('action') is not None:
|
|
69
|
+
self.action = m.get('action')
|
|
70
|
+
if m.get('clusterId') is not None:
|
|
71
|
+
self.cluster_id = m.get('clusterId')
|
|
72
|
+
return self
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for BindClusterResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BindClusterResponse(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
BindClusterResponse
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, binding_status=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize BindClusterResponse response.
|
|
16
|
+
|
|
17
|
+
:param binding_status: 绑定状态。绑定请求返回 `Binding`,解绑请求返回 `Unbinding`。
|
|
18
|
+
:type binding_status: str (optional)
|
|
19
|
+
"""
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.binding_status = binding_status
|
|
22
|
+
|
|
23
|
+
def to_dict(self):
|
|
24
|
+
"""
|
|
25
|
+
Convert the response instance to a dictionary representation.
|
|
26
|
+
|
|
27
|
+
Includes metadata from the parent BceResponse class.
|
|
28
|
+
Nested model objects are recursively converted to dictionaries.
|
|
29
|
+
|
|
30
|
+
:return: Dictionary representation of the response
|
|
31
|
+
:rtype: dict
|
|
32
|
+
"""
|
|
33
|
+
_map = super().to_dict()
|
|
34
|
+
if _map is not None:
|
|
35
|
+
return _map
|
|
36
|
+
result = dict()
|
|
37
|
+
if self.metadata is not None:
|
|
38
|
+
result['metadata'] = dict(self.metadata)
|
|
39
|
+
if self.binding_status is not None:
|
|
40
|
+
result['bindingStatus'] = self.binding_status
|
|
41
|
+
return result
|
|
42
|
+
|
|
43
|
+
def from_dict(self, m):
|
|
44
|
+
"""
|
|
45
|
+
Populate the response instance from a dictionary.
|
|
46
|
+
|
|
47
|
+
Nested dictionaries are recursively converted to model objects.
|
|
48
|
+
|
|
49
|
+
:param m: Dictionary containing response data
|
|
50
|
+
:type m: dict
|
|
51
|
+
|
|
52
|
+
:return: Self reference for method chaining
|
|
53
|
+
:rtype: BindClusterResponse
|
|
54
|
+
|
|
55
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
56
|
+
:raises ValueError: If nested model conversion fails
|
|
57
|
+
"""
|
|
58
|
+
m = m or dict()
|
|
59
|
+
if m.get('bindingStatus') is not None:
|
|
60
|
+
self.binding_status = m.get('bindingStatus')
|
|
61
|
+
return self
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
CallbackConfig information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_cprom.models.webhook_detail import WebhookDetail
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CallbackConfig(AbstractModel):
|
|
11
|
+
"""
|
|
12
|
+
CallbackConfig
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, webhook_type=None, webhook_list=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize CallbackConfig instance.
|
|
18
|
+
|
|
19
|
+
:param webhook_type: 回调类型,weCom:企业微信,dingTalk:钉钉,lark:飞书,custom:自定义webhook
|
|
20
|
+
:type webhook_type: str (optional)
|
|
21
|
+
|
|
22
|
+
:param webhook_list: webhook配置详情列表
|
|
23
|
+
:type webhook_list: List[WebhookDetail] (optional)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.webhook_type = webhook_type
|
|
27
|
+
self.webhook_list = webhook_list
|
|
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.webhook_type is not None:
|
|
43
|
+
result['webhookType'] = self.webhook_type
|
|
44
|
+
if self.webhook_list is not None:
|
|
45
|
+
result['webhookList'] = [i.to_dict() for i in self.webhook_list]
|
|
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: CallbackConfig
|
|
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('webhookType') is not None:
|
|
65
|
+
self.webhook_type = m.get('webhookType')
|
|
66
|
+
if m.get('webhookList') is not None:
|
|
67
|
+
self.webhook_list = [WebhookDetail().from_dict(i) for i in m.get('webhookList')]
|
|
68
|
+
return self
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ClaimAlertEventRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ClaimAlertEventRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ClaimAlertEventRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, event_ids, claim_reason=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ClaimAlertEventRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param event_ids: 要认领的事件 ID 列表(1-100 个)
|
|
20
|
+
:type event_ids: List[str] (required)
|
|
21
|
+
|
|
22
|
+
:param claim_reason: 认领原因(最大 500 字符)
|
|
23
|
+
:type claim_reason: str (optional)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.event_ids = event_ids
|
|
27
|
+
self.claim_reason = claim_reason
|
|
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
|
+
if self.event_ids is not None:
|
|
43
|
+
result['eventIds'] = self.event_ids
|
|
44
|
+
if self.claim_reason is not None:
|
|
45
|
+
result['claimReason'] = self.claim_reason
|
|
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: ClaimAlertEventRequest
|
|
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('eventIds') is not None:
|
|
65
|
+
self.event_ids = m.get('eventIds')
|
|
66
|
+
if m.get('claimReason') is not None:
|
|
67
|
+
self.claim_reason = m.get('claimReason')
|
|
68
|
+
return self
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ClaimAlertEventResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_cprom.models.event_claim_detail import EventClaimDetail
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ClaimAlertEventResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ClaimAlertEventResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, success_count=None, failed_count=None, details=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ClaimAlertEventResponse response.
|
|
17
|
+
|
|
18
|
+
:param success_count: 成功认领数量
|
|
19
|
+
:type success_count: int (optional)
|
|
20
|
+
|
|
21
|
+
:param failed_count: 失败认领数量
|
|
22
|
+
:type failed_count: int (optional)
|
|
23
|
+
|
|
24
|
+
:param details: 认领详情
|
|
25
|
+
:type details: List[EventClaimDetail] (optional)
|
|
26
|
+
"""
|
|
27
|
+
super().__init__()
|
|
28
|
+
self.success_count = success_count
|
|
29
|
+
self.failed_count = failed_count
|
|
30
|
+
self.details = details
|
|
31
|
+
|
|
32
|
+
def to_dict(self):
|
|
33
|
+
"""
|
|
34
|
+
Convert the response instance to a dictionary representation.
|
|
35
|
+
|
|
36
|
+
Includes metadata from the parent BceResponse class.
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the response
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
if self.metadata is not None:
|
|
47
|
+
result['metadata'] = dict(self.metadata)
|
|
48
|
+
if self.success_count is not None:
|
|
49
|
+
result['successCount'] = self.success_count
|
|
50
|
+
if self.failed_count is not None:
|
|
51
|
+
result['failedCount'] = self.failed_count
|
|
52
|
+
if self.details is not None:
|
|
53
|
+
result['details'] = [i.to_dict() for i in self.details]
|
|
54
|
+
return result
|
|
55
|
+
|
|
56
|
+
def from_dict(self, m):
|
|
57
|
+
"""
|
|
58
|
+
Populate the response instance from a dictionary.
|
|
59
|
+
|
|
60
|
+
Nested dictionaries are recursively converted to model objects.
|
|
61
|
+
|
|
62
|
+
:param m: Dictionary containing response data
|
|
63
|
+
:type m: dict
|
|
64
|
+
|
|
65
|
+
:return: Self reference for method chaining
|
|
66
|
+
:rtype: ClaimAlertEventResponse
|
|
67
|
+
|
|
68
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
69
|
+
:raises ValueError: If nested model conversion fails
|
|
70
|
+
"""
|
|
71
|
+
m = m or dict()
|
|
72
|
+
if m.get('successCount') is not None:
|
|
73
|
+
self.success_count = m.get('successCount')
|
|
74
|
+
if m.get('failedCount') is not None:
|
|
75
|
+
self.failed_count = m.get('failedCount')
|
|
76
|
+
if m.get('details') is not None:
|
|
77
|
+
self.details = [EventClaimDetail().from_dict(i) for i in m.get('details')]
|
|
78
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ClaimCondition information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ClaimCondition(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
ClaimCondition
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, condition=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize ClaimCondition instance.
|
|
16
|
+
|
|
17
|
+
:param condition: 认领后多久未恢复
|
|
18
|
+
:type condition: int (optional)
|
|
19
|
+
"""
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.condition = condition
|
|
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.condition is not None:
|
|
37
|
+
result['condition'] = self.condition
|
|
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: ClaimCondition
|
|
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('condition') is not None:
|
|
57
|
+
self.condition = m.get('condition')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ClaimedInfo information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ClaimedInfo(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
ClaimedInfo
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, is_claimed=None, user_name=None, claim_time=None, claim_reason=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize ClaimedInfo instance.
|
|
16
|
+
|
|
17
|
+
:param is_claimed: 是否认领
|
|
18
|
+
:type is_claimed: bool (optional)
|
|
19
|
+
|
|
20
|
+
:param user_name: 认领人用户名
|
|
21
|
+
:type user_name: str (optional)
|
|
22
|
+
|
|
23
|
+
:param claim_time: 认领时间(Unix 时间戳,秒)
|
|
24
|
+
:type claim_time: int (optional)
|
|
25
|
+
|
|
26
|
+
:param claim_reason: 认领原因
|
|
27
|
+
:type claim_reason: str (optional)
|
|
28
|
+
"""
|
|
29
|
+
super().__init__()
|
|
30
|
+
self.is_claimed = is_claimed
|
|
31
|
+
self.user_name = user_name
|
|
32
|
+
self.claim_time = claim_time
|
|
33
|
+
self.claim_reason = claim_reason
|
|
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.is_claimed is not None:
|
|
49
|
+
result['isClaimed'] = self.is_claimed
|
|
50
|
+
if self.user_name is not None:
|
|
51
|
+
result['userName'] = self.user_name
|
|
52
|
+
if self.claim_time is not None:
|
|
53
|
+
result['claimTime'] = self.claim_time
|
|
54
|
+
if self.claim_reason is not None:
|
|
55
|
+
result['claimReason'] = self.claim_reason
|
|
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: ClaimedInfo
|
|
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('isClaimed') is not None:
|
|
75
|
+
self.is_claimed = m.get('isClaimed')
|
|
76
|
+
if m.get('userName') is not None:
|
|
77
|
+
self.user_name = m.get('userName')
|
|
78
|
+
if m.get('claimTime') is not None:
|
|
79
|
+
self.claim_time = m.get('claimTime')
|
|
80
|
+
if m.get('claimReason') is not None:
|
|
81
|
+
self.claim_reason = m.get('claimReason')
|
|
82
|
+
return self
|