huaweicloudsdkelb 3.1.132__py2.py3-none-any.whl → 3.1.134__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 +39 -0
- huaweicloudsdkelb/v3/elb_async_client.py +742 -22
- huaweicloudsdkelb/v3/elb_client.py +742 -22
- huaweicloudsdkelb/v3/model/__init__.py +39 -0
- huaweicloudsdkelb/v3/model/availability_zone.py +6 -6
- huaweicloudsdkelb/v3/model/base_job.py +347 -0
- huaweicloudsdkelb/v3/model/batch_add_available_zones_response.py +6 -6
- huaweicloudsdkelb/v3/model/batch_create_load_balancer_option.py +1022 -0
- huaweicloudsdkelb/v3/model/batch_create_load_balancers_request.py +111 -0
- huaweicloudsdkelb/v3/model/batch_create_load_balancers_request_body.py +110 -0
- huaweicloudsdkelb/v3/model/batch_create_load_balancers_response.py +203 -0
- huaweicloudsdkelb/v3/model/batch_member.py +38 -13
- huaweicloudsdkelb/v3/model/batch_update_member.py +32 -7
- huaweicloudsdkelb/v3/model/batch_update_priority_request_body.py +3 -3
- huaweicloudsdkelb/v3/model/certificate_info.py +39 -10
- huaweicloudsdkelb/v3/model/clone_loadbalancer_request.py +139 -0
- huaweicloudsdkelb/v3/model/clone_loadbalancer_request_body.py +139 -0
- huaweicloudsdkelb/v3/model/clone_loadbalancer_response.py +174 -0
- huaweicloudsdkelb/v3/model/clone_loadbalancer_response_body_loadbalancer_list.py +115 -0
- huaweicloudsdkelb/v3/model/cors_config.py +260 -0
- huaweicloudsdkelb/v3/model/count_preoccupy_ip_num_request.py +73 -15
- huaweicloudsdkelb/v3/model/create_certificate_option.py +35 -6
- huaweicloudsdkelb/v3/model/create_cors_config.py +260 -0
- huaweicloudsdkelb/v3/model/create_health_monitor_option.py +3 -3
- huaweicloudsdkelb/v3/model/create_l7_policy_option.py +6 -6
- huaweicloudsdkelb/v3/model/create_listener_option.py +126 -39
- huaweicloudsdkelb/v3/model/create_load_balancer_bandwidth_option.py +3 -3
- huaweicloudsdkelb/v3/model/create_load_balancer_option.py +36 -36
- huaweicloudsdkelb/v3/model/create_load_balancer_public_ip_option.py +3 -3
- huaweicloudsdkelb/v3/model/create_load_balancer_response.py +6 -6
- huaweicloudsdkelb/v3/model/create_master_slave_member_option.py +2 -1
- huaweicloudsdkelb/v3/model/create_master_slave_pool_option.py +31 -6
- huaweicloudsdkelb/v3/model/create_member_option.py +3 -3
- huaweicloudsdkelb/v3/model/create_pool_option.py +46 -21
- huaweicloudsdkelb/v3/model/create_pool_session_persistence_option.py +6 -6
- huaweicloudsdkelb/v3/model/create_redirect_pools_extend_config.py +28 -3
- huaweicloudsdkelb/v3/model/create_redirect_url_config.py +3 -3
- huaweicloudsdkelb/v3/model/delete_load_balancer_cascade_option.py +144 -0
- huaweicloudsdkelb/v3/model/delete_load_balancer_cascade_request.py +139 -0
- huaweicloudsdkelb/v3/model/delete_load_balancer_cascade_request_body.py +110 -0
- huaweicloudsdkelb/v3/model/delete_load_balancer_cascade_response.py +85 -0
- huaweicloudsdkelb/v3/model/delete_pool_cascade_request.py +114 -0
- huaweicloudsdkelb/v3/model/delete_pool_cascade_response.py +85 -0
- huaweicloudsdkelb/v3/model/feature_config.py +394 -0
- huaweicloudsdkelb/v3/model/flavor.py +9 -9
- huaweicloudsdkelb/v3/model/global_eip_info.py +3 -3
- huaweicloudsdkelb/v3/model/health_monitor.py +9 -9
- huaweicloudsdkelb/v3/model/job_entities.py +144 -0
- huaweicloudsdkelb/v3/model/l7_policy.py +44 -15
- huaweicloudsdkelb/v3/model/l7_rule.py +9 -9
- huaweicloudsdkelb/v3/model/list_all_members_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_availability_zones_request.py +35 -6
- huaweicloudsdkelb/v3/model/list_certificates_request.py +30 -1
- huaweicloudsdkelb/v3/model/list_feature_configs_request.py +115 -0
- huaweicloudsdkelb/v3/model/list_feature_configs_response.py +170 -0
- huaweicloudsdkelb/v3/model/list_flavors_request.py +119 -3
- huaweicloudsdkelb/v3/model/list_health_monitors_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_ip_groups_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_jobs_request.py +260 -0
- huaweicloudsdkelb/v3/model/list_jobs_response.py +145 -0
- huaweicloudsdkelb/v3/model/list_l7_policies_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_l7_rules_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_listeners_request.py +79 -21
- huaweicloudsdkelb/v3/model/list_load_balancers_request.py +15 -15
- huaweicloudsdkelb/v3/model/list_loadbalancer_feature_request.py +114 -0
- huaweicloudsdkelb/v3/model/list_loadbalancer_feature_response.py +145 -0
- huaweicloudsdkelb/v3/model/list_logtanks_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_master_slave_pools_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_members_request.py +3 -3
- huaweicloudsdkelb/v3/model/list_pools_request.py +67 -9
- huaweicloudsdkelb/v3/model/list_quota_details_request.py +3 -3
- huaweicloudsdkelb/v3/model/listener.py +154 -39
- huaweicloudsdkelb/v3/model/load_balancer.py +21 -21
- huaweicloudsdkelb/v3/model/load_balancer_status_policy.py +3 -3
- huaweicloudsdkelb/v3/model/loadbalancer_feature.py +170 -0
- huaweicloudsdkelb/v3/model/main_job.py +376 -0
- huaweicloudsdkelb/v3/model/master_slave_member.py +26 -1
- huaweicloudsdkelb/v3/model/master_slave_pool.py +37 -12
- huaweicloudsdkelb/v3/model/member.py +32 -7
- huaweicloudsdkelb/v3/model/member_health_check_failed_reason.py +170 -0
- huaweicloudsdkelb/v3/model/member_info.py +34 -9
- huaweicloudsdkelb/v3/model/member_status.py +28 -3
- huaweicloudsdkelb/v3/model/pool.py +43 -18
- huaweicloudsdkelb/v3/model/quic_cid_hash_strategy.py +142 -0
- huaweicloudsdkelb/v3/model/quota.py +87 -3
- huaweicloudsdkelb/v3/model/quota_info.py +3 -3
- huaweicloudsdkelb/v3/model/redirect_pools_extend_config.py +28 -3
- huaweicloudsdkelb/v3/model/session_persistence.py +6 -6
- huaweicloudsdkelb/v3/model/show_ip_group_related_listeners_request.py +114 -0
- huaweicloudsdkelb/v3/model/show_ip_group_related_listeners_response.py +116 -0
- huaweicloudsdkelb/v3/model/show_job_request.py +114 -0
- huaweicloudsdkelb/v3/model/show_job_response.py +141 -0
- huaweicloudsdkelb/v3/model/sub_job.py +376 -0
- huaweicloudsdkelb/v3/model/target_loadbalancer_param.py +434 -0
- huaweicloudsdkelb/v3/model/update_certificate_option.py +35 -6
- huaweicloudsdkelb/v3/model/update_health_monitor_option.py +3 -3
- huaweicloudsdkelb/v3/model/update_l7_policy_option.py +3 -3
- huaweicloudsdkelb/v3/model/update_listener_option.py +120 -33
- huaweicloudsdkelb/v3/model/update_load_balancer_option.py +15 -15
- huaweicloudsdkelb/v3/model/update_load_balancer_response.py +6 -6
- huaweicloudsdkelb/v3/model/update_pool_option.py +31 -6
- huaweicloudsdkelb/v3/model/update_pool_session_persistence_option.py +6 -6
- huaweicloudsdkelb/v3/model/update_redirect_pools_extend_config.py +28 -3
- huaweicloudsdkelb/v3/model/upgrade_loadbalancer_request.py +139 -0
- huaweicloudsdkelb/v3/model/upgrade_loadbalancer_response.py +145 -0
- huaweicloudsdkelb/v3/model/upgrade_prepaid_option.py +200 -0
- huaweicloudsdkelb/v3/model/upgrade_v3_request_body.py +313 -0
- {huaweicloudsdkelb-3.1.132.dist-info → huaweicloudsdkelb-3.1.134.dist-info}/METADATA +2 -2
- {huaweicloudsdkelb-3.1.132.dist-info → huaweicloudsdkelb-3.1.134.dist-info}/RECORD +112 -73
- {huaweicloudsdkelb-3.1.132.dist-info → huaweicloudsdkelb-3.1.134.dist-info}/LICENSE +0 -0
- {huaweicloudsdkelb-3.1.132.dist-info → huaweicloudsdkelb-3.1.134.dist-info}/WHEEL +0 -0
- {huaweicloudsdkelb-3.1.132.dist-info → huaweicloudsdkelb-3.1.134.dist-info}/top_level.txt +0 -0
@@ -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 CloneLoadbalancerResponse(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
|
+
'loadbalancer_list': 'list[CloneLoadbalancerResponseBodyLoadbalancerList]',
|
22
|
+
'request_id': 'str',
|
23
|
+
'job_id': 'str'
|
24
|
+
}
|
25
|
+
|
26
|
+
attribute_map = {
|
27
|
+
'loadbalancer_list': 'loadbalancer_list',
|
28
|
+
'request_id': 'request_id',
|
29
|
+
'job_id': 'job_id'
|
30
|
+
}
|
31
|
+
|
32
|
+
def __init__(self, loadbalancer_list=None, request_id=None, job_id=None):
|
33
|
+
"""CloneLoadbalancerResponse
|
34
|
+
|
35
|
+
The model defined in huaweicloud sdk
|
36
|
+
|
37
|
+
:param loadbalancer_list: 新实例相关信息
|
38
|
+
:type loadbalancer_list: list[:class:`huaweicloudsdkelb.v3.CloneLoadbalancerResponseBodyLoadbalancerList`]
|
39
|
+
:param request_id: 请求id
|
40
|
+
:type request_id: str
|
41
|
+
:param job_id: 实例复制任务id
|
42
|
+
:type job_id: str
|
43
|
+
"""
|
44
|
+
|
45
|
+
super(CloneLoadbalancerResponse, self).__init__()
|
46
|
+
|
47
|
+
self._loadbalancer_list = None
|
48
|
+
self._request_id = None
|
49
|
+
self._job_id = None
|
50
|
+
self.discriminator = None
|
51
|
+
|
52
|
+
if loadbalancer_list is not None:
|
53
|
+
self.loadbalancer_list = loadbalancer_list
|
54
|
+
if request_id is not None:
|
55
|
+
self.request_id = request_id
|
56
|
+
if job_id is not None:
|
57
|
+
self.job_id = job_id
|
58
|
+
|
59
|
+
@property
|
60
|
+
def loadbalancer_list(self):
|
61
|
+
"""Gets the loadbalancer_list of this CloneLoadbalancerResponse.
|
62
|
+
|
63
|
+
新实例相关信息
|
64
|
+
|
65
|
+
:return: The loadbalancer_list of this CloneLoadbalancerResponse.
|
66
|
+
:rtype: list[:class:`huaweicloudsdkelb.v3.CloneLoadbalancerResponseBodyLoadbalancerList`]
|
67
|
+
"""
|
68
|
+
return self._loadbalancer_list
|
69
|
+
|
70
|
+
@loadbalancer_list.setter
|
71
|
+
def loadbalancer_list(self, loadbalancer_list):
|
72
|
+
"""Sets the loadbalancer_list of this CloneLoadbalancerResponse.
|
73
|
+
|
74
|
+
新实例相关信息
|
75
|
+
|
76
|
+
:param loadbalancer_list: The loadbalancer_list of this CloneLoadbalancerResponse.
|
77
|
+
:type loadbalancer_list: list[:class:`huaweicloudsdkelb.v3.CloneLoadbalancerResponseBodyLoadbalancerList`]
|
78
|
+
"""
|
79
|
+
self._loadbalancer_list = loadbalancer_list
|
80
|
+
|
81
|
+
@property
|
82
|
+
def request_id(self):
|
83
|
+
"""Gets the request_id of this CloneLoadbalancerResponse.
|
84
|
+
|
85
|
+
请求id
|
86
|
+
|
87
|
+
:return: The request_id of this CloneLoadbalancerResponse.
|
88
|
+
:rtype: str
|
89
|
+
"""
|
90
|
+
return self._request_id
|
91
|
+
|
92
|
+
@request_id.setter
|
93
|
+
def request_id(self, request_id):
|
94
|
+
"""Sets the request_id of this CloneLoadbalancerResponse.
|
95
|
+
|
96
|
+
请求id
|
97
|
+
|
98
|
+
:param request_id: The request_id of this CloneLoadbalancerResponse.
|
99
|
+
:type request_id: str
|
100
|
+
"""
|
101
|
+
self._request_id = request_id
|
102
|
+
|
103
|
+
@property
|
104
|
+
def job_id(self):
|
105
|
+
"""Gets the job_id of this CloneLoadbalancerResponse.
|
106
|
+
|
107
|
+
实例复制任务id
|
108
|
+
|
109
|
+
:return: The job_id of this CloneLoadbalancerResponse.
|
110
|
+
:rtype: str
|
111
|
+
"""
|
112
|
+
return self._job_id
|
113
|
+
|
114
|
+
@job_id.setter
|
115
|
+
def job_id(self, job_id):
|
116
|
+
"""Sets the job_id of this CloneLoadbalancerResponse.
|
117
|
+
|
118
|
+
实例复制任务id
|
119
|
+
|
120
|
+
:param job_id: The job_id of this CloneLoadbalancerResponse.
|
121
|
+
:type job_id: str
|
122
|
+
"""
|
123
|
+
self._job_id = job_id
|
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, CloneLoadbalancerResponse):
|
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,115 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class CloneLoadbalancerResponseBodyLoadbalancerList:
|
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
|
+
'id': 'str'
|
21
|
+
}
|
22
|
+
|
23
|
+
attribute_map = {
|
24
|
+
'id': 'id'
|
25
|
+
}
|
26
|
+
|
27
|
+
def __init__(self, id=None):
|
28
|
+
"""CloneLoadbalancerResponseBodyLoadbalancerList
|
29
|
+
|
30
|
+
The model defined in huaweicloud sdk
|
31
|
+
|
32
|
+
:param id: 新实例id
|
33
|
+
:type id: str
|
34
|
+
"""
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
self._id = None
|
39
|
+
self.discriminator = None
|
40
|
+
|
41
|
+
if id is not None:
|
42
|
+
self.id = id
|
43
|
+
|
44
|
+
@property
|
45
|
+
def id(self):
|
46
|
+
"""Gets the id of this CloneLoadbalancerResponseBodyLoadbalancerList.
|
47
|
+
|
48
|
+
新实例id
|
49
|
+
|
50
|
+
:return: The id of this CloneLoadbalancerResponseBodyLoadbalancerList.
|
51
|
+
:rtype: str
|
52
|
+
"""
|
53
|
+
return self._id
|
54
|
+
|
55
|
+
@id.setter
|
56
|
+
def id(self, id):
|
57
|
+
"""Sets the id of this CloneLoadbalancerResponseBodyLoadbalancerList.
|
58
|
+
|
59
|
+
新实例id
|
60
|
+
|
61
|
+
:param id: The id of this CloneLoadbalancerResponseBodyLoadbalancerList.
|
62
|
+
:type id: str
|
63
|
+
"""
|
64
|
+
self._id = 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, CloneLoadbalancerResponseBodyLoadbalancerList):
|
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
|
@@ -0,0 +1,260 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class CorsConfig:
|
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
|
+
'allow_origin': 'list[str]',
|
21
|
+
'allow_methods': 'list[str]',
|
22
|
+
'allow_headers': 'list[str]',
|
23
|
+
'expose_headers': 'list[str]',
|
24
|
+
'allow_credentials': 'bool',
|
25
|
+
'max_age': 'int'
|
26
|
+
}
|
27
|
+
|
28
|
+
attribute_map = {
|
29
|
+
'allow_origin': 'allow_origin',
|
30
|
+
'allow_methods': 'allow_methods',
|
31
|
+
'allow_headers': 'allow_headers',
|
32
|
+
'expose_headers': 'expose_headers',
|
33
|
+
'allow_credentials': 'allow_credentials',
|
34
|
+
'max_age': 'max_age'
|
35
|
+
}
|
36
|
+
|
37
|
+
def __init__(self, allow_origin=None, allow_methods=None, allow_headers=None, expose_headers=None, allow_credentials=None, max_age=None):
|
38
|
+
"""CorsConfig
|
39
|
+
|
40
|
+
The model defined in huaweicloud sdk
|
41
|
+
|
42
|
+
:param allow_origin: 参数解释:允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。 约束限制: - 单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com) - 单个值可以不加端口,也可以指定端口,端口范围:1~65535。
|
43
|
+
:type allow_origin: list[str]
|
44
|
+
:param allow_methods: 参数解释:选择跨域访问时允许的 HTTP 方法。
|
45
|
+
:type allow_methods: list[str]
|
46
|
+
:param allow_headers: 参数解释:允许跨域的 Header 列表。
|
47
|
+
:type allow_headers: list[str]
|
48
|
+
:param expose_headers: 参数解释:允许暴露的Header列表。
|
49
|
+
:type expose_headers: list[str]
|
50
|
+
:param allow_credentials: 参数解释:是否允许携带凭证信息。 取值范围: - true:是。 - false:否。
|
51
|
+
:type allow_credentials: bool
|
52
|
+
:param max_age: 参数解释:预检请求在浏览器的最大缓存时间,单位:秒。 取值范围:-1~172800。
|
53
|
+
:type max_age: int
|
54
|
+
"""
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
self._allow_origin = None
|
59
|
+
self._allow_methods = None
|
60
|
+
self._allow_headers = None
|
61
|
+
self._expose_headers = None
|
62
|
+
self._allow_credentials = None
|
63
|
+
self._max_age = None
|
64
|
+
self.discriminator = None
|
65
|
+
|
66
|
+
if allow_origin is not None:
|
67
|
+
self.allow_origin = allow_origin
|
68
|
+
if allow_methods is not None:
|
69
|
+
self.allow_methods = allow_methods
|
70
|
+
if allow_headers is not None:
|
71
|
+
self.allow_headers = allow_headers
|
72
|
+
if expose_headers is not None:
|
73
|
+
self.expose_headers = expose_headers
|
74
|
+
if allow_credentials is not None:
|
75
|
+
self.allow_credentials = allow_credentials
|
76
|
+
if max_age is not None:
|
77
|
+
self.max_age = max_age
|
78
|
+
|
79
|
+
@property
|
80
|
+
def allow_origin(self):
|
81
|
+
"""Gets the allow_origin of this CorsConfig.
|
82
|
+
|
83
|
+
参数解释:允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。 约束限制: - 单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com) - 单个值可以不加端口,也可以指定端口,端口范围:1~65535。
|
84
|
+
|
85
|
+
:return: The allow_origin of this CorsConfig.
|
86
|
+
:rtype: list[str]
|
87
|
+
"""
|
88
|
+
return self._allow_origin
|
89
|
+
|
90
|
+
@allow_origin.setter
|
91
|
+
def allow_origin(self, allow_origin):
|
92
|
+
"""Sets the allow_origin of this CorsConfig.
|
93
|
+
|
94
|
+
参数解释:允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。 约束限制: - 单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com) - 单个值可以不加端口,也可以指定端口,端口范围:1~65535。
|
95
|
+
|
96
|
+
:param allow_origin: The allow_origin of this CorsConfig.
|
97
|
+
:type allow_origin: list[str]
|
98
|
+
"""
|
99
|
+
self._allow_origin = allow_origin
|
100
|
+
|
101
|
+
@property
|
102
|
+
def allow_methods(self):
|
103
|
+
"""Gets the allow_methods of this CorsConfig.
|
104
|
+
|
105
|
+
参数解释:选择跨域访问时允许的 HTTP 方法。
|
106
|
+
|
107
|
+
:return: The allow_methods of this CorsConfig.
|
108
|
+
:rtype: list[str]
|
109
|
+
"""
|
110
|
+
return self._allow_methods
|
111
|
+
|
112
|
+
@allow_methods.setter
|
113
|
+
def allow_methods(self, allow_methods):
|
114
|
+
"""Sets the allow_methods of this CorsConfig.
|
115
|
+
|
116
|
+
参数解释:选择跨域访问时允许的 HTTP 方法。
|
117
|
+
|
118
|
+
:param allow_methods: The allow_methods of this CorsConfig.
|
119
|
+
:type allow_methods: list[str]
|
120
|
+
"""
|
121
|
+
self._allow_methods = allow_methods
|
122
|
+
|
123
|
+
@property
|
124
|
+
def allow_headers(self):
|
125
|
+
"""Gets the allow_headers of this CorsConfig.
|
126
|
+
|
127
|
+
参数解释:允许跨域的 Header 列表。
|
128
|
+
|
129
|
+
:return: The allow_headers of this CorsConfig.
|
130
|
+
:rtype: list[str]
|
131
|
+
"""
|
132
|
+
return self._allow_headers
|
133
|
+
|
134
|
+
@allow_headers.setter
|
135
|
+
def allow_headers(self, allow_headers):
|
136
|
+
"""Sets the allow_headers of this CorsConfig.
|
137
|
+
|
138
|
+
参数解释:允许跨域的 Header 列表。
|
139
|
+
|
140
|
+
:param allow_headers: The allow_headers of this CorsConfig.
|
141
|
+
:type allow_headers: list[str]
|
142
|
+
"""
|
143
|
+
self._allow_headers = allow_headers
|
144
|
+
|
145
|
+
@property
|
146
|
+
def expose_headers(self):
|
147
|
+
"""Gets the expose_headers of this CorsConfig.
|
148
|
+
|
149
|
+
参数解释:允许暴露的Header列表。
|
150
|
+
|
151
|
+
:return: The expose_headers of this CorsConfig.
|
152
|
+
:rtype: list[str]
|
153
|
+
"""
|
154
|
+
return self._expose_headers
|
155
|
+
|
156
|
+
@expose_headers.setter
|
157
|
+
def expose_headers(self, expose_headers):
|
158
|
+
"""Sets the expose_headers of this CorsConfig.
|
159
|
+
|
160
|
+
参数解释:允许暴露的Header列表。
|
161
|
+
|
162
|
+
:param expose_headers: The expose_headers of this CorsConfig.
|
163
|
+
:type expose_headers: list[str]
|
164
|
+
"""
|
165
|
+
self._expose_headers = expose_headers
|
166
|
+
|
167
|
+
@property
|
168
|
+
def allow_credentials(self):
|
169
|
+
"""Gets the allow_credentials of this CorsConfig.
|
170
|
+
|
171
|
+
参数解释:是否允许携带凭证信息。 取值范围: - true:是。 - false:否。
|
172
|
+
|
173
|
+
:return: The allow_credentials of this CorsConfig.
|
174
|
+
:rtype: bool
|
175
|
+
"""
|
176
|
+
return self._allow_credentials
|
177
|
+
|
178
|
+
@allow_credentials.setter
|
179
|
+
def allow_credentials(self, allow_credentials):
|
180
|
+
"""Sets the allow_credentials of this CorsConfig.
|
181
|
+
|
182
|
+
参数解释:是否允许携带凭证信息。 取值范围: - true:是。 - false:否。
|
183
|
+
|
184
|
+
:param allow_credentials: The allow_credentials of this CorsConfig.
|
185
|
+
:type allow_credentials: bool
|
186
|
+
"""
|
187
|
+
self._allow_credentials = allow_credentials
|
188
|
+
|
189
|
+
@property
|
190
|
+
def max_age(self):
|
191
|
+
"""Gets the max_age of this CorsConfig.
|
192
|
+
|
193
|
+
参数解释:预检请求在浏览器的最大缓存时间,单位:秒。 取值范围:-1~172800。
|
194
|
+
|
195
|
+
:return: The max_age of this CorsConfig.
|
196
|
+
:rtype: int
|
197
|
+
"""
|
198
|
+
return self._max_age
|
199
|
+
|
200
|
+
@max_age.setter
|
201
|
+
def max_age(self, max_age):
|
202
|
+
"""Sets the max_age of this CorsConfig.
|
203
|
+
|
204
|
+
参数解释:预检请求在浏览器的最大缓存时间,单位:秒。 取值范围:-1~172800。
|
205
|
+
|
206
|
+
:param max_age: The max_age of this CorsConfig.
|
207
|
+
:type max_age: int
|
208
|
+
"""
|
209
|
+
self._max_age = max_age
|
210
|
+
|
211
|
+
def to_dict(self):
|
212
|
+
"""Returns the model properties as a dict"""
|
213
|
+
result = {}
|
214
|
+
|
215
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
216
|
+
value = getattr(self, attr)
|
217
|
+
if isinstance(value, list):
|
218
|
+
result[attr] = list(map(
|
219
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
220
|
+
value
|
221
|
+
))
|
222
|
+
elif hasattr(value, "to_dict"):
|
223
|
+
result[attr] = value.to_dict()
|
224
|
+
elif isinstance(value, dict):
|
225
|
+
result[attr] = dict(map(
|
226
|
+
lambda item: (item[0], item[1].to_dict())
|
227
|
+
if hasattr(item[1], "to_dict") else item,
|
228
|
+
value.items()
|
229
|
+
))
|
230
|
+
else:
|
231
|
+
if attr in self.sensitive_list:
|
232
|
+
result[attr] = "****"
|
233
|
+
else:
|
234
|
+
result[attr] = value
|
235
|
+
|
236
|
+
return result
|
237
|
+
|
238
|
+
def to_str(self):
|
239
|
+
"""Returns the string representation of the model"""
|
240
|
+
import simplejson as json
|
241
|
+
if six.PY2:
|
242
|
+
import sys
|
243
|
+
reload(sys)
|
244
|
+
sys.setdefaultencoding("utf-8")
|
245
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
246
|
+
|
247
|
+
def __repr__(self):
|
248
|
+
"""For `print`"""
|
249
|
+
return self.to_str()
|
250
|
+
|
251
|
+
def __eq__(self, other):
|
252
|
+
"""Returns true if both objects are equal"""
|
253
|
+
if not isinstance(other, CorsConfig):
|
254
|
+
return False
|
255
|
+
|
256
|
+
return self.__dict__ == other.__dict__
|
257
|
+
|
258
|
+
def __ne__(self, other):
|
259
|
+
"""Returns true if both objects are not equal"""
|
260
|
+
return not self == other
|