huaweicloudsdkmrs 3.1.71__py2.py3-none-any.whl → 3.1.73__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. huaweicloudsdkmrs/v1/__init__.py +9 -0
  2. huaweicloudsdkmrs/v1/model/__init__.py +9 -0
  3. huaweicloudsdkmrs/v1/model/component_external_datasource.py +144 -0
  4. huaweicloudsdkmrs/v1/model/flavor_lists.py +173 -0
  5. huaweicloudsdkmrs/v1/model/node_constraint.py +376 -0
  6. huaweicloudsdkmrs/v1/model/node_constraints.py +315 -0
  7. huaweicloudsdkmrs/v1/model/role_deploy_meta.py +637 -0
  8. huaweicloudsdkmrs/v1/model/show_mrs_version_metadata_request.py +143 -0
  9. huaweicloudsdkmrs/v1/model/show_mrs_version_metadata_response.py +456 -0
  10. huaweicloudsdkmrs/v1/model/version_component.py +434 -0
  11. huaweicloudsdkmrs/v1/model/version_constraint.py +169 -0
  12. huaweicloudsdkmrs/v1/mrs_async_client.py +67 -0
  13. huaweicloudsdkmrs/v1/mrs_client.py +67 -0
  14. huaweicloudsdkmrs/v1/region/mrs_region.py +6 -0
  15. huaweicloudsdkmrs/v2/__init__.py +7 -0
  16. huaweicloudsdkmrs/v2/model/__init__.py +7 -0
  17. huaweicloudsdkmrs/v2/model/modify_default_tags_request_body.py +114 -0
  18. huaweicloudsdkmrs/v2/model/show_tag_quota_request.py +143 -0
  19. huaweicloudsdkmrs/v2/model/show_tag_quota_response.py +145 -0
  20. huaweicloudsdkmrs/v2/model/show_tag_status_request.py +114 -0
  21. huaweicloudsdkmrs/v2/model/show_tag_status_response.py +145 -0
  22. huaweicloudsdkmrs/v2/model/switch_cluster_tags_request.py +139 -0
  23. huaweicloudsdkmrs/v2/model/switch_cluster_tags_response.py +85 -0
  24. huaweicloudsdkmrs/v2/mrs_async_client.py +199 -0
  25. huaweicloudsdkmrs/v2/mrs_client.py +199 -0
  26. huaweicloudsdkmrs/v2/region/mrs_region.py +6 -0
  27. {huaweicloudsdkmrs-3.1.71.dist-info → huaweicloudsdkmrs-3.1.73.dist-info}/METADATA +2 -2
  28. {huaweicloudsdkmrs-3.1.71.dist-info → huaweicloudsdkmrs-3.1.73.dist-info}/RECORD +31 -15
  29. {huaweicloudsdkmrs-3.1.71.dist-info → huaweicloudsdkmrs-3.1.73.dist-info}/LICENSE +0 -0
  30. {huaweicloudsdkmrs-3.1.71.dist-info → huaweicloudsdkmrs-3.1.73.dist-info}/WHEEL +0 -0
  31. {huaweicloudsdkmrs-3.1.71.dist-info → huaweicloudsdkmrs-3.1.73.dist-info}/top_level.txt +0 -0
@@ -1349,6 +1349,73 @@ class MrsClient(Client):
1349
1349
 
1350
1350
  return http_info
1351
1351
 
