huaweicloudsdkmrs 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.
- huaweicloudsdkmrs/__init__.py +0 -0
- huaweicloudsdkmrs/v1/__init__.py +87 -0
- huaweicloudsdkmrs/v1/model/__init__.py +84 -0
- huaweicloudsdkmrs/v1/model/add_jobs_req_v11.py +431 -0
- huaweicloudsdkmrs/v1/model/auto_scaling_policy.py +257 -0
- huaweicloudsdkmrs/v1/model/auto_scaling_policy_req_v11.py +138 -0
- huaweicloudsdkmrs/v1/model/available_tag.py +173 -0
- huaweicloudsdkmrs/v1/model/available_zone_v2.py +343 -0
- huaweicloudsdkmrs/v1/model/batch_create_cluster_tags_req.py +142 -0
- huaweicloudsdkmrs/v1/model/batch_create_cluster_tags_request.py +139 -0
- huaweicloudsdkmrs/v1/model/batch_create_cluster_tags_response.py +85 -0
- huaweicloudsdkmrs/v1/model/batch_delete_cluster_tags_req.py +142 -0
- huaweicloudsdkmrs/v1/model/batch_delete_cluster_tags_request.py +139 -0
- huaweicloudsdkmrs/v1/model/batch_delete_cluster_tags_response.py +85 -0
- huaweicloudsdkmrs/v1/model/bootstrap_script.py +372 -0
- huaweicloudsdkmrs/v1/model/cluster.py +2058 -0
- huaweicloudsdkmrs/v1/model/cluster_scaling_params.py +340 -0
- huaweicloudsdkmrs/v1/model/cluster_scaling_req.py +197 -0
- huaweicloudsdkmrs/v1/model/component_amb.py +202 -0
- huaweicloudsdkmrs/v1/model/component_amb_v11.py +114 -0
- huaweicloudsdkmrs/v1/model/component_external_datasource.py +144 -0
- huaweicloudsdkmrs/v1/model/create_and_execute_job_request.py +111 -0
- huaweicloudsdkmrs/v1/model/create_and_execute_job_response.py +1334 -0
- huaweicloudsdkmrs/v1/model/create_cluster_req_v11.py +1119 -0
- huaweicloudsdkmrs/v1/model/create_cluster_request.py +111 -0
- huaweicloudsdkmrs/v1/model/create_cluster_response.py +174 -0
- huaweicloudsdkmrs/v1/model/create_cluster_tag_request.py +139 -0
- huaweicloudsdkmrs/v1/model/create_cluster_tag_response.py +85 -0
- huaweicloudsdkmrs/v1/model/create_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v1/model/create_scaling_policy_response.py +116 -0
- huaweicloudsdkmrs/v1/model/create_tag_req.py +110 -0
- huaweicloudsdkmrs/v1/model/delete_cluster_request.py +114 -0
- huaweicloudsdkmrs/v1/model/delete_cluster_response.py +112 -0
- huaweicloudsdkmrs/v1/model/delete_cluster_tag_request.py +142 -0
- huaweicloudsdkmrs/v1/model/delete_cluster_tag_response.py +85 -0
- huaweicloudsdkmrs/v1/model/delete_job_execution_request.py +114 -0
- huaweicloudsdkmrs/v1/model/delete_job_execution_response.py +85 -0
- huaweicloudsdkmrs/v1/model/flavor_lists.py +173 -0
- huaweicloudsdkmrs/v1/model/host_model.py +550 -0
- huaweicloudsdkmrs/v1/model/job_exe_result.py +1011 -0
- huaweicloudsdkmrs/v1/model/list_all_tags_request.py +84 -0
- huaweicloudsdkmrs/v1/model/list_all_tags_response.py +116 -0
- huaweicloudsdkmrs/v1/model/list_available_zones_request.py +143 -0
- huaweicloudsdkmrs/v1/model/list_available_zones_response.py +174 -0
- huaweicloudsdkmrs/v1/model/list_cluster_tags_request.py +114 -0
- huaweicloudsdkmrs/v1/model/list_cluster_tags_response.py +116 -0
- huaweicloudsdkmrs/v1/model/list_clusters_by_tags_request.py +111 -0
- huaweicloudsdkmrs/v1/model/list_clusters_by_tags_response.py +145 -0
- huaweicloudsdkmrs/v1/model/list_clusters_request.py +260 -0
- huaweicloudsdkmrs/v1/model/list_clusters_response.py +145 -0
- huaweicloudsdkmrs/v1/model/list_execute_job_request.py +259 -0
- huaweicloudsdkmrs/v1/model/list_execute_job_response.py +145 -0
- huaweicloudsdkmrs/v1/model/list_hosts_request.py +172 -0
- huaweicloudsdkmrs/v1/model/list_hosts_response.py +145 -0
- huaweicloudsdkmrs/v1/model/list_resource_req.py +317 -0
- huaweicloudsdkmrs/v1/model/match.py +144 -0
- huaweicloudsdkmrs/v1/model/mrs_resource.py +202 -0
- huaweicloudsdkmrs/v1/model/node_constraint.py +376 -0
- huaweicloudsdkmrs/v1/model/node_constraints.py +315 -0
- huaweicloudsdkmrs/v1/model/node_group_v10.py +608 -0
- huaweicloudsdkmrs/v1/model/node_group_v11.py +340 -0
- huaweicloudsdkmrs/v1/model/resources_plan.py +226 -0
- huaweicloudsdkmrs/v1/model/role_deploy_meta.py +637 -0
- huaweicloudsdkmrs/v1/model/rule.py +251 -0
- huaweicloudsdkmrs/v1/model/scale_script.py +284 -0
- huaweicloudsdkmrs/v1/model/show_cluster_details_request.py +114 -0
- huaweicloudsdkmrs/v1/model/show_cluster_details_response.py +112 -0
- huaweicloudsdkmrs/v1/model/show_job_exes_request.py +114 -0
- huaweicloudsdkmrs/v1/model/show_job_exes_response.py +112 -0
- huaweicloudsdkmrs/v1/model/show_mrs_version_metadata_request.py +143 -0
- huaweicloudsdkmrs/v1/model/show_mrs_version_metadata_response.py +456 -0
- huaweicloudsdkmrs/v1/model/submit_job_req_v11.py +402 -0
- huaweicloudsdkmrs/v1/model/tag.py +142 -0
- huaweicloudsdkmrs/v1/model/tag_plain.py +144 -0
- huaweicloudsdkmrs/v1/model/tag_with_multi_value.py +143 -0
- huaweicloudsdkmrs/v1/model/task_node_group.py +251 -0
- huaweicloudsdkmrs/v1/model/task_node_info.py +198 -0
- huaweicloudsdkmrs/v1/model/trigger.py +199 -0
- huaweicloudsdkmrs/v1/model/update_cluster_scaling_request.py +139 -0
- huaweicloudsdkmrs/v1/model/update_cluster_scaling_response.py +116 -0
- huaweicloudsdkmrs/v1/model/version_component.py +434 -0
- huaweicloudsdkmrs/v1/model/version_constraint.py +169 -0
- huaweicloudsdkmrs/v1/mrs_async_client.py +1467 -0
- huaweicloudsdkmrs/v1/mrs_client.py +1464 -0
- huaweicloudsdkmrs/v1/region/__init__.py +0 -0
- huaweicloudsdkmrs/v1/region/mrs_region.py +103 -0
- huaweicloudsdkmrs/v2/__init__.py +126 -0
- huaweicloudsdkmrs/v2/model/__init__.py +123 -0
- huaweicloudsdkmrs/v2/model/add_component_request.py +139 -0
- huaweicloudsdkmrs/v2/model/add_component_response.py +116 -0
- huaweicloudsdkmrs/v2/model/add_components_req.py +114 -0
- huaweicloudsdkmrs/v2/model/add_jobs_req_v11.py +431 -0
- huaweicloudsdkmrs/v2/model/agency_mapping.py +198 -0
- huaweicloudsdkmrs/v2/model/agency_mapping_array.py +114 -0
- huaweicloudsdkmrs/v2/model/assigned_node_group.py +142 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy.py +257 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_delete_req.py +142 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_info.py +257 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_v2.py +167 -0
- huaweicloudsdkmrs/v2/model/az_flavors.py +231 -0
- huaweicloudsdkmrs/v2/model/batch_delete_jobs_request.py +139 -0
- huaweicloudsdkmrs/v2/model/batch_delete_jobs_response.py +85 -0
- huaweicloudsdkmrs/v2/model/bootstrap_script.py +372 -0
- huaweicloudsdkmrs/v2/model/cancel_sql_request.py +142 -0
- huaweicloudsdkmrs/v2/model/cancel_sql_response.py +145 -0
- huaweicloudsdkmrs/v2/model/cancel_sync_iam_user_request.py +139 -0
- huaweicloudsdkmrs/v2/model/cancel_sync_iam_user_response.py +116 -0
- huaweicloudsdkmrs/v2/model/cancel_sync_request.py +144 -0
- huaweicloudsdkmrs/v2/model/charge_info.py +201 -0
- huaweicloudsdkmrs/v2/model/cluster_data_connector_map.py +289 -0
- huaweicloudsdkmrs/v2/model/cluster_node.py +396 -0
- huaweicloudsdkmrs/v2/model/component_config.py +143 -0
- huaweicloudsdkmrs/v2/model/component_info.py +521 -0
- huaweicloudsdkmrs/v2/model/component_install_mode.py +200 -0
- huaweicloudsdkmrs/v2/model/config.py +170 -0
- huaweicloudsdkmrs/v2/model/create_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/create_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/model/create_cluster_req_v2.py +994 -0
- huaweicloudsdkmrs/v2/model/create_cluster_request.py +111 -0
- huaweicloudsdkmrs/v2/model/create_cluster_response.py +116 -0
- huaweicloudsdkmrs/v2/model/create_data_connector_request.py +111 -0
- huaweicloudsdkmrs/v2/model/create_data_connector_response.py +116 -0
- huaweicloudsdkmrs/v2/model/create_execute_job_request.py +139 -0
- huaweicloudsdkmrs/v2/model/create_execute_job_response.py +112 -0
- huaweicloudsdkmrs/v2/model/data_connector.py +170 -0
- huaweicloudsdkmrs/v2/model/data_connector_detail.py +460 -0
- huaweicloudsdkmrs/v2/model/data_connector_req.py +110 -0
- huaweicloudsdkmrs/v2/model/delete_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/delete_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/model/delete_data_connector_request.py +114 -0
- huaweicloudsdkmrs/v2/model/delete_data_connector_response.py +85 -0
- huaweicloudsdkmrs/v2/model/execute_sql_request.py +139 -0
- huaweicloudsdkmrs/v2/model/execute_sql_response.py +261 -0
- huaweicloudsdkmrs/v2/model/expand_cluster_request.py +139 -0
- huaweicloudsdkmrs/v2/model/expand_cluster_response.py +145 -0
- huaweicloudsdkmrs/v2/model/expand_param.py +200 -0
- huaweicloudsdkmrs/v2/model/file_status_v2.py +405 -0
- huaweicloudsdkmrs/v2/model/flavor.py +115 -0
- huaweicloudsdkmrs/v2/model/job_batch_delete.py +115 -0
- huaweicloudsdkmrs/v2/model/job_execution.py +200 -0
- huaweicloudsdkmrs/v2/model/job_query_bean.py +579 -0
- huaweicloudsdkmrs/v2/model/job_submit_result.py +144 -0
- huaweicloudsdkmrs/v2/model/list_data_connector_request.py +260 -0
- huaweicloudsdkmrs/v2/model/list_data_connector_response.py +145 -0
- huaweicloudsdkmrs/v2/model/list_nodes_request.py +375 -0
- huaweicloudsdkmrs/v2/model/list_nodes_response.py +145 -0
- huaweicloudsdkmrs/v2/model/modify_default_tags_request_body.py +114 -0
- huaweicloudsdkmrs/v2/model/node_detail.py +376 -0
- huaweicloudsdkmrs/v2/model/node_group_v2.py +328 -0
- huaweicloudsdkmrs/v2/model/resources_plan.py +255 -0
- huaweicloudsdkmrs/v2/model/rule.py +251 -0
- huaweicloudsdkmrs/v2/model/run_job_flow_command.py +997 -0
- huaweicloudsdkmrs/v2/model/run_job_flow_request.py +111 -0
- huaweicloudsdkmrs/v2/model/run_job_flow_response.py +116 -0
- huaweicloudsdkmrs/v2/model/scale_script.py +284 -0
- huaweicloudsdkmrs/v2/model/server_info.py +340 -0
- huaweicloudsdkmrs/v2/model/show_agency_mapping_request.py +114 -0
- huaweicloudsdkmrs/v2/model/show_agency_mapping_response.py +116 -0
- huaweicloudsdkmrs/v2/model/show_auto_scaling_policy_request.py +114 -0
- huaweicloudsdkmrs/v2/model/show_auto_scaling_policy_response.py +116 -0
- huaweicloudsdkmrs/v2/model/show_hdfs_file_list_request.py +258 -0
- huaweicloudsdkmrs/v2/model/show_hdfs_file_list_response.py +145 -0
- huaweicloudsdkmrs/v2/model/show_job_exe_list_new_request.py +462 -0
- huaweicloudsdkmrs/v2/model/show_job_exe_list_new_response.py +145 -0
- huaweicloudsdkmrs/v2/model/show_mrs_flavors_request.py +143 -0
- huaweicloudsdkmrs/v2/model/show_mrs_flavors_response.py +145 -0
- huaweicloudsdkmrs/v2/model/show_mrs_version_list_request.py +84 -0
- huaweicloudsdkmrs/v2/model/show_mrs_version_list_response.py +116 -0
- huaweicloudsdkmrs/v2/model/show_single_job_exe_request.py +142 -0
- huaweicloudsdkmrs/v2/model/show_single_job_exe_response.py +112 -0
- huaweicloudsdkmrs/v2/model/show_sql_result_request.py +142 -0
- huaweicloudsdkmrs/v2/model/show_sql_result_response.py +261 -0
- huaweicloudsdkmrs/v2/model/show_sql_result_with_job_request.py +142 -0
- huaweicloudsdkmrs/v2/model/show_sql_result_with_job_response.py +116 -0
- huaweicloudsdkmrs/v2/model/show_sync_iam_user_request.py +114 -0
- huaweicloudsdkmrs/v2/model/show_sync_iam_user_response.py +145 -0
- huaweicloudsdkmrs/v2/model/show_tag_quota_request.py +143 -0
- huaweicloudsdkmrs/v2/model/show_tag_quota_response.py +145 -0
- huaweicloudsdkmrs/v2/model/show_tag_status_request.py +114 -0
- huaweicloudsdkmrs/v2/model/show_tag_status_response.py +145 -0
- huaweicloudsdkmrs/v2/model/shrink_cluster_request.py +139 -0
- huaweicloudsdkmrs/v2/model/shrink_cluster_response.py +116 -0
- huaweicloudsdkmrs/v2/model/shrink_param.py +172 -0
- huaweicloudsdkmrs/v2/model/smn_notify.py +144 -0
- huaweicloudsdkmrs/v2/model/sql_execution_req.py +200 -0
- huaweicloudsdkmrs/v2/model/step_config.py +110 -0
- huaweicloudsdkmrs/v2/model/stop_job_request.py +142 -0
- huaweicloudsdkmrs/v2/model/stop_job_response.py +85 -0
- huaweicloudsdkmrs/v2/model/switch_cluster_tags_request.py +139 -0
- huaweicloudsdkmrs/v2/model/switch_cluster_tags_response.py +85 -0
- huaweicloudsdkmrs/v2/model/tag.py +142 -0
- huaweicloudsdkmrs/v2/model/trigger.py +199 -0
- huaweicloudsdkmrs/v2/model/update_agency_mapping_request.py +139 -0
- huaweicloudsdkmrs/v2/model/update_agency_mapping_response.py +116 -0
- huaweicloudsdkmrs/v2/model/update_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/update_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/model/update_cluster_name_request.py +139 -0
- huaweicloudsdkmrs/v2/model/update_cluster_name_response.py +116 -0
- huaweicloudsdkmrs/v2/model/update_cluster_req.py +114 -0
- huaweicloudsdkmrs/v2/model/update_data_connector_request.py +139 -0
- huaweicloudsdkmrs/v2/model/update_data_connector_response.py +116 -0
- huaweicloudsdkmrs/v2/model/update_sync_iam_user_request.py +139 -0
- huaweicloudsdkmrs/v2/model/update_sync_iam_user_response.py +116 -0
- huaweicloudsdkmrs/v2/model/update_sync_request.py +173 -0
- huaweicloudsdkmrs/v2/model/volume.py +142 -0
- huaweicloudsdkmrs/v2/model/volume_info.py +170 -0
- huaweicloudsdkmrs/v2/mrs_async_client.py +2476 -0
- huaweicloudsdkmrs/v2/mrs_client.py +2473 -0
- huaweicloudsdkmrs/v2/region/__init__.py +0 -0
- huaweicloudsdkmrs/v2/region/mrs_region.py +103 -0
- huaweicloudsdkmrs-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkmrs-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkmrs-3.1.160.dist-info/RECORD +215 -0
- huaweicloudsdkmrs-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkmrs-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,251 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class Rule:
|
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
|
+
'name': 'str',
|
21
|
+
'description': 'str',
|
22
|
+
'adjustment_type': 'str',
|
23
|
+
'cool_down_minutes': 'int',
|
24
|
+
'scaling_adjustment': 'int',
|
25
|
+
'trigger': 'Trigger'
|
26
|
+
}
|
27
|
+
|
28
|
+
attribute_map = {
|
29
|
+
'name': 'name',
|
30
|
+
'description': 'description',
|
31
|
+
'adjustment_type': 'adjustment_type',
|
32
|
+
'cool_down_minutes': 'cool_down_minutes',
|
33
|
+
'scaling_adjustment': 'scaling_adjustment',
|
34
|
+
'trigger': 'trigger'
|
35
|
+
}
|
36
|
+
|
37
|
+
def __init__(self, name=None, description=None, adjustment_type=None, cool_down_minutes=None, scaling_adjustment=None, trigger=None):
|
38
|
+
r"""Rule
|
39
|
+
|
40
|
+
The model defined in huaweicloud sdk
|
41
|
+
|
42
|
+
:param name: 弹性伸缩规则的名称。 只能由字母、数字、中划线和下划线组成,并且长度为1~64个字符。 在一个节点组范围内,不允许重名。
|
43
|
+
:type name: str
|
44
|
+
:param description: 弹性伸缩规则的说明。 最大长度为1024字符。
|
45
|
+
:type description: str
|
46
|
+
:param adjustment_type: 弹性伸缩规则的调整类型,只允许以下类型: 枚举值: - scale_out:扩容 - scale_in:缩容
|
47
|
+
:type adjustment_type: str
|
48
|
+
:param cool_down_minutes: 触发弹性伸缩规则后,该集群处于冷却状态(不再执行弹性伸缩操作)的时长,单位为分钟。 取值范围[0~10080],10080为一周的分钟数。
|
49
|
+
:type cool_down_minutes: int
|
50
|
+
:param scaling_adjustment: 单次调整集群节点的个数。 取值范围[1~100]
|
51
|
+
:type scaling_adjustment: int
|
52
|
+
:param trigger:
|
53
|
+
:type trigger: :class:`huaweicloudsdkmrs.v1.Trigger`
|
54
|
+
"""
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
self._name = None
|
59
|
+
self._description = None
|
60
|
+
self._adjustment_type = None
|
61
|
+
self._cool_down_minutes = None
|
62
|
+
self._scaling_adjustment = None
|
63
|
+
self._trigger = None
|
64
|
+
self.discriminator = None
|
65
|
+
|
66
|
+
self.name = name
|
67
|
+
if description is not None:
|
68
|
+
self.description = description
|
69
|
+
self.adjustment_type = adjustment_type
|
70
|
+
self.cool_down_minutes = cool_down_minutes
|
71
|
+
self.scaling_adjustment = scaling_adjustment
|
72
|
+
self.trigger = trigger
|
73
|
+
|
74
|
+
@property
|
75
|
+
def name(self):
|
76
|
+
r"""Gets the name of this Rule.
|
77
|
+
|
78
|
+
弹性伸缩规则的名称。 只能由字母、数字、中划线和下划线组成,并且长度为1~64个字符。 在一个节点组范围内,不允许重名。
|
79
|
+
|
80
|
+
:return: The name of this Rule.
|
81
|
+
:rtype: str
|
82
|
+
"""
|
83
|
+
return self._name
|
84
|
+
|
85
|
+
@name.setter
|
86
|
+
def name(self, name):
|
87
|
+
r"""Sets the name of this Rule.
|
88
|
+
|
89
|
+
弹性伸缩规则的名称。 只能由字母、数字、中划线和下划线组成,并且长度为1~64个字符。 在一个节点组范围内,不允许重名。
|
90
|
+
|
91
|
+
:param name: The name of this Rule.
|
92
|
+
:type name: str
|
93
|
+
"""
|
94
|
+
self._name = name
|
95
|
+
|
96
|
+
@property
|
97
|
+
def description(self):
|
98
|
+
r"""Gets the description of this Rule.
|
99
|
+
|
100
|
+
弹性伸缩规则的说明。 最大长度为1024字符。
|
101
|
+
|
102
|
+
:return: The description of this Rule.
|
103
|
+
:rtype: str
|
104
|
+
"""
|
105
|
+
return self._description
|
106
|
+
|
107
|
+
@description.setter
|
108
|
+
def description(self, description):
|
109
|
+
r"""Sets the description of this Rule.
|
110
|
+
|
111
|
+
弹性伸缩规则的说明。 最大长度为1024字符。
|
112
|
+
|
113
|
+
:param description: The description of this Rule.
|
114
|
+
:type description: str
|
115
|
+
"""
|
116
|
+
self._description = description
|
117
|
+
|
118
|
+
@property
|
119
|
+
def adjustment_type(self):
|
120
|
+
r"""Gets the adjustment_type of this Rule.
|
121
|
+
|
122
|
+
弹性伸缩规则的调整类型,只允许以下类型: 枚举值: - scale_out:扩容 - scale_in:缩容
|
123
|
+
|
124
|
+
:return: The adjustment_type of this Rule.
|
125
|
+
:rtype: str
|
126
|
+
"""
|
127
|
+
return self._adjustment_type
|
128
|
+
|
129
|
+
@adjustment_type.setter
|
130
|
+
def adjustment_type(self, adjustment_type):
|
131
|
+
r"""Sets the adjustment_type of this Rule.
|
132
|
+
|
133
|
+
弹性伸缩规则的调整类型,只允许以下类型: 枚举值: - scale_out:扩容 - scale_in:缩容
|
134
|
+
|
135
|
+
:param adjustment_type: The adjustment_type of this Rule.
|
136
|
+
:type adjustment_type: str
|
137
|
+
"""
|
138
|
+
self._adjustment_type = adjustment_type
|
139
|
+
|
140
|
+
@property
|
141
|
+
def cool_down_minutes(self):
|
142
|
+
r"""Gets the cool_down_minutes of this Rule.
|
143
|
+
|
144
|
+
触发弹性伸缩规则后,该集群处于冷却状态(不再执行弹性伸缩操作)的时长,单位为分钟。 取值范围[0~10080],10080为一周的分钟数。
|
145
|
+
|
146
|
+
:return: The cool_down_minutes of this Rule.
|
147
|
+
:rtype: int
|
148
|
+
"""
|
149
|
+
return self._cool_down_minutes
|
150
|
+
|
151
|
+
@cool_down_minutes.setter
|
152
|
+
def cool_down_minutes(self, cool_down_minutes):
|
153
|
+
r"""Sets the cool_down_minutes of this Rule.
|
154
|
+
|
155
|
+
触发弹性伸缩规则后,该集群处于冷却状态(不再执行弹性伸缩操作)的时长,单位为分钟。 取值范围[0~10080],10080为一周的分钟数。
|
156
|
+
|
157
|
+
:param cool_down_minutes: The cool_down_minutes of this Rule.
|
158
|
+
:type cool_down_minutes: int
|
159
|
+
"""
|
160
|
+
self._cool_down_minutes = cool_down_minutes
|
161
|
+
|
162
|
+
@property
|
163
|
+
def scaling_adjustment(self):
|
164
|
+
r"""Gets the scaling_adjustment of this Rule.
|
165
|
+
|
166
|
+
单次调整集群节点的个数。 取值范围[1~100]
|
167
|
+
|
168
|
+
:return: The scaling_adjustment of this Rule.
|
169
|
+
:rtype: int
|
170
|
+
"""
|
171
|
+
return self._scaling_adjustment
|
172
|
+
|
173
|
+
@scaling_adjustment.setter
|
174
|
+
def scaling_adjustment(self, scaling_adjustment):
|
175
|
+
r"""Sets the scaling_adjustment of this Rule.
|
176
|
+
|
177
|
+
单次调整集群节点的个数。 取值范围[1~100]
|
178
|
+
|
179
|
+
:param scaling_adjustment: The scaling_adjustment of this Rule.
|
180
|
+
:type scaling_adjustment: int
|
181
|
+
"""
|
182
|
+
self._scaling_adjustment = scaling_adjustment
|
183
|
+
|
184
|
+
@property
|
185
|
+
def trigger(self):
|
186
|
+
r"""Gets the trigger of this Rule.
|
187
|
+
|
188
|
+
:return: The trigger of this Rule.
|
189
|
+
:rtype: :class:`huaweicloudsdkmrs.v1.Trigger`
|
190
|
+
"""
|
191
|
+
return self._trigger
|
192
|
+
|
193
|
+
@trigger.setter
|
194
|
+
def trigger(self, trigger):
|
195
|
+
r"""Sets the trigger of this Rule.
|
196
|
+
|
197
|
+
:param trigger: The trigger of this Rule.
|
198
|
+
:type trigger: :class:`huaweicloudsdkmrs.v1.Trigger`
|
199
|
+
"""
|
200
|
+
self._trigger = trigger
|
201
|
+
|
202
|
+
def to_dict(self):
|
203
|
+
"""Returns the model properties as a dict"""
|
204
|
+
result = {}
|
205
|
+
|
206
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
207
|
+
value = getattr(self, attr)
|
208
|
+
if isinstance(value, list):
|
209
|
+
result[attr] = list(map(
|
210
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
211
|
+
value
|
212
|
+
))
|
213
|
+
elif hasattr(value, "to_dict"):
|
214
|
+
result[attr] = value.to_dict()
|
215
|
+
elif isinstance(value, dict):
|
216
|
+
result[attr] = dict(map(
|
217
|
+
lambda item: (item[0], item[1].to_dict())
|
218
|
+
if hasattr(item[1], "to_dict") else item,
|
219
|
+
value.items()
|
220
|
+
))
|
221
|
+
else:
|
222
|
+
if attr in self.sensitive_list:
|
223
|
+
result[attr] = "****"
|
224
|
+
else:
|
225
|
+
result[attr] = value
|
226
|
+
|
227
|
+
return result
|
228
|
+
|
229
|
+
def to_str(self):
|
230
|
+
"""Returns the string representation of the model"""
|
231
|
+
import simplejson as json
|
232
|
+
if six.PY2:
|
233
|
+
import sys
|
234
|
+
reload(sys)
|
235
|
+
sys.setdefaultencoding("utf-8")
|
236
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
237
|
+
|
238
|
+
def __repr__(self):
|
239
|
+
"""For `print`"""
|
240
|
+
return self.to_str()
|
241
|
+
|
242
|
+
def __eq__(self, other):
|
243
|
+
"""Returns true if both objects are equal"""
|
244
|
+
if not isinstance(other, Rule):
|
245
|
+
return False
|
246
|
+
|
247
|
+
return self.__dict__ == other.__dict__
|
248
|
+
|
249
|
+
def __ne__(self, other):
|
250
|
+
"""Returns true if both objects are not equal"""
|
251
|
+
return not self == other
|
@@ -0,0 +1,284 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ScaleScript:
|
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
|
+
'name': 'str',
|
21
|
+
'uri': 'str',
|
22
|
+
'parameters': 'str',
|
23
|
+
'nodes': 'list[str]',
|
24
|
+
'active_master': 'bool',
|
25
|
+
'fail_action': 'str',
|
26
|
+
'action_stage': 'str'
|
27
|
+
}
|
28
|
+
|
29
|
+
attribute_map = {
|
30
|
+
'name': 'name',
|
31
|
+
'uri': 'uri',
|
32
|
+
'parameters': 'parameters',
|
33
|
+
'nodes': 'nodes',
|
34
|
+
'active_master': 'active_master',
|
35
|
+
'fail_action': 'fail_action',
|
36
|
+
'action_stage': 'action_stage'
|
37
|
+
}
|
38
|
+
|
39
|
+
def __init__(self, name=None, uri=None, parameters=None, nodes=None, active_master=None, fail_action=None, action_stage=None):
|
40
|
+
r"""ScaleScript
|
41
|
+
|
42
|
+
The model defined in huaweicloud sdk
|
43
|
+
|
44
|
+
:param name: 弹性伸缩自定义自动化脚本的名称,同一个集群的自定义自动化脚本名称不允许相同。 只能由数字、英文字符、空格、中划线和下划线组成,且不能以空格开头。 可输入的字符串长度为1~64个字符。
|
45
|
+
:type name: str
|
46
|
+
:param uri: 自定义自动化脚本的路径。设置为OBS桶的路径或虚拟机本地的路径。 - OBS桶的路径:直接手动输入脚本路径。示例:s3a://XXX/scale.sh - 虚拟机本地的路径:用户需要输入正确的脚本路径。脚本所在的路径必须以‘/’开头,以.sh结尾。
|
47
|
+
:type uri: str
|
48
|
+
:param parameters: 自定义自动化脚本参数。 多个参数间用空格隔开。 可以传入以下系统预定义参数: - ${mrs_scale_node_num}:扩缩容节点数 - ${mrs_scale_type}:扩缩容类型,扩容为scale_out,缩容为scale_in - ${mrs_scale_node_hostnames}:扩缩容的节点主机名称 - ${mrs_scale_node_ips}:扩缩容的节点IP - ${mrs_scale_rule_name}:触发扩缩容的规则名 其他用户自定义参数使用方式与普通shell脚本相同,多个参数中间用空格隔开。
|
49
|
+
:type parameters: str
|
50
|
+
:param nodes: 自定义自动化脚本所执行的节点组名称(非自定义集群也可使用节点类型,包含Master、Core和Task三种类型)。
|
51
|
+
:type nodes: list[str]
|
52
|
+
:param active_master: 自定义自动化脚本是否只运行在主Master节点上。 缺省值为false,表示自定义自动化脚本可运行在所有Master节点上。
|
53
|
+
:type active_master: bool
|
54
|
+
:param fail_action: 自自定义自动化脚本执行失败后,是否继续执行后续脚本和创建集群。 说明: - 建议您在调试阶段设置为“continue”,无论此自定义自动化脚本是否执行成功,则集群都能继续安装和启动。 - 由于缩容成功无法回滚,因此缩容后执行的脚本“fail_action”必须设置为“continue”。 枚举值: - continue:继续执行后续脚本。 - errorout:终止操作。
|
55
|
+
:type fail_action: str
|
56
|
+
:param action_stage: 脚本执行时机。 枚举值: - before_scale_out:扩容前 - before_scale_in:缩容前 - after_scale_out:扩容后 - after_scale_in:缩容后
|
57
|
+
:type action_stage: str
|
58
|
+
"""
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
self._name = None
|
63
|
+
self._uri = None
|
64
|
+
self._parameters = None
|
65
|
+
self._nodes = None
|
66
|
+
self._active_master = None
|
67
|
+
self._fail_action = None
|
68
|
+
self._action_stage = None
|
69
|
+
self.discriminator = None
|
70
|
+
|
71
|
+
self.name = name
|
72
|
+
self.uri = uri
|
73
|
+
if parameters is not None:
|
74
|
+
self.parameters = parameters
|
75
|
+
self.nodes = nodes
|
76
|
+
if active_master is not None:
|
77
|
+
self.active_master = active_master
|
78
|
+
self.fail_action = fail_action
|
79
|
+
self.action_stage = action_stage
|
80
|
+
|
81
|
+
@property
|
82
|
+
def name(self):
|
83
|
+
r"""Gets the name of this ScaleScript.
|
84
|
+
|
85
|
+
弹性伸缩自定义自动化脚本的名称,同一个集群的自定义自动化脚本名称不允许相同。 只能由数字、英文字符、空格、中划线和下划线组成,且不能以空格开头。 可输入的字符串长度为1~64个字符。
|
86
|
+
|
87
|
+
:return: The name of this ScaleScript.
|
88
|
+
:rtype: str
|
89
|
+
"""
|
90
|
+
return self._name
|
91
|
+
|
92
|
+
@name.setter
|
93
|
+
def name(self, name):
|
94
|
+
r"""Sets the name of this ScaleScript.
|
95
|
+
|
96
|
+
弹性伸缩自定义自动化脚本的名称,同一个集群的自定义自动化脚本名称不允许相同。 只能由数字、英文字符、空格、中划线和下划线组成,且不能以空格开头。 可输入的字符串长度为1~64个字符。
|
97
|
+
|
98
|
+
:param name: The name of this ScaleScript.
|
99
|
+
:type name: str
|
100
|
+
"""
|
101
|
+
self._name = name
|
102
|
+
|
103
|
+
@property
|
104
|
+
def uri(self):
|
105
|
+
r"""Gets the uri of this ScaleScript.
|
106
|
+
|
107
|
+
自定义自动化脚本的路径。设置为OBS桶的路径或虚拟机本地的路径。 - OBS桶的路径:直接手动输入脚本路径。示例:s3a://XXX/scale.sh - 虚拟机本地的路径:用户需要输入正确的脚本路径。脚本所在的路径必须以‘/’开头,以.sh结尾。
|
108
|
+
|
109
|
+
:return: The uri of this ScaleScript.
|
110
|
+
:rtype: str
|
111
|
+
"""
|
112
|
+
return self._uri
|
113
|
+
|
114
|
+
@uri.setter
|
115
|
+
def uri(self, uri):
|
116
|
+
r"""Sets the uri of this ScaleScript.
|
117
|
+
|
118
|
+
自定义自动化脚本的路径。设置为OBS桶的路径或虚拟机本地的路径。 - OBS桶的路径:直接手动输入脚本路径。示例:s3a://XXX/scale.sh - 虚拟机本地的路径:用户需要输入正确的脚本路径。脚本所在的路径必须以‘/’开头,以.sh结尾。
|
119
|
+
|
120
|
+
:param uri: The uri of this ScaleScript.
|
121
|
+
:type uri: str
|
122
|
+
"""
|
123
|
+
self._uri = uri
|
124
|
+
|
125
|
+
@property
|
126
|
+
def parameters(self):
|
127
|
+
r"""Gets the parameters of this ScaleScript.
|
128
|
+
|
129
|
+
自定义自动化脚本参数。 多个参数间用空格隔开。 可以传入以下系统预定义参数: - ${mrs_scale_node_num}:扩缩容节点数 - ${mrs_scale_type}:扩缩容类型,扩容为scale_out,缩容为scale_in - ${mrs_scale_node_hostnames}:扩缩容的节点主机名称 - ${mrs_scale_node_ips}:扩缩容的节点IP - ${mrs_scale_rule_name}:触发扩缩容的规则名 其他用户自定义参数使用方式与普通shell脚本相同,多个参数中间用空格隔开。
|
130
|
+
|
131
|
+
:return: The parameters of this ScaleScript.
|
132
|
+
:rtype: str
|
133
|
+
"""
|
134
|
+
return self._parameters
|
135
|
+
|
136
|
+
@parameters.setter
|
137
|
+
def parameters(self, parameters):
|
138
|
+
r"""Sets the parameters of this ScaleScript.
|
139
|
+
|
140
|
+
自定义自动化脚本参数。 多个参数间用空格隔开。 可以传入以下系统预定义参数: - ${mrs_scale_node_num}:扩缩容节点数 - ${mrs_scale_type}:扩缩容类型,扩容为scale_out,缩容为scale_in - ${mrs_scale_node_hostnames}:扩缩容的节点主机名称 - ${mrs_scale_node_ips}:扩缩容的节点IP - ${mrs_scale_rule_name}:触发扩缩容的规则名 其他用户自定义参数使用方式与普通shell脚本相同,多个参数中间用空格隔开。
|
141
|
+
|
142
|
+
:param parameters: The parameters of this ScaleScript.
|
143
|
+
:type parameters: str
|
144
|
+
"""
|
145
|
+
self._parameters = parameters
|
146
|
+
|
147
|
+
@property
|
148
|
+
def nodes(self):
|
149
|
+
r"""Gets the nodes of this ScaleScript.
|
150
|
+
|
151
|
+
自定义自动化脚本所执行的节点组名称(非自定义集群也可使用节点类型,包含Master、Core和Task三种类型)。
|
152
|
+
|
153
|
+
:return: The nodes of this ScaleScript.
|
154
|
+
:rtype: list[str]
|
155
|
+
"""
|
156
|
+
return self._nodes
|
157
|
+
|
158
|
+
@nodes.setter
|
159
|
+
def nodes(self, nodes):
|
160
|
+
r"""Sets the nodes of this ScaleScript.
|
161
|
+
|
162
|
+
自定义自动化脚本所执行的节点组名称(非自定义集群也可使用节点类型,包含Master、Core和Task三种类型)。
|
163
|
+
|
164
|
+
:param nodes: The nodes of this ScaleScript.
|
165
|
+
:type nodes: list[str]
|
166
|
+
"""
|
167
|
+
self._nodes = nodes
|
168
|
+
|
169
|
+
@property
|
170
|
+
def active_master(self):
|
171
|
+
r"""Gets the active_master of this ScaleScript.
|
172
|
+
|
173
|
+
自定义自动化脚本是否只运行在主Master节点上。 缺省值为false,表示自定义自动化脚本可运行在所有Master节点上。
|
174
|
+
|
175
|
+
:return: The active_master of this ScaleScript.
|
176
|
+
:rtype: bool
|
177
|
+
"""
|
178
|
+
return self._active_master
|
179
|
+
|
180
|
+
@active_master.setter
|
181
|
+
def active_master(self, active_master):
|
182
|
+
r"""Sets the active_master of this ScaleScript.
|
183
|
+
|
184
|
+
自定义自动化脚本是否只运行在主Master节点上。 缺省值为false,表示自定义自动化脚本可运行在所有Master节点上。
|
185
|
+
|
186
|
+
:param active_master: The active_master of this ScaleScript.
|
187
|
+
:type active_master: bool
|
188
|
+
"""
|
189
|
+
self._active_master = active_master
|
190
|
+
|
191
|
+
@property
|
192
|
+
def fail_action(self):
|
193
|
+
r"""Gets the fail_action of this ScaleScript.
|
194
|
+
|
195
|
+
自自定义自动化脚本执行失败后,是否继续执行后续脚本和创建集群。 说明: - 建议您在调试阶段设置为“continue”,无论此自定义自动化脚本是否执行成功,则集群都能继续安装和启动。 - 由于缩容成功无法回滚,因此缩容后执行的脚本“fail_action”必须设置为“continue”。 枚举值: - continue:继续执行后续脚本。 - errorout:终止操作。
|
196
|
+
|
197
|
+
:return: The fail_action of this ScaleScript.
|
198
|
+
:rtype: str
|
199
|
+
"""
|
200
|
+
return self._fail_action
|
201
|
+
|
202
|
+
@fail_action.setter
|
203
|
+
def fail_action(self, fail_action):
|
204
|
+
r"""Sets the fail_action of this ScaleScript.
|
205
|
+
|
206
|
+
自自定义自动化脚本执行失败后,是否继续执行后续脚本和创建集群。 说明: - 建议您在调试阶段设置为“continue”,无论此自定义自动化脚本是否执行成功,则集群都能继续安装和启动。 - 由于缩容成功无法回滚,因此缩容后执行的脚本“fail_action”必须设置为“continue”。 枚举值: - continue:继续执行后续脚本。 - errorout:终止操作。
|
207
|
+
|
208
|
+
:param fail_action: The fail_action of this ScaleScript.
|
209
|
+
:type fail_action: str
|
210
|
+
"""
|
211
|
+
self._fail_action = fail_action
|
212
|
+
|
213
|
+
@property
|
214
|
+
def action_stage(self):
|
215
|
+
r"""Gets the action_stage of this ScaleScript.
|
216
|
+
|
217
|
+
脚本执行时机。 枚举值: - before_scale_out:扩容前 - before_scale_in:缩容前 - after_scale_out:扩容后 - after_scale_in:缩容后
|
218
|
+
|
219
|
+
:return: The action_stage of this ScaleScript.
|
220
|
+
:rtype: str
|
221
|
+
"""
|
222
|
+
return self._action_stage
|
223
|
+
|
224
|
+
@action_stage.setter
|
225
|
+
def action_stage(self, action_stage):
|
226
|
+
r"""Sets the action_stage of this ScaleScript.
|
227
|
+
|
228
|
+
脚本执行时机。 枚举值: - before_scale_out:扩容前 - before_scale_in:缩容前 - after_scale_out:扩容后 - after_scale_in:缩容后
|
229
|
+
|
230
|
+
:param action_stage: The action_stage of this ScaleScript.
|
231
|
+
:type action_stage: str
|
232
|
+
"""
|
233
|
+
self._action_stage = action_stage
|
234
|
+
|
235
|
+
def to_dict(self):
|
236
|
+
"""Returns the model properties as a dict"""
|
237
|
+
result = {}
|
238
|
+
|
239
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
240
|
+
value = getattr(self, attr)
|
241
|
+
if isinstance(value, list):
|
242
|
+
result[attr] = list(map(
|
243
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
244
|
+
value
|
245
|
+
))
|
246
|
+
elif hasattr(value, "to_dict"):
|
247
|
+
result[attr] = value.to_dict()
|
248
|
+
elif isinstance(value, dict):
|
249
|
+
result[attr] = dict(map(
|
250
|
+
lambda item: (item[0], item[1].to_dict())
|
251
|
+
if hasattr(item[1], "to_dict") else item,
|
252
|
+
value.items()
|
253
|
+
))
|
254
|
+
else:
|
255
|
+
if attr in self.sensitive_list:
|
256
|
+
result[attr] = "****"
|
257
|
+
else:
|
258
|
+
result[attr] = value
|
259
|
+
|
260
|
+
return result
|
261
|
+
|
262
|
+
def to_str(self):
|
263
|
+
"""Returns the string representation of the model"""
|
264
|
+
import simplejson as json
|
265
|
+
if six.PY2:
|
266
|
+
import sys
|
267
|
+
reload(sys)
|
268
|
+
sys.setdefaultencoding("utf-8")
|
269
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
270
|
+
|
271
|
+
def __repr__(self):
|
272
|
+
"""For `print`"""
|
273
|
+
return self.to_str()
|
274
|
+
|
275
|
+
def __eq__(self, other):
|
276
|
+
"""Returns true if both objects are equal"""
|
277
|
+
if not isinstance(other, ScaleScript):
|
278
|
+
return False
|
279
|
+
|
280
|
+
return self.__dict__ == other.__dict__
|
281
|
+
|
282
|
+
def __ne__(self, other):
|
283
|
+
"""Returns true if both objects are not equal"""
|
284
|
+
return not self == other
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ShowClusterDetailsRequest:
|
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
|
+
'cluster_id': 'str'
|
21
|
+
}
|
22
|
+
|
23
|
+
attribute_map = {
|
24
|
+
'cluster_id': 'cluster_id'
|
25
|
+
}
|
26
|
+
|
27
|
+
def __init__(self, cluster_id=None):
|
28
|
+
r"""ShowClusterDetailsRequest
|
29
|
+
|
30
|
+
The model defined in huaweicloud sdk
|
31
|
+
|
32
|
+
:param cluster_id: 集群ID。获取方法,请参见[获取集群ID](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)。
|
33
|
+
:type cluster_id: str
|
34
|
+
"""
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
self._cluster_id = None
|
39
|
+
self.discriminator = None
|
40
|
+
|
41
|
+
self.cluster_id = cluster_id
|
42
|
+
|
43
|
+
@property
|
44
|
+
def cluster_id(self):
|
45
|
+
r"""Gets the cluster_id of this ShowClusterDetailsRequest.
|
46
|
+
|
47
|
+
集群ID。获取方法,请参见[获取集群ID](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)。
|
48
|
+
|
49
|
+
:return: The cluster_id of this ShowClusterDetailsRequest.
|
50
|
+
:rtype: str
|
51
|
+
"""
|
52
|
+
return self._cluster_id
|
53
|
+
|
54
|
+
@cluster_id.setter
|
55
|
+
def cluster_id(self, cluster_id):
|
56
|
+
r"""Sets the cluster_id of this ShowClusterDetailsRequest.
|
57
|
+
|
58
|
+
集群ID。获取方法,请参见[获取集群ID](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)。
|
59
|
+
|
60
|
+
:param cluster_id: The cluster_id of this ShowClusterDetailsRequest.
|
61
|
+
:type cluster_id: str
|
62
|
+
"""
|
63
|
+
self._cluster_id = cluster_id
|
64
|
+
|
65
|
+
def to_dict(self):
|
66
|
+
"""Returns the model properties as a dict"""
|
67
|
+
result = {}
|
68
|
+
|
69
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
70
|
+
value = getattr(self, attr)
|
71
|
+
if isinstance(value, list):
|
72
|
+
result[attr] = list(map(
|
73
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
74
|
+
value
|
75
|
+
))
|
76
|
+
elif hasattr(value, "to_dict"):
|
77
|
+
result[attr] = value.to_dict()
|
78
|
+
elif isinstance(value, dict):
|
79
|
+
result[attr] = dict(map(
|
80
|
+
lambda item: (item[0], item[1].to_dict())
|
81
|
+
if hasattr(item[1], "to_dict") else item,
|
82
|
+
value.items()
|
83
|
+
))
|
84
|
+
else:
|
85
|
+
if attr in self.sensitive_list:
|
86
|
+
result[attr] = "****"
|
87
|
+
else:
|
88
|
+
result[attr] = value
|
89
|
+
|
90
|
+
return result
|
91
|
+
|
92
|
+
def to_str(self):
|
93
|
+
"""Returns the string representation of the model"""
|
94
|
+
import simplejson as json
|
95
|
+
if six.PY2:
|
96
|
+
import sys
|
97
|
+
reload(sys)
|
98
|
+
sys.setdefaultencoding("utf-8")
|
99
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
100
|
+
|
101
|
+
def __repr__(self):
|
102
|
+
"""For `print`"""
|
103
|
+
return self.to_str()
|
104
|
+
|
105
|
+
def __eq__(self, other):
|
106
|
+
"""Returns true if both objects are equal"""
|
107
|
+
if not isinstance(other, ShowClusterDetailsRequest):
|
108
|
+
return False
|
109
|
+
|
110
|
+
return self.__dict__ == other.__dict__
|
111
|
+
|
112
|
+
def __ne__(self, other):
|
113
|
+
"""Returns true if both objects are not equal"""
|
114
|
+
return not self == other
|