huaweicloudsdkcae 3.1.160__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.
Potentially problematic release.
This version of huaweicloudsdkcae might be problematic. Click here for more details.
- huaweicloudsdkcae/__init__.py +0 -0
- huaweicloudsdkcae/v1/__init__.py +256 -0
- huaweicloudsdkcae/v1/cae_async_client.py +3941 -0
- huaweicloudsdkcae/v1/cae_client.py +3938 -0
- huaweicloudsdkcae/v1/model/__init__.py +253 -0
- huaweicloudsdkcae/v1/model/access.py +144 -0
- huaweicloudsdkcae/v1/model/access_configuration_data_items.py +368 -0
- huaweicloudsdkcae/v1/model/access_configuration_http_path.py +173 -0
- huaweicloudsdkcae/v1/model/access_configuration_metadata.py +115 -0
- huaweicloudsdkcae/v1/model/access_configuration_port.py +372 -0
- huaweicloudsdkcae/v1/model/access_control.py +144 -0
- huaweicloudsdkcae/v1/model/action_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/action_on_component_build.py +140 -0
- huaweicloudsdkcae/v1/model/action_on_component_source.py +198 -0
- huaweicloudsdkcae/v1/model/action_on_component_spec.py +219 -0
- huaweicloudsdkcae/v1/model/agency.py +158 -0
- huaweicloudsdkcae/v1/model/agency_item.py +115 -0
- huaweicloudsdkcae/v1/model/agency_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/agency_metadata.py +139 -0
- huaweicloudsdkcae/v1/model/api_version_obj.py +87 -0
- huaweicloudsdkcae/v1/model/app_info.py +144 -0
- huaweicloudsdkcae/v1/model/application_item.py +202 -0
- huaweicloudsdkcae/v1/model/application_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/application_metadata.py +202 -0
- huaweicloudsdkcae/v1/model/archive.py +115 -0
- huaweicloudsdkcae/v1/model/build.py +138 -0
- huaweicloudsdkcae/v1/model/cert_item.py +136 -0
- huaweicloudsdkcae/v1/model/cert_req.py +182 -0
- huaweicloudsdkcae/v1/model/certificate_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/cloud_storage_log_path_info.py +144 -0
- huaweicloudsdkcae/v1/model/component_configuration_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/component_execution_result.py +202 -0
- huaweicloudsdkcae/v1/model/component_info.py +144 -0
- huaweicloudsdkcae/v1/model/component_item.py +256 -0
- huaweicloudsdkcae/v1/model/component_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/component_snapshot_context.py +724 -0
- huaweicloudsdkcae/v1/model/component_snapshot_item.py +227 -0
- huaweicloudsdkcae/v1/model/component_snapshot_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/component_spec.py +480 -0
- huaweicloudsdkcae/v1/model/configuration.py +256 -0
- huaweicloudsdkcae/v1/model/configuration_data.py +136 -0
- huaweicloudsdkcae/v1/model/configuration_data_metadata.py +115 -0
- huaweicloudsdkcae/v1/model/configuration_item.py +138 -0
- huaweicloudsdkcae/v1/model/configuration_request_data_spec.py +903 -0
- huaweicloudsdkcae/v1/model/configuration_request_data_spec_post_start.py +111 -0
- huaweicloudsdkcae/v1/model/configuration_request_data_spec_pre_stop.py +111 -0
- huaweicloudsdkcae/v1/model/configuration_response_data_spec.py +1193 -0
- huaweicloudsdkcae/v1/model/configuration_response_data_spec_post_start.py +111 -0
- huaweicloudsdkcae/v1/model/configuration_response_data_spec_pre_stop.py +111 -0
- huaweicloudsdkcae/v1/model/create_agency_request.py +111 -0
- huaweicloudsdkcae/v1/model/create_agency_response.py +85 -0
- huaweicloudsdkcae/v1/model/create_application_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_application_request_body.py +158 -0
- huaweicloudsdkcae/v1/model/create_application_request_body_metadata.py +114 -0
- huaweicloudsdkcae/v1/model/create_application_response.py +162 -0
- huaweicloudsdkcae/v1/model/create_certificate_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_certificate_response.py +166 -0
- huaweicloudsdkcae/v1/model/create_component_configuration_request.py +224 -0
- huaweicloudsdkcae/v1/model/create_component_configuration_request_body.py +162 -0
- huaweicloudsdkcae/v1/model/create_component_configuration_response.py +85 -0
- huaweicloudsdkcae/v1/model/create_component_request.py +196 -0
- huaweicloudsdkcae/v1/model/create_component_request_body.py +182 -0
- huaweicloudsdkcae/v1/model/create_component_response.py +187 -0
- huaweicloudsdkcae/v1/model/create_component_spec.py +306 -0
- huaweicloudsdkcae/v1/model/create_component_with_configuration_request.py +196 -0
- huaweicloudsdkcae/v1/model/create_component_with_configuration_request_body.py +213 -0
- huaweicloudsdkcae/v1/model/create_component_with_configuration_request_body_metadata.py +142 -0
- huaweicloudsdkcae/v1/model/create_component_with_configuration_request_body_spec.py +244 -0
- huaweicloudsdkcae/v1/model/create_component_with_configuration_response.py +241 -0
- huaweicloudsdkcae/v1/model/create_component_with_configuration_response_body_status.py +115 -0
- huaweicloudsdkcae/v1/model/create_domain_req.py +158 -0
- huaweicloudsdkcae/v1/model/create_domain_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_domain_response.py +170 -0
- huaweicloudsdkcae/v1/model/create_environment_request.py +140 -0
- huaweicloudsdkcae/v1/model/create_environment_request_body.py +158 -0
- huaweicloudsdkcae/v1/model/create_environment_request_body_metadata.py +143 -0
- huaweicloudsdkcae/v1/model/create_environment_response.py +116 -0
- huaweicloudsdkcae/v1/model/create_meta_cert.py +114 -0
- huaweicloudsdkcae/v1/model/create_meta_domain.py +114 -0
- huaweicloudsdkcae/v1/model/create_monitor_system_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_monitor_system_response.py +85 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_item.py +244 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_req.py +166 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_request.py +140 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_resp_item.py +277 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_response.py +170 -0
- huaweicloudsdkcae/v1/model/create_or_update_secret_detail.py +142 -0
- huaweicloudsdkcae/v1/model/create_or_update_secret_req.py +166 -0
- huaweicloudsdkcae/v1/model/create_secret_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_secret_response.py +170 -0
- huaweicloudsdkcae/v1/model/create_spec_cert.py +142 -0
- huaweicloudsdkcae/v1/model/create_timer_rule_req.py +161 -0
- huaweicloudsdkcae/v1/model/create_timer_rule_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_timer_rule_response.py +162 -0
- huaweicloudsdkcae/v1/model/create_volume_req.py +158 -0
- huaweicloudsdkcae/v1/model/create_volume_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_volume_response.py +85 -0
- huaweicloudsdkcae/v1/model/create_vpc_egress_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_vpc_egress_response.py +162 -0
- huaweicloudsdkcae/v1/model/cron_trigger_scheduler.py +144 -0
- huaweicloudsdkcae/v1/model/delete_application_request.py +171 -0
- huaweicloudsdkcae/v1/model/delete_application_response.py +85 -0
- huaweicloudsdkcae/v1/model/delete_certificate_request.py +171 -0
- huaweicloudsdkcae/v1/model/delete_certificate_response.py +85 -0
- huaweicloudsdkcae/v1/model/delete_component_configuration_request.py +199 -0
- huaweicloudsdkcae/v1/model/delete_component_configuration_response.py +85 -0
- huaweicloudsdkcae/v1/model/delete_component_request.py +199 -0
- huaweicloudsdkcae/v1/model/delete_component_response.py +116 -0
- huaweicloudsdkcae/v1/model/delete_domain_request.py +171 -0
- huaweicloudsdkcae/v1/model/delete_domain_response.py +85 -0
- huaweicloudsdkcae/v1/model/delete_environment_request.py +143 -0
- huaweicloudsdkcae/v1/model/delete_environment_response.py +116 -0
- huaweicloudsdkcae/v1/model/delete_notice_rule_request.py +139 -0
- huaweicloudsdkcae/v1/model/delete_notice_rule_response.py +112 -0
- huaweicloudsdkcae/v1/model/delete_secret_request.py +143 -0
- huaweicloudsdkcae/v1/model/delete_secret_response.py +85 -0
- huaweicloudsdkcae/v1/model/delete_timer_rule_request.py +171 -0
- huaweicloudsdkcae/v1/model/delete_timer_rule_response.py +85 -0
- huaweicloudsdkcae/v1/model/delete_volume_request.py +171 -0
- huaweicloudsdkcae/v1/model/delete_volume_response.py +166 -0
- huaweicloudsdkcae/v1/model/delete_vpc_egress_request.py +171 -0
- huaweicloudsdkcae/v1/model/delete_vpc_egress_response.py +85 -0
- huaweicloudsdkcae/v1/model/domain_item.py +111 -0
- huaweicloudsdkcae/v1/model/domain_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/egress_cidr.py +171 -0
- huaweicloudsdkcae/v1/model/eip_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/environment_item.py +289 -0
- huaweicloudsdkcae/v1/model/environment_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/execute_action_request.py +224 -0
- huaweicloudsdkcae/v1/model/execute_action_request_body.py +184 -0
- huaweicloudsdkcae/v1/model/execute_action_request_body_metadata.py +143 -0
- huaweicloudsdkcae/v1/model/execute_action_response.py +116 -0
- huaweicloudsdkcae/v1/model/execution_details.py +144 -0
- huaweicloudsdkcae/v1/model/health_check_configuration_exec.py +115 -0
- huaweicloudsdkcae/v1/model/health_check_configuration_http_get.py +173 -0
- huaweicloudsdkcae/v1/model/health_check_configuration_liveness_probe.py +306 -0
- huaweicloudsdkcae/v1/model/health_check_configuration_readiness_probe.py +306 -0
- huaweicloudsdkcae/v1/model/health_check_configuration_startup_probe.py +306 -0
- huaweicloudsdkcae/v1/model/health_check_configuration_tcp_socket.py +115 -0
- huaweicloudsdkcae/v1/model/instance.py +173 -0
- huaweicloudsdkcae/v1/model/job_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/job_spec.py +173 -0
- huaweicloudsdkcae/v1/model/life_cycle_configuration_exec.py +115 -0
- huaweicloudsdkcae/v1/model/list_agencies_request.py +84 -0
- huaweicloudsdkcae/v1/model/list_agencies_response.py +166 -0
- huaweicloudsdkcae/v1/model/list_applications_request.py +143 -0
- huaweicloudsdkcae/v1/model/list_applications_response.py +166 -0
- huaweicloudsdkcae/v1/model/list_certificates_request.py +143 -0
- huaweicloudsdkcae/v1/model/list_certificates_response.py +166 -0
- huaweicloudsdkcae/v1/model/list_component_configurations_request.py +228 -0
- huaweicloudsdkcae/v1/model/list_component_configurations_response.py +174 -0
- huaweicloudsdkcae/v1/model/list_component_configurations_response_data.py +136 -0
- huaweicloudsdkcae/v1/model/list_component_instances_request.py +199 -0
- huaweicloudsdkcae/v1/model/list_component_instances_response.py +166 -0
- huaweicloudsdkcae/v1/model/list_component_snapshots_request.py +199 -0
- huaweicloudsdkcae/v1/model/list_component_snapshots_response.py +166 -0
- huaweicloudsdkcae/v1/model/list_components_request.py +287 -0
- huaweicloudsdkcae/v1/model/list_components_response.py +195 -0
- huaweicloudsdkcae/v1/model/list_domains_request.py +143 -0
- huaweicloudsdkcae/v1/model/list_domains_response.py +170 -0
- huaweicloudsdkcae/v1/model/list_effective_components_request.py +143 -0
- huaweicloudsdkcae/v1/model/list_effective_components_response.py +174 -0
- huaweicloudsdkcae/v1/model/list_eip_response_body_spec.py +136 -0
- huaweicloudsdkcae/v1/model/list_eip_response_body_spec_egress.py +173 -0
- huaweicloudsdkcae/v1/model/list_eip_response_body_spec_ingress.py +173 -0
- huaweicloudsdkcae/v1/model/list_eips_request.py +143 -0
- huaweicloudsdkcae/v1/model/list_eips_response.py +162 -0
- huaweicloudsdkcae/v1/model/list_environments_request.py +115 -0
- huaweicloudsdkcae/v1/model/list_environments_response.py +166 -0
- huaweicloudsdkcae/v1/model/list_notice_rules_request.py +115 -0
- huaweicloudsdkcae/v1/model/list_notice_rules_response.py +174 -0
- huaweicloudsdkcae/v1/model/list_secrets_request.py +115 -0
- huaweicloudsdkcae/v1/model/list_secrets_response.py +174 -0
- huaweicloudsdkcae/v1/model/list_timer_rules_request.py +143 -0
- huaweicloudsdkcae/v1/model/list_timer_rules_response.py +162 -0
- huaweicloudsdkcae/v1/model/list_volumes_request.py +171 -0
- huaweicloudsdkcae/v1/model/list_volumes_response.py +166 -0
- huaweicloudsdkcae/v1/model/list_vpc_egress_request.py +143 -0
- huaweicloudsdkcae/v1/model/list_vpc_egress_response.py +162 -0
- huaweicloudsdkcae/v1/model/meta_cert.py +144 -0
- huaweicloudsdkcae/v1/model/meta_domain.py +173 -0
- huaweicloudsdkcae/v1/model/metadata_response.py +231 -0
- huaweicloudsdkcae/v1/model/monitor_system_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/monitor_system_request_body.py +161 -0
- huaweicloudsdkcae/v1/model/monitor_system_request_body_spec.py +313 -0
- huaweicloudsdkcae/v1/model/mount_component.py +260 -0
- huaweicloudsdkcae/v1/model/notice_rule_notification.py +171 -0
- huaweicloudsdkcae/v1/model/notice_rule_scope.py +201 -0
- huaweicloudsdkcae/v1/model/repo.py +173 -0
- huaweicloudsdkcae/v1/model/resource_limit.py +142 -0
- huaweicloudsdkcae/v1/model/resource_limit_for_upgrade.py +144 -0
- huaweicloudsdkcae/v1/model/resources_credential.py +144 -0
- huaweicloudsdkcae/v1/model/retry_job_request.py +171 -0
- huaweicloudsdkcae/v1/model/retry_job_response.py +85 -0
- huaweicloudsdkcae/v1/model/scale_configuration_data_advanced.py +231 -0
- huaweicloudsdkcae/v1/model/scale_configuration_data_trigger.py +140 -0
- huaweicloudsdkcae/v1/model/scaling_trigger_meta.py +202 -0
- huaweicloudsdkcae/v1/model/secret_detail.py +283 -0
- huaweicloudsdkcae/v1/model/show_application_request.py +171 -0
- huaweicloudsdkcae/v1/model/show_application_response.py +162 -0
- huaweicloudsdkcae/v1/model/show_component_request.py +199 -0
- huaweicloudsdkcae/v1/model/show_component_response.py +187 -0
- huaweicloudsdkcae/v1/model/show_execution_result_request.py +171 -0
- huaweicloudsdkcae/v1/model/show_execution_result_response.py +162 -0
- huaweicloudsdkcae/v1/model/show_job_request.py +171 -0
- huaweicloudsdkcae/v1/model/show_job_response.py +162 -0
- huaweicloudsdkcae/v1/model/show_monitor_system_request.py +143 -0
- huaweicloudsdkcae/v1/model/show_monitor_system_response.py +162 -0
- huaweicloudsdkcae/v1/model/show_monitor_system_response_body_spec.py +434 -0
- huaweicloudsdkcae/v1/model/show_notice_rule_request.py +139 -0
- huaweicloudsdkcae/v1/model/show_notice_rule_response.py +170 -0
- huaweicloudsdkcae/v1/model/source.py +196 -0
- huaweicloudsdkcae/v1/model/spec_cert.py +173 -0
- huaweicloudsdkcae/v1/model/task.py +260 -0
- huaweicloudsdkcae/v1/model/time_rule_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/timer_rule_details.py +434 -0
- huaweicloudsdkcae/v1/model/trigger_policy.py +201 -0
- huaweicloudsdkcae/v1/model/update_cert_req.py +158 -0
- huaweicloudsdkcae/v1/model/update_certificate_request.py +196 -0
- huaweicloudsdkcae/v1/model/update_certificate_response.py +85 -0
- huaweicloudsdkcae/v1/model/update_component_request.py +224 -0
- huaweicloudsdkcae/v1/model/update_component_request_body.py +182 -0
- huaweicloudsdkcae/v1/model/update_component_request_metadata.py +143 -0
- huaweicloudsdkcae/v1/model/update_component_request_spec.py +218 -0
- huaweicloudsdkcae/v1/model/update_component_response.py +85 -0
- huaweicloudsdkcae/v1/model/update_eip_request.py +168 -0
- huaweicloudsdkcae/v1/model/update_eip_request_body.py +161 -0
- huaweicloudsdkcae/v1/model/update_eip_request_body_spec.py +136 -0
- huaweicloudsdkcae/v1/model/update_eip_request_body_spec_egress.py +144 -0
- huaweicloudsdkcae/v1/model/update_eip_request_body_spec_ingress.py +144 -0
- huaweicloudsdkcae/v1/model/update_eip_response.py +85 -0
- huaweicloudsdkcae/v1/model/update_monitor_system_request.py +196 -0
- huaweicloudsdkcae/v1/model/update_monitor_system_response.py +85 -0
- huaweicloudsdkcae/v1/model/update_notice_rule_item.py +192 -0
- huaweicloudsdkcae/v1/model/update_notice_rule_req.py +166 -0
- huaweicloudsdkcae/v1/model/update_notice_rule_request.py +164 -0
- huaweicloudsdkcae/v1/model/update_notice_rule_response.py +170 -0
- huaweicloudsdkcae/v1/model/update_secret_request.py +168 -0
- huaweicloudsdkcae/v1/model/update_secret_response.py +170 -0
- huaweicloudsdkcae/v1/model/update_spec_cert.py +142 -0
- huaweicloudsdkcae/v1/model/update_timer_rule_details.py +312 -0
- huaweicloudsdkcae/v1/model/update_timer_rule_req.py +158 -0
- huaweicloudsdkcae/v1/model/update_timer_rule_request.py +196 -0
- huaweicloudsdkcae/v1/model/update_timer_rule_response.py +85 -0
- huaweicloudsdkcae/v1/model/volume.py +289 -0
- huaweicloudsdkcae/v1/model/volume_configuration_data_volume.py +256 -0
- huaweicloudsdkcae/v1/model/volume_configuration_mount_info.py +173 -0
- huaweicloudsdkcae/v1/model/volume_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/volume_spec.py +199 -0
- huaweicloudsdkcae/v1/model/vpc_egress_kind_obj.py +87 -0
- huaweicloudsdkcae/v1/model/vpc_egress_request_body.py +161 -0
- huaweicloudsdkcae/v1/model/vpc_egress_request_body_spec.py +114 -0
- huaweicloudsdkcae/v1/model/vpc_egress_response_body_spec.py +173 -0
- huaweicloudsdkcae/v1/region/__init__.py +0 -0
- huaweicloudsdkcae/v1/region/cae_region.py +60 -0
- huaweicloudsdkcae-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkcae-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkcae-3.1.160.dist-info/RECORD +260 -0
- huaweicloudsdkcae-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkcae-3.1.160.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TimerRuleDetails:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'id': 'str',
|
|
21
|
+
'name': 'str',
|
|
22
|
+
'type': 'str',
|
|
23
|
+
'status': 'str',
|
|
24
|
+
'env_id': 'str',
|
|
25
|
+
'apps': 'list[AppInfo]',
|
|
26
|
+
'components': 'list[ComponentInfo]',
|
|
27
|
+
'component_number': 'int',
|
|
28
|
+
'cron': 'str',
|
|
29
|
+
'effective_range': 'str',
|
|
30
|
+
'effective_policy': 'str',
|
|
31
|
+
'last_execution_status': 'str'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
attribute_map = {
|
|
35
|
+
'id': 'id',
|
|
36
|
+
'name': 'name',
|
|
37
|
+
'type': 'type',
|
|
38
|
+
'status': 'status',
|
|
39
|
+
'env_id': 'env_id',
|
|
40
|
+
'apps': 'apps',
|
|
41
|
+
'components': 'components',
|
|
42
|
+
'component_number': 'component_number',
|
|
43
|
+
'cron': 'cron',
|
|
44
|
+
'effective_range': 'effective_range',
|
|
45
|
+
'effective_policy': 'effective_policy',
|
|
46
|
+
'last_execution_status': 'last_execution_status'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def __init__(self, id=None, name=None, type=None, status=None, env_id=None, apps=None, components=None, component_number=None, cron=None, effective_range=None, effective_policy=None, last_execution_status=None):
|
|
50
|
+
r"""TimerRuleDetails
|
|
51
|
+
|
|
52
|
+
The model defined in huaweicloud sdk
|
|
53
|
+
|
|
54
|
+
:param id: 定时启停规则ID,在创建定时启停规则时会忽略。
|
|
55
|
+
:type id: str
|
|
56
|
+
:param name: 定时启停规则名称。
|
|
57
|
+
:type name: str
|
|
58
|
+
:param type: 定时启停规则的类型:stop/start。
|
|
59
|
+
:type type: str
|
|
60
|
+
:param status: 定时启停规则状态(是否开启):on/off。
|
|
61
|
+
:type status: str
|
|
62
|
+
:param env_id: 环境ID。
|
|
63
|
+
:type env_id: str
|
|
64
|
+
:param apps: 定时启停规则所包含的所有应用,只在生效范围为application的时候需要填写。
|
|
65
|
+
:type apps: list[:class:`huaweicloudsdkcae.v1.AppInfo`]
|
|
66
|
+
:param components: 在定时启停规则所包含的所有组件,只在生效范围为component的时候需要填写。
|
|
67
|
+
:type components: list[:class:`huaweicloudsdkcae.v1.ComponentInfo`]
|
|
68
|
+
:param component_number: 定时启停规则包含的组件个数,在创建定时启停规则时会忽略。
|
|
69
|
+
:type component_number: int
|
|
70
|
+
:param cron: cron表达式。
|
|
71
|
+
:type cron: str
|
|
72
|
+
:param effective_range: 定时启停规则生效范围: component/application/environment。
|
|
73
|
+
:type effective_range: str
|
|
74
|
+
:param effective_policy: 定时启停规则的定时类别: onetime/periodic。
|
|
75
|
+
:type effective_policy: str
|
|
76
|
+
:param last_execution_status: 上次执行的状态:abnormal/normal/executing,在创建定时启停规则时会忽略。
|
|
77
|
+
:type last_execution_status: str
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
self._id = None
|
|
83
|
+
self._name = None
|
|
84
|
+
self._type = None
|
|
85
|
+
self._status = None
|
|
86
|
+
self._env_id = None
|
|
87
|
+
self._apps = None
|
|
88
|
+
self._components = None
|
|
89
|
+
self._component_number = None
|
|
90
|
+
self._cron = None
|
|
91
|
+
self._effective_range = None
|
|
92
|
+
self._effective_policy = None
|
|
93
|
+
self._last_execution_status = None
|
|
94
|
+
self.discriminator = None
|
|
95
|
+
|
|
96
|
+
if id is not None:
|
|
97
|
+
self.id = id
|
|
98
|
+
if name is not None:
|
|
99
|
+
self.name = name
|
|
100
|
+
if type is not None:
|
|
101
|
+
self.type = type
|
|
102
|
+
if status is not None:
|
|
103
|
+
self.status = status
|
|
104
|
+
if env_id is not None:
|
|
105
|
+
self.env_id = env_id
|
|
106
|
+
if apps is not None:
|
|
107
|
+
self.apps = apps
|
|
108
|
+
if components is not None:
|
|
109
|
+
self.components = components
|
|
110
|
+
if component_number is not None:
|
|
111
|
+
self.component_number = component_number
|
|
112
|
+
if cron is not None:
|
|
113
|
+
self.cron = cron
|
|
114
|
+
if effective_range is not None:
|
|
115
|
+
self.effective_range = effective_range
|
|
116
|
+
if effective_policy is not None:
|
|
117
|
+
self.effective_policy = effective_policy
|
|
118
|
+
if last_execution_status is not None:
|
|
119
|
+
self.last_execution_status = last_execution_status
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def id(self):
|
|
123
|
+
r"""Gets the id of this TimerRuleDetails.
|
|
124
|
+
|
|
125
|
+
定时启停规则ID,在创建定时启停规则时会忽略。
|
|
126
|
+
|
|
127
|
+
:return: The id of this TimerRuleDetails.
|
|
128
|
+
:rtype: str
|
|
129
|
+
"""
|
|
130
|
+
return self._id
|
|
131
|
+
|
|
132
|
+
@id.setter
|
|
133
|
+
def id(self, id):
|
|
134
|
+
r"""Sets the id of this TimerRuleDetails.
|
|
135
|
+
|
|
136
|
+
定时启停规则ID,在创建定时启停规则时会忽略。
|
|
137
|
+
|
|
138
|
+
:param id: The id of this TimerRuleDetails.
|
|
139
|
+
:type id: str
|
|
140
|
+
"""
|
|
141
|
+
self._id = id
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def name(self):
|
|
145
|
+
r"""Gets the name of this TimerRuleDetails.
|
|
146
|
+
|
|
147
|
+
定时启停规则名称。
|
|
148
|
+
|
|
149
|
+
:return: The name of this TimerRuleDetails.
|
|
150
|
+
:rtype: str
|
|
151
|
+
"""
|
|
152
|
+
return self._name
|
|
153
|
+
|
|
154
|
+
@name.setter
|
|
155
|
+
def name(self, name):
|
|
156
|
+
r"""Sets the name of this TimerRuleDetails.
|
|
157
|
+
|
|
158
|
+
定时启停规则名称。
|
|
159
|
+
|
|
160
|
+
:param name: The name of this TimerRuleDetails.
|
|
161
|
+
:type name: str
|
|
162
|
+
"""
|
|
163
|
+
self._name = name
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def type(self):
|
|
167
|
+
r"""Gets the type of this TimerRuleDetails.
|
|
168
|
+
|
|
169
|
+
定时启停规则的类型:stop/start。
|
|
170
|
+
|
|
171
|
+
:return: The type of this TimerRuleDetails.
|
|
172
|
+
:rtype: str
|
|
173
|
+
"""
|
|
174
|
+
return self._type
|
|
175
|
+
|
|
176
|
+
@type.setter
|
|
177
|
+
def type(self, type):
|
|
178
|
+
r"""Sets the type of this TimerRuleDetails.
|
|
179
|
+
|
|
180
|
+
定时启停规则的类型:stop/start。
|
|
181
|
+
|
|
182
|
+
:param type: The type of this TimerRuleDetails.
|
|
183
|
+
:type type: str
|
|
184
|
+
"""
|
|
185
|
+
self._type = type
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def status(self):
|
|
189
|
+
r"""Gets the status of this TimerRuleDetails.
|
|
190
|
+
|
|
191
|
+
定时启停规则状态(是否开启):on/off。
|
|
192
|
+
|
|
193
|
+
:return: The status of this TimerRuleDetails.
|
|
194
|
+
:rtype: str
|
|
195
|
+
"""
|
|
196
|
+
return self._status
|
|
197
|
+
|
|
198
|
+
@status.setter
|
|
199
|
+
def status(self, status):
|
|
200
|
+
r"""Sets the status of this TimerRuleDetails.
|
|
201
|
+
|
|
202
|
+
定时启停规则状态(是否开启):on/off。
|
|
203
|
+
|
|
204
|
+
:param status: The status of this TimerRuleDetails.
|
|
205
|
+
:type status: str
|
|
206
|
+
"""
|
|
207
|
+
self._status = status
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def env_id(self):
|
|
211
|
+
r"""Gets the env_id of this TimerRuleDetails.
|
|
212
|
+
|
|
213
|
+
环境ID。
|
|
214
|
+
|
|
215
|
+
:return: The env_id of this TimerRuleDetails.
|
|
216
|
+
:rtype: str
|
|
217
|
+
"""
|
|
218
|
+
return self._env_id
|
|
219
|
+
|
|
220
|
+
@env_id.setter
|
|
221
|
+
def env_id(self, env_id):
|
|
222
|
+
r"""Sets the env_id of this TimerRuleDetails.
|
|
223
|
+
|
|
224
|
+
环境ID。
|
|
225
|
+
|
|
226
|
+
:param env_id: The env_id of this TimerRuleDetails.
|
|
227
|
+
:type env_id: str
|
|
228
|
+
"""
|
|
229
|
+
self._env_id = env_id
|
|
230
|
+
|
|
231
|
+
@property
|
|
232
|
+
def apps(self):
|
|
233
|
+
r"""Gets the apps of this TimerRuleDetails.
|
|
234
|
+
|
|
235
|
+
定时启停规则所包含的所有应用,只在生效范围为application的时候需要填写。
|
|
236
|
+
|
|
237
|
+
:return: The apps of this TimerRuleDetails.
|
|
238
|
+
:rtype: list[:class:`huaweicloudsdkcae.v1.AppInfo`]
|
|
239
|
+
"""
|
|
240
|
+
return self._apps
|
|
241
|
+
|
|
242
|
+
@apps.setter
|
|
243
|
+
def apps(self, apps):
|
|
244
|
+
r"""Sets the apps of this TimerRuleDetails.
|
|
245
|
+
|
|
246
|
+
定时启停规则所包含的所有应用,只在生效范围为application的时候需要填写。
|
|
247
|
+
|
|
248
|
+
:param apps: The apps of this TimerRuleDetails.
|
|
249
|
+
:type apps: list[:class:`huaweicloudsdkcae.v1.AppInfo`]
|
|
250
|
+
"""
|
|
251
|
+
self._apps = apps
|
|
252
|
+
|
|
253
|
+
@property
|
|
254
|
+
def components(self):
|
|
255
|
+
r"""Gets the components of this TimerRuleDetails.
|
|
256
|
+
|
|
257
|
+
在定时启停规则所包含的所有组件,只在生效范围为component的时候需要填写。
|
|
258
|
+
|
|
259
|
+
:return: The components of this TimerRuleDetails.
|
|
260
|
+
:rtype: list[:class:`huaweicloudsdkcae.v1.ComponentInfo`]
|
|
261
|
+
"""
|
|
262
|
+
return self._components
|
|
263
|
+
|
|
264
|
+
@components.setter
|
|
265
|
+
def components(self, components):
|
|
266
|
+
r"""Sets the components of this TimerRuleDetails.
|
|
267
|
+
|
|
268
|
+
在定时启停规则所包含的所有组件,只在生效范围为component的时候需要填写。
|
|
269
|
+
|
|
270
|
+
:param components: The components of this TimerRuleDetails.
|
|
271
|
+
:type components: list[:class:`huaweicloudsdkcae.v1.ComponentInfo`]
|
|
272
|
+
"""
|
|
273
|
+
self._components = components
|
|
274
|
+
|
|
275
|
+
@property
|
|
276
|
+
def component_number(self):
|
|
277
|
+
r"""Gets the component_number of this TimerRuleDetails.
|
|
278
|
+
|
|
279
|
+
定时启停规则包含的组件个数,在创建定时启停规则时会忽略。
|
|
280
|
+
|
|
281
|
+
:return: The component_number of this TimerRuleDetails.
|
|
282
|
+
:rtype: int
|
|
283
|
+
"""
|
|
284
|
+
return self._component_number
|
|
285
|
+
|
|
286
|
+
@component_number.setter
|
|
287
|
+
def component_number(self, component_number):
|
|
288
|
+
r"""Sets the component_number of this TimerRuleDetails.
|
|
289
|
+
|
|
290
|
+
定时启停规则包含的组件个数,在创建定时启停规则时会忽略。
|
|
291
|
+
|
|
292
|
+
:param component_number: The component_number of this TimerRuleDetails.
|
|
293
|
+
:type component_number: int
|
|
294
|
+
"""
|
|
295
|
+
self._component_number = component_number
|
|
296
|
+
|
|
297
|
+
@property
|
|
298
|
+
def cron(self):
|
|
299
|
+
r"""Gets the cron of this TimerRuleDetails.
|
|
300
|
+
|
|
301
|
+
cron表达式。
|
|
302
|
+
|
|
303
|
+
:return: The cron of this TimerRuleDetails.
|
|
304
|
+
:rtype: str
|
|
305
|
+
"""
|
|
306
|
+
return self._cron
|
|
307
|
+
|
|
308
|
+
@cron.setter
|
|
309
|
+
def cron(self, cron):
|
|
310
|
+
r"""Sets the cron of this TimerRuleDetails.
|
|
311
|
+
|
|
312
|
+
cron表达式。
|
|
313
|
+
|
|
314
|
+
:param cron: The cron of this TimerRuleDetails.
|
|
315
|
+
:type cron: str
|
|
316
|
+
"""
|
|
317
|
+
self._cron = cron
|
|
318
|
+
|
|
319
|
+
@property
|
|
320
|
+
def effective_range(self):
|
|
321
|
+
r"""Gets the effective_range of this TimerRuleDetails.
|
|
322
|
+
|
|
323
|
+
定时启停规则生效范围: component/application/environment。
|
|
324
|
+
|
|
325
|
+
:return: The effective_range of this TimerRuleDetails.
|
|
326
|
+
:rtype: str
|
|
327
|
+
"""
|
|
328
|
+
return self._effective_range
|
|
329
|
+
|
|
330
|
+
@effective_range.setter
|
|
331
|
+
def effective_range(self, effective_range):
|
|
332
|
+
r"""Sets the effective_range of this TimerRuleDetails.
|
|
333
|
+
|
|
334
|
+
定时启停规则生效范围: component/application/environment。
|
|
335
|
+
|
|
336
|
+
:param effective_range: The effective_range of this TimerRuleDetails.
|
|
337
|
+
:type effective_range: str
|
|
338
|
+
"""
|
|
339
|
+
self._effective_range = effective_range
|
|
340
|
+
|
|
341
|
+
@property
|
|
342
|
+
def effective_policy(self):
|
|
343
|
+
r"""Gets the effective_policy of this TimerRuleDetails.
|
|
344
|
+
|
|
345
|
+
定时启停规则的定时类别: onetime/periodic。
|
|
346
|
+
|
|
347
|
+
:return: The effective_policy of this TimerRuleDetails.
|
|
348
|
+
:rtype: str
|
|
349
|
+
"""
|
|
350
|
+
return self._effective_policy
|
|
351
|
+
|
|
352
|
+
@effective_policy.setter
|
|
353
|
+
def effective_policy(self, effective_policy):
|
|
354
|
+
r"""Sets the effective_policy of this TimerRuleDetails.
|
|
355
|
+
|
|
356
|
+
定时启停规则的定时类别: onetime/periodic。
|
|
357
|
+
|
|
358
|
+
:param effective_policy: The effective_policy of this TimerRuleDetails.
|
|
359
|
+
:type effective_policy: str
|
|
360
|
+
"""
|
|
361
|
+
self._effective_policy = effective_policy
|
|
362
|
+
|
|
363
|
+
@property
|
|
364
|
+
def last_execution_status(self):
|
|
365
|
+
r"""Gets the last_execution_status of this TimerRuleDetails.
|
|
366
|
+
|
|
367
|
+
上次执行的状态:abnormal/normal/executing,在创建定时启停规则时会忽略。
|
|
368
|
+
|
|
369
|
+
:return: The last_execution_status of this TimerRuleDetails.
|
|
370
|
+
:rtype: str
|
|
371
|
+
"""
|
|
372
|
+
return self._last_execution_status
|
|
373
|
+
|
|
374
|
+
@last_execution_status.setter
|
|
375
|
+
def last_execution_status(self, last_execution_status):
|
|
376
|
+
r"""Sets the last_execution_status of this TimerRuleDetails.
|
|
377
|
+
|
|
378
|
+
上次执行的状态:abnormal/normal/executing,在创建定时启停规则时会忽略。
|
|
379
|
+
|
|
380
|
+
:param last_execution_status: The last_execution_status of this TimerRuleDetails.
|
|
381
|
+
:type last_execution_status: str
|
|
382
|
+
"""
|
|
383
|
+
self._last_execution_status = last_execution_status
|
|
384
|
+
|
|
385
|
+
def to_dict(self):
|
|
386
|
+
"""Returns the model properties as a dict"""
|
|
387
|
+
result = {}
|
|
388
|
+
|
|
389
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
390
|
+
value = getattr(self, attr)
|
|
391
|
+
if isinstance(value, list):
|
|
392
|
+
result[attr] = list(map(
|
|
393
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
394
|
+
value
|
|
395
|
+
))
|
|
396
|
+
elif hasattr(value, "to_dict"):
|
|
397
|
+
result[attr] = value.to_dict()
|
|
398
|
+
elif isinstance(value, dict):
|
|
399
|
+
result[attr] = dict(map(
|
|
400
|
+
lambda item: (item[0], item[1].to_dict())
|
|
401
|
+
if hasattr(item[1], "to_dict") else item,
|
|
402
|
+
value.items()
|
|
403
|
+
))
|
|
404
|
+
else:
|
|
405
|
+
if attr in self.sensitive_list:
|
|
406
|
+
result[attr] = "****"
|
|
407
|
+
else:
|
|
408
|
+
result[attr] = value
|
|
409
|
+
|
|
410
|
+
return result
|
|
411
|
+
|
|
412
|
+
def to_str(self):
|
|
413
|
+
"""Returns the string representation of the model"""
|
|
414
|
+
import simplejson as json
|
|
415
|
+
if six.PY2:
|
|
416
|
+
import sys
|
|
417
|
+
reload(sys)
|
|
418
|
+
sys.setdefaultencoding("utf-8")
|
|
419
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
420
|
+
|
|
421
|
+
def __repr__(self):
|
|
422
|
+
"""For `print`"""
|
|
423
|
+
return self.to_str()
|
|
424
|
+
|
|
425
|
+
def __eq__(self, other):
|
|
426
|
+
"""Returns true if both objects are equal"""
|
|
427
|
+
if not isinstance(other, TimerRuleDetails):
|
|
428
|
+
return False
|
|
429
|
+
|
|
430
|
+
return self.__dict__ == other.__dict__
|
|
431
|
+
|
|
432
|
+
def __ne__(self, other):
|
|
433
|
+
"""Returns true if both objects are not equal"""
|
|
434
|
+
return not self == other
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TriggerPolicy:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'trigger_type': 'str',
|
|
21
|
+
'period': 'int',
|
|
22
|
+
'operator': 'str',
|
|
23
|
+
'count': 'int'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
attribute_map = {
|
|
27
|
+
'trigger_type': 'trigger_type',
|
|
28
|
+
'period': 'period',
|
|
29
|
+
'operator': 'operator',
|
|
30
|
+
'count': 'count'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
def __init__(self, trigger_type=None, period=None, operator=None, count=None):
|
|
34
|
+
r"""TriggerPolicy
|
|
35
|
+
|
|
36
|
+
The model defined in huaweicloud sdk
|
|
37
|
+
|
|
38
|
+
:param trigger_type: 触发类型,accumulative: 累计触发,immediately: 立即触发。
|
|
39
|
+
:type trigger_type: str
|
|
40
|
+
:param period: 触发周期,选择累计触发时需设置该参数,默认单位为s,支持5分钟、20分钟、1小时、4小时、24小时。
|
|
41
|
+
:type period: int
|
|
42
|
+
:param operator: 比较符,支持'>'和'>='。
|
|
43
|
+
:type operator: str
|
|
44
|
+
:param count: 触发次数,选择累计触发时需设置该参数。
|
|
45
|
+
:type count: int
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
self._trigger_type = None
|
|
51
|
+
self._period = None
|
|
52
|
+
self._operator = None
|
|
53
|
+
self._count = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
|
|
56
|
+
self.trigger_type = trigger_type
|
|
57
|
+
if period is not None:
|
|
58
|
+
self.period = period
|
|
59
|
+
if operator is not None:
|
|
60
|
+
self.operator = operator
|
|
61
|
+
if count is not None:
|
|
62
|
+
self.count = count
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def trigger_type(self):
|
|
66
|
+
r"""Gets the trigger_type of this TriggerPolicy.
|
|
67
|
+
|
|
68
|
+
触发类型,accumulative: 累计触发,immediately: 立即触发。
|
|
69
|
+
|
|
70
|
+
:return: The trigger_type of this TriggerPolicy.
|
|
71
|
+
:rtype: str
|
|
72
|
+
"""
|
|
73
|
+
return self._trigger_type
|
|
74
|
+
|
|
75
|
+
@trigger_type.setter
|
|
76
|
+
def trigger_type(self, trigger_type):
|
|
77
|
+
r"""Sets the trigger_type of this TriggerPolicy.
|
|
78
|
+
|
|
79
|
+
触发类型,accumulative: 累计触发,immediately: 立即触发。
|
|
80
|
+
|
|
81
|
+
:param trigger_type: The trigger_type of this TriggerPolicy.
|
|
82
|
+
:type trigger_type: str
|
|
83
|
+
"""
|
|
84
|
+
self._trigger_type = trigger_type
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def period(self):
|
|
88
|
+
r"""Gets the period of this TriggerPolicy.
|
|
89
|
+
|
|
90
|
+
触发周期,选择累计触发时需设置该参数,默认单位为s,支持5分钟、20分钟、1小时、4小时、24小时。
|
|
91
|
+
|
|
92
|
+
:return: The period of this TriggerPolicy.
|
|
93
|
+
:rtype: int
|
|
94
|
+
"""
|
|
95
|
+
return self._period
|
|
96
|
+
|
|
97
|
+
@period.setter
|
|
98
|
+
def period(self, period):
|
|
99
|
+
r"""Sets the period of this TriggerPolicy.
|
|
100
|
+
|
|
101
|
+
触发周期,选择累计触发时需设置该参数,默认单位为s,支持5分钟、20分钟、1小时、4小时、24小时。
|
|
102
|
+
|
|
103
|
+
:param period: The period of this TriggerPolicy.
|
|
104
|
+
:type period: int
|
|
105
|
+
"""
|
|
106
|
+
self._period = period
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def operator(self):
|
|
110
|
+
r"""Gets the operator of this TriggerPolicy.
|
|
111
|
+
|
|
112
|
+
比较符,支持'>'和'>='。
|
|
113
|
+
|
|
114
|
+
:return: The operator of this TriggerPolicy.
|
|
115
|
+
:rtype: str
|
|
116
|
+
"""
|
|
117
|
+
return self._operator
|
|
118
|
+
|
|
119
|
+
@operator.setter
|
|
120
|
+
def operator(self, operator):
|
|
121
|
+
r"""Sets the operator of this TriggerPolicy.
|
|
122
|
+
|
|
123
|
+
比较符,支持'>'和'>='。
|
|
124
|
+
|
|
125
|
+
:param operator: The operator of this TriggerPolicy.
|
|
126
|
+
:type operator: str
|
|
127
|
+
"""
|
|
128
|
+
self._operator = operator
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def count(self):
|
|
132
|
+
r"""Gets the count of this TriggerPolicy.
|
|
133
|
+
|
|
134
|
+
触发次数,选择累计触发时需设置该参数。
|
|
135
|
+
|
|
136
|
+
:return: The count of this TriggerPolicy.
|
|
137
|
+
:rtype: int
|
|
138
|
+
"""
|
|
139
|
+
return self._count
|
|
140
|
+
|
|
141
|
+
@count.setter
|
|
142
|
+
def count(self, count):
|
|
143
|
+
r"""Sets the count of this TriggerPolicy.
|
|
144
|
+
|
|
145
|
+
触发次数,选择累计触发时需设置该参数。
|
|
146
|
+
|
|
147
|
+
:param count: The count of this TriggerPolicy.
|
|
148
|
+
:type count: int
|
|
149
|
+
"""
|
|
150
|
+
self._count = count
|
|
151
|
+
|
|
152
|
+
def to_dict(self):
|
|
153
|
+
"""Returns the model properties as a dict"""
|
|
154
|
+
result = {}
|
|
155
|
+
|
|
156
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
157
|
+
value = getattr(self, attr)
|
|
158
|
+
if isinstance(value, list):
|
|
159
|
+
result[attr] = list(map(
|
|
160
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
161
|
+
value
|
|
162
|
+
))
|
|
163
|
+
elif hasattr(value, "to_dict"):
|
|
164
|
+
result[attr] = value.to_dict()
|
|
165
|
+
elif isinstance(value, dict):
|
|
166
|
+
result[attr] = dict(map(
|
|
167
|
+
lambda item: (item[0], item[1].to_dict())
|
|
168
|
+
if hasattr(item[1], "to_dict") else item,
|
|
169
|
+
value.items()
|
|
170
|
+
))
|
|
171
|
+
else:
|
|
172
|
+
if attr in self.sensitive_list:
|
|
173
|
+
result[attr] = "****"
|
|
174
|
+
else:
|
|
175
|
+
result[attr] = value
|
|
176
|
+
|
|
177
|
+
return result
|
|
178
|
+
|
|
179
|
+
def to_str(self):
|
|
180
|
+
"""Returns the string representation of the model"""
|
|
181
|
+
import simplejson as json
|
|
182
|
+
if six.PY2:
|
|
183
|
+
import sys
|
|
184
|
+
reload(sys)
|
|
185
|
+
sys.setdefaultencoding("utf-8")
|
|
186
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
187
|
+
|
|
188
|
+
def __repr__(self):
|
|
189
|
+
"""For `print`"""
|
|
190
|
+
return self.to_str()
|
|
191
|
+
|
|
192
|
+
def __eq__(self, other):
|
|
193
|
+
"""Returns true if both objects are equal"""
|
|
194
|
+
if not isinstance(other, TriggerPolicy):
|
|
195
|
+
return False
|
|
196
|
+
|
|
197
|
+
return self.__dict__ == other.__dict__
|
|
198
|
+
|
|
199
|
+
def __ne__(self, other):
|
|
200
|
+
"""Returns true if both objects are not equal"""
|
|
201
|
+
return not self == other
|