huaweicloudsdkelb 3.1.148__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.
Files changed (72) hide show
  1. huaweicloudsdkelb/v3/__init__.py +34 -0
  2. huaweicloudsdkelb/v3/elb_async_client.py +631 -3
  3. huaweicloudsdkelb/v3/elb_client.py +631 -3
  4. huaweicloudsdkelb/v3/model/__init__.py +34 -0
  5. huaweicloudsdkelb/v3/model/az_affinity.py +201 -0
  6. huaweicloudsdkelb/v3/model/batch_create_load_balancer_option.py +3 -3
  7. huaweicloudsdkelb/v3/model/batch_create_members_option.py +30 -1
  8. huaweicloudsdkelb/v3/model/batch_update_member.py +32 -3
  9. huaweicloudsdkelb/v3/model/batch_update_members_option.py +30 -1
  10. huaweicloudsdkelb/v3/model/certificate_info.py +90 -3
  11. huaweicloudsdkelb/v3/model/create_certificate_option.py +90 -3
  12. huaweicloudsdkelb/v3/model/create_health_monitor_option.py +3 -3
  13. huaweicloudsdkelb/v3/model/create_master_slave_health_monitor_option.py +3 -3
  14. huaweicloudsdkelb/v3/model/create_member_health_check_job_option.py +142 -0
  15. huaweicloudsdkelb/v3/model/create_member_health_check_job_request.py +139 -0
  16. huaweicloudsdkelb/v3/model/create_member_health_check_job_request_body.py +111 -0
  17. huaweicloudsdkelb/v3/model/create_member_health_check_job_response.py +141 -0
  18. huaweicloudsdkelb/v3/model/create_member_option.py +32 -3
  19. huaweicloudsdkelb/v3/model/create_pool_option.py +26 -1
  20. huaweicloudsdkelb/v3/model/create_redirect_pools_extend_config.py +28 -3
  21. huaweicloudsdkelb/v3/model/create_traffic_mirror_config.py +144 -0
  22. huaweicloudsdkelb/v3/model/delete_recycle_load_balancer_request.py +114 -0
  23. huaweicloudsdkelb/v3/model/delete_recycle_load_balancer_response.py +85 -0
  24. huaweicloudsdkelb/v3/model/health_monitor.py +3 -3
  25. huaweicloudsdkelb/v3/model/list_certificates_request.py +90 -3
  26. huaweicloudsdkelb/v3/model/list_health_monitors_request.py +3 -3
  27. huaweicloudsdkelb/v3/model/list_listeners_request.py +30 -1
  28. huaweicloudsdkelb/v3/model/list_load_balancers_request.py +30 -1
  29. huaweicloudsdkelb/v3/model/list_members_request.py +32 -3
  30. huaweicloudsdkelb/v3/model/list_pools_request.py +32 -3
  31. huaweicloudsdkelb/v3/model/list_recycle_bin_load_balancers_request.py +1043 -0
  32. huaweicloudsdkelb/v3/model/list_recycle_bin_load_balancers_response.py +170 -0
  33. huaweicloudsdkelb/v3/model/master_slave_health_monitor.py +3 -3
  34. huaweicloudsdkelb/v3/model/member.py +29 -1
  35. huaweicloudsdkelb/v3/model/member_check_job.py +115 -0
  36. huaweicloudsdkelb/v3/model/member_check_job_info.py +343 -0
  37. huaweicloudsdkelb/v3/model/member_check_job_result.py +161 -0
  38. huaweicloudsdkelb/v3/model/member_check_job_result_group.py +173 -0
  39. huaweicloudsdkelb/v3/model/member_check_job_result_item.py +289 -0
  40. huaweicloudsdkelb/v3/model/member_info.py +29 -1
  41. huaweicloudsdkelb/v3/model/pool.py +29 -4
  42. huaweicloudsdkelb/v3/model/prepaid_change_charge_mode_option.py +30 -1
  43. huaweicloudsdkelb/v3/model/recycle_bin_policy.py +144 -0
  44. huaweicloudsdkelb/v3/model/recycle_bin_policy_request_body.py +111 -0
  45. huaweicloudsdkelb/v3/model/recycle_bin_request_body.py +115 -0
  46. huaweicloudsdkelb/v3/model/recycle_bin_response_body.py +169 -0
  47. huaweicloudsdkelb/v3/model/recycle_load_balancer.py +1412 -0
  48. huaweicloudsdkelb/v3/model/redirect_pools_extend_config.py +28 -3
  49. huaweicloudsdkelb/v3/model/restore_loadbalancer_request.py +114 -0
  50. huaweicloudsdkelb/v3/model/restore_loadbalancer_response.py +174 -0
  51. huaweicloudsdkelb/v3/model/show_member_health_check_job_request.py +114 -0
  52. huaweicloudsdkelb/v3/model/show_member_health_check_job_response.py +141 -0
  53. huaweicloudsdkelb/v3/model/show_recycle_bin_request.py +84 -0
  54. huaweicloudsdkelb/v3/model/show_recycle_bin_response.py +112 -0
  55. huaweicloudsdkelb/v3/model/traffic_mirror_config.py +144 -0
  56. huaweicloudsdkelb/v3/model/update_az_affinity.py +202 -0
  57. huaweicloudsdkelb/v3/model/update_certificate_option.py +90 -3
  58. huaweicloudsdkelb/v3/model/update_health_monitor_option.py +3 -3
  59. huaweicloudsdkelb/v3/model/update_member_option.py +30 -1
  60. huaweicloudsdkelb/v3/model/update_pool_option.py +28 -3
  61. huaweicloudsdkelb/v3/model/update_recycle_bin_enable_request.py +111 -0
  62. huaweicloudsdkelb/v3/model/update_recycle_bin_enable_request_body.py +111 -0
  63. huaweicloudsdkelb/v3/model/update_recycle_bin_enable_response.py +112 -0
  64. huaweicloudsdkelb/v3/model/update_recycle_bin_policy_request.py +111 -0
  65. huaweicloudsdkelb/v3/model/update_recycle_bin_policy_request_body.py +111 -0
  66. huaweicloudsdkelb/v3/model/update_recycle_bin_policy_response.py +112 -0
  67. huaweicloudsdkelb/v3/model/update_redirect_pools_extend_config.py +28 -3
  68. {huaweicloudsdkelb-3.1.148.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/METADATA +2 -2
  69. {huaweicloudsdkelb-3.1.148.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/RECORD +72 -38
  70. {huaweicloudsdkelb-3.1.148.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/LICENSE +0 -0
  71. {huaweicloudsdkelb-3.1.148.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/WHEEL +0 -0
  72. {huaweicloudsdkelb-3.1.148.dist-info → huaweicloudsdkelb-3.1.149.dist-info}/top_level.txt +0 -0
@@ -18,6 +18,7 @@ class UpdateMemberOption:
18
18
 
19
19
  openapi_types = {
20
20
  'admin_state_up': 'bool',
21
+ 'availability_zone': 'str',
21
22
  'name': 'str',
22
23
  'weight': 'int',
23
24
  'protocol_port': 'int'
@@ -25,18 +26,21 @@ class UpdateMemberOption:
25
26
 
26
27
  attribute_map = {
27
28
  'admin_state_up': 'admin_state_up',
29
+ 'availability_zone': 'availability_zone',
28
30
  'name': 'name',
29
31
  'weight': 'weight',
30
32
  'protocol_port': 'protocol_port'
31
33
  }
32
34
 
33
- def __init__(self, admin_state_up=None, name=None, weight=None, protocol_port=None):
35
+ def __init__(self, admin_state_up=None, availability_zone=None, name=None, weight=None, protocol_port=None):
34
36
  r"""UpdateMemberOption
35
37
 
36
38
  The model defined in huaweicloud sdk
37
39
 
38
40
  :param admin_state_up: 后端服务器的管理状态。 取值:true、false。 虽然创建、更新请求支持该字段,但实际取值决定于后端服务器对应的弹性云服务器是否存在。若存在,该值为true,否则,该值为false。 请勿传入该字段。
39
41
  :type admin_state_up: bool
42
+ :param availability_zone: 参数解释:后端服务器的可用区。 约束限制: 仅支持iptarget类型的后端服务器更新该字段。且后端服务器组开启可用区亲和时,iptarget类型的后端服务器必须配置该字段,且无法更新为\"\"。 取值范围:本region中ECS可选择的可用区。
43
+ :type availability_zone: str
40
44
  :param name: 后端服务器名称。
41
45
  :type name: str
42
46
  :param weight: 后端服务器的权重,请求将根据pool配置的负载均衡算法和后端服务器的权重进行负载分发。 权重值越大,分发的请求越多。权重为0的后端不再接受新的请求。 取值:0-100,默认1。 使用说明:若所在pool的lb_algorithm取值为SOURCE_IP或QUIC_CID,该字段无效。
@@ -48,6 +52,7 @@ class UpdateMemberOption:
48
52
 
49
53
 
50
54
  self._admin_state_up = None
55
+ self._availability_zone = None
51
56
  self._name = None
52
57
  self._weight = None
53
58
  self._protocol_port = None
@@ -55,6 +60,8 @@ class UpdateMemberOption:
55
60
 
56
61
  if admin_state_up is not None:
57
62
  self.admin_state_up = admin_state_up
63
+ if availability_zone is not None:
64
+ self.availability_zone = availability_zone
58
65
  if name is not None:
59
66
  self.name = name
60
67
  if weight is not None:
@@ -84,6 +91,28 @@ class UpdateMemberOption:
84
91
  """
85
92
  self._admin_state_up = admin_state_up
86
93
 
94
+ @property
95
+ def availability_zone(self):
96
+ r"""Gets the availability_zone of this UpdateMemberOption.
97
+
98
+ 参数解释:后端服务器的可用区。 约束限制: 仅支持iptarget类型的后端服务器更新该字段。且后端服务器组开启可用区亲和时,iptarget类型的后端服务器必须配置该字段,且无法更新为\"\"。 取值范围:本region中ECS可选择的可用区。
99
+
100
+ :return: The availability_zone of this UpdateMemberOption.
101
+ :rtype: str
102
+ """
103
+ return self._availability_zone
104
+
105
+ @availability_zone.setter
106
+ def availability_zone(self, availability_zone):
107
+ r"""Sets the availability_zone of this UpdateMemberOption.
108
+
109
+ 参数解释:后端服务器的可用区。 约束限制: 仅支持iptarget类型的后端服务器更新该字段。且后端服务器组开启可用区亲和时,iptarget类型的后端服务器必须配置该字段,且无法更新为\"\"。 取值范围:本region中ECS可选择的可用区。
110
+
111
+ :param availability_zone: The availability_zone of this UpdateMemberOption.
112
+ :type availability_zone: str
113
+ """
114
+ self._availability_zone = availability_zone
115
+
87
116
  @property
88
117
  def name(self):
89
118
  r"""Gets the name of this UpdateMemberOption.
@@ -31,7 +31,8 @@ class UpdatePoolOption:
31
31
  'any_port_enable': 'bool',
32
32
  'connection_drain': 'ConnectionDrain',
33
33
  'pool_health': 'PoolHealth',
34
- 'quic_cid_hash_strategy': 'QuicCidHashStrategy'
34
+ 'quic_cid_hash_strategy': 'QuicCidHashStrategy',
35
+ 'az_affinity': 'UpdateAzAffinity'
35
36
  }
36
37
 
37
38
  attribute_map = {
@@ -49,10 +50,11 @@ class UpdatePoolOption:
49
50
  'any_port_enable': 'any_port_enable',
50
51
  'connection_drain': 'connection_drain',
51
52
  'pool_health': 'pool_health',
52
- 'quic_cid_hash_strategy': 'quic_cid_hash_strategy'
53
+ 'quic_cid_hash_strategy': 'quic_cid_hash_strategy',
54
+ 'az_affinity': 'az_affinity'
53
55
  }
54
56
 
55
- def __init__(self, admin_state_up=None, description=None, lb_algorithm=None, name=None, session_persistence=None, slow_start=None, member_deletion_protection_enable=None, vpc_id=None, type=None, protection_status=None, protection_reason=None, any_port_enable=None, connection_drain=None, pool_health=None, quic_cid_hash_strategy=None):
57
+ def __init__(self, admin_state_up=None, description=None, lb_algorithm=None, name=None, session_persistence=None, slow_start=None, member_deletion_protection_enable=None, vpc_id=None, type=None, protection_status=None, protection_reason=None, any_port_enable=None, connection_drain=None, pool_health=None, quic_cid_hash_strategy=None, az_affinity=None):
56
58
  r"""UpdatePoolOption
57
59
 
58
60
  The model defined in huaweicloud sdk
@@ -87,6 +89,8 @@ class UpdatePoolOption:
87
89
  :type pool_health: :class:`huaweicloudsdkelb.v3.PoolHealth`
88
90
  :param quic_cid_hash_strategy:
89
91
  :type quic_cid_hash_strategy: :class:`huaweicloudsdkelb.v3.QuicCidHashStrategy`
92
+ :param az_affinity:
93
+ :type az_affinity: :class:`huaweicloudsdkelb.v3.UpdateAzAffinity`
90
94
  """
91
95
 
92
96
 
@@ -106,6 +110,7 @@ class UpdatePoolOption:
106
110
  self._connection_drain = None
107
111
  self._pool_health = None
108
112
  self._quic_cid_hash_strategy = None
113
+ self._az_affinity = None
109
114
  self.discriminator = None
110
115
 
111
116
  if admin_state_up is not None:
@@ -138,6 +143,8 @@ class UpdatePoolOption:
138
143
  self.pool_health = pool_health
139
144
  if quic_cid_hash_strategy is not None:
140
145
  self.quic_cid_hash_strategy = quic_cid_hash_strategy
146
+ if az_affinity is not None:
147
+ self.az_affinity = az_affinity
141
148
 
142
149
  @property
143
150
  def admin_state_up(self):
@@ -449,6 +456,24 @@ class UpdatePoolOption:
449
456
  """
450
457
  self._quic_cid_hash_strategy = quic_cid_hash_strategy
451
458
 
459
+ @property
460
+ def az_affinity(self):
461
+ r"""Gets the az_affinity of this UpdatePoolOption.
462
+
463
+ :return: The az_affinity of this UpdatePoolOption.
464
+ :rtype: :class:`huaweicloudsdkelb.v3.UpdateAzAffinity`
465
+ """
466
+ return self._az_affinity
467
+
468
+ @az_affinity.setter
469
+ def az_affinity(self, az_affinity):
470
+ r"""Sets the az_affinity of this UpdatePoolOption.
471
+
472
+ :param az_affinity: The az_affinity of this UpdatePoolOption.
473
+ :type az_affinity: :class:`huaweicloudsdkelb.v3.UpdateAzAffinity`
474
+ """
475
+ self._az_affinity = az_affinity
476
+
452
477
  def to_dict(self):
453
478
  """Returns the model properties as a dict"""
454
479
  result = {}
@@ -0,0 +1,111 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class UpdateRecycleBinEnableRequest:
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
+ 'body': 'UpdateRecycleBinEnableRequestBody'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'body': 'body'
25
+ }
26
+
27
+ def __init__(self, body=None):
28
+ r"""UpdateRecycleBinEnableRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param body: Body of the UpdateRecycleBinEnableRequest
33
+ :type body: :class:`huaweicloudsdkelb.v3.UpdateRecycleBinEnableRequestBody`
34
+ """
35
+
36
+
37
+
38
+ self._body = None
39
+ self.discriminator = None
40
+
41
+ if body is not None:
42
+ self.body = body
43
+
44
+ @property
45
+ def body(self):
46
+ r"""Gets the body of this UpdateRecycleBinEnableRequest.
47
+
48
+ :return: The body of this UpdateRecycleBinEnableRequest.
49
+ :rtype: :class:`huaweicloudsdkelb.v3.UpdateRecycleBinEnableRequestBody`
50
+ """
51
+ return self._body
52
+
53
+ @body.setter
54
+ def body(self, body):
55
+ r"""Sets the body of this UpdateRecycleBinEnableRequest.
56
+
57
+ :param body: The body of this UpdateRecycleBinEnableRequest.
58
+ :type body: :class:`huaweicloudsdkelb.v3.UpdateRecycleBinEnableRequestBody`
59
+ """
60
+ self._body = body
61
+
62
+ def to_dict(self):
63
+ """Returns the model properties as a dict"""
64
+ result = {}
65
+
66
+ for attr, _ in six.iteritems(self.openapi_types):
67
+ value = getattr(self, attr)
68
+ if isinstance(value, list):
69
+ result[attr] = list(map(
70
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
71
+ value
72
+ ))
73
+ elif hasattr(value, "to_dict"):
74
+ result[attr] = value.to_dict()
75
+ elif isinstance(value, dict):
76
+ result[attr] = dict(map(
77
+ lambda item: (item[0], item[1].to_dict())
78
+ if hasattr(item[1], "to_dict") else item,
79
+ value.items()
80
+ ))
81
+ else:
82
+ if attr in self.sensitive_list:
83
+ result[attr] = "****"
84
+ else:
85
+ result[attr] = value
86
+
87
+ return result
88
+
89
+ def to_str(self):
90
+ """Returns the string representation of the model"""
91
+ import simplejson as json
92
+ if six.PY2:
93
+ import sys
94
+ reload(sys)
95
+ sys.setdefaultencoding("utf-8")
96
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
97
+
98
+ def __repr__(self):
99
+ """For `print`"""
100
+ return self.to_str()
101
+
102
+ def __eq__(self, other):
103
+ """Returns true if both objects are equal"""
104
+ if not isinstance(other, UpdateRecycleBinEnableRequest):
105
+ return False
106
+
107
+ return self.__dict__ == other.__dict__
108
+
109
+ def __ne__(self, other):
110
+ """Returns true if both objects are not equal"""
111
+ return not self == other
@@ -0,0 +1,111 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class UpdateRecycleBinEnableRequestBody:
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
+ 'recycle_bin': 'RecycleBinRequestBody'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'recycle_bin': 'recycle_bin'
25
+ }
26
+
27
+ def __init__(self, recycle_bin=None):
28
+ r"""UpdateRecycleBinEnableRequestBody
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param recycle_bin:
33
+ :type recycle_bin: :class:`huaweicloudsdkelb.v3.RecycleBinRequestBody`
34
+ """
35
+
36
+
37
+
38
+ self._recycle_bin = None
39
+ self.discriminator = None
40
+
41
+ if recycle_bin is not None:
42
+ self.recycle_bin = recycle_bin
43
+
44
+ @property
45
+ def recycle_bin(self):
46
+ r"""Gets the recycle_bin of this UpdateRecycleBinEnableRequestBody.
47
+
48
+ :return: The recycle_bin of this UpdateRecycleBinEnableRequestBody.
49
+ :rtype: :class:`huaweicloudsdkelb.v3.RecycleBinRequestBody`
50
+ """
51
+ return self._recycle_bin
52
+
53
+ @recycle_bin.setter
54
+ def recycle_bin(self, recycle_bin):
55
+ r"""Sets the recycle_bin of this UpdateRecycleBinEnableRequestBody.
56
+
57
+ :param recycle_bin: The recycle_bin of this UpdateRecycleBinEnableRequestBody.
58
+ :type recycle_bin: :class:`huaweicloudsdkelb.v3.RecycleBinRequestBody`
59
+ """
60
+ self._recycle_bin = recycle_bin
61
+
62
+ def to_dict(self):
63
+ """Returns the model properties as a dict"""
64
+ result = {}
65
+
66
+ for attr, _ in six.iteritems(self.openapi_types):
67
+ value = getattr(self, attr)
68
+ if isinstance(value, list):
69
+ result[attr] = list(map(
70
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
71
+ value
72
+ ))
73
+ elif hasattr(value, "to_dict"):
74
+ result[attr] = value.to_dict()
75
+ elif isinstance(value, dict):
76
+ result[attr] = dict(map(
77
+ lambda item: (item[0], item[1].to_dict())
78
+ if hasattr(item[1], "to_dict") else item,
79
+ value.items()
80
+ ))
81
+ else:
82
+ if attr in self.sensitive_list:
83
+ result[attr] = "****"
84
+ else:
85
+ result[attr] = value
86
+
87
+ return result
88
+
89
+ def to_str(self):
90
+ """Returns the string representation of the model"""
91
+ import simplejson as json
92
+ if six.PY2:
93
+ import sys
94
+ reload(sys)
95
+ sys.setdefaultencoding("utf-8")
96
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
97
+
98
+ def __repr__(self):
99
+ """For `print`"""
100
+ return self.to_str()
101
+
102
+ def __eq__(self, other):
103
+ """Returns true if both objects are equal"""
104
+ if not isinstance(other, UpdateRecycleBinEnableRequestBody):
105
+ return False
106
+
107
+ return self.__dict__ == other.__dict__
108
+
109
+ def __ne__(self, other):
110
+ """Returns true if both objects are not equal"""
111
+ return not self == other
@@ -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 UpdateRecycleBinEnableResponse(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
+ 'recycle_bin': 'RecycleBinResponseBody'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'recycle_bin': 'recycle_bin'
26
+ }
27
+
28
+ def __init__(self, recycle_bin=None):
29
+ r"""UpdateRecycleBinEnableResponse
30
+
31
+ The model defined in huaweicloud sdk
32
+
33
+ :param recycle_bin:
34
+ :type recycle_bin: :class:`huaweicloudsdkelb.v3.RecycleBinResponseBody`
35
+ """
36
+
37
+ super(UpdateRecycleBinEnableResponse, self).__init__()
38
+
39
+ self._recycle_bin = None
40
+ self.discriminator = None
41
+
42
+ if recycle_bin is not None:
43
+ self.recycle_bin = recycle_bin
44
+
45
+ @property
46
+ def recycle_bin(self):
47
+ r"""Gets the recycle_bin of this UpdateRecycleBinEnableResponse.
48
+
49
+ :return: The recycle_bin of this UpdateRecycleBinEnableResponse.
50
+ :rtype: :class:`huaweicloudsdkelb.v3.RecycleBinResponseBody`
51
+ """
52
+ return self._recycle_bin
53
+
54
+ @recycle_bin.setter
55
+ def recycle_bin(self, recycle_bin):
56
+ r"""Sets the recycle_bin of this UpdateRecycleBinEnableResponse.
57
+
58
+ :param recycle_bin: The recycle_bin of this UpdateRecycleBinEnableResponse.
59
+ :type recycle_bin: :class:`huaweicloudsdkelb.v3.RecycleBinResponseBody`
60
+ """
61
+ self._recycle_bin = recycle_bin
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, UpdateRecycleBinEnableResponse):
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
@@ -0,0 +1,111 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class UpdateRecycleBinPolicyRequest:
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
+ 'body': 'UpdateRecycleBinPolicyRequestBody'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'body': 'body'
25
+ }
26
+
27
+ def __init__(self, body=None):
28
+ r"""UpdateRecycleBinPolicyRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param body: Body of the UpdateRecycleBinPolicyRequest
33
+ :type body: :class:`huaweicloudsdkelb.v3.UpdateRecycleBinPolicyRequestBody`
34
+ """
35
+
36
+
37
+
38
+ self._body = None
39
+ self.discriminator = None
40
+
41
+ if body is not None:
42
+ self.body = body
43
+
44
+ @property
45
+ def body(self):
46
+ r"""Gets the body of this UpdateRecycleBinPolicyRequest.
47
+
48
+ :return: The body of this UpdateRecycleBinPolicyRequest.
49
+ :rtype: :class:`huaweicloudsdkelb.v3.UpdateRecycleBinPolicyRequestBody`
50
+ """
51
+ return self._body
52
+
53
+ @body.setter
54
+ def body(self, body):
55
+ r"""Sets the body of this UpdateRecycleBinPolicyRequest.
56
+
57
+ :param body: The body of this UpdateRecycleBinPolicyRequest.
58
+ :type body: :class:`huaweicloudsdkelb.v3.UpdateRecycleBinPolicyRequestBody`
59
+ """
60
+ self._body = body
61
+
62
+ def to_dict(self):
63
+ """Returns the model properties as a dict"""
64
+ result = {}
65
+
66
+ for attr, _ in six.iteritems(self.openapi_types):
67
+ value = getattr(self, attr)
68
+ if isinstance(value, list):
69
+ result[attr] = list(map(
70
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
71
+ value
72
+ ))
73
+ elif hasattr(value, "to_dict"):
74
+ result[attr] = value.to_dict()
75
+ elif isinstance(value, dict):
76
+ result[attr] = dict(map(
77
+ lambda item: (item[0], item[1].to_dict())
78
+ if hasattr(item[1], "to_dict") else item,
79
+ value.items()
80
+ ))
81
+ else:
82
+ if attr in self.sensitive_list:
83
+ result[attr] = "****"
84
+ else:
85
+ result[attr] = value
86
+
87
+ return result
88
+
89
+ def to_str(self):
90
+ """Returns the string representation of the model"""
91
+ import simplejson as json
92
+ if six.PY2:
93
+ import sys
94
+ reload(sys)
95
+ sys.setdefaultencoding("utf-8")
96
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
97
+
98
+ def __repr__(self):
99
+ """For `print`"""
100
+ return self.to_str()
101
+
102
+ def __eq__(self, other):
103
+ """Returns true if both objects are equal"""
104
+ if not isinstance(other, UpdateRecycleBinPolicyRequest):
105
+ return False
106
+
107
+ return self.__dict__ == other.__dict__
108
+
109
+ def __ne__(self, other):
110
+ """Returns true if both objects are not equal"""
111
+ return not self == other