1352
+ def show_mrs_version_metadata(self, request):
1353
+ """查询对应版本元数据
1354
+
1355
+ 查询对应版本元数据。如果参数里指定集群id,则可查询集群更新过补丁之后的最新元数据。
1356
+
1357
+ Please refer to HUAWEI cloud API Explorer for details.
1358
+
1359
+ :param request: Request instance for ShowMrsVersionMetadata
1360
+ :type request: :class:`huaweicloudsdkmrs.v1.ShowMrsVersionMetadataRequest`
1361
+ :rtype: :class:`huaweicloudsdkmrs.v1.ShowMrsVersionMetadataResponse`
1362
+ """
1363
+ http_info = self._show_mrs_version_metadata_http_info(request)
1364
+ return self._call_api(**http_info)
1365
+
1366
+ def show_mrs_version_metadata_invoker(self, request):
1367
+ http_info = self._show_mrs_version_metadata_http_info(request)
1368
+ return SyncInvoker(self, http_info)
1369
+
1370
+ @classmethod
1371
+ def _show_mrs_version_metadata_http_info(cls, request):
1372
+ http_info = {
1373
+ "method": "GET",
1374
+ "resource_path": "/v1.1/{project_id}/metadata/versions/{version_name}",
1375
+ "request_type": request.__class__.__name__,
1376
+ "response_type": "ShowMrsVersionMetadataResponse"
1377
+ }
1378
+
1379
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
1380
+
1381
+ cname = None
1382
+
1383
+ collection_formats = {}
1384
+
1385
+ path_params = {}
1386
+ if 'version_name' in local_var_params:
1387
+ path_params['version_name'] = local_var_params['version_name']
1388
+
1389
+ query_params = []
1390
+ if 'cluster_id' in local_var_params:
1391
+ query_params.append(('cluster_id', local_var_params['cluster_id']))
1392
+
1393
+ header_params = {}
1394
+
1395
+ form_params = {}
1396
+
1397
+ body = None
1398
+ if isinstance(request, SdkStreamRequest):
1399
+ body = request.get_file_stream()
1400
+
1401
+ response_headers = []
1402
+
1403
+ header_params['Content-Type'] = http_utils.select_header_content_type(
1404
+ ['application/json'])
1405
+
1406
+ auth_settings = []
1407
+
1408
+ http_info["cname"] = cname
1409
+ http_info["collection_formats"] = collection_formats
1410
+ http_info["path_params"] = path_params
1411
+ http_info["query_params"] = query_params
1412
+ http_info["header_params"] = header_params
1413
+ http_info["post_params"] = form_params
1414
+ http_info["body"] = body
1415
+ http_info["response_headers"] = response_headers
1416
+
1417
+ return http_info
1418
+
1352
1419
  def _call_api(self, **kwargs):
1353
1420
  try:
1354
1421
  return self.do_http_request(**kwargs)
@@ -49,6 +49,10 @@ class MrsRegion:
49
49
  "https://mrs.ap-southeast-4.myhuaweicloud.cn")
50
50
  EU_WEST_101 = Region("eu-west-101",
51
51
  "https://mrs.eu-west-101.myhuaweicloud.eu")
52
+ ME_EAST_1 = Region("me-east-1",
53
+ "https://mrs.me-east-1.myhuaweicloud.com")
54
+ EU_WEST_0 = Region("eu-west-0",
55
+ "https://mrs.eu-west-0.myhuaweicloud.com")
52
56
 
53
57
  static_fields = {
54
58
  "cn-north-1": CN_NORTH_1,
@@ -71,6 +75,8 @@ class MrsRegion:
71
75
  "tr-west-1": TR_WEST_1,
72
76
  "ap-southeast-4": AP_SOUTHEAST_4,
73
77
  "eu-west-101": EU_WEST_101,
78
+ "me-east-1": ME_EAST_1,
79
+ "eu-west-0": EU_WEST_0,
74
80
  }
75
81
 
76
82
  @classmethod
@@ -54,6 +54,7 @@ from huaweicloudsdkmrs.v2.model.job_query_bean import JobQueryBean
54
54
  from huaweicloudsdkmrs.v2.model.job_submit_result import JobSubmitResult
55
55
  from huaweicloudsdkmrs.v2.model.list_data_connector_request import ListDataConnectorRequest
56
56
  from huaweicloudsdkmrs.v2.model.list_data_connector_response import ListDataConnectorResponse
57
+ from huaweicloudsdkmrs.v2.model.modify_default_tags_request_body import ModifyDefaultTagsRequestBody
57
58
  from huaweicloudsdkmrs.v2.model.node_group_v2 import NodeGroupV2
58
59
  from huaweicloudsdkmrs.v2.model.resources_plan import ResourcesPlan
59
60
  from huaweicloudsdkmrs.v2.model.rule import Rule
@@ -77,6 +78,10 @@ from huaweicloudsdkmrs.v2.model.show_sql_result_request import ShowSqlResultRequ
77
78
  from huaweicloudsdkmrs.v2.model.show_sql_result_response import ShowSqlResultResponse
78
79
  from huaweicloudsdkmrs.v2.model.show_sql_result_with_job_request import ShowSqlResultWithJobRequest
79
80
  from huaweicloudsdkmrs.v2.model.show_sql_result_with_job_response import ShowSqlResultWithJobResponse
