huaweicloudsdkcae 3.1.98__py2.py3-none-any.whl → 3.1.100__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of huaweicloudsdkcae might be problematic. Click here for more details.

Files changed (42) hide show
  1. huaweicloudsdkcae/v1/__init__.py +25 -2
  2. huaweicloudsdkcae/v1/cae_async_client.py +416 -0
  3. huaweicloudsdkcae/v1/cae_client.py +416 -0
  4. huaweicloudsdkcae/v1/model/__init__.py +25 -2
  5. huaweicloudsdkcae/v1/model/access_configuration_port.py +32 -3
  6. huaweicloudsdkcae/v1/model/agency_metadata.py +28 -3
  7. huaweicloudsdkcae/v1/model/configuration_data_metadata.py +3 -3
  8. huaweicloudsdkcae/v1/model/configuration_request_data_spec.py +30 -1
  9. huaweicloudsdkcae/v1/model/create_component_request_body.py +8 -8
  10. huaweicloudsdkcae/v1/model/create_component_with_configuration_request.py +196 -0
  11. huaweicloudsdkcae/v1/model/create_component_with_configuration_request_body.py +213 -0
  12. huaweicloudsdkcae/v1/model/{create_component_request_body_metadata.py → create_component_with_configuration_request_body_metadata.py} +11 -11
  13. huaweicloudsdkcae/v1/model/{create_component_request_body_spec.py → create_component_with_configuration_request_body_spec.py} +27 -27
  14. huaweicloudsdkcae/v1/model/create_component_with_configuration_response.py +241 -0
  15. huaweicloudsdkcae/v1/model/create_component_with_configuration_response_body_status.py +115 -0
  16. huaweicloudsdkcae/v1/model/create_notice_rule_item.py +244 -0
  17. huaweicloudsdkcae/v1/model/create_notice_rule_req.py +166 -0
  18. huaweicloudsdkcae/v1/model/create_notice_rule_request.py +168 -0
  19. huaweicloudsdkcae/v1/model/create_notice_rule_resp_item.py +277 -0
  20. huaweicloudsdkcae/v1/model/create_notice_rule_response.py +170 -0
  21. huaweicloudsdkcae/v1/model/delete_notice_rule_request.py +167 -0
  22. huaweicloudsdkcae/v1/model/delete_notice_rule_response.py +112 -0
  23. huaweicloudsdkcae/v1/model/environment_item.py +3 -3
  24. huaweicloudsdkcae/v1/model/list_notice_rules_request.py +143 -0
  25. huaweicloudsdkcae/v1/model/list_notice_rules_response.py +174 -0
  26. huaweicloudsdkcae/v1/model/notice_rule_notification.py +142 -0
  27. huaweicloudsdkcae/v1/model/notice_rule_scope.py +201 -0
  28. huaweicloudsdkcae/v1/model/resources_credential.py +144 -0
  29. huaweicloudsdkcae/v1/model/show_notice_rule_request.py +167 -0
  30. huaweicloudsdkcae/v1/model/show_notice_rule_response.py +170 -0
  31. huaweicloudsdkcae/v1/model/trigger_policy.py +201 -0
  32. huaweicloudsdkcae/v1/model/update_notice_rule_item.py +192 -0
  33. huaweicloudsdkcae/v1/model/update_notice_rule_req.py +166 -0
  34. huaweicloudsdkcae/v1/model/update_notice_rule_request.py +192 -0
  35. huaweicloudsdkcae/v1/model/update_notice_rule_response.py +170 -0
  36. huaweicloudsdkcae/v1/model/volume.py +30 -1
  37. huaweicloudsdkcae/v1/model/volume_spec.py +32 -3
  38. {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/METADATA +2 -2
  39. {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/RECORD +42 -19
  40. {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/LICENSE +0 -0
  41. {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/WHEEL +0 -0
  42. {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,244 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateNoticeRuleItem:
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
+ 'event_name': 'str',
22
+ 'scope': 'NoticeRuleScope',
23
+ 'trigger_policy': 'TriggerPolicy',
24
+ 'notification': 'NoticeRuleNotification',
25
+ 'enable': 'bool'
26
+ }
27
+
28
+ attribute_map = {
29
+ 'name': 'name',
30
+ 'event_name': 'event_name',
31
+ 'scope': 'scope',
32
+ 'trigger_policy': 'trigger_policy',
33
+ 'notification': 'notification',
34
+ 'enable': 'enable'
35
+ }
36
+
37
+ def __init__(self, name=None, event_name=None, scope=None, trigger_policy=None, notification=None, enable=None):
38
+ """CreateNoticeRuleItem
39
+
40
+ The model defined in huaweicloud sdk
41
+
42
+ :param name: 通知名称。
43
+ :type name: str
44
+ :param event_name: 触发事件名称,支持实例调度成功、实例调度失败、健康检查成功、健康检查失败、镜像拉取成功、镜像拉取失败、容器启动成功、容器启动失败、卷挂载成功、卷挂载失败。
45
+ :type event_name: str
46
+ :param scope:
47
+ :type scope: :class:`huaweicloudsdkcae.v1.NoticeRuleScope`
48
+ :param trigger_policy:
49
+ :type trigger_policy: :class:`huaweicloudsdkcae.v1.TriggerPolicy`
50
+ :param notification:
51
+ :type notification: :class:`huaweicloudsdkcae.v1.NoticeRuleNotification`
52
+ :param enable: 是否启用。
53
+ :type enable: bool
54
+ """
55
+
56
+
57
+
58
+ self._name = None
59
+ self._event_name = None
60
+ self._scope = None
61
+ self._trigger_policy = None
62
+ self._notification = None
63
+ self._enable = None
64
+ self.discriminator = None
65
+
66
+ self.name = name
67
+ if event_name is not None:
68
+ self.event_name = event_name
69
+ self.scope = scope
70
+ self.trigger_policy = trigger_policy
71
+ self.notification = notification
72
+ if enable is not None:
73
+ self.enable = enable
74
+
75
+ @property
76
+ def name(self):
77
+ """Gets the name of this CreateNoticeRuleItem.
78
+
79
+ 通知名称。
80
+
81
+ :return: The name of this CreateNoticeRuleItem.
82
+ :rtype: str
83
+ """
84
+ return self._name
85
+
86
+ @name.setter
87
+ def name(self, name):
88
+ """Sets the name of this CreateNoticeRuleItem.
89
+
90
+ 通知名称。
91
+
92
+ :param name: The name of this CreateNoticeRuleItem.
93
+ :type name: str
94
+ """
95
+ self._name = name
96
+
97
+ @property
98
+ def event_name(self):
99
+ """Gets the event_name of this CreateNoticeRuleItem.
100
+
101
+ 触发事件名称,支持实例调度成功、实例调度失败、健康检查成功、健康检查失败、镜像拉取成功、镜像拉取失败、容器启动成功、容器启动失败、卷挂载成功、卷挂载失败。
102
+
103
+ :return: The event_name of this CreateNoticeRuleItem.
104
+ :rtype: str
105
+ """
106
+ return self._event_name
107
+
108
+ @event_name.setter
109
+ def event_name(self, event_name):
110
+ """Sets the event_name of this CreateNoticeRuleItem.
111
+
112
+ 触发事件名称,支持实例调度成功、实例调度失败、健康检查成功、健康检查失败、镜像拉取成功、镜像拉取失败、容器启动成功、容器启动失败、卷挂载成功、卷挂载失败。
113
+
114
+ :param event_name: The event_name of this CreateNoticeRuleItem.
115
+ :type event_name: str
116
+ """
117
+ self._event_name = event_name
118
+
119
+ @property
120
+ def scope(self):
121
+ """Gets the scope of this CreateNoticeRuleItem.
122
+
123
+ :return: The scope of this CreateNoticeRuleItem.
124
+ :rtype: :class:`huaweicloudsdkcae.v1.NoticeRuleScope`
125
+ """
126
+ return self._scope
127
+
128
+ @scope.setter
129
+ def scope(self, scope):
130
+ """Sets the scope of this CreateNoticeRuleItem.
131
+
132
+ :param scope: The scope of this CreateNoticeRuleItem.
133
+ :type scope: :class:`huaweicloudsdkcae.v1.NoticeRuleScope`
134
+ """
135
+ self._scope = scope
136
+
137
+ @property
138
+ def trigger_policy(self):
139
+ """Gets the trigger_policy of this CreateNoticeRuleItem.
140
+
141
+ :return: The trigger_policy of this CreateNoticeRuleItem.
142
+ :rtype: :class:`huaweicloudsdkcae.v1.TriggerPolicy`
143
+ """
144
+ return self._trigger_policy
145
+
146
+ @trigger_policy.setter
147
+ def trigger_policy(self, trigger_policy):
148
+ """Sets the trigger_policy of this CreateNoticeRuleItem.
149
+
150
+ :param trigger_policy: The trigger_policy of this CreateNoticeRuleItem.
151
+ :type trigger_policy: :class:`huaweicloudsdkcae.v1.TriggerPolicy`
152
+ """
153
+ self._trigger_policy = trigger_policy
154
+
155
+ @property
156
+ def notification(self):
157
+ """Gets the notification of this CreateNoticeRuleItem.
158
+
159
+ :return: The notification of this CreateNoticeRuleItem.
160
+ :rtype: :class:`huaweicloudsdkcae.v1.NoticeRuleNotification`
161
+ """
162
+ return self._notification
163
+
164
+ @notification.setter
165
+ def notification(self, notification):
166
+ """Sets the notification of this CreateNoticeRuleItem.
167
+
168
+ :param notification: The notification of this CreateNoticeRuleItem.
169
+ :type notification: :class:`huaweicloudsdkcae.v1.NoticeRuleNotification`
170
+ """
171
+ self._notification = notification
172
+
173
+ @property
174
+ def enable(self):
175
+ """Gets the enable of this CreateNoticeRuleItem.
176
+
177
+ 是否启用。
178
+
179
+ :return: The enable of this CreateNoticeRuleItem.
180
+ :rtype: bool
181
+ """
182
+ return self._enable
183
+
184
+ @enable.setter
185
+ def enable(self, enable):
186
+ """Sets the enable of this CreateNoticeRuleItem.
187
+
188
+ 是否启用。
189
+
190
+ :param enable: The enable of this CreateNoticeRuleItem.
191
+ :type enable: bool
192
+ """
193
+ self._enable = enable
194
+
195
+ def to_dict(self):
196
+ """Returns the model properties as a dict"""
197
+ result = {}
198
+
199
+ for attr, _ in six.iteritems(self.openapi_types):
200
+ value = getattr(self, attr)
201
+ if isinstance(value, list):
202
+ result[attr] = list(map(
203
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
204
+ value
205
+ ))
206
+ elif hasattr(value, "to_dict"):
207
+ result[attr] = value.to_dict()
208
+ elif isinstance(value, dict):
209
+ result[attr] = dict(map(
210
+ lambda item: (item[0], item[1].to_dict())
211
+ if hasattr(item[1], "to_dict") else item,
212
+ value.items()
213
+ ))
214
+ else:
215
+ if attr in self.sensitive_list:
216
+ result[attr] = "****"
217
+ else:
218
+ result[attr] = value
219
+
220
+ return result
221
+
222
+ def to_str(self):
223
+ """Returns the string representation of the model"""
224
+ import simplejson as json
225
+ if six.PY2:
226
+ import sys
227
+ reload(sys)
228
+ sys.setdefaultencoding("utf-8")
229
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
230
+
231
+ def __repr__(self):
232
+ """For `print`"""
233
+ return self.to_str()
234
+
235
+ def __eq__(self, other):
236
+ """Returns true if both objects are equal"""
237
+ if not isinstance(other, CreateNoticeRuleItem):
238
+ return False
239
+
240
+ return self.__dict__ == other.__dict__
241
+
242
+ def __ne__(self, other):
243
+ """Returns true if both objects are not equal"""
244
+ return not self == other
@@ -0,0 +1,166 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateNoticeRuleReq:
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
+ 'api_version': 'str',
21
+ 'kind': 'str',
22
+ 'spec': 'CreateNoticeRuleItem'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'api_version': 'api_version',
27
+ 'kind': 'kind',
28
+ 'spec': 'spec'
29
+ }
30
+
31
+ def __init__(self, api_version=None, kind=None, spec=None):
32
+ """CreateNoticeRuleReq
33
+
34
+ The model defined in huaweicloud sdk
35
+
36
+ :param api_version: API版本,固定值“v1”,该值不可修改。
37
+ :type api_version: str
38
+ :param kind: API类型,固定值“NoticeRule”,该值不可修改。
39
+ :type kind: str
40
+ :param spec:
41
+ :type spec: :class:`huaweicloudsdkcae.v1.CreateNoticeRuleItem`
42
+ """
43
+
44
+
45
+
46
+ self._api_version = None
47
+ self._kind = None
48
+ self._spec = None
49
+ self.discriminator = None
50
+
51
+ self.api_version = api_version
52
+ self.kind = kind
53
+ self.spec = spec
54
+
55
+ @property
56
+ def api_version(self):
57
+ """Gets the api_version of this CreateNoticeRuleReq.
58
+
59
+ API版本,固定值“v1”,该值不可修改。
60
+
61
+ :return: The api_version of this CreateNoticeRuleReq.
62
+ :rtype: str
63
+ """
64
+ return self._api_version
65
+
66
+ @api_version.setter
67
+ def api_version(self, api_version):
68
+ """Sets the api_version of this CreateNoticeRuleReq.
69
+
70
+ API版本,固定值“v1”,该值不可修改。
71
+
72
+ :param api_version: The api_version of this CreateNoticeRuleReq.
73
+ :type api_version: str
74
+ """
75
+ self._api_version = api_version
76
+
77
+ @property
78
+ def kind(self):
79
+ """Gets the kind of this CreateNoticeRuleReq.
80
+
81
+ API类型,固定值“NoticeRule”,该值不可修改。
82
+
83
+ :return: The kind of this CreateNoticeRuleReq.
84
+ :rtype: str
85
+ """
86
+ return self._kind
87
+
88
+ @kind.setter
89
+ def kind(self, kind):
90
+ """Sets the kind of this CreateNoticeRuleReq.
91
+
92
+ API类型,固定值“NoticeRule”,该值不可修改。
93
+
94
+ :param kind: The kind of this CreateNoticeRuleReq.
95
+ :type kind: str
96
+ """
97
+ self._kind = kind
98
+
99
+ @property
100
+ def spec(self):
101
+ """Gets the spec of this CreateNoticeRuleReq.
102
+
103
+ :return: The spec of this CreateNoticeRuleReq.
104
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateNoticeRuleItem`
105
+ """
106
+ return self._spec
107
+
108
+ @spec.setter
109
+ def spec(self, spec):
110
+ """Sets the spec of this CreateNoticeRuleReq.
111
+
112
+ :param spec: The spec of this CreateNoticeRuleReq.
113
+ :type spec: :class:`huaweicloudsdkcae.v1.CreateNoticeRuleItem`
114
+ """
115
+ self._spec = spec
116
+
117
+ def to_dict(self):
118
+ """Returns the model properties as a dict"""
119
+ result = {}
120
+
121
+ for attr, _ in six.iteritems(self.openapi_types):
122
+ value = getattr(self, attr)
123
+ if isinstance(value, list):
124
+ result[attr] = list(map(
125
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
126
+ value
127
+ ))
128
+ elif hasattr(value, "to_dict"):
129
+ result[attr] = value.to_dict()
130
+ elif isinstance(value, dict):
131
+ result[attr] = dict(map(
132
+ lambda item: (item[0], item[1].to_dict())
133
+ if hasattr(item[1], "to_dict") else item,
134
+ value.items()
135
+ ))
136
+ else:
137
+ if attr in self.sensitive_list:
138
+ result[attr] = "****"
139
+ else:
140
+ result[attr] = value
141
+
142
+ return result
143
+
144
+ def to_str(self):
145
+ """Returns the string representation of the model"""
146
+ import simplejson as json
147
+ if six.PY2:
148
+ import sys
149
+ reload(sys)
150
+ sys.setdefaultencoding("utf-8")
151
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
152
+
153
+ def __repr__(self):
154
+ """For `print`"""
155
+ return self.to_str()
156
+
157
+ def __eq__(self, other):
158
+ """Returns true if both objects are equal"""
159
+ if not isinstance(other, CreateNoticeRuleReq):
160
+ return False
161
+
162
+ return self.__dict__ == other.__dict__
163
+
164
+ def __ne__(self, other):
165
+ """Returns true if both objects are not equal"""
166
+ return not self == other
@@ -0,0 +1,168 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateNoticeRuleRequest:
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
+ 'x_enterprise_project_id': 'str',
21
+ 'x_environment_id': 'str',
22
+ 'body': 'CreateNoticeRuleReq'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'x_enterprise_project_id': 'X-Enterprise-Project-ID',
27
+ 'x_environment_id': 'X-Environment-ID',
28
+ 'body': 'body'
29
+ }
30
+
31
+ def __init__(self, x_enterprise_project_id=None, x_environment_id=None, body=None):
32
+ """CreateNoticeRuleRequest
33
+
34
+ The model defined in huaweicloud sdk
35
+
36
+ :param x_enterprise_project_id: 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
37
+ :type x_enterprise_project_id: str
38
+ :param x_environment_id: 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
39
+ :type x_environment_id: str
40
+ :param body: Body of the CreateNoticeRuleRequest
41
+ :type body: :class:`huaweicloudsdkcae.v1.CreateNoticeRuleReq`
42
+ """
43
+
44
+
45
+
46
+ self._x_enterprise_project_id = None
47
+ self._x_environment_id = None
48
+ self._body = None
49
+ self.discriminator = None
50
+
51
+ if x_enterprise_project_id is not None:
52
+ self.x_enterprise_project_id = x_enterprise_project_id
53
+ self.x_environment_id = x_environment_id
54
+ if body is not None:
55
+ self.body = body
56
+
57
+ @property
58
+ def x_enterprise_project_id(self):
59
+ """Gets the x_enterprise_project_id of this CreateNoticeRuleRequest.
60
+
61
+ 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
62
+
63
+ :return: The x_enterprise_project_id of this CreateNoticeRuleRequest.
64
+ :rtype: str
65
+ """
66
+ return self._x_enterprise_project_id
67
+
68
+ @x_enterprise_project_id.setter
69
+ def x_enterprise_project_id(self, x_enterprise_project_id):
70
+ """Sets the x_enterprise_project_id of this CreateNoticeRuleRequest.
71
+
72
+ 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
73
+
74
+ :param x_enterprise_project_id: The x_enterprise_project_id of this CreateNoticeRuleRequest.
75
+ :type x_enterprise_project_id: str
76
+ """
77
+ self._x_enterprise_project_id = x_enterprise_project_id
78
+
79
+ @property
80
+ def x_environment_id(self):
81
+ """Gets the x_environment_id of this CreateNoticeRuleRequest.
82
+
83
+ 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
84
+
85
+ :return: The x_environment_id of this CreateNoticeRuleRequest.
86
+ :rtype: str
87
+ """
88
+ return self._x_environment_id
89
+
90
+ @x_environment_id.setter
91
+ def x_environment_id(self, x_environment_id):
92
+ """Sets the x_environment_id of this CreateNoticeRuleRequest.
93
+
94
+ 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
95
+
96
+ :param x_environment_id: The x_environment_id of this CreateNoticeRuleRequest.
97
+ :type x_environment_id: str
98
+ """
99
+ self._x_environment_id = x_environment_id
100
+
101
+ @property
102
+ def body(self):
103
+ """Gets the body of this CreateNoticeRuleRequest.
104
+
105
+ :return: The body of this CreateNoticeRuleRequest.
106
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateNoticeRuleReq`
107
+ """
108
+ return self._body
109
+
110
+ @body.setter
111
+ def body(self, body):
112
+ """Sets the body of this CreateNoticeRuleRequest.
113
+
114
+ :param body: The body of this CreateNoticeRuleRequest.
115
+ :type body: :class:`huaweicloudsdkcae.v1.CreateNoticeRuleReq`
116
+ """
117
+ self._body = body
118
+
119
+ def to_dict(self):
120
+ """Returns the model properties as a dict"""
121
+ result = {}
122
+
123
+ for attr, _ in six.iteritems(self.openapi_types):
124
+ value = getattr(self, attr)
125
+ if isinstance(value, list):
126
+ result[attr] = list(map(
127
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
128
+ value
129
+ ))
130
+ elif hasattr(value, "to_dict"):
131
+ result[attr] = value.to_dict()
132
+ elif isinstance(value, dict):
133
+ result[attr] = dict(map(
134
+ lambda item: (item[0], item[1].to_dict())
135
+ if hasattr(item[1], "to_dict") else item,
136
+ value.items()
137
+ ))
138
+ else:
139
+ if attr in self.sensitive_list:
140
+ result[attr] = "****"
141
+ else:
142
+ result[attr] = value
143
+
144
+ return result
145
+
146
+ def to_str(self):
147
+ """Returns the string representation of the model"""
148
+ import simplejson as json
149
+ if six.PY2:
150
+ import sys
151
+ reload(sys)
152
+ sys.setdefaultencoding("utf-8")
153
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
154
+
155
+ def __repr__(self):
156
+ """For `print`"""
157
+ return self.to_str()
158
+
159
+ def __eq__(self, other):
160
+ """Returns true if both objects are equal"""
161
+ if not isinstance(other, CreateNoticeRuleRequest):
162
+ return False
163
+
164
+ return self.__dict__ == other.__dict__
165
+
166
+ def __ne__(self, other):
167
+ """Returns true if both objects are not equal"""
168
+ return not self == other