huaweicloudsdkelb 3.1.147__py2.py3-none-any.whl → 3.1.149__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.
- huaweicloudsdkelb/v3/__init__.py +34 -0
- huaweicloudsdkelb/v3/elb_async_client.py +631 -3
- huaweicloudsdkelb/v3/elb_client.py +631 -3
- huaweicloudsdkelb/v3/model/__init__.py +34 -0
- huaweicloudsdkelb/v3/model/az_affinity.py +201 -0
- huaweicloudsdkelb/v3/model/batch_create_load_balancer_option.py +3 -3
- huaweicloudsdkelb/v3/model/batch_create_members_option.py +30 -1
- huaweicloudsdkelb/v3/model/batch_update_member.py +32 -3
- huaweicloudsdkelb/v3/model/batch_update_members_option.py +30 -1
- huaweicloudsdkelb/v3/model/certificate_info.py +90 -3
- huaweicloudsdkelb/v3/model/create_certificate_option.py +90 -3
- huaweicloudsdkelb/v3/model/create_health_monitor_option.py +3 -3
- huaweicloudsdkelb/v3/model/create_master_slave_health_monitor_option.py +3 -3
- huaweicloudsdkelb/v3/model/create_member_health_check_job_option.py +142 -0
- huaweicloudsdkelb/v3/model/create_member_health_check_job_request.py +139 -0
- huaweicloudsdkelb/v3/model/create_member_health_check_job_request_body.py +111 -0
- huaweicloudsdkelb/v3/model/create_member_health_check_job_response.py +141 -0
- huaweicloudsdkelb/v3/model/create_member_option.py +32 -3
- huaweicloudsdkelb/v3/model/create_pool_option.py +26 -1
- huaweicloudsdkelb/v3/model/create_redirect_pools_extend_config.py +28 -3
- huaweicloudsdkelb/v3/model/create_traffic_mirror_config.py +144 -0
- huaweicloudsdkelb/v3/model/delete_recycle_load_balancer_request.py +114 -0
- huaweicloudsdkelb/v3/model/delete_recycle_load_balancer_response.py +85 -0
- huaweicloudsdkelb/v3/model/health_monitor.py +3 -3
- huaweicloudsdkelb/v3/model/list_certificates_request.py +90 -3
- huaweicloudsdkelb/v3/model/list_health_monitors_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_listeners_request.py +30 -1
- huaweicloudsdkelb/v3/model/list_load_balancers_request.py +30 -1
- huaweicloudsdkelb/v3/model/list_members_request.py +32 -3
- huaweicloudsdkelb/v3/model/list_pools_request.py +32 -3
- huaweicloudsdkelb/v3/model/list_recycle_bin_load_balancers_request.py +1043 -0
- huaweicloudsdkelb/v3/model/list_recycle_bin_load_balancers_response.py +170 -0
- huaweicloudsdkelb/v3/model/master_slave_health_monitor.py +3 -3
- huaweicloudsdkelb/v3/model/member.py +29 -1
- huaweicloudsdkelb/v3/model/member_check_job.py +115 -0
- huaweicloudsdkelb/v3/model/member_check_job_info.py +343 -0
- huaweicloudsdkelb/v3/model/member_check_job_result.py +161 -0
- huaweicloudsdkelb/v3/model/member_check_job_result_group.py +173 -0
- huaweicloudsdkelb/v3/model/member_check_job_result_item.py +289 -0
- huaweicloudsdkelb/v3/model/member_info.py +29 -1
- huaweicloudsdkelb/v3/model/pool.py +29 -4
- huaweicloudsdkelb/v3/model/prepaid_change_charge_mode_option.py +30 -1
- huaweicloudsdkelb/v3/model/recycle_bin_policy.py +144 -0
- huaweicloudsdkelb/v3/model/recycle_bin_policy_request_body.py +111 -0
- huaweicloudsdkelb/v3/model/recycle_bin_request_body.py +115 -0
- huaweicloudsdkelb/v3/model/recycle_bin_response_body.py +169 -0
- huaweicloudsdkelb/v3/model/recycle_load_balancer.py +1412 -0
- huaweicloudsdkelb/v3/model/redirect_pools_extend_config.py +28 -3
- huaweicloudsdkelb/v3/model/restore_loadbalancer_request.py +114 -0
- huaweicloudsdkelb/v3/model/restore_loadbalancer_response.py +174 -0
- huaweicloudsdkelb/v3/model/show_member_health_check_job_request.py +114 -0
- huaweicloudsdkelb/v3/model/show_member_health_check_job_response.py +141 -0
- huaweicloudsdkelb/v3/model/show_recycle_bin_request.py +84 -0
- huaweicloudsdkelb/v3/model/show_recycle_bin_response.py +112 -0
- huaweicloudsdkelb/v3/model/traffic_mirror_config.py +144 -0
- huaweicloudsdkelb/v3/model/update_az_affinity.py +202 -0
- huaweicloudsdkelb/v3/model/update_certificate_option.py +90 -3
- huaweicloudsdkelb/v3/model/update_health_monitor_option.py +3 -3
- huaweicloudsdkelb/v3/model/update_member_option.py +30 -1
- huaweicloudsdkelb/v3/model/update_pool_option.py +28 -3
- huaweicloudsdkelb/v3/model/update_recycle_bin_enable_request.py +111 -0
- huaweicloudsdkelb/v3/model/update_recycle_bin_enable_request_body.py +111 -0
- huaweicloudsdkelb/v3/model/update_recycle_bin_enable_response.py +112 -0
- huaweicloudsdkelb/v3/model/update_recycle_bin_policy_request.py +111 -0
- huaweicloudsdkelb/v3/model/update_recycle_bin_policy_request_body.py +111 -0
- huaweicloudsdkelb/v3/model/update_recycle_bin_policy_response.py +112 -0
- huaweicloudsdkelb/v3/model/update_redirect_pools_extend_config.py +28 -3
- {huaweicloudsdkelb-3.1.147.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/METADATA +2 -2
- {huaweicloudsdkelb-3.1.147.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/RECORD +72 -38
- {huaweicloudsdkelb-3.1.147.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/LICENSE +0 -0
- {huaweicloudsdkelb-3.1.147.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/WHEEL +0 -0
- {huaweicloudsdkelb-3.1.147.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,170 @@
|
|
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 ListRecycleBinLoadBalancersResponse(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
|
+
'loadbalancers': 'list[RecycleLoadBalancer]',
|
22
|
+
'page_info': 'PageInfo',
|
23
|
+
'request_id': 'str'
|
24
|
+
}
|
25
|
+
|
26
|
+
attribute_map = {
|
27
|
+
'loadbalancers': 'loadbalancers',
|
28
|
+
'page_info': 'page_info',
|
29
|
+
'request_id': 'request_id'
|
30
|
+
}
|
31
|
+
|
32
|
+
def __init__(self, loadbalancers=None, page_info=None, request_id=None):
|
33
|
+
r"""ListRecycleBinLoadBalancersResponse
|
34
|
+
|
35
|
+
The model defined in huaweicloud sdk
|
36
|
+
|
37
|
+
:param loadbalancers: 回收站中的弹性负载均衡器实例列表。
|
38
|
+
:type loadbalancers: list[:class:`huaweicloudsdkelb.v3.RecycleLoadBalancer`]
|
39
|
+
:param page_info:
|
40
|
+
:type page_info: :class:`huaweicloudsdkelb.v3.PageInfo`
|
41
|
+
:param request_id: 请求ID。 注:自动生成 。
|
42
|
+
:type request_id: str
|
43
|
+
"""
|
44
|
+
|
45
|
+
super(ListRecycleBinLoadBalancersResponse, self).__init__()
|
46
|
+
|
47
|
+
self._loadbalancers = None
|
48
|
+
self._page_info = None
|
49
|
+
self._request_id = None
|
50
|
+
self.discriminator = None
|
51
|
+
|
52
|
+
if loadbalancers is not None:
|
53
|
+
self.loadbalancers = loadbalancers
|
54
|
+
if page_info is not None:
|
55
|
+
self.page_info = page_info
|
56
|
+
if request_id is not None:
|
57
|
+
self.request_id = request_id
|
58
|
+
|
59
|
+
@property
|
60
|
+
def loadbalancers(self):
|
61
|
+
r"""Gets the loadbalancers of this ListRecycleBinLoadBalancersResponse.
|
62
|
+
|
63
|
+
回收站中的弹性负载均衡器实例列表。
|
64
|
+
|
65
|
+
:return: The loadbalancers of this ListRecycleBinLoadBalancersResponse.
|
66
|
+
:rtype: list[:class:`huaweicloudsdkelb.v3.RecycleLoadBalancer`]
|
67
|
+
"""
|
68
|
+
return self._loadbalancers
|
69
|
+
|
70
|
+
@loadbalancers.setter
|
71
|
+
def loadbalancers(self, loadbalancers):
|
72
|
+
r"""Sets the loadbalancers of this ListRecycleBinLoadBalancersResponse.
|
73
|
+
|
74
|
+
回收站中的弹性负载均衡器实例列表。
|
75
|
+
|
76
|
+
:param loadbalancers: The loadbalancers of this ListRecycleBinLoadBalancersResponse.
|
77
|
+
:type loadbalancers: list[:class:`huaweicloudsdkelb.v3.RecycleLoadBalancer`]
|
78
|
+
"""
|
79
|
+
self._loadbalancers = loadbalancers
|
80
|
+
|
81
|
+
@property
|
82
|
+
def page_info(self):
|
83
|
+
r"""Gets the page_info of this ListRecycleBinLoadBalancersResponse.
|
84
|
+
|
85
|
+
:return: The page_info of this ListRecycleBinLoadBalancersResponse.
|
86
|
+
:rtype: :class:`huaweicloudsdkelb.v3.PageInfo`
|
87
|
+
"""
|
88
|
+
return self._page_info
|
89
|
+
|
90
|
+
@page_info.setter
|
91
|
+
def page_info(self, page_info):
|
92
|
+
r"""Sets the page_info of this ListRecycleBinLoadBalancersResponse.
|
93
|
+
|
94
|
+
:param page_info: The page_info of this ListRecycleBinLoadBalancersResponse.
|
95
|
+
:type page_info: :class:`huaweicloudsdkelb.v3.PageInfo`
|
96
|
+
"""
|
97
|
+
self._page_info = page_info
|
98
|
+
|
99
|
+
@property
|
100
|
+
def request_id(self):
|
101
|
+
r"""Gets the request_id of this ListRecycleBinLoadBalancersResponse.
|
102
|
+
|
103
|
+
请求ID。 注:自动生成 。
|
104
|
+
|
105
|
+
:return: The request_id of this ListRecycleBinLoadBalancersResponse.
|
106
|
+
:rtype: str
|
107
|
+
"""
|
108
|
+
return self._request_id
|
109
|
+
|
110
|
+
@request_id.setter
|
111
|
+
def request_id(self, request_id):
|
112
|
+
r"""Sets the request_id of this ListRecycleBinLoadBalancersResponse.
|
113
|
+
|
114
|
+
请求ID。 注:自动生成 。
|
115
|
+
|
116
|
+
:param request_id: The request_id of this ListRecycleBinLoadBalancersResponse.
|
117
|
+
:type request_id: str
|
118
|
+
"""
|
119
|
+
self._request_id = request_id
|
120
|
+
|
121
|
+
def to_dict(self):
|
122
|
+
"""Returns the model properties as a dict"""
|
123
|
+
result = {}
|
124
|
+
|
125
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
126
|
+
value = getattr(self, attr)
|
127
|
+
if isinstance(value, list):
|
128
|
+
result[attr] = list(map(
|
129
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
130
|
+
value
|
131
|
+
))
|
132
|
+
elif hasattr(value, "to_dict"):
|
133
|
+
result[attr] = value.to_dict()
|
134
|
+
elif isinstance(value, dict):
|
135
|
+
result[attr] = dict(map(
|
136
|
+
lambda item: (item[0], item[1].to_dict())
|
137
|
+
if hasattr(item[1], "to_dict") else item,
|
138
|
+
value.items()
|
139
|
+
))
|
140
|
+
else:
|
141
|
+
if attr in self.sensitive_list:
|
142
|
+
result[attr] = "****"
|
143
|
+
else:
|
144
|
+
result[attr] = value
|
145
|
+
|
146
|
+
return result
|
147
|
+
|
148
|
+
def to_str(self):
|
149
|
+
"""Returns the string representation of the model"""
|
150
|
+
import simplejson as json
|
151
|
+
if six.PY2:
|
152
|
+
import sys
|
153
|
+
reload(sys)
|
154
|
+
sys.setdefaultencoding("utf-8")
|
155
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
156
|
+
|
157
|
+
def __repr__(self):
|
158
|
+
"""For `print`"""
|
159
|
+
return self.to_str()
|
160
|
+
|
161
|
+
def __eq__(self, other):
|
162
|
+
"""Returns true if both objects are equal"""
|
163
|
+
if not isinstance(other, ListRecycleBinLoadBalancersResponse):
|
164
|
+
return False
|
165
|
+
|
166
|
+
return self.__dict__ == other.__dict__
|
167
|
+
|
168
|
+
def __ne__(self, other):
|
169
|
+
"""Returns true if both objects are not equal"""
|
170
|
+
return not self == other
|
@@ -59,7 +59,7 @@ class MasterSlaveHealthMonitor:
|
|
59
59
|
:type delay: int
|
60
60
|
:param domain_name: 发送健康检查请求的域名。 取值:以数字或字母开头,只能包含数字、字母、’-’、’.’。 默认为空,表示使用负载均衡器的vip作为http请求的目的地址。 使用说明:当type为HTTP/HTTPS时生效。
|
61
61
|
:type domain_name: str
|
62
|
-
:param expected_codes: 期望响应状态码。 取值: - 单值:单个返回码,例如200。 - 列表:多个特定返回码,例如200,202。 - 区间:一个返回码区间,例如200-204。 默认值:200。
|
62
|
+
:param expected_codes: 期望响应状态码。 取值: - 单值:单个返回码,例如200。 - 列表:多个特定返回码,例如200,202。 - 区间:一个返回码区间,例如200-204。 默认值:200。 该字段仅在HTTP/HTTPS/GRPC协议下有效,其他协议可以设置但不会生效。
|
63
63
|
:type expected_codes: str
|
64
64
|
:param http_method: HTTP请求方法。 取值:GET、HEAD、POST,默认GET。 使用说明:当type为HTTP/HTTPS时生效。
|
65
65
|
:type http_method: str
|
@@ -182,7 +182,7 @@ class MasterSlaveHealthMonitor:
|
|
182
182
|
def expected_codes(self):
|
183
183
|
r"""Gets the expected_codes of this MasterSlaveHealthMonitor.
|
184
184
|
|
185
|
-
期望响应状态码。 取值: - 单值:单个返回码,例如200。 - 列表:多个特定返回码,例如200,202。 - 区间:一个返回码区间,例如200-204。 默认值:200。
|
185
|
+
期望响应状态码。 取值: - 单值:单个返回码,例如200。 - 列表:多个特定返回码,例如200,202。 - 区间:一个返回码区间,例如200-204。 默认值:200。 该字段仅在HTTP/HTTPS/GRPC协议下有效,其他协议可以设置但不会生效。
|
186
186
|
|
187
187
|
:return: The expected_codes of this MasterSlaveHealthMonitor.
|
188
188
|
:rtype: str
|
@@ -193,7 +193,7 @@ class MasterSlaveHealthMonitor:
|
|
193
193
|
def expected_codes(self, expected_codes):
|
194
194
|
r"""Sets the expected_codes of this MasterSlaveHealthMonitor.
|
195
195
|
|
196
|
-
期望响应状态码。 取值: - 单值:单个返回码,例如200。 - 列表:多个特定返回码,例如200,202。 - 区间:一个返回码区间,例如200-204。 默认值:200。
|
196
|
+
期望响应状态码。 取值: - 单值:单个返回码,例如200。 - 列表:多个特定返回码,例如200,202。 - 区间:一个返回码区间,例如200-204。 默认值:200。 该字段仅在HTTP/HTTPS/GRPC协议下有效,其他协议可以设置但不会生效。
|
197
197
|
|
198
198
|
:param expected_codes: The expected_codes of this MasterSlaveHealthMonitor.
|
199
199
|
:type expected_codes: str
|
@@ -18,6 +18,7 @@ class Member:
|
|
18
18
|
|
19
19
|
openapi_types = {
|
20
20
|
'id': 'str',
|
21
|
+
'availability_zone': 'str',
|
21
22
|
'name': 'str',
|
22
23
|
'project_id': 'str',
|
23
24
|
'admin_state_up': 'bool',
|
@@ -37,6 +38,7 @@ class Member:
|
|
37
38
|
|
38
39
|
attribute_map = {
|
39
40
|
'id': 'id',
|
41
|
+
'availability_zone': 'availability_zone',
|
40
42
|
'name': 'name',
|
41
43
|
'project_id': 'project_id',
|
42
44
|
'admin_state_up': 'admin_state_up',
|
@@ -54,13 +56,15 @@ class Member:
|
|
54
56
|
'instance_id': 'instance_id'
|
55
57
|
}
|
56
58
|
|
57
|
-
def __init__(self, id=None, name=None, project_id=None, admin_state_up=None, subnet_cidr_id=None, protocol_port=None, weight=None, address=None, ip_version=None, operating_status=None, status=None, reason=None, created_at=None, updated_at=None, member_type=None, instance_id=None):
|
59
|
+
def __init__(self, id=None, availability_zone=None, name=None, project_id=None, admin_state_up=None, subnet_cidr_id=None, protocol_port=None, weight=None, address=None, ip_version=None, operating_status=None, status=None, reason=None, created_at=None, updated_at=None, member_type=None, instance_id=None):
|
58
60
|
r"""Member
|
59
61
|
|
60
62
|
The model defined in huaweicloud sdk
|
61
63
|
|
62
64
|
:param id: 参数解释:后端服务器ID。 > 此处并非ECS服务器的ID,而是ELB为绑定的后端服务器自动生成的member ID。
|
63
65
|
:type id: str
|
66
|
+
:param availability_zone: 参数解释:后端服务器所在的可用区。
|
67
|
+
:type availability_zone: str
|
64
68
|
:param name: 参数解释:后端服务器名称。 注意:该名称并非ECS名称。
|
65
69
|
:type name: str
|
66
70
|
:param project_id: 参数解释:后端服务器所在的项目ID。
|
@@ -96,6 +100,7 @@ class Member:
|
|
96
100
|
|
97
101
|
|
98
102
|
self._id = None
|
103
|
+
self._availability_zone = None
|
99
104
|
self._name = None
|
100
105
|
self._project_id = None
|
101
106
|
self._admin_state_up = None
|
@@ -114,6 +119,7 @@ class Member:
|
|
114
119
|
self.discriminator = None
|
115
120
|
|
116
121
|
self.id = id
|
122
|
+
self.availability_zone = availability_zone
|
117
123
|
self.name = name
|
118
124
|
self.project_id = project_id
|
119
125
|
self.admin_state_up = admin_state_up
|
@@ -158,6 +164,28 @@ class Member:
|
|
158
164
|
"""
|
159
165
|
self._id = id
|
160
166
|
|
167
|
+
@property
|
168
|
+
def availability_zone(self):
|
169
|
+
r"""Gets the availability_zone of this Member.
|
170
|
+
|
171
|
+
参数解释:后端服务器所在的可用区。
|
172
|
+
|
173
|
+
:return: The availability_zone of this Member.
|
174
|
+
:rtype: str
|
175
|
+
"""
|
176
|
+
return self._availability_zone
|
177
|
+
|
178
|
+
@availability_zone.setter
|
179
|
+
def availability_zone(self, availability_zone):
|
180
|
+
r"""Sets the availability_zone of this Member.
|
181
|
+
|
182
|
+
参数解释:后端服务器所在的可用区。
|
183
|
+
|
184
|
+
:param availability_zone: The availability_zone of this Member.
|
185
|
+
:type availability_zone: str
|
186
|
+
"""
|
187
|
+
self._availability_zone = availability_zone
|
188
|
+
|
161
189
|
@property
|
162
190
|
def name(self):
|
163
191
|
r"""Gets the name of this Member.
|
@@ -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 MemberCheckJob:
|
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
|
+
r"""MemberCheckJob
|
29
|
+
|
30
|
+
The model defined in huaweicloud sdk
|
31
|
+
|
32
|
+
:param job_id: 参数解释:任务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
|
+
r"""Gets the job_id of this MemberCheckJob.
|
47
|
+
|
48
|
+
参数解释:任务ID,根据该任务ID可以查询到任务执行结果。
|
49
|
+
|
50
|
+
:return: The job_id of this MemberCheckJob.
|
51
|
+
:rtype: str
|
52
|
+
"""
|
53
|
+
return self._job_id
|
54
|
+
|
55
|
+
@job_id.setter
|
56
|
+
def job_id(self, job_id):
|
57
|
+
r"""Sets the job_id of this MemberCheckJob.
|
58
|
+
|
59
|
+
参数解释:任务ID,根据该任务ID可以查询到任务执行结果。
|
60
|
+
|
61
|
+
:param job_id: The job_id of this MemberCheckJob.
|
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, MemberCheckJob):
|
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
|