huaweicloudsdkcae 3.1.85__py2.py3-none-any.whl → 3.1.132__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 (69) hide show
  1. huaweicloudsdkcae/v1/__init__.py +38 -6
  2. huaweicloudsdkcae/v1/cae_async_client.py +601 -45
  3. huaweicloudsdkcae/v1/cae_client.py +601 -45
  4. huaweicloudsdkcae/v1/model/__init__.py +38 -6
  5. huaweicloudsdkcae/v1/model/access_configuration_data_items.py +177 -7
  6. huaweicloudsdkcae/v1/model/access_configuration_metadata.py +115 -0
  7. huaweicloudsdkcae/v1/model/access_configuration_port.py +67 -9
  8. huaweicloudsdkcae/v1/model/agency_metadata.py +28 -3
  9. huaweicloudsdkcae/v1/model/cloud_storage_log_path_info.py +144 -0
  10. huaweicloudsdkcae/v1/model/configuration.py +35 -6
  11. huaweicloudsdkcae/v1/model/configuration_request_data_spec.py +37 -8
  12. huaweicloudsdkcae/v1/model/configuration_response_data_spec.py +37 -8
  13. huaweicloudsdkcae/v1/model/create_component_request_body.py +10 -12
  14. huaweicloudsdkcae/v1/model/{list_component_events_request.py → create_component_with_configuration_request.py} +43 -46
  15. huaweicloudsdkcae/v1/model/create_component_with_configuration_request_body.py +213 -0
  16. huaweicloudsdkcae/v1/model/{create_component_request_body_metadata.py → create_component_with_configuration_request_body_metadata.py} +11 -11
  17. huaweicloudsdkcae/v1/model/{create_component_request_body_spec.py → create_component_with_configuration_request_body_spec.py} +27 -27
  18. huaweicloudsdkcae/v1/model/create_component_with_configuration_response.py +241 -0
  19. huaweicloudsdkcae/v1/model/create_component_with_configuration_response_body_status.py +115 -0
  20. huaweicloudsdkcae/v1/model/create_environment_request_body_metadata.py +3 -3
  21. huaweicloudsdkcae/v1/model/create_notice_rule_item.py +244 -0
  22. huaweicloudsdkcae/v1/model/create_notice_rule_req.py +166 -0
  23. huaweicloudsdkcae/v1/model/create_notice_rule_request.py +168 -0
  24. huaweicloudsdkcae/v1/model/create_notice_rule_resp_item.py +277 -0
  25. huaweicloudsdkcae/v1/model/create_notice_rule_response.py +170 -0
  26. huaweicloudsdkcae/v1/model/create_vpc_egress_request.py +168 -0
  27. huaweicloudsdkcae/v1/model/{list_component_events_response.py → create_vpc_egress_response.py} +35 -39
  28. huaweicloudsdkcae/v1/model/delete_notice_rule_request.py +167 -0
  29. huaweicloudsdkcae/v1/model/delete_notice_rule_response.py +112 -0
  30. huaweicloudsdkcae/v1/model/delete_vpc_egress_request.py +171 -0
  31. huaweicloudsdkcae/v1/model/delete_vpc_egress_response.py +85 -0
  32. huaweicloudsdkcae/v1/model/egress_cidr.py +171 -0
  33. huaweicloudsdkcae/v1/model/environment_item.py +3 -3
  34. huaweicloudsdkcae/v1/model/health_check_configuration_http_get.py +4 -4
  35. huaweicloudsdkcae/v1/model/health_check_configuration_tcp_socket.py +4 -4
  36. huaweicloudsdkcae/v1/model/list_component_configurations_request.py +32 -3
  37. huaweicloudsdkcae/v1/model/list_components_request.py +61 -3
  38. huaweicloudsdkcae/v1/model/list_eip_response_body_spec_egress.py +30 -1
  39. huaweicloudsdkcae/v1/model/list_eip_response_body_spec_ingress.py +30 -1
  40. huaweicloudsdkcae/v1/model/list_notice_rules_request.py +143 -0
  41. huaweicloudsdkcae/v1/model/list_notice_rules_response.py +174 -0
  42. huaweicloudsdkcae/v1/model/list_vpc_egress_request.py +143 -0
  43. huaweicloudsdkcae/v1/model/list_vpc_egress_response.py +162 -0
  44. huaweicloudsdkcae/v1/model/notice_rule_notification.py +171 -0
  45. huaweicloudsdkcae/v1/model/notice_rule_scope.py +201 -0
  46. huaweicloudsdkcae/v1/model/resources_credential.py +144 -0
  47. huaweicloudsdkcae/v1/model/show_notice_rule_request.py +167 -0
  48. huaweicloudsdkcae/v1/model/show_notice_rule_response.py +170 -0
  49. huaweicloudsdkcae/v1/model/trigger_policy.py +201 -0
  50. huaweicloudsdkcae/v1/model/update_component_request_body.py +2 -4
  51. huaweicloudsdkcae/v1/model/update_eip_request_body_spec_egress.py +32 -3
  52. huaweicloudsdkcae/v1/model/update_eip_request_body_spec_ingress.py +32 -3
  53. huaweicloudsdkcae/v1/model/update_notice_rule_item.py +192 -0
  54. huaweicloudsdkcae/v1/model/update_notice_rule_req.py +166 -0
  55. huaweicloudsdkcae/v1/model/update_notice_rule_request.py +192 -0
  56. huaweicloudsdkcae/v1/model/update_notice_rule_response.py +170 -0
  57. huaweicloudsdkcae/v1/model/volume.py +30 -1
  58. huaweicloudsdkcae/v1/model/volume_spec.py +32 -3
  59. huaweicloudsdkcae/v1/model/{component_event_kind_obj.py → vpc_egress_kind_obj.py} +4 -4
  60. huaweicloudsdkcae/v1/model/vpc_egress_request_body.py +161 -0
  61. huaweicloudsdkcae/v1/model/vpc_egress_request_body_spec.py +114 -0
  62. huaweicloudsdkcae/v1/model/vpc_egress_response_body_spec.py +173 -0
  63. huaweicloudsdkcae/v1/region/cae_region.py +12 -4
  64. {huaweicloudsdkcae-3.1.85.dist-info → huaweicloudsdkcae-3.1.132.dist-info}/METADATA +2 -2
  65. {huaweicloudsdkcae-3.1.85.dist-info → huaweicloudsdkcae-3.1.132.dist-info}/RECORD +68 -36
  66. {huaweicloudsdkcae-3.1.85.dist-info → huaweicloudsdkcae-3.1.132.dist-info}/WHEEL +1 -1
  67. huaweicloudsdkcae/v1/model/event_item.py +0 -318
  68. {huaweicloudsdkcae-3.1.85.dist-info → huaweicloudsdkcae-3.1.132.dist-info}/LICENSE +0 -0
  69. {huaweicloudsdkcae-3.1.85.dist-info → huaweicloudsdkcae-3.1.132.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,241 @@
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 CreateComponentWithConfigurationResponse(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': 'ApiVersionObj',
22
+ 'kind': 'ComponentKindObj',
23
+ 'metadata': 'MetadataResponse',
24
+ 'spec': 'CreateComponentSpec',
25
+ 'configurations': 'list[ConfigurationItem]',
26
+ 'status': 'CreateComponentWithConfigurationResponseBodyStatus'
27
+ }
28
+
29
+ attribute_map = {
30
+ 'api_version': 'api_version',
31
+ 'kind': 'kind',
32
+ 'metadata': 'metadata',
33
+ 'spec': 'spec',
34
+ 'configurations': 'configurations',
35
+ 'status': 'status'
36
+ }
37
+
38
+ def __init__(self, api_version=None, kind=None, metadata=None, spec=None, configurations=None, status=None):
39
+ """CreateComponentWithConfigurationResponse
40
+
41
+ The model defined in huaweicloud sdk
42
+
43
+ :param api_version:
44
+ :type api_version: :class:`huaweicloudsdkcae.v1.ApiVersionObj`
45
+ :param kind:
46
+ :type kind: :class:`huaweicloudsdkcae.v1.ComponentKindObj`
47
+ :param metadata:
48
+ :type metadata: :class:`huaweicloudsdkcae.v1.MetadataResponse`
49
+ :param spec:
50
+ :type spec: :class:`huaweicloudsdkcae.v1.CreateComponentSpec`
51
+ :param configurations: 配置项列表。
52
+ :type configurations: list[:class:`huaweicloudsdkcae.v1.ConfigurationItem`]
53
+ :param status:
54
+ :type status: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationResponseBodyStatus`
55
+ """
56
+
57
+ super(CreateComponentWithConfigurationResponse, self).__init__()
58
+
59
+ self._api_version = None
60
+ self._kind = None
61
+ self._metadata = None
62
+ self._spec = None
63
+ self._configurations = None
64
+ self._status = None
65
+ self.discriminator = None
66
+
67
+ if api_version is not None:
68
+ self.api_version = api_version
69
+ if kind is not None:
70
+ self.kind = kind
71
+ if metadata is not None:
72
+ self.metadata = metadata
73
+ if spec is not None:
74
+ self.spec = spec
75
+ if configurations is not None:
76
+ self.configurations = configurations
77
+ if status is not None:
78
+ self.status = status
79
+
80
+ @property
81
+ def api_version(self):
82
+ """Gets the api_version of this CreateComponentWithConfigurationResponse.
83
+
84
+ :return: The api_version of this CreateComponentWithConfigurationResponse.
85
+ :rtype: :class:`huaweicloudsdkcae.v1.ApiVersionObj`
86
+ """
87
+ return self._api_version
88
+
89
+ @api_version.setter
90
+ def api_version(self, api_version):
91
+ """Sets the api_version of this CreateComponentWithConfigurationResponse.
92
+
93
+ :param api_version: The api_version of this CreateComponentWithConfigurationResponse.
94
+ :type api_version: :class:`huaweicloudsdkcae.v1.ApiVersionObj`
95
+ """
96
+ self._api_version = api_version
97
+
98
+ @property
99
+ def kind(self):
100
+ """Gets the kind of this CreateComponentWithConfigurationResponse.
101
+
102
+ :return: The kind of this CreateComponentWithConfigurationResponse.
103
+ :rtype: :class:`huaweicloudsdkcae.v1.ComponentKindObj`
104
+ """
105
+ return self._kind
106
+
107
+ @kind.setter
108
+ def kind(self, kind):
109
+ """Sets the kind of this CreateComponentWithConfigurationResponse.
110
+
111
+ :param kind: The kind of this CreateComponentWithConfigurationResponse.
112
+ :type kind: :class:`huaweicloudsdkcae.v1.ComponentKindObj`
113
+ """
114
+ self._kind = kind
115
+
116
+ @property
117
+ def metadata(self):
118
+ """Gets the metadata of this CreateComponentWithConfigurationResponse.
119
+
120
+ :return: The metadata of this CreateComponentWithConfigurationResponse.
121
+ :rtype: :class:`huaweicloudsdkcae.v1.MetadataResponse`
122
+ """
123
+ return self._metadata
124
+
125
+ @metadata.setter
126
+ def metadata(self, metadata):
127
+ """Sets the metadata of this CreateComponentWithConfigurationResponse.
128
+
129
+ :param metadata: The metadata of this CreateComponentWithConfigurationResponse.
130
+ :type metadata: :class:`huaweicloudsdkcae.v1.MetadataResponse`
131
+ """
132
+ self._metadata = metadata
133
+
134
+ @property
135
+ def spec(self):
136
+ """Gets the spec of this CreateComponentWithConfigurationResponse.
137
+
138
+ :return: The spec of this CreateComponentWithConfigurationResponse.
139
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentSpec`
140
+ """
141
+ return self._spec
142
+
143
+ @spec.setter
144
+ def spec(self, spec):
145
+ """Sets the spec of this CreateComponentWithConfigurationResponse.
146
+
147
+ :param spec: The spec of this CreateComponentWithConfigurationResponse.
148
+ :type spec: :class:`huaweicloudsdkcae.v1.CreateComponentSpec`
149
+ """
150
+ self._spec = spec
151
+
152
+ @property
153
+ def configurations(self):
154
+ """Gets the configurations of this CreateComponentWithConfigurationResponse.
155
+
156
+ 配置项列表。
157
+
158
+ :return: The configurations of this CreateComponentWithConfigurationResponse.
159
+ :rtype: list[:class:`huaweicloudsdkcae.v1.ConfigurationItem`]
160
+ """
161
+ return self._configurations
162
+
163
+ @configurations.setter
164
+ def configurations(self, configurations):
165
+ """Sets the configurations of this CreateComponentWithConfigurationResponse.
166
+
167
+ 配置项列表。
168
+
169
+ :param configurations: The configurations of this CreateComponentWithConfigurationResponse.
170
+ :type configurations: list[:class:`huaweicloudsdkcae.v1.ConfigurationItem`]
171
+ """
172
+ self._configurations = configurations
173
+
174
+ @property
175
+ def status(self):
176
+ """Gets the status of this CreateComponentWithConfigurationResponse.
177
+
178
+ :return: The status of this CreateComponentWithConfigurationResponse.
179
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationResponseBodyStatus`
180
+ """
181
+ return self._status
182
+
183
+ @status.setter
184
+ def status(self, status):
185
+ """Sets the status of this CreateComponentWithConfigurationResponse.
186
+
187
+ :param status: The status of this CreateComponentWithConfigurationResponse.
188
+ :type status: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationResponseBodyStatus`
189
+ """
190
+ self._status = status
191
+
192
+ def to_dict(self):
193
+ """Returns the model properties as a dict"""
194
+ result = {}
195
+
196
+ for attr, _ in six.iteritems(self.openapi_types):
197
+ value = getattr(self, attr)
198
+ if isinstance(value, list):
199
+ result[attr] = list(map(
200
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
201
+ value
202
+ ))
203
+ elif hasattr(value, "to_dict"):
204
+ result[attr] = value.to_dict()
205
+ elif isinstance(value, dict):
206
+ result[attr] = dict(map(
207
+ lambda item: (item[0], item[1].to_dict())
208
+ if hasattr(item[1], "to_dict") else item,
209
+ value.items()
210
+ ))
211
+ else:
212
+ if attr in self.sensitive_list:
213
+ result[attr] = "****"
214
+ else:
215
+ result[attr] = value
216
+
217
+ return result
218
+
219
+ def to_str(self):
220
+ """Returns the string representation of the model"""
221
+ import simplejson as json
222
+ if six.PY2:
223
+ import sys
224
+ reload(sys)
225
+ sys.setdefaultencoding("utf-8")
226
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
227
+
228
+ def __repr__(self):
229
+ """For `print`"""
230
+ return self.to_str()
231
+
232
+ def __eq__(self, other):
233
+ """Returns true if both objects are equal"""
234
+ if not isinstance(other, CreateComponentWithConfigurationResponse):
235
+ return False
236
+
237
+ return self.__dict__ == other.__dict__
238
+
239
+ def __ne__(self, other):
240
+ """Returns true if both objects are not equal"""
241
+ return not self == other
@@ -0,0 +1,115 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateComponentWithConfigurationResponseBodyStatus:
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
+ 'job_id': 'str'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'job_id': 'job_id'
25
+ }
26
+
27
+ def __init__(self, job_id=None):
28
+ """CreateComponentWithConfigurationResponseBodyStatus
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param job_id: 任务ID。
33
+ :type job_id: str
34
+ """
35
+
36
+
37
+
38
+ self._job_id = None
39
+ self.discriminator = None
40
+
41
+ if job_id is not None:
42
+ self.job_id = job_id
43
+
44
+ @property
45
+ def job_id(self):
46
+ """Gets the job_id of this CreateComponentWithConfigurationResponseBodyStatus.
47
+
48
+ 任务ID。
49
+
50
+ :return: The job_id of this CreateComponentWithConfigurationResponseBodyStatus.
51
+ :rtype: str
52
+ """
53
+ return self._job_id
54
+
55
+ @job_id.setter
56
+ def job_id(self, job_id):
57
+ """Sets the job_id of this CreateComponentWithConfigurationResponseBodyStatus.
58
+
59
+ 任务ID。
60
+
61
+ :param job_id: The job_id of this CreateComponentWithConfigurationResponseBodyStatus.
62
+ :type job_id: str
63
+ """
64
+ self._job_id = job_id
65
+
66
+ def to_dict(self):
67
+ """Returns the model properties as a dict"""
68
+ result = {}
69
+
70
+ for attr, _ in six.iteritems(self.openapi_types):
71
+ value = getattr(self, attr)
72
+ if isinstance(value, list):
73
+ result[attr] = list(map(
74
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
75
+ value
76
+ ))
77
+ elif hasattr(value, "to_dict"):
78
+ result[attr] = value.to_dict()
79
+ elif isinstance(value, dict):
80
+ result[attr] = dict(map(
81
+ lambda item: (item[0], item[1].to_dict())
82
+ if hasattr(item[1], "to_dict") else item,
83
+ value.items()
84
+ ))
85
+ else:
86
+ if attr in self.sensitive_list:
87
+ result[attr] = "****"
88
+ else:
89
+ result[attr] = value
90
+
91
+ return result
92
+
93
+ def to_str(self):
94
+ """Returns the string representation of the model"""
95
+ import simplejson as json
96
+ if six.PY2:
97
+ import sys
98
+ reload(sys)
99
+ sys.setdefaultencoding("utf-8")
100
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
101
+
102
+ def __repr__(self):
103
+ """For `print`"""
104
+ return self.to_str()
105
+
106
+ def __eq__(self, other):
107
+ """Returns true if both objects are equal"""
108
+ if not isinstance(other, CreateComponentWithConfigurationResponseBodyStatus):
109
+ return False
110
+
111
+ return self.__dict__ == other.__dict__
112
+
113
+ def __ne__(self, other):
114
+ """Returns true if both objects are not equal"""
115
+ return not self == other
@@ -31,7 +31,7 @@ class CreateEnvironmentRequestBodyMetadata:
31
31
 
32
32
  The model defined in huaweicloud sdk
33
33
 
34
- :param annotations: 创建环境请求体附加参数。 - vpc_id:创建环境绑定的VPC的ID。 - group_name:创建环境绑定的SWR组织的组织名称。 - type:环境类型,当前仅支持exclusive类型。
34
+ :param annotations: 创建环境请求体附加参数。 - vpc_id:创建环境绑定的VPC的ID。 - group_name:创建环境绑定的SWR组织的组织名称。 - type:环境类型,当前仅支持exclusive类型。 - subnet_id: 创建环境绑定的VPC子网的ID。 - security_group_id:创建环境绑定的安全组的ID,可不填,不填由CAE后台自动创建。
35
35
  :type annotations: dict(str, str)
36
36
  :param name: 环境名称。
37
37
  :type name: str
@@ -51,7 +51,7 @@ class CreateEnvironmentRequestBodyMetadata:
51
51
  def annotations(self):
52
52
  """Gets the annotations of this CreateEnvironmentRequestBodyMetadata.
53
53
 
54
- 创建环境请求体附加参数。 - vpc_id:创建环境绑定的VPC的ID。 - group_name:创建环境绑定的SWR组织的组织名称。 - type:环境类型,当前仅支持exclusive类型。
54
+ 创建环境请求体附加参数。 - vpc_id:创建环境绑定的VPC的ID。 - group_name:创建环境绑定的SWR组织的组织名称。 - type:环境类型,当前仅支持exclusive类型。 - subnet_id: 创建环境绑定的VPC子网的ID。 - security_group_id:创建环境绑定的安全组的ID,可不填,不填由CAE后台自动创建。
55
55
 
56
56
  :return: The annotations of this CreateEnvironmentRequestBodyMetadata.
57
57
  :rtype: dict(str, str)
@@ -62,7 +62,7 @@ class CreateEnvironmentRequestBodyMetadata:
62
62
  def annotations(self, annotations):
63
63
  """Sets the annotations of this CreateEnvironmentRequestBodyMetadata.
64
64
 
65
- 创建环境请求体附加参数。 - vpc_id:创建环境绑定的VPC的ID。 - group_name:创建环境绑定的SWR组织的组织名称。 - type:环境类型,当前仅支持exclusive类型。
65
+ 创建环境请求体附加参数。 - vpc_id:创建环境绑定的VPC的ID。 - group_name:创建环境绑定的SWR组织的组织名称。 - type:环境类型,当前仅支持exclusive类型。 - subnet_id: 创建环境绑定的VPC子网的ID。 - security_group_id:创建环境绑定的安全组的ID,可不填,不填由CAE后台自动创建。
66
66
 
67
67
  :param annotations: The annotations of this CreateEnvironmentRequestBodyMetadata.
68
68
  :type annotations: dict(str, str)
@@ -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