81
+ from huaweicloudsdkmrs.v2.model.show_tag_quota_request import ShowTagQuotaRequest
82
+ from huaweicloudsdkmrs.v2.model.show_tag_quota_response import ShowTagQuotaResponse
83
+ from huaweicloudsdkmrs.v2.model.show_tag_status_request import ShowTagStatusRequest
84
+ from huaweicloudsdkmrs.v2.model.show_tag_status_response import ShowTagStatusResponse
80
85
  from huaweicloudsdkmrs.v2.model.shrink_cluster_request import ShrinkClusterRequest
81
86
  from huaweicloudsdkmrs.v2.model.shrink_cluster_response import ShrinkClusterResponse
82
87
  from huaweicloudsdkmrs.v2.model.shrink_param import ShrinkParam
@@ -84,6 +89,8 @@ from huaweicloudsdkmrs.v2.model.sql_execution_req import SqlExecutionReq
84
89
  from huaweicloudsdkmrs.v2.model.step_config import StepConfig
85
90
  from huaweicloudsdkmrs.v2.model.stop_job_request import StopJobRequest
86
91
  from huaweicloudsdkmrs.v2.model.stop_job_response import StopJobResponse
92
+ from huaweicloudsdkmrs.v2.model.switch_cluster_tags_request import SwitchClusterTagsRequest
93
+ from huaweicloudsdkmrs.v2.model.switch_cluster_tags_response import SwitchClusterTagsResponse
87
94
  from huaweicloudsdkmrs.v2.model.tag import Tag
88
95
  from huaweicloudsdkmrs.v2.model.trigger import Trigger
89
96
  from huaweicloudsdkmrs.v2.model.update_agency_mapping_request import UpdateAgencyMappingRequest
@@ -52,6 +52,7 @@ from huaweicloudsdkmrs.v2.model.job_query_bean import JobQueryBean
52
52
  from huaweicloudsdkmrs.v2.model.job_submit_result import JobSubmitResult
53
53
  from huaweicloudsdkmrs.v2.model.list_data_connector_request import ListDataConnectorRequest
54
54
  from huaweicloudsdkmrs.v2.model.list_data_connector_response import ListDataConnectorResponse
55
+ from huaweicloudsdkmrs.v2.model.modify_default_tags_request_body import ModifyDefaultTagsRequestBody
55
56
  from huaweicloudsdkmrs.v2.model.node_group_v2 import NodeGroupV2
56
57
  from huaweicloudsdkmrs.v2.model.resources_plan import ResourcesPlan
57
58
  from huaweicloudsdkmrs.v2.model.rule import Rule
@@ -75,6 +76,10 @@ from huaweicloudsdkmrs.v2.model.show_sql_result_request import ShowSqlResultRequ
75
76
  from huaweicloudsdkmrs.v2.model.show_sql_result_response import ShowSqlResultResponse
76
77
  from huaweicloudsdkmrs.v2.model.show_sql_result_with_job_request import ShowSqlResultWithJobRequest
77
78
  from huaweicloudsdkmrs.v2.model.show_sql_result_with_job_response import ShowSqlResultWithJobResponse
79
+ from huaweicloudsdkmrs.v2.model.show_tag_quota_request import ShowTagQuotaRequest
80
+ from huaweicloudsdkmrs.v2.model.show_tag_quota_response import ShowTagQuotaResponse
81
+ from huaweicloudsdkmrs.v2.model.show_tag_status_request import ShowTagStatusRequest
82
+ from huaweicloudsdkmrs.v2.model.show_tag_status_response import ShowTagStatusResponse
78
83
  from huaweicloudsdkmrs.v2.model.shrink_cluster_request import ShrinkClusterRequest
79
84
  from huaweicloudsdkmrs.v2.model.shrink_cluster_response import ShrinkClusterResponse
80
85
  from huaweicloudsdkmrs.v2.model.shrink_param import ShrinkParam
@@ -82,6 +87,8 @@ from huaweicloudsdkmrs.v2.model.sql_execution_req import SqlExecutionReq
82
87
  from huaweicloudsdkmrs.v2.model.step_config import StepConfig
83
88
  from huaweicloudsdkmrs.v2.model.stop_job_request import StopJobRequest
84
89
  from huaweicloudsdkmrs.v2.model.stop_job_response import StopJobResponse
90
+ from huaweicloudsdkmrs.v2.model.switch_cluster_tags_request import SwitchClusterTagsRequest
91
+ from huaweicloudsdkmrs.v2.model.switch_cluster_tags_response import SwitchClusterTagsResponse
85
92
  from huaweicloudsdkmrs.v2.model.tag import Tag
86
93
  from huaweicloudsdkmrs.v2.model.trigger import Trigger
87
94
  from huaweicloudsdkmrs.v2.model.update_agency_mapping_request import UpdateAgencyMappingRequest
@@ -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 ModifyDefaultTagsRequestBody:
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
+ 'action': 'str'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'action': 'action'
25
+ }
26
+
27
+ def __init__(self, action=None):
28
+ """ModifyDefaultTagsRequestBody
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param action: 操作类型,支持创建和删除
33
+ :type action: str
34
+ """
35
+
36
+
37
+
38
+ self._action = None
39
+ self.discriminator = None
40
+
41
+ self.action = action
42
+
43
+ @property
44
+ def action(self):
45
+ """Gets the action of this ModifyDefaultTagsRequestBody.
46
+
47
+ 操作类型,支持创建和删除
48
+
49
+ :return: The action of this ModifyDefaultTagsRequestBody.
50
+ :rtype: str
51
+ """
52
+ return self._action
53
+
54
+ @action.setter
55
+ def action(self, action):
56
+ """Sets the action of this ModifyDefaultTagsRequestBody.
57
+
58
+ 操作类型,支持创建和删除
59
+
60
+ :param action: The action of this ModifyDefaultTagsRequestBody.
61
+ :type action: str
62
+ """
63
+ self._action = action
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, ModifyDefaultTagsRequestBody):
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
@@ -0,0 +1,143 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class ShowTagQuotaRequest:
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
+ 'auto_scaling_policy_tags': 'bool'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'cluster_id': 'cluster_id',
26
+ 'auto_scaling_policy_tags': 'auto_scaling_policy_tags'
27
+ }
28
+
29
+ def __init__(self, cluster_id=None, auto_scaling_policy_tags=None):
30
+ """ShowTagQuotaRequest
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param cluster_id: 集群ID。
35
+ :type cluster_id: str
36
+ :param auto_scaling_policy_tags: 是否查询弹性伸缩策略标签
37
+ :type auto_scaling_policy_tags: bool
38
+ """
39
+
40
+
41
+
42
+ self._cluster_id = None
43
+ self._auto_scaling_policy_tags = None
44
+ self.discriminator = None
45
+
46
+ self.cluster_id = cluster_id
47
+ if auto_scaling_policy_tags is not None:
48
+ self.auto_scaling_policy_tags = auto_scaling_policy_tags
49
+
50
+ @property
51
+ def cluster_id(self):
52
+ """Gets the cluster_id of this ShowTagQuotaRequest.
53
+
54
+ 集群ID。
55
+
56
+ :return: The cluster_id of this ShowTagQuotaRequest.
57
+ :rtype: str
58
+ """
59
+ return self._cluster_id
60
+
61
+ @cluster_id.setter
62
+ def cluster_id(self, cluster_id):
63
+ """Sets the cluster_id of this ShowTagQuotaRequest.
64
+
65
+ 集群ID。
66
+
67
+ :param cluster_id: The cluster_id of this ShowTagQuotaRequest.
68
+ :type cluster_id: str
69
+ """
70
+ self._cluster_id = cluster_id
71
+
72
+ @property
73
+ def auto_scaling_policy_tags(self):
74
+ """Gets the auto_scaling_policy_tags of this ShowTagQuotaRequest.
75
+
76
+ 是否查询弹性伸缩策略标签
77
+
78
+ :return: The auto_scaling_policy_tags of this ShowTagQuotaRequest.
79
+ :rtype: bool
80
+ """
81
+ return self._auto_scaling_policy_tags
82
+
83
+ @auto_scaling_policy_tags.setter
84
+ def auto_scaling_policy_tags(self, auto_scaling_policy_tags):
85
+ """Sets the auto_scaling_policy_tags of this ShowTagQuotaRequest.
86
+
87
+ 是否查询弹性伸缩策略标签
88
+
89
+ :param auto_scaling_policy_tags: The auto_scaling_policy_tags of this ShowTagQuotaRequest.
90
+ :type auto_scaling_policy_tags: bool
91
+ """
92
+ self._auto_scaling_policy_tags = auto_scaling_policy_tags
93
+
94
+ def to_dict(self):
95
+ """Returns the model properties as a dict"""
96
+ result = {}
97
+
98
+ for attr, _ in six.iteritems(self.openapi_types):
99
+ value = getattr(self, attr)
100
+ if isinstance(value, list):
101
+ result[attr] = list(map(
102
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
103
+ value
104
+ ))
105
+ elif hasattr(value, "to_dict"):
106
+ result[attr] = value.to_dict()
107
+ elif isinstance(value, dict):
108
+ result[attr] = dict(map(
109
+ lambda item: (item[0], item[1].to_dict())
110
+ if hasattr(item[1], "to_dict") else item,
111
+ value.items()
112
+ ))
113
+ else:
114
+ if attr in self.sensitive_list:
115
+ result[attr] = "****"
116
+ else:
117
+ result[attr] = value
118
+
119
+ return result
120
+
121
+ def to_str(self):
122
+ """Returns the string representation of the model"""
123
+ import simplejson as json
124
+ if six.PY2:
125
+ import sys
126
+ reload(sys)
127
+ sys.setdefaultencoding("utf-8")
128
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
129
+
130
+ def __repr__(self):
131
+ """For `print`"""
132
+ return self.to_str()
133
+
134
+ def __eq__(self, other):
135
+ """Returns true if both objects are equal"""
136
+ if not isinstance(other, ShowTagQuotaRequest):
137
+ return False
138
+
139
+ return self.__dict__ == other.__dict__
140
+
141
+ def __ne__(self, other):
142
+ """Returns true if both objects are not equal"""
143
+ 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 ShowTagQuotaResponse(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
+ 'total_quota': 'int',
22
+ 'available_quota': 'int'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'total_quota': 'total_quota',
27
+ 'available_quota': 'available_quota'
28
+ }
29
+
30
+ def __init__(self, total_quota=None, available_quota=None):
31
+ """ShowTagQuotaResponse
32
+
33
+ The model defined in huaweicloud sdk
34
+
35
+ :param total_quota: 总配额大小
36
+ :type total_quota: int
37
+ :param available_quota: 可使用配额大小
38
+ :type available_quota: int
39
+ """
40
+
41
+ super(ShowTagQuotaResponse, self).__init__()
42
+
43
+ self._total_quota = None
44
+ self._available_quota = None
45
+ self.discriminator = None
46
+
47
+ if total_quota is not None:
48
+ self.total_quota = total_quota
49
+ if available_quota is not None:
50
+ self.available_quota = available_quota
51
+
52
+ @property
53
+ def total_quota(self):
54
+ """Gets the total_quota of this ShowTagQuotaResponse.
55
+
56
+ 总配额大小
57
+
58
+ :return: The total_quota of this ShowTagQuotaResponse.
59
+ :rtype: int
60
+ """
61
+ return self._total_quota
62
+
63
+ @total_quota.setter
64
+ def total_quota(self, total_quota):
65
+ """Sets the total_quota of this ShowTagQuotaResponse.
66
+
67
+ 总配额大小
68
+
69
+ :param total_quota: The total_quota of this ShowTagQuotaResponse.
70
+ :type total_quota: int
71
+ """
72
+ self._total_quota = total_quota
73
+
74
+ @property
75
+ def available_quota(self):
76
+ """Gets the available_quota of this ShowTagQuotaResponse.
77
+
78
+ 可使用配额大小
79
+
80
+ :return: The available_quota of this ShowTagQuotaResponse.
81
+ :rtype: int
82
+ """
83
+ return self._available_quota
84
+
85
+ @available_quota.setter
86
+ def available_quota(self, available_quota):
87
+ """Sets the available_quota of this ShowTagQuotaResponse.
88
+
89
+ 可使用配额大小
90
+
91
+ :param available_quota: The available_quota of this ShowTagQuotaResponse.
92
+ :type available_quota: int
93
+ """
94
+ self._available_quota = available_quota
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, ShowTagQuotaResponse):
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
@@ -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 ShowTagStatusRequest:
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
+ """ShowTagStatusRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param cluster_id: 集群ID。
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
+ """Gets the cluster_id of this ShowTagStatusRequest.
46
+
47
+ 集群ID。
48
+
49
+ :return: The cluster_id of this ShowTagStatusRequest.
50
+ :rtype: str
51
+ """
52
+ return self._cluster_id
53
+
54
+ @cluster_id.setter
55
+ def cluster_id(self, cluster_id):
56
+ """Sets the cluster_id of this ShowTagStatusRequest.
57
+
58
+ 集群ID。
59
+
60
+ :param cluster_id: The cluster_id of this ShowTagStatusRequest.
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, ShowTagStatusRequest):
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