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.
- huaweicloudsdkcae/v1/__init__.py +25 -2
- huaweicloudsdkcae/v1/cae_async_client.py +416 -0
- huaweicloudsdkcae/v1/cae_client.py +416 -0
- huaweicloudsdkcae/v1/model/__init__.py +25 -2
- huaweicloudsdkcae/v1/model/access_configuration_port.py +32 -3
- huaweicloudsdkcae/v1/model/agency_metadata.py +28 -3
- huaweicloudsdkcae/v1/model/configuration_data_metadata.py +3 -3
- huaweicloudsdkcae/v1/model/configuration_request_data_spec.py +30 -1
- huaweicloudsdkcae/v1/model/create_component_request_body.py +8 -8
- huaweicloudsdkcae/v1/model/create_component_with_configuration_request.py +196 -0
- huaweicloudsdkcae/v1/model/create_component_with_configuration_request_body.py +213 -0
- huaweicloudsdkcae/v1/model/{create_component_request_body_metadata.py → create_component_with_configuration_request_body_metadata.py} +11 -11
- huaweicloudsdkcae/v1/model/{create_component_request_body_spec.py → create_component_with_configuration_request_body_spec.py} +27 -27
- huaweicloudsdkcae/v1/model/create_component_with_configuration_response.py +241 -0
- huaweicloudsdkcae/v1/model/create_component_with_configuration_response_body_status.py +115 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_item.py +244 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_req.py +166 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_request.py +168 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_resp_item.py +277 -0
- huaweicloudsdkcae/v1/model/create_notice_rule_response.py +170 -0
- huaweicloudsdkcae/v1/model/delete_notice_rule_request.py +167 -0
- huaweicloudsdkcae/v1/model/delete_notice_rule_response.py +112 -0
- huaweicloudsdkcae/v1/model/environment_item.py +3 -3
- huaweicloudsdkcae/v1/model/list_notice_rules_request.py +143 -0
- huaweicloudsdkcae/v1/model/list_notice_rules_response.py +174 -0
- huaweicloudsdkcae/v1/model/notice_rule_notification.py +142 -0
- huaweicloudsdkcae/v1/model/notice_rule_scope.py +201 -0
- huaweicloudsdkcae/v1/model/resources_credential.py +144 -0
- huaweicloudsdkcae/v1/model/show_notice_rule_request.py +167 -0
- huaweicloudsdkcae/v1/model/show_notice_rule_response.py +170 -0
- huaweicloudsdkcae/v1/model/trigger_policy.py +201 -0
- huaweicloudsdkcae/v1/model/update_notice_rule_item.py +192 -0
- huaweicloudsdkcae/v1/model/update_notice_rule_req.py +166 -0
- huaweicloudsdkcae/v1/model/update_notice_rule_request.py +192 -0
- huaweicloudsdkcae/v1/model/update_notice_rule_response.py +170 -0
- huaweicloudsdkcae/v1/model/volume.py +30 -1
- huaweicloudsdkcae/v1/model/volume_spec.py +32 -3
- {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/METADATA +2 -2
- {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/RECORD +42 -19
- {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/LICENSE +0 -0
- {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/WHEEL +0 -0
- {huaweicloudsdkcae-3.1.98.dist-info → huaweicloudsdkcae-3.1.100.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TriggerPolicy:
|
|
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
|
+
'trigger_type': 'str',
|
|
21
|
+
'period': 'int',
|
|
22
|
+
'operator': 'str',
|
|
23
|
+
'count': 'int'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
attribute_map = {
|
|
27
|
+
'trigger_type': 'trigger_type',
|
|
28
|
+
'period': 'period',
|
|
29
|
+
'operator': 'operator',
|
|
30
|
+
'count': 'count'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
def __init__(self, trigger_type=None, period=None, operator=None, count=None):
|
|
34
|
+
"""TriggerPolicy
|
|
35
|
+
|
|
36
|
+
The model defined in huaweicloud sdk
|
|
37
|
+
|
|
38
|
+
:param trigger_type: 触发类型,accumulative: 累计触发,immediately: 立即触发。
|
|
39
|
+
:type trigger_type: str
|
|
40
|
+
:param period: 触发周期,选择累计触发时需设置该参数,默认单位为s,支持5分钟、20分钟、1小时、4小时、24小时。
|
|
41
|
+
:type period: int
|
|
42
|
+
:param operator: 比较符,支持'>'和'>='。
|
|
43
|
+
:type operator: str
|
|
44
|
+
:param count: 触发次数,选择累计触发时需设置该参数。
|
|
45
|
+
:type count: int
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
self._trigger_type = None
|
|
51
|
+
self._period = None
|
|
52
|
+
self._operator = None
|
|
53
|
+
self._count = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
|
|
56
|
+
self.trigger_type = trigger_type
|
|
57
|
+
if period is not None:
|
|
58
|
+
self.period = period
|
|
59
|
+
if operator is not None:
|
|
60
|
+
self.operator = operator
|
|
61
|
+
if count is not None:
|
|
62
|
+
self.count = count
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def trigger_type(self):
|
|
66
|
+
"""Gets the trigger_type of this TriggerPolicy.
|
|
67
|
+
|
|
68
|
+
触发类型,accumulative: 累计触发,immediately: 立即触发。
|
|
69
|
+
|
|
70
|
+
:return: The trigger_type of this TriggerPolicy.
|
|
71
|
+
:rtype: str
|
|
72
|
+
"""
|
|
73
|
+
return self._trigger_type
|
|
74
|
+
|
|
75
|
+
@trigger_type.setter
|
|
76
|
+
def trigger_type(self, trigger_type):
|
|
77
|
+
"""Sets the trigger_type of this TriggerPolicy.
|
|
78
|
+
|
|
79
|
+
触发类型,accumulative: 累计触发,immediately: 立即触发。
|
|
80
|
+
|
|
81
|
+
:param trigger_type: The trigger_type of this TriggerPolicy.
|
|
82
|
+
:type trigger_type: str
|
|
83
|
+
"""
|
|
84
|
+
self._trigger_type = trigger_type
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def period(self):
|
|
88
|
+
"""Gets the period of this TriggerPolicy.
|
|
89
|
+
|
|
90
|
+
触发周期,选择累计触发时需设置该参数,默认单位为s,支持5分钟、20分钟、1小时、4小时、24小时。
|
|
91
|
+
|
|
92
|
+
:return: The period of this TriggerPolicy.
|
|
93
|
+
:rtype: int
|
|
94
|
+
"""
|
|
95
|
+
return self._period
|
|
96
|
+
|
|
97
|
+
@period.setter
|
|
98
|
+
def period(self, period):
|
|
99
|
+
"""Sets the period of this TriggerPolicy.
|
|
100
|
+
|
|
101
|
+
触发周期,选择累计触发时需设置该参数,默认单位为s,支持5分钟、20分钟、1小时、4小时、24小时。
|
|
102
|
+
|
|
103
|
+
:param period: The period of this TriggerPolicy.
|
|
104
|
+
:type period: int
|
|
105
|
+
"""
|
|
106
|
+
self._period = period
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def operator(self):
|
|
110
|
+
"""Gets the operator of this TriggerPolicy.
|
|
111
|
+
|
|
112
|
+
比较符,支持'>'和'>='。
|
|
113
|
+
|
|
114
|
+
:return: The operator of this TriggerPolicy.
|
|
115
|
+
:rtype: str
|
|
116
|
+
"""
|
|
117
|
+
return self._operator
|
|
118
|
+
|
|
119
|
+
@operator.setter
|
|
120
|
+
def operator(self, operator):
|
|
121
|
+
"""Sets the operator of this TriggerPolicy.
|
|
122
|
+
|
|
123
|
+
比较符,支持'>'和'>='。
|
|
124
|
+
|
|
125
|
+
:param operator: The operator of this TriggerPolicy.
|
|
126
|
+
:type operator: str
|
|
127
|
+
"""
|
|
128
|
+
self._operator = operator
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def count(self):
|
|
132
|
+
"""Gets the count of this TriggerPolicy.
|
|
133
|
+
|
|
134
|
+
触发次数,选择累计触发时需设置该参数。
|
|
135
|
+
|
|
136
|
+
:return: The count of this TriggerPolicy.
|
|
137
|
+
:rtype: int
|
|
138
|
+
"""
|
|
139
|
+
return self._count
|
|
140
|
+
|
|
141
|
+
@count.setter
|
|
142
|
+
def count(self, count):
|
|
143
|
+
"""Sets the count of this TriggerPolicy.
|
|
144
|
+
|
|
145
|
+
触发次数,选择累计触发时需设置该参数。
|
|
146
|
+
|
|
147
|
+
:param count: The count of this TriggerPolicy.
|
|
148
|
+
:type count: int
|
|
149
|
+
"""
|
|
150
|
+
self._count = count
|
|
151
|
+
|
|
152
|
+
def to_dict(self):
|
|
153
|
+
"""Returns the model properties as a dict"""
|
|
154
|
+
result = {}
|
|
155
|
+
|
|
156
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
157
|
+
value = getattr(self, attr)
|
|
158
|
+
if isinstance(value, list):
|
|
159
|
+
result[attr] = list(map(
|
|
160
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
161
|
+
value
|
|
162
|
+
))
|
|
163
|
+
elif hasattr(value, "to_dict"):
|
|
164
|
+
result[attr] = value.to_dict()
|
|
165
|
+
elif isinstance(value, dict):
|
|
166
|
+
result[attr] = dict(map(
|
|
167
|
+
lambda item: (item[0], item[1].to_dict())
|
|
168
|
+
if hasattr(item[1], "to_dict") else item,
|
|
169
|
+
value.items()
|
|
170
|
+
))
|
|
171
|
+
else:
|
|
172
|
+
if attr in self.sensitive_list:
|
|
173
|
+
result[attr] = "****"
|
|
174
|
+
else:
|
|
175
|
+
result[attr] = value
|
|
176
|
+
|
|
177
|
+
return result
|
|
178
|
+
|
|
179
|
+
def to_str(self):
|
|
180
|
+
"""Returns the string representation of the model"""
|
|
181
|
+
import simplejson as json
|
|
182
|
+
if six.PY2:
|
|
183
|
+
import sys
|
|
184
|
+
reload(sys)
|
|
185
|
+
sys.setdefaultencoding("utf-8")
|
|
186
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
187
|
+
|
|
188
|
+
def __repr__(self):
|
|
189
|
+
"""For `print`"""
|
|
190
|
+
return self.to_str()
|
|
191
|
+
|
|
192
|
+
def __eq__(self, other):
|
|
193
|
+
"""Returns true if both objects are equal"""
|
|
194
|
+
if not isinstance(other, TriggerPolicy):
|
|
195
|
+
return False
|
|
196
|
+
|
|
197
|
+
return self.__dict__ == other.__dict__
|
|
198
|
+
|
|
199
|
+
def __ne__(self, other):
|
|
200
|
+
"""Returns true if both objects are not equal"""
|
|
201
|
+
return not self == other
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateNoticeRuleItem:
|
|
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
|
+
'event_name': 'str',
|
|
21
|
+
'scope': 'NoticeRuleScope',
|
|
22
|
+
'trigger_policy': 'TriggerPolicy',
|
|
23
|
+
'enable': 'bool'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
attribute_map = {
|
|
27
|
+
'event_name': 'event_name',
|
|
28
|
+
'scope': 'scope',
|
|
29
|
+
'trigger_policy': 'trigger_policy',
|
|
30
|
+
'enable': 'enable'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
def __init__(self, event_name=None, scope=None, trigger_policy=None, enable=None):
|
|
34
|
+
"""UpdateNoticeRuleItem
|
|
35
|
+
|
|
36
|
+
The model defined in huaweicloud sdk
|
|
37
|
+
|
|
38
|
+
:param event_name: 触发事件名称,支持实例调度成功、实例调度失败、健康检查成功、健康检查失败、镜像拉取成功、镜像拉取失败、容器启动成功、容器启动失败、卷挂载成功、卷挂载失败。
|
|
39
|
+
:type event_name: str
|
|
40
|
+
:param scope:
|
|
41
|
+
:type scope: :class:`huaweicloudsdkcae.v1.NoticeRuleScope`
|
|
42
|
+
:param trigger_policy:
|
|
43
|
+
:type trigger_policy: :class:`huaweicloudsdkcae.v1.TriggerPolicy`
|
|
44
|
+
:param enable: 是否启用。
|
|
45
|
+
:type enable: bool
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
self._event_name = None
|
|
51
|
+
self._scope = None
|
|
52
|
+
self._trigger_policy = None
|
|
53
|
+
self._enable = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
|
|
56
|
+
if event_name is not None:
|
|
57
|
+
self.event_name = event_name
|
|
58
|
+
self.scope = scope
|
|
59
|
+
self.trigger_policy = trigger_policy
|
|
60
|
+
if enable is not None:
|
|
61
|
+
self.enable = enable
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def event_name(self):
|
|
65
|
+
"""Gets the event_name of this UpdateNoticeRuleItem.
|
|
66
|
+
|
|
67
|
+
触发事件名称,支持实例调度成功、实例调度失败、健康检查成功、健康检查失败、镜像拉取成功、镜像拉取失败、容器启动成功、容器启动失败、卷挂载成功、卷挂载失败。
|
|
68
|
+
|
|
69
|
+
:return: The event_name of this UpdateNoticeRuleItem.
|
|
70
|
+
:rtype: str
|
|
71
|
+
"""
|
|
72
|
+
return self._event_name
|
|
73
|
+
|
|
74
|
+
@event_name.setter
|
|
75
|
+
def event_name(self, event_name):
|
|
76
|
+
"""Sets the event_name of this UpdateNoticeRuleItem.
|
|
77
|
+
|
|
78
|
+
触发事件名称,支持实例调度成功、实例调度失败、健康检查成功、健康检查失败、镜像拉取成功、镜像拉取失败、容器启动成功、容器启动失败、卷挂载成功、卷挂载失败。
|
|
79
|
+
|
|
80
|
+
:param event_name: The event_name of this UpdateNoticeRuleItem.
|
|
81
|
+
:type event_name: str
|
|
82
|
+
"""
|
|
83
|
+
self._event_name = event_name
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def scope(self):
|
|
87
|
+
"""Gets the scope of this UpdateNoticeRuleItem.
|
|
88
|
+
|
|
89
|
+
:return: The scope of this UpdateNoticeRuleItem.
|
|
90
|
+
:rtype: :class:`huaweicloudsdkcae.v1.NoticeRuleScope`
|
|
91
|
+
"""
|
|
92
|
+
return self._scope
|
|
93
|
+
|
|
94
|
+
@scope.setter
|
|
95
|
+
def scope(self, scope):
|
|
96
|
+
"""Sets the scope of this UpdateNoticeRuleItem.
|
|
97
|
+
|
|
98
|
+
:param scope: The scope of this UpdateNoticeRuleItem.
|
|
99
|
+
:type scope: :class:`huaweicloudsdkcae.v1.NoticeRuleScope`
|
|
100
|
+
"""
|
|
101
|
+
self._scope = scope
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def trigger_policy(self):
|
|
105
|
+
"""Gets the trigger_policy of this UpdateNoticeRuleItem.
|
|
106
|
+
|
|
107
|
+
:return: The trigger_policy of this UpdateNoticeRuleItem.
|
|
108
|
+
:rtype: :class:`huaweicloudsdkcae.v1.TriggerPolicy`
|
|
109
|
+
"""
|
|
110
|
+
return self._trigger_policy
|
|
111
|
+
|
|
112
|
+
@trigger_policy.setter
|
|
113
|
+
def trigger_policy(self, trigger_policy):
|
|
114
|
+
"""Sets the trigger_policy of this UpdateNoticeRuleItem.
|
|
115
|
+
|
|
116
|
+
:param trigger_policy: The trigger_policy of this UpdateNoticeRuleItem.
|
|
117
|
+
:type trigger_policy: :class:`huaweicloudsdkcae.v1.TriggerPolicy`
|
|
118
|
+
"""
|
|
119
|
+
self._trigger_policy = trigger_policy
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def enable(self):
|
|
123
|
+
"""Gets the enable of this UpdateNoticeRuleItem.
|
|
124
|
+
|
|
125
|
+
是否启用。
|
|
126
|
+
|
|
127
|
+
:return: The enable of this UpdateNoticeRuleItem.
|
|
128
|
+
:rtype: bool
|
|
129
|
+
"""
|
|
130
|
+
return self._enable
|
|
131
|
+
|
|
132
|
+
@enable.setter
|
|
133
|
+
def enable(self, enable):
|
|
134
|
+
"""Sets the enable of this UpdateNoticeRuleItem.
|
|
135
|
+
|
|
136
|
+
是否启用。
|
|
137
|
+
|
|
138
|
+
:param enable: The enable of this UpdateNoticeRuleItem.
|
|
139
|
+
:type enable: bool
|
|
140
|
+
"""
|
|
141
|
+
self._enable = enable
|
|
142
|
+
|
|
143
|
+
def to_dict(self):
|
|
144
|
+
"""Returns the model properties as a dict"""
|
|
145
|
+
result = {}
|
|
146
|
+
|
|
147
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
148
|
+
value = getattr(self, attr)
|
|
149
|
+
if isinstance(value, list):
|
|
150
|
+
result[attr] = list(map(
|
|
151
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
152
|
+
value
|
|
153
|
+
))
|
|
154
|
+
elif hasattr(value, "to_dict"):
|
|
155
|
+
result[attr] = value.to_dict()
|
|
156
|
+
elif isinstance(value, dict):
|
|
157
|
+
result[attr] = dict(map(
|
|
158
|
+
lambda item: (item[0], item[1].to_dict())
|
|
159
|
+
if hasattr(item[1], "to_dict") else item,
|
|
160
|
+
value.items()
|
|
161
|
+
))
|
|
162
|
+
else:
|
|
163
|
+
if attr in self.sensitive_list:
|
|
164
|
+
result[attr] = "****"
|
|
165
|
+
else:
|
|
166
|
+
result[attr] = value
|
|
167
|
+
|
|
168
|
+
return result
|
|
169
|
+
|
|
170
|
+
def to_str(self):
|
|
171
|
+
"""Returns the string representation of the model"""
|
|
172
|
+
import simplejson as json
|
|
173
|
+
if six.PY2:
|
|
174
|
+
import sys
|
|
175
|
+
reload(sys)
|
|
176
|
+
sys.setdefaultencoding("utf-8")
|
|
177
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
178
|
+
|
|
179
|
+
def __repr__(self):
|
|
180
|
+
"""For `print`"""
|
|
181
|
+
return self.to_str()
|
|
182
|
+
|
|
183
|
+
def __eq__(self, other):
|
|
184
|
+
"""Returns true if both objects are equal"""
|
|
185
|
+
if not isinstance(other, UpdateNoticeRuleItem):
|
|
186
|
+
return False
|
|
187
|
+
|
|
188
|
+
return self.__dict__ == other.__dict__
|
|
189
|
+
|
|
190
|
+
def __ne__(self, other):
|
|
191
|
+
"""Returns true if both objects are not equal"""
|
|
192
|
+
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 UpdateNoticeRuleReq:
|
|
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': 'UpdateNoticeRuleItem'
|
|
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
|
+
"""UpdateNoticeRuleReq
|
|
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.UpdateNoticeRuleItem`
|
|
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 UpdateNoticeRuleReq.
|
|
58
|
+
|
|
59
|
+
API版本,固定值“v1”,该值不可修改。
|
|
60
|
+
|
|
61
|
+
:return: The api_version of this UpdateNoticeRuleReq.
|
|
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 UpdateNoticeRuleReq.
|
|
69
|
+
|
|
70
|
+
API版本,固定值“v1”,该值不可修改。
|
|
71
|
+
|
|
72
|
+
:param api_version: The api_version of this UpdateNoticeRuleReq.
|
|
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 UpdateNoticeRuleReq.
|
|
80
|
+
|
|
81
|
+
API类型,固定值“NoticeRule”,该值不可修改。
|
|
82
|
+
|
|
83
|
+
:return: The kind of this UpdateNoticeRuleReq.
|
|
84
|
+
:rtype: str
|
|
85
|
+
"""
|
|
86
|
+
return self._kind
|
|
87
|
+
|
|
88
|
+
@kind.setter
|
|
89
|
+
def kind(self, kind):
|
|
90
|
+
"""Sets the kind of this UpdateNoticeRuleReq.
|
|
91
|
+
|
|
92
|
+
API类型,固定值“NoticeRule”,该值不可修改。
|
|
93
|
+
|
|
94
|
+
:param kind: The kind of this UpdateNoticeRuleReq.
|
|
95
|
+
:type kind: str
|
|
96
|
+
"""
|
|
97
|
+
self._kind = kind
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def spec(self):
|
|
101
|
+
"""Gets the spec of this UpdateNoticeRuleReq.
|
|
102
|
+
|
|
103
|
+
:return: The spec of this UpdateNoticeRuleReq.
|
|
104
|
+
:rtype: :class:`huaweicloudsdkcae.v1.UpdateNoticeRuleItem`
|
|
105
|
+
"""
|
|
106
|
+
return self._spec
|
|
107
|
+
|
|
108
|
+
@spec.setter
|
|
109
|
+
def spec(self, spec):
|
|
110
|
+
"""Sets the spec of this UpdateNoticeRuleReq.
|
|
111
|
+
|
|
112
|
+
:param spec: The spec of this UpdateNoticeRuleReq.
|
|
113
|
+
:type spec: :class:`huaweicloudsdkcae.v1.UpdateNoticeRuleItem`
|
|
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, UpdateNoticeRuleReq):
|
|
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
|