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,372 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class BootstrapScript:
|
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
|
+
'before_component_start': 'bool',
|
27
|
+
'start_time': 'int',
|
28
|
+
'state': 'str',
|
29
|
+
'action_stages': 'list[str]'
|
30
|
+
}
|
31
|
+
|
32
|
+
attribute_map = {
|
33
|
+
'name': 'name',
|
34
|
+
'uri': 'uri',
|
35
|
+
'parameters': 'parameters',
|
36
|
+
'nodes': 'nodes',
|
37
|
+
'active_master': 'active_master',
|
38
|
+
'fail_action': 'fail_action',
|
39
|
+
'before_component_start': 'before_component_start',
|
40
|
+
'start_time': 'start_time',
|
41
|
+
'state': 'state',
|
42
|
+
'action_stages': 'action_stages'
|
43
|
+
}
|
44
|
+
|
45
|
+
def __init__(self, name=None, uri=None, parameters=None, nodes=None, active_master=None, fail_action=None, before_component_start=None, start_time=None, state=None, action_stages=None):
|
46
|
+
r"""BootstrapScript
|
47
|
+
|
48
|
+
The model defined in huaweicloud sdk
|
49
|
+
|
50
|
+
:param name: 引导操作脚本的名称,同一个集群的引导操作脚本名称不允许相同。 只能由数字、英文字符、空格、中划线和下划线组成,且不能以空格开头。 可输入的字符串长度为1~64个字符。
|
51
|
+
:type name: str
|
52
|
+
:param uri: 引导操作脚本的路径。设置为OBS桶的路径或虚拟机本地的路径。 OBS桶的路径:直接手动输入脚本路径。例如输入MRS提供的公共样例脚本路径。示例:obs://bootstrap/presto/presto-install.sh,其中安装dualroles时,presto-install.sh脚本参数为dualroles, 安装worker时,presto-install.sh脚本参数为worker。根据Presto使用习惯,建议您在Active Master节点上安装dualroles,在Core节点上安装worker。 虚拟机本地的路径:用户需要输入正确的脚本路径。脚本所在的路径必须以‘/’开头,以.sh结尾。
|
53
|
+
:type uri: str
|
54
|
+
:param parameters: 引导操作脚本参数。
|
55
|
+
:type parameters: str
|
56
|
+
:param nodes: 引导操作脚本所执行的节点组名称。
|
57
|
+
:type nodes: list[str]
|
58
|
+
:param active_master: 引导操作脚本是否只运行在主Master节点上。 缺省值为false,表示引导操作脚本可运行在所有Master节点上。
|
59
|
+
:type active_master: bool
|
60
|
+
:param fail_action: 引导操作脚本执行失败后,是否继续执行后续脚本和创建集群。 缺省值为errorout,表示终止操作。 说明: 建议您在调试阶段设置为“继续”,无论此引导操作是否执行成功,则集群都能继续安装和启动。 枚举值: - continue:继续执行后续脚本。 - errorout:终止操作。
|
61
|
+
:type fail_action: str
|
62
|
+
:param before_component_start: 引导操作脚本执行的时间。目前支持“组件启动前”和“组件启动后”两种类型。 缺省值为false,表示引导操作脚本在组件启动后执行。
|
63
|
+
:type before_component_start: bool
|
64
|
+
:param start_time: 单个引导操作脚本的执行时间。
|
65
|
+
:type start_time: int
|
66
|
+
:param state: 单个引导操作脚本的运行状态。 - PENDING - IN_PROGRESS - SUCCESS - FAILURE
|
67
|
+
:type state: str
|
68
|
+
:param action_stages: 选择引导操作脚本执行的时间。 - BEFORE_COMPONENT_FIRST_START: 组件首次启动前 - AFTER_COMPONENT_FIRST_START: 组件首次启动后 - BEFORE_SCALE_IN: 缩容前 - AFTER_SCALE_IN: 缩容后 - BEFORE_SCALE_OUT: 扩容前 - AFTER_SCALE_OUT: 扩容后
|
69
|
+
:type action_stages: list[str]
|
70
|
+
"""
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
self._name = None
|
75
|
+
self._uri = None
|
76
|
+
self._parameters = None
|
77
|
+
self._nodes = None
|
78
|
+
self._active_master = None
|
79
|
+
self._fail_action = None
|
80
|
+
self._before_component_start = None
|
81
|
+
self._start_time = None
|
82
|
+
self._state = None
|
83
|
+
self._action_stages = None
|
84
|
+
self.discriminator = None
|
85
|
+
|
86
|
+
self.name = name
|
87
|
+
self.uri = uri
|
88
|
+
if parameters is not None:
|
89
|
+
self.parameters = parameters
|
90
|
+
self.nodes = nodes
|
91
|
+
if active_master is not None:
|
92
|
+
self.active_master = active_master
|
93
|
+
self.fail_action = fail_action
|
94
|
+
if before_component_start is not None:
|
95
|
+
self.before_component_start = before_component_start
|
96
|
+
if start_time is not None:
|
97
|
+
self.start_time = start_time
|
98
|
+
if state is not None:
|
99
|
+
self.state = state
|
100
|
+
if action_stages is not None:
|
101
|
+
self.action_stages = action_stages
|
102
|
+
|
103
|
+
@property
|
104
|
+
def name(self):
|
105
|
+
r"""Gets the name of this BootstrapScript.
|
106
|
+
|
107
|
+
引导操作脚本的名称,同一个集群的引导操作脚本名称不允许相同。 只能由数字、英文字符、空格、中划线和下划线组成,且不能以空格开头。 可输入的字符串长度为1~64个字符。
|
108
|
+
|
109
|
+
:return: The name of this BootstrapScript.
|
110
|
+
:rtype: str
|
111
|
+
"""
|
112
|
+
return self._name
|
113
|
+
|
114
|
+
@name.setter
|
115
|
+
def name(self, name):
|
116
|
+
r"""Sets the name of this BootstrapScript.
|
117
|
+
|
118
|
+
引导操作脚本的名称,同一个集群的引导操作脚本名称不允许相同。 只能由数字、英文字符、空格、中划线和下划线组成,且不能以空格开头。 可输入的字符串长度为1~64个字符。
|
119
|
+
|
120
|
+
:param name: The name of this BootstrapScript.
|
121
|
+
:type name: str
|
122
|
+
"""
|
123
|
+
self._name = name
|
124
|
+
|
125
|
+
@property
|
126
|
+
def uri(self):
|
127
|
+
r"""Gets the uri of this BootstrapScript.
|
128
|
+
|
129
|
+
引导操作脚本的路径。设置为OBS桶的路径或虚拟机本地的路径。 OBS桶的路径:直接手动输入脚本路径。例如输入MRS提供的公共样例脚本路径。示例:obs://bootstrap/presto/presto-install.sh,其中安装dualroles时,presto-install.sh脚本参数为dualroles, 安装worker时,presto-install.sh脚本参数为worker。根据Presto使用习惯,建议您在Active Master节点上安装dualroles,在Core节点上安装worker。 虚拟机本地的路径:用户需要输入正确的脚本路径。脚本所在的路径必须以‘/’开头,以.sh结尾。
|
130
|
+
|
131
|
+
:return: The uri of this BootstrapScript.
|
132
|
+
:rtype: str
|
133
|
+
"""
|
134
|
+
return self._uri
|
135
|
+
|
136
|
+
@uri.setter
|
137
|
+
def uri(self, uri):
|
138
|
+
r"""Sets the uri of this BootstrapScript.
|
139
|
+
|
140
|
+
引导操作脚本的路径。设置为OBS桶的路径或虚拟机本地的路径。 OBS桶的路径:直接手动输入脚本路径。例如输入MRS提供的公共样例脚本路径。示例:obs://bootstrap/presto/presto-install.sh,其中安装dualroles时,presto-install.sh脚本参数为dualroles, 安装worker时,presto-install.sh脚本参数为worker。根据Presto使用习惯,建议您在Active Master节点上安装dualroles,在Core节点上安装worker。 虚拟机本地的路径:用户需要输入正确的脚本路径。脚本所在的路径必须以‘/’开头,以.sh结尾。
|
141
|
+
|
142
|
+
:param uri: The uri of this BootstrapScript.
|
143
|
+
:type uri: str
|
144
|
+
"""
|
145
|
+
self._uri = uri
|
146
|
+
|
147
|
+
@property
|
148
|
+
def parameters(self):
|
149
|
+
r"""Gets the parameters of this BootstrapScript.
|
150
|
+
|
151
|
+
引导操作脚本参数。
|
152
|
+
|
153
|
+
:return: The parameters of this BootstrapScript.
|
154
|
+
:rtype: str
|
155
|
+
"""
|
156
|
+
return self._parameters
|
157
|
+
|
158
|
+
@parameters.setter
|
159
|
+
def parameters(self, parameters):
|
160
|
+
r"""Sets the parameters of this BootstrapScript.
|
161
|
+
|
162
|
+
引导操作脚本参数。
|
163
|
+
|
164
|
+
:param parameters: The parameters of this BootstrapScript.
|
165
|
+
:type parameters: str
|
166
|
+
"""
|
167
|
+
self._parameters = parameters
|
168
|
+
|
169
|
+
@property
|
170
|
+
def nodes(self):
|
171
|
+
r"""Gets the nodes of this BootstrapScript.
|
172
|
+
|
173
|
+
引导操作脚本所执行的节点组名称。
|
174
|
+
|
175
|
+
:return: The nodes of this BootstrapScript.
|
176
|
+
:rtype: list[str]
|
177
|
+
"""
|
178
|
+
return self._nodes
|
179
|
+
|
180
|
+
@nodes.setter
|
181
|
+
def nodes(self, nodes):
|
182
|
+
r"""Sets the nodes of this BootstrapScript.
|
183
|
+
|
184
|
+
引导操作脚本所执行的节点组名称。
|
185
|
+
|
186
|
+
:param nodes: The nodes of this BootstrapScript.
|
187
|
+
:type nodes: list[str]
|
188
|
+
"""
|
189
|
+
self._nodes = nodes
|
190
|
+
|
191
|
+
@property
|
192
|
+
def active_master(self):
|
193
|
+
r"""Gets the active_master of this BootstrapScript.
|
194
|
+
|
195
|
+
引导操作脚本是否只运行在主Master节点上。 缺省值为false,表示引导操作脚本可运行在所有Master节点上。
|
196
|
+
|
197
|
+
:return: The active_master of this BootstrapScript.
|
198
|
+
:rtype: bool
|
199
|
+
"""
|
200
|
+
return self._active_master
|
201
|
+
|
202
|
+
@active_master.setter
|
203
|
+
def active_master(self, active_master):
|
204
|
+
r"""Sets the active_master of this BootstrapScript.
|
205
|
+
|
206
|
+
引导操作脚本是否只运行在主Master节点上。 缺省值为false,表示引导操作脚本可运行在所有Master节点上。
|
207
|
+
|
208
|
+
:param active_master: The active_master of this BootstrapScript.
|
209
|
+
:type active_master: bool
|
210
|
+
"""
|
211
|
+
self._active_master = active_master
|
212
|
+
|
213
|
+
@property
|
214
|
+
def fail_action(self):
|
215
|
+
r"""Gets the fail_action of this BootstrapScript.
|
216
|
+
|
217
|
+
引导操作脚本执行失败后,是否继续执行后续脚本和创建集群。 缺省值为errorout,表示终止操作。 说明: 建议您在调试阶段设置为“继续”,无论此引导操作是否执行成功,则集群都能继续安装和启动。 枚举值: - continue:继续执行后续脚本。 - errorout:终止操作。
|
218
|
+
|
219
|
+
:return: The fail_action of this BootstrapScript.
|
220
|
+
:rtype: str
|
221
|
+
"""
|
222
|
+
return self._fail_action
|
223
|
+
|
224
|
+
@fail_action.setter
|
225
|
+
def fail_action(self, fail_action):
|
226
|
+
r"""Sets the fail_action of this BootstrapScript.
|
227
|
+
|
228
|
+
引导操作脚本执行失败后,是否继续执行后续脚本和创建集群。 缺省值为errorout,表示终止操作。 说明: 建议您在调试阶段设置为“继续”,无论此引导操作是否执行成功,则集群都能继续安装和启动。 枚举值: - continue:继续执行后续脚本。 - errorout:终止操作。
|
229
|
+
|
230
|
+
:param fail_action: The fail_action of this BootstrapScript.
|
231
|
+
:type fail_action: str
|
232
|
+
"""
|
233
|
+
self._fail_action = fail_action
|
234
|
+
|
235
|
+
@property
|
236
|
+
def before_component_start(self):
|
237
|
+
r"""Gets the before_component_start of this BootstrapScript.
|
238
|
+
|
239
|
+
引导操作脚本执行的时间。目前支持“组件启动前”和“组件启动后”两种类型。 缺省值为false,表示引导操作脚本在组件启动后执行。
|
240
|
+
|
241
|
+
:return: The before_component_start of this BootstrapScript.
|
242
|
+
:rtype: bool
|
243
|
+
"""
|
244
|
+
return self._before_component_start
|
245
|
+
|
246
|
+
@before_component_start.setter
|
247
|
+
def before_component_start(self, before_component_start):
|
248
|
+
r"""Sets the before_component_start of this BootstrapScript.
|
249
|
+
|
250
|
+
引导操作脚本执行的时间。目前支持“组件启动前”和“组件启动后”两种类型。 缺省值为false,表示引导操作脚本在组件启动后执行。
|
251
|
+
|
252
|
+
:param before_component_start: The before_component_start of this BootstrapScript.
|
253
|
+
:type before_component_start: bool
|
254
|
+
"""
|
255
|
+
self._before_component_start = before_component_start
|
256
|
+
|
257
|
+
@property
|
258
|
+
def start_time(self):
|
259
|
+
r"""Gets the start_time of this BootstrapScript.
|
260
|
+
|
261
|
+
单个引导操作脚本的执行时间。
|
262
|
+
|
263
|
+
:return: The start_time of this BootstrapScript.
|
264
|
+
:rtype: int
|
265
|
+
"""
|
266
|
+
return self._start_time
|
267
|
+
|
268
|
+
@start_time.setter
|
269
|
+
def start_time(self, start_time):
|
270
|
+
r"""Sets the start_time of this BootstrapScript.
|
271
|
+
|
272
|
+
单个引导操作脚本的执行时间。
|
273
|
+
|
274
|
+
:param start_time: The start_time of this BootstrapScript.
|
275
|
+
:type start_time: int
|
276
|
+
"""
|
277
|
+
self._start_time = start_time
|
278
|
+
|
279
|
+
@property
|
280
|
+
def state(self):
|
281
|
+
r"""Gets the state of this BootstrapScript.
|
282
|
+
|
283
|
+
单个引导操作脚本的运行状态。 - PENDING - IN_PROGRESS - SUCCESS - FAILURE
|
284
|
+
|
285
|
+
:return: The state of this BootstrapScript.
|
286
|
+
:rtype: str
|
287
|
+
"""
|
288
|
+
return self._state
|
289
|
+
|
290
|
+
@state.setter
|
291
|
+
def state(self, state):
|
292
|
+
r"""Sets the state of this BootstrapScript.
|
293
|
+
|
294
|
+
单个引导操作脚本的运行状态。 - PENDING - IN_PROGRESS - SUCCESS - FAILURE
|
295
|
+
|
296
|
+
:param state: The state of this BootstrapScript.
|
297
|
+
:type state: str
|
298
|
+
"""
|
299
|
+
self._state = state
|
300
|
+
|
301
|
+
@property
|
302
|
+
def action_stages(self):
|
303
|
+
r"""Gets the action_stages of this BootstrapScript.
|
304
|
+
|
305
|
+
选择引导操作脚本执行的时间。 - BEFORE_COMPONENT_FIRST_START: 组件首次启动前 - AFTER_COMPONENT_FIRST_START: 组件首次启动后 - BEFORE_SCALE_IN: 缩容前 - AFTER_SCALE_IN: 缩容后 - BEFORE_SCALE_OUT: 扩容前 - AFTER_SCALE_OUT: 扩容后
|
306
|
+
|
307
|
+
:return: The action_stages of this BootstrapScript.
|
308
|
+
:rtype: list[str]
|
309
|
+
"""
|
310
|
+
return self._action_stages
|
311
|
+
|
312
|
+
@action_stages.setter
|
313
|
+
def action_stages(self, action_stages):
|
314
|
+
r"""Sets the action_stages of this BootstrapScript.
|
315
|
+
|
316
|
+
选择引导操作脚本执行的时间。 - BEFORE_COMPONENT_FIRST_START: 组件首次启动前 - AFTER_COMPONENT_FIRST_START: 组件首次启动后 - BEFORE_SCALE_IN: 缩容前 - AFTER_SCALE_IN: 缩容后 - BEFORE_SCALE_OUT: 扩容前 - AFTER_SCALE_OUT: 扩容后
|
317
|
+
|
318
|
+
:param action_stages: The action_stages of this BootstrapScript.
|
319
|
+
:type action_stages: list[str]
|
320
|
+
"""
|
321
|
+
self._action_stages = action_stages
|
322
|
+
|
323
|
+
def to_dict(self):
|
324
|
+
"""Returns the model properties as a dict"""
|
325
|
+
result = {}
|
326
|
+
|
327
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
328
|
+
value = getattr(self, attr)
|
329
|
+
if isinstance(value, list):
|
330
|
+
result[attr] = list(map(
|
331
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
332
|
+
value
|
333
|
+
))
|
334
|
+
elif hasattr(value, "to_dict"):
|
335
|
+
result[attr] = value.to_dict()
|
336
|
+
elif isinstance(value, dict):
|
337
|
+
result[attr] = dict(map(
|
338
|
+
lambda item: (item[0], item[1].to_dict())
|
339
|
+
if hasattr(item[1], "to_dict") else item,
|
340
|
+
value.items()
|
341
|
+
))
|
342
|
+
else:
|
343
|
+
if attr in self.sensitive_list:
|
344
|
+
result[attr] = "****"
|
345
|
+
else:
|
346
|
+
result[attr] = value
|
347
|
+
|
348
|
+
return result
|
349
|
+
|
350
|
+
def to_str(self):
|
351
|
+
"""Returns the string representation of the model"""
|
352
|
+
import simplejson as json
|
353
|
+
if six.PY2:
|
354
|
+
import sys
|
355
|
+
reload(sys)
|
356
|
+
sys.setdefaultencoding("utf-8")
|
357
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
358
|
+
|
359
|
+
def __repr__(self):
|
360
|
+
"""For `print`"""
|
361
|
+
return self.to_str()
|
362
|
+
|
363
|
+
def __eq__(self, other):
|
364
|
+
"""Returns true if both objects are equal"""
|
365
|
+
if not isinstance(other, BootstrapScript):
|
366
|
+
return False
|
367
|
+
|
368
|
+
return self.__dict__ == other.__dict__
|
369
|
+
|
370
|
+
def __ne__(self, other):
|
371
|
+
"""Returns true if both objects are not equal"""
|
372
|
+
return not self == other
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class CancelSqlRequest:
|
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
|
+
'sql_id': 'str'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'cluster_id': 'cluster_id',
|
26
|
+
'sql_id': 'sql_id'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, cluster_id=None, sql_id=None):
|
30
|
+
r"""CancelSqlRequest
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param cluster_id: 集群ID。获取方法,请参见[获取集群ID](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)。
|
35
|
+
:type cluster_id: str
|
36
|
+
:param sql_id: SQL的执行ID,即提交SQL语句返回结果中的sql_id。
|
37
|
+
:type sql_id: str
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._cluster_id = None
|
43
|
+
self._sql_id = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
self.cluster_id = cluster_id
|
47
|
+
self.sql_id = sql_id
|
48
|
+
|
49
|
+
@property
|
50
|
+
def cluster_id(self):
|
51
|
+
r"""Gets the cluster_id of this CancelSqlRequest.
|
52
|
+
|
53
|
+
集群ID。获取方法,请参见[获取集群ID](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)。
|
54
|
+
|
55
|
+
:return: The cluster_id of this CancelSqlRequest.
|
56
|
+
:rtype: str
|
57
|
+
"""
|
58
|
+
return self._cluster_id
|
59
|
+
|
60
|
+
@cluster_id.setter
|
61
|
+
def cluster_id(self, cluster_id):
|
62
|
+
r"""Sets the cluster_id of this CancelSqlRequest.
|
63
|
+
|
64
|
+
集群ID。获取方法,请参见[获取集群ID](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)。
|
65
|
+
|
66
|
+
:param cluster_id: The cluster_id of this CancelSqlRequest.
|
67
|
+
:type cluster_id: str
|
68
|
+
"""
|
69
|
+
self._cluster_id = cluster_id
|
70
|
+
|
71
|
+
@property
|
72
|
+
def sql_id(self):
|
73
|
+
r"""Gets the sql_id of this CancelSqlRequest.
|
74
|
+
|
75
|
+
SQL的执行ID,即提交SQL语句返回结果中的sql_id。
|
76
|
+
|
77
|
+
:return: The sql_id of this CancelSqlRequest.
|
78
|
+
:rtype: str
|
79
|
+
"""
|
80
|
+
return self._sql_id
|
81
|
+
|
82
|
+
@sql_id.setter
|
83
|
+
def sql_id(self, sql_id):
|
84
|
+
r"""Sets the sql_id of this CancelSqlRequest.
|
85
|
+
|
86
|
+
SQL的执行ID,即提交SQL语句返回结果中的sql_id。
|
87
|
+
|
88
|
+
:param sql_id: The sql_id of this CancelSqlRequest.
|
89
|
+
:type sql_id: str
|
90
|
+
"""
|
91
|
+
self._sql_id = sql_id
|
92
|
+
|
93
|
+
def to_dict(self):
|
94
|
+
"""Returns the model properties as a dict"""
|
95
|
+
result = {}
|
96
|
+
|
97
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
98
|
+
value = getattr(self, attr)
|
99
|
+
if isinstance(value, list):
|
100
|
+
result[attr] = list(map(
|
101
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
102
|
+
value
|
103
|
+
))
|
104
|
+
elif hasattr(value, "to_dict"):
|
105
|
+
result[attr] = value.to_dict()
|
106
|
+
elif isinstance(value, dict):
|
107
|
+
result[attr] = dict(map(
|
108
|
+
lambda item: (item[0], item[1].to_dict())
|
109
|
+
if hasattr(item[1], "to_dict") else item,
|
110
|
+
value.items()
|
111
|
+
))
|
112
|
+
else:
|
113
|
+
if attr in self.sensitive_list:
|
114
|
+
result[attr] = "****"
|
115
|
+
else:
|
116
|
+
result[attr] = value
|
117
|
+
|
118
|
+
return result
|
119
|
+
|
120
|
+
def to_str(self):
|
121
|
+
"""Returns the string representation of the model"""
|
122
|
+
import simplejson as json
|
123
|
+
if six.PY2:
|
124
|
+
import sys
|
125
|
+
reload(sys)
|
126
|
+
sys.setdefaultencoding("utf-8")
|
127
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
128
|
+
|
129
|
+
def __repr__(self):
|
130
|
+
"""For `print`"""
|
131
|
+
return self.to_str()
|
132
|
+
|
133
|
+
def __eq__(self, other):
|
134
|
+
"""Returns true if both objects are equal"""
|
135
|
+
if not isinstance(other, CancelSqlRequest):
|
136
|
+
return False
|
137
|
+
|
138
|
+
return self.__dict__ == other.__dict__
|
139
|
+
|
140
|
+
def __ne__(self, other):
|
141
|
+
"""Returns true if both objects are not equal"""
|
142
|
+
return not self == other
|
@@ -0,0 +1,145 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
6
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
7
|
+
|
8
|
+
|
9
|
+
class CancelSqlResponse(SdkResponse):
|
10
|
+
|
11
|
+
"""
|
12
|
+
Attributes:
|
13
|
+
openapi_types (dict): The key is attribute name
|
14
|
+
and the value is attribute type.
|
15
|
+
attribute_map (dict): The key is attribute name
|
16
|
+
and the value is json key in definition.
|
17
|
+
"""
|
18
|
+
sensitive_list = []
|
19
|
+
|
20
|
+
openapi_types = {
|
21
|
+
'message': 'str',
|
22
|
+
'status': 'str'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'message': 'message',
|
27
|
+
'status': 'status'
|
28
|
+
}
|
29
|
+
|
30
|
+
def __init__(self, message=None, status=None):
|
31
|
+
r"""CancelSqlResponse
|
32
|
+
|
33
|
+
The model defined in huaweicloud sdk
|
34
|
+
|
35
|
+
:param message: 错误信息。
|
36
|
+
:type message: str
|
37
|
+
:param status: 取消SQL的执行结果。 说明: 默认返回SUCCEED,对于已经结束的任务也会返回SUCCEED,只有取消正在运行的SQL时没成功才会FAILED。 枚举值: - SUCCEED:成功 - FAILED:失败
|
38
|
+
:type status: str
|
39
|
+
"""
|
40
|
+
|
41
|
+
super(CancelSqlResponse, self).__init__()
|
42
|
+
|
43
|
+
self._message = None
|
44
|
+
self._status = None
|
45
|
+
self.discriminator = None
|
46
|
+
|
47
|
+
if message is not None:
|
48
|
+
self.message = message
|
49
|
+
if status is not None:
|
50
|
+
self.status = status
|
51
|
+
|
52
|
+
@property
|
53
|
+
def message(self):
|
54
|
+
r"""Gets the message of this CancelSqlResponse.
|
55
|
+
|
56
|
+
错误信息。
|
57
|
+
|
58
|
+
:return: The message of this CancelSqlResponse.
|
59
|
+
:rtype: str
|
60
|
+
"""
|
61
|
+
return self._message
|
62
|
+
|
63
|
+
@message.setter
|
64
|
+
def message(self, message):
|
65
|
+
r"""Sets the message of this CancelSqlResponse.
|
66
|
+
|
67
|
+
错误信息。
|
68
|
+
|
69
|
+
:param message: The message of this CancelSqlResponse.
|
70
|
+
:type message: str
|
71
|
+
"""
|
72
|
+
self._message = message
|
73
|
+
|
74
|
+
@property
|
75
|
+
def status(self):
|
76
|
+
r"""Gets the status of this CancelSqlResponse.
|
77
|
+
|
78
|
+
取消SQL的执行结果。 说明: 默认返回SUCCEED,对于已经结束的任务也会返回SUCCEED,只有取消正在运行的SQL时没成功才会FAILED。 枚举值: - SUCCEED:成功 - FAILED:失败
|
79
|
+
|
80
|
+
:return: The status of this CancelSqlResponse.
|
81
|
+
:rtype: str
|
82
|
+
"""
|
83
|
+
return self._status
|
84
|
+
|
85
|
+
@status.setter
|
86
|
+
def status(self, status):
|
87
|
+
r"""Sets the status of this CancelSqlResponse.
|
88
|
+
|
89
|
+
取消SQL的执行结果。 说明: 默认返回SUCCEED,对于已经结束的任务也会返回SUCCEED,只有取消正在运行的SQL时没成功才会FAILED。 枚举值: - SUCCEED:成功 - FAILED:失败
|
90
|
+
|
91
|
+
:param status: The status of this CancelSqlResponse.
|
92
|
+
:type status: str
|
93
|
+
"""
|
94
|
+
self._status = status
|
95
|
+
|
96
|
+
def to_dict(self):
|
97
|
+
"""Returns the model properties as a dict"""
|
98
|
+
result = {}
|
99
|
+
|
100
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
101
|
+
value = getattr(self, attr)
|
102
|
+
if isinstance(value, list):
|
103
|
+
result[attr] = list(map(
|
104
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
105
|
+
value
|
106
|
+
))
|
107
|
+
elif hasattr(value, "to_dict"):
|
108
|
+
result[attr] = value.to_dict()
|
109
|
+
elif isinstance(value, dict):
|
110
|
+
result[attr] = dict(map(
|
111
|
+
lambda item: (item[0], item[1].to_dict())
|
112
|
+
if hasattr(item[1], "to_dict") else item,
|
113
|
+
value.items()
|
114
|
+
))
|
115
|
+
else:
|
116
|
+
if attr in self.sensitive_list:
|
117
|
+
result[attr] = "****"
|
118
|
+
else:
|
119
|
+
result[attr] = value
|
120
|
+
|
121
|
+
return result
|
122
|
+
|
123
|
+
def to_str(self):
|
124
|
+
"""Returns the string representation of the model"""
|
125
|
+
import simplejson as json
|
126
|
+
if six.PY2:
|
127
|
+
import sys
|
128
|
+
reload(sys)
|
129
|
+
sys.setdefaultencoding("utf-8")
|
130
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
131
|
+
|
132
|
+
def __repr__(self):
|
133
|
+
"""For `print`"""
|
134
|
+
return self.to_str()
|
135
|
+
|
136
|
+
def __eq__(self, other):
|
137
|
+
"""Returns true if both objects are equal"""
|
138
|
+
if not isinstance(other, CancelSqlResponse):
|
139
|
+
return False
|
140
|
+
|
141
|
+
return self.__dict__ == other.__dict__
|
142
|
+
|
143
|
+
def __ne__(self, other):
|
144
|
+
"""Returns true if both objects are not equal"""
|
145
|
+
return not self == other
|