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,112 @@
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 DeleteNoticeRuleResponse(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
+ 'body': 'str'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'body': 'body'
26
+ }
27
+
28
+ def __init__(self, body=None):
29
+ """DeleteNoticeRuleResponse
30
+
31
+ The model defined in huaweicloud sdk
32
+
33
+ :param body:
34
+ :type body: str
35
+ """
36
+
37
+ super(DeleteNoticeRuleResponse, self).__init__()
38
+
39
+ self._body = None
40
+ self.discriminator = None
41
+
42
+ if body is not None:
43
+ self.body = body
44
+
45
+ @property
46
+ def body(self):
47
+ """Gets the body of this DeleteNoticeRuleResponse.
48
+
49
+ :return: The body of this DeleteNoticeRuleResponse.
50
+ :rtype: str
51
+ """
52
+ return self._body
53
+
54
+ @body.setter
55
+ def body(self, body):
56
+ """Sets the body of this DeleteNoticeRuleResponse.
57
+
58
+ :param body: The body of this DeleteNoticeRuleResponse.
59
+ :type body: str
60
+ """
61
+ self._body = body
62
+
63
+ def to_dict(self):
64
+ """Returns the model properties as a dict"""
65
+ result = {}
66
+
67
+ for attr, _ in six.iteritems(self.openapi_types):
68
+ value = getattr(self, attr)
69
+ if isinstance(value, list):
70
+ result[attr] = list(map(
71
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
72
+ value
73
+ ))
74
+ elif hasattr(value, "to_dict"):
75
+ result[attr] = value.to_dict()
76
+ elif isinstance(value, dict):
77
+ result[attr] = dict(map(
78
+ lambda item: (item[0], item[1].to_dict())
79
+ if hasattr(item[1], "to_dict") else item,
80
+ value.items()
81
+ ))
82
+ else:
83
+ if attr in self.sensitive_list:
84
+ result[attr] = "****"
85
+ else:
86
+ result[attr] = value
87
+
88
+ return result
89
+
90
+ def to_str(self):
91
+ """Returns the string representation of the model"""
92
+ import simplejson as json
93
+ if six.PY2:
94
+ import sys
95
+ reload(sys)
96
+ sys.setdefaultencoding("utf-8")
97
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
98
+
99
+ def __repr__(self):
100
+ """For `print`"""
101
+ return self.to_str()
102
+
103
+ def __eq__(self, other):
104
+ """Returns true if both objects are equal"""
105
+ if not isinstance(other, DeleteNoticeRuleResponse):
106
+ return False
107
+
108
+ return self.__dict__ == other.__dict__
109
+
110
+ def __ne__(self, other):
111
+ """Returns true if both objects are not equal"""
112
+ return not self == other
@@ -49,7 +49,7 @@ class EnvironmentItem:
49
49
  :type job_id: str
50
50
  :param status: 环境状态。
51
51
  :type status: str
52
- :param annotations: 环境附加属性。 - cluster_id:CCE集群ID。 - enterprise_project_id:企业项目ID。 - group_name:主环境绑定的SWR组织名称。 - inbound_eip_addr:负载均衡绑定EIP地址。 - namespace:CCE集群命名空间。 - public_elb_id:ELB ID,主环境绑定的负载均衡ID。 - type:环境类型,当前仅支持exclusive类型。 - vpc_id:主环境绑定的VPC ID。
52
+ :param annotations: 环境附加属性。 - cluster_id:CCE集群ID。 - enterprise_project_id:企业项目ID。 - env_category: 环境种类,当前支持v1、v2,在授权云存储时,v1、v2种类环境有所不同。 - group_name:主环境绑定的SWR组织名称。 - inbound_eip_addr:负载均衡绑定EIP地址。 - namespace:CCE集群命名空间。 - public_elb_id:ELB ID,主环境绑定的负载均衡ID。 - type:环境类型,当前仅支持exclusive类型。 - vpc_id:主环境绑定的VPC ID。
53
53
  :type annotations: dict(str, str)
54
54
  :param created_at: 创建时间。
55
55
  :type created_at: str
@@ -175,7 +175,7 @@ class EnvironmentItem:
175
175
  def annotations(self):
176
176
  """Gets the annotations of this EnvironmentItem.
177
177
 
178
- 环境附加属性。 - cluster_id:CCE集群ID。 - enterprise_project_id:企业项目ID。 - group_name:主环境绑定的SWR组织名称。 - inbound_eip_addr:负载均衡绑定EIP地址。 - namespace:CCE集群命名空间。 - public_elb_id:ELB ID,主环境绑定的负载均衡ID。 - type:环境类型,当前仅支持exclusive类型。 - vpc_id:主环境绑定的VPC ID。
178
+ 环境附加属性。 - cluster_id:CCE集群ID。 - enterprise_project_id:企业项目ID。 - env_category: 环境种类,当前支持v1、v2,在授权云存储时,v1、v2种类环境有所不同。 - group_name:主环境绑定的SWR组织名称。 - inbound_eip_addr:负载均衡绑定EIP地址。 - namespace:CCE集群命名空间。 - public_elb_id:ELB ID,主环境绑定的负载均衡ID。 - type:环境类型,当前仅支持exclusive类型。 - vpc_id:主环境绑定的VPC ID。
179
179
 
180
180
  :return: The annotations of this EnvironmentItem.
181
181
  :rtype: dict(str, str)
@@ -186,7 +186,7 @@ class EnvironmentItem:
186
186
  def annotations(self, annotations):
187
187
  """Sets the annotations of this EnvironmentItem.
188
188
 
189
- 环境附加属性。 - cluster_id:CCE集群ID。 - enterprise_project_id:企业项目ID。 - group_name:主环境绑定的SWR组织名称。 - inbound_eip_addr:负载均衡绑定EIP地址。 - namespace:CCE集群命名空间。 - public_elb_id:ELB ID,主环境绑定的负载均衡ID。 - type:环境类型,当前仅支持exclusive类型。 - vpc_id:主环境绑定的VPC ID。
189
+ 环境附加属性。 - cluster_id:CCE集群ID。 - enterprise_project_id:企业项目ID。 - env_category: 环境种类,当前支持v1、v2,在授权云存储时,v1、v2种类环境有所不同。 - group_name:主环境绑定的SWR组织名称。 - inbound_eip_addr:负载均衡绑定EIP地址。 - namespace:CCE集群命名空间。 - public_elb_id:ELB ID,主环境绑定的负载均衡ID。 - type:环境类型,当前仅支持exclusive类型。 - vpc_id:主环境绑定的VPC ID。
190
190
 
191
191
  :param annotations: The annotations of this EnvironmentItem.
192
192
  :type annotations: dict(str, str)
@@ -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 ListNoticeRulesRequest:
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
+ }
23
+
24
+ attribute_map = {
25
+ 'x_enterprise_project_id': 'X-Enterprise-Project-ID',
26
+ 'x_environment_id': 'X-Environment-ID'
27
+ }
28
+
29
+ def __init__(self, x_enterprise_project_id=None, x_environment_id=None):
30
+ """ListNoticeRulesRequest
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param x_enterprise_project_id: 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
35
+ :type x_enterprise_project_id: str
36
+ :param x_environment_id: 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
37
+ :type x_environment_id: str
38
+ """
39
+
40
+
41
+
42
+ self._x_enterprise_project_id = None
43
+ self._x_environment_id = None
44
+ self.discriminator = None
45
+
46
+ if x_enterprise_project_id is not None:
47
+ self.x_enterprise_project_id = x_enterprise_project_id
48
+ self.x_environment_id = x_environment_id
49
+
50
+ @property
51
+ def x_enterprise_project_id(self):
52
+ """Gets the x_enterprise_project_id of this ListNoticeRulesRequest.
53
+
54
+ 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
55
+
56
+ :return: The x_enterprise_project_id of this ListNoticeRulesRequest.
57
+ :rtype: str
58
+ """
59
+ return self._x_enterprise_project_id
60
+
61
+ @x_enterprise_project_id.setter
62
+ def x_enterprise_project_id(self, x_enterprise_project_id):
63
+ """Sets the x_enterprise_project_id of this ListNoticeRulesRequest.
64
+
65
+ 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
66
+
67
+ :param x_enterprise_project_id: The x_enterprise_project_id of this ListNoticeRulesRequest.
68
+ :type x_enterprise_project_id: str
69
+ """
70
+ self._x_enterprise_project_id = x_enterprise_project_id
71
+
72
+ @property
73
+ def x_environment_id(self):
74
+ """Gets the x_environment_id of this ListNoticeRulesRequest.
75
+
76
+ 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
77
+
78
+ :return: The x_environment_id of this ListNoticeRulesRequest.
79
+ :rtype: str
80
+ """
81
+ return self._x_environment_id
82
+
83
+ @x_environment_id.setter
84
+ def x_environment_id(self, x_environment_id):
85
+ """Sets the x_environment_id of this ListNoticeRulesRequest.
86
+
87
+ 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
88
+
89
+ :param x_environment_id: The x_environment_id of this ListNoticeRulesRequest.
90
+ :type x_environment_id: str
91
+ """
92
+ self._x_environment_id = x_environment_id
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, ListNoticeRulesRequest):
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,174 @@
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 ListNoticeRulesResponse(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
+ 'api_version': 'str',
22
+ 'kind': 'str',
23
+ 'items': 'list[CreateNoticeRuleRespItem]'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'api_version': 'api_version',
28
+ 'kind': 'kind',
29
+ 'items': 'items'
30
+ }
31
+
32
+ def __init__(self, api_version=None, kind=None, items=None):
33
+ """ListNoticeRulesResponse
34
+
35
+ The model defined in huaweicloud sdk
36
+
37
+ :param api_version: API版本,固定值“v1”,该值不可修改。
38
+ :type api_version: str
39
+ :param kind: API类型,固定值“NoticeRule”,该值不可修改。
40
+ :type kind: str
41
+ :param items: 请求数据。
42
+ :type items: list[:class:`huaweicloudsdkcae.v1.CreateNoticeRuleRespItem`]
43
+ """
44
+
45
+ super(ListNoticeRulesResponse, self).__init__()
46
+
47
+ self._api_version = None
48
+ self._kind = None
49
+ self._items = None
50
+ self.discriminator = None
51
+
52
+ if api_version is not None:
53
+ self.api_version = api_version
54
+ if kind is not None:
55
+ self.kind = kind
56
+ if items is not None:
57
+ self.items = items
58
+
59
+ @property
60
+ def api_version(self):
61
+ """Gets the api_version of this ListNoticeRulesResponse.
62
+
63
+ API版本,固定值“v1”,该值不可修改。
64
+
65
+ :return: The api_version of this ListNoticeRulesResponse.
66
+ :rtype: str
67
+ """
68
+ return self._api_version
69
+
70
+ @api_version.setter
71
+ def api_version(self, api_version):
72
+ """Sets the api_version of this ListNoticeRulesResponse.
73
+
74
+ API版本,固定值“v1”,该值不可修改。
75
+
76
+ :param api_version: The api_version of this ListNoticeRulesResponse.
77
+ :type api_version: str
78
+ """
79
+ self._api_version = api_version
80
+
81
+ @property
82
+ def kind(self):
83
+ """Gets the kind of this ListNoticeRulesResponse.
84
+
85
+ API类型,固定值“NoticeRule”,该值不可修改。
86
+
87
+ :return: The kind of this ListNoticeRulesResponse.
88
+ :rtype: str
89
+ """
90
+ return self._kind
91
+
92
+ @kind.setter
93
+ def kind(self, kind):
94
+ """Sets the kind of this ListNoticeRulesResponse.
95
+
96
+ API类型,固定值“NoticeRule”,该值不可修改。
97
+
98
+ :param kind: The kind of this ListNoticeRulesResponse.
99
+ :type kind: str
100
+ """
101
+ self._kind = kind
102
+
103
+ @property
104
+ def items(self):
105
+ """Gets the items of this ListNoticeRulesResponse.
106
+
107
+ 请求数据。
108
+
109
+ :return: The items of this ListNoticeRulesResponse.
110
+ :rtype: list[:class:`huaweicloudsdkcae.v1.CreateNoticeRuleRespItem`]
111
+ """
112
+ return self._items
113
+
114
+ @items.setter
115
+ def items(self, items):
116
+ """Sets the items of this ListNoticeRulesResponse.
117
+
118
+ 请求数据。
119
+
120
+ :param items: The items of this ListNoticeRulesResponse.
121
+ :type items: list[:class:`huaweicloudsdkcae.v1.CreateNoticeRuleRespItem`]
122
+ """
123
+ self._items = items
124
+
125
+ def to_dict(self):
126
+ """Returns the model properties as a dict"""
127
+ result = {}
128
+
129
+ for attr, _ in six.iteritems(self.openapi_types):
130
+ value = getattr(self, attr)
131
+ if isinstance(value, list):
132
+ result[attr] = list(map(
133
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
134
+ value
135
+ ))
136
+ elif hasattr(value, "to_dict"):
137
+ result[attr] = value.to_dict()
138
+ elif isinstance(value, dict):
139
+ result[attr] = dict(map(
140
+ lambda item: (item[0], item[1].to_dict())
141
+ if hasattr(item[1], "to_dict") else item,
142
+ value.items()
143
+ ))
144
+ else:
145
+ if attr in self.sensitive_list:
146
+ result[attr] = "****"
147
+ else:
148
+ result[attr] = value
149
+
150
+ return result
151
+
152
+ def to_str(self):
153
+ """Returns the string representation of the model"""
154
+ import simplejson as json
155
+ if six.PY2:
156
+ import sys
157
+ reload(sys)
158
+ sys.setdefaultencoding("utf-8")
159
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
160
+
161
+ def __repr__(self):
162
+ """For `print`"""
163
+ return self.to_str()
164
+
165
+ def __eq__(self, other):
166
+ """Returns true if both objects are equal"""
167
+ if not isinstance(other, ListNoticeRulesResponse):
168
+ return False
169
+
170
+ return self.__dict__ == other.__dict__
171
+
172
+ def __ne__(self, other):
173
+ """Returns true if both objects are not equal"""
174
+ 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 NoticeRuleNotification:
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
+ 'protocol': 'str',
21
+ 'endpoint': 'str'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'protocol': 'protocol',
26
+ 'endpoint': 'endpoint'
27
+ }
28
+
29
+ def __init__(self, protocol=None, endpoint=None):
30
+ """NoticeRuleNotification
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param protocol: 通知的协议类型,包括短信,邮件,企业微信群消息等。
35
+ :type protocol: str
36
+ :param endpoint: 通知的终端地址。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 wechat协议,参考https://support.huaweicloud.com/smn_faq/smn_faq_0027.html获取订阅终端, 企业微信群消息为SMN服务公测功能,需提交工单申请开通。
37
+ :type endpoint: str
38
+ """
39
+
40
+
41
+
42
+ self._protocol = None
43
+ self._endpoint = None
44
+ self.discriminator = None
45
+
46
+ self.protocol = protocol
47
+ self.endpoint = endpoint
48
+
49
+ @property
50
+ def protocol(self):
51
+ """Gets the protocol of this NoticeRuleNotification.
52
+
53
+ 通知的协议类型,包括短信,邮件,企业微信群消息等。
54
+
55
+ :return: The protocol of this NoticeRuleNotification.
56
+ :rtype: str
57
+ """
58
+ return self._protocol
59
+
60
+ @protocol.setter
61
+ def protocol(self, protocol):
62
+ """Sets the protocol of this NoticeRuleNotification.
63
+
64
+ 通知的协议类型,包括短信,邮件,企业微信群消息等。
65
+
66
+ :param protocol: The protocol of this NoticeRuleNotification.
67
+ :type protocol: str
68
+ """
69
+ self._protocol = protocol
70
+
71
+ @property
72
+ def endpoint(self):
73
+ """Gets the endpoint of this NoticeRuleNotification.
74
+
75
+ 通知的终端地址。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 wechat协议,参考https://support.huaweicloud.com/smn_faq/smn_faq_0027.html获取订阅终端, 企业微信群消息为SMN服务公测功能,需提交工单申请开通。
76
+
77
+ :return: The endpoint of this NoticeRuleNotification.
78
+ :rtype: str
79
+ """
80
+ return self._endpoint
81
+
82
+ @endpoint.setter
83
+ def endpoint(self, endpoint):
84
+ """Sets the endpoint of this NoticeRuleNotification.
85
+
86
+ 通知的终端地址。 email协议,接入点必须是邮件地址。 sms协议,接入点必须是一个电话号码。 wechat协议,参考https://support.huaweicloud.com/smn_faq/smn_faq_0027.html获取订阅终端, 企业微信群消息为SMN服务公测功能,需提交工单申请开通。
87
+
88
+ :param endpoint: The endpoint of this NoticeRuleNotification.
89
+ :type endpoint: str
90
+ """
91
+ self._endpoint = endpoint
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, NoticeRuleNotification):
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