Skip to content

Commit 97eb98d

Browse files
author
BitsAdmin
committed
Merge 'clb-Python-2020-04-01-online-2247-2026_02_03_16_37_09' into 'integration_2026-02-05_1111496369922'
feat: [development task] clb-2247-Python (2098147) See merge request: !1047
2 parents cb1946a + 47b3050 commit 97eb98d

5 files changed

Lines changed: 374 additions & 0 deletions

File tree

volcenginesdkclb/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
from volcenginesdkclb.models.describe_load_balancer_attributes_response import DescribeLoadBalancerAttributesResponse
101101
from volcenginesdkclb.models.describe_load_balancer_specs_request import DescribeLoadBalancerSpecsRequest
102102
from volcenginesdkclb.models.describe_load_balancer_specs_response import DescribeLoadBalancerSpecsResponse
103+
from volcenginesdkclb.models.describe_load_balancer_status_request import DescribeLoadBalancerStatusRequest
104+
from volcenginesdkclb.models.describe_load_balancer_status_response import DescribeLoadBalancerStatusResponse
103105
from volcenginesdkclb.models.describe_load_balancers_billing_request import DescribeLoadBalancersBillingRequest
104106
from volcenginesdkclb.models.describe_load_balancers_billing_response import DescribeLoadBalancersBillingResponse
105107
from volcenginesdkclb.models.describe_load_balancers_request import DescribeLoadBalancersRequest

volcenginesdkclb/api/clb_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3525,6 +3525,103 @@ def describe_load_balancer_specs_with_http_info(self, body, **kwargs): # noqa:
35253525
_request_timeout=params.get('_request_timeout'),
35263526
collection_formats=collection_formats)
35273527

3528+
def describe_load_balancer_status(self, body, **kwargs): # noqa: E501
3529+
"""describe_load_balancer_status # noqa: E501
3530+
3531+
This method makes a synchronous HTTP request by default. To make an
3532+
asynchronous HTTP request, please pass async_req=True
3533+
>>> thread = api.describe_load_balancer_status(body, async_req=True)
3534+
>>> result = thread.get()
3535+
3536+
:param async_req bool
3537+
:param DescribeLoadBalancerStatusRequest body: (required)
3538+
:return: DescribeLoadBalancerStatusResponse
3539+
If the method is called asynchronously,
3540+
returns the request thread.
3541+
"""
3542+
kwargs['_return_http_data_only'] = True
3543+
if kwargs.get('async_req'):
3544+
return self.describe_load_balancer_status_with_http_info(body, **kwargs) # noqa: E501
3545+
else:
3546+
(data) = self.describe_load_balancer_status_with_http_info(body, **kwargs) # noqa: E501
3547+
return data
3548+
3549+
def describe_load_balancer_status_with_http_info(self, body, **kwargs): # noqa: E501
3550+
"""describe_load_balancer_status # noqa: E501
3551+
3552+
This method makes a synchronous HTTP request by default. To make an
3553+
asynchronous HTTP request, please pass async_req=True
3554+
>>> thread = api.describe_load_balancer_status_with_http_info(body, async_req=True)
3555+
>>> result = thread.get()
3556+
3557+
:param async_req bool
3558+
:param DescribeLoadBalancerStatusRequest body: (required)
3559+
:return: DescribeLoadBalancerStatusResponse
3560+
If the method is called asynchronously,
3561+
returns the request thread.
3562+
"""
3563+
3564+
all_params = ['body'] # noqa: E501
3565+
all_params.append('async_req')
3566+
all_params.append('_return_http_data_only')
3567+
all_params.append('_preload_content')
3568+
all_params.append('_request_timeout')
3569+
3570+
params = locals()
3571+
for key, val in six.iteritems(params['kwargs']):
3572+
if key not in all_params:
3573+
raise TypeError(
3574+
"Got an unexpected keyword argument '%s'"
3575+
" to method describe_load_balancer_status" % key
3576+
)
3577+
params[key] = val
3578+
del params['kwargs']
3579+
# verify the required parameter 'body' is set
3580+
if self.api_client.client_side_validation and ('body' not in params or
3581+
params['body'] is None): # noqa: E501
3582+
raise ValueError("Missing the required parameter `body` when calling `describe_load_balancer_status`") # noqa: E501
3583+
3584+
collection_formats = {}
3585+
3586+
path_params = {}
3587+
3588+
query_params = []
3589+
3590+
header_params = {}
3591+
3592+
form_params = []
3593+
local_var_files = {}
3594+
3595+
body_params = None
3596+
if 'body' in params:
3597+
body_params = params['body']
3598+
# HTTP header `Accept`
3599+
header_params['Accept'] = self.api_client.select_header_accept(
3600+
['application/json']) # noqa: E501
3601+
3602+
# HTTP header `Content-Type`
3603+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3604+
['text/plain']) # noqa: E501
3605+
3606+
# Authentication setting
3607+
auth_settings = ['volcengineSign'] # noqa: E501
3608+
3609+
return self.api_client.call_api(
3610+
'/DescribeLoadBalancerStatus/2020-04-01/clb/get/text_plain/', 'GET',
3611+
path_params,
3612+
query_params,
3613+
header_params,
3614+
body=body_params,
3615+
post_params=form_params,
3616+
files=local_var_files,
3617+
response_type='DescribeLoadBalancerStatusResponse', # noqa: E501
3618+
auth_settings=auth_settings,
3619+
async_req=params.get('async_req'),
3620+
_return_http_data_only=params.get('_return_http_data_only'),
3621+
_preload_content=params.get('_preload_content', True),
3622+
_request_timeout=params.get('_request_timeout'),
3623+
collection_formats=collection_formats)
3624+
35283625
def describe_load_balancers(self, body, **kwargs): # noqa: E501
35293626
"""describe_load_balancers # noqa: E501
35303627

volcenginesdkclb/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@
9696
from volcenginesdkclb.models.describe_load_balancer_attributes_response import DescribeLoadBalancerAttributesResponse
9797
from volcenginesdkclb.models.describe_load_balancer_specs_request import DescribeLoadBalancerSpecsRequest
9898
from volcenginesdkclb.models.describe_load_balancer_specs_response import DescribeLoadBalancerSpecsResponse
99+
from volcenginesdkclb.models.describe_load_balancer_status_request import DescribeLoadBalancerStatusRequest
100+
from volcenginesdkclb.models.describe_load_balancer_status_response import DescribeLoadBalancerStatusResponse
99101
from volcenginesdkclb.models.describe_load_balancers_billing_request import DescribeLoadBalancersBillingRequest
100102
from volcenginesdkclb.models.describe_load_balancers_billing_response import DescribeLoadBalancersBillingResponse
101103
from volcenginesdkclb.models.describe_load_balancers_request import DescribeLoadBalancersRequest
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# coding: utf-8
2+
3+
"""
4+
clb
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: common-version
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from volcenginesdkcore.configuration import Configuration
20+
21+
22+
class DescribeLoadBalancerStatusRequest(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
'load_balancer_id': 'str'
37+
}
38+
39+
attribute_map = {
40+
'load_balancer_id': 'LoadBalancerId'
41+
}
42+
43+
def __init__(self, load_balancer_id=None, _configuration=None): # noqa: E501
44+
"""DescribeLoadBalancerStatusRequest - a model defined in Swagger""" # noqa: E501
45+
if _configuration is None:
46+
_configuration = Configuration()
47+
self._configuration = _configuration
48+
49+
self._load_balancer_id = None
50+
self.discriminator = None
51+
52+
self.load_balancer_id = load_balancer_id
53+
54+
@property
55+
def load_balancer_id(self):
56+
"""Gets the load_balancer_id of this DescribeLoadBalancerStatusRequest. # noqa: E501
57+
58+
59+
:return: The load_balancer_id of this DescribeLoadBalancerStatusRequest. # noqa: E501
60+
:rtype: str
61+
"""
62+
return self._load_balancer_id
63+
64+
@load_balancer_id.setter
65+
def load_balancer_id(self, load_balancer_id):
66+
"""Sets the load_balancer_id of this DescribeLoadBalancerStatusRequest.
67+
68+
69+
:param load_balancer_id: The load_balancer_id of this DescribeLoadBalancerStatusRequest. # noqa: E501
70+
:type: str
71+
"""
72+
if self._configuration.client_side_validation and load_balancer_id is None:
73+
raise ValueError("Invalid value for `load_balancer_id`, must not be `None`") # noqa: E501
74+
75+
self._load_balancer_id = load_balancer_id
76+
77+
def to_dict(self):
78+
"""Returns the model properties as a dict"""
79+
result = {}
80+
81+
for attr, _ in six.iteritems(self.swagger_types):
82+
value = getattr(self, attr)
83+
if isinstance(value, list):
84+
result[attr] = list(map(
85+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
86+
value
87+
))
88+
elif hasattr(value, "to_dict"):
89+
result[attr] = value.to_dict()
90+
elif isinstance(value, dict):
91+
result[attr] = dict(map(
92+
lambda item: (item[0], item[1].to_dict())
93+
if hasattr(item[1], "to_dict") else item,
94+
value.items()
95+
))
96+
else:
97+
result[attr] = value
98+
if issubclass(DescribeLoadBalancerStatusRequest, dict):
99+
for key, value in self.items():
100+
result[key] = value
101+
102+
return result
103+
104+
def to_str(self):
105+
"""Returns the string representation of the model"""
106+
return pprint.pformat(self.to_dict())
107+
108+
def __repr__(self):
109+
"""For `print` and `pprint`"""
110+
return self.to_str()
111+
112+
def __eq__(self, other):
113+
"""Returns true if both objects are equal"""
114+
if not isinstance(other, DescribeLoadBalancerStatusRequest):
115+
return False
116+
117+
return self.to_dict() == other.to_dict()
118+
119+
def __ne__(self, other):
120+
"""Returns true if both objects are not equal"""
121+
if not isinstance(other, DescribeLoadBalancerStatusRequest):
122+
return True
123+
124+
return self.to_dict() != other.to_dict()
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# coding: utf-8
2+
3+
"""
4+
clb
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: common-version
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from volcenginesdkcore.configuration import Configuration
20+
21+
22+
class DescribeLoadBalancerStatusResponse(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
'load_balancer_id': 'str',
37+
'status': 'str'
38+
}
39+
40+
attribute_map = {
41+
'load_balancer_id': 'LoadBalancerId',
42+
'status': 'Status'
43+
}
44+
45+
def __init__(self, load_balancer_id=None, status=None, _configuration=None): # noqa: E501
46+
"""DescribeLoadBalancerStatusResponse - a model defined in Swagger""" # noqa: E501
47+
if _configuration is None:
48+
_configuration = Configuration()
49+
self._configuration = _configuration
50+
51+
self._load_balancer_id = None
52+
self._status = None
53+
self.discriminator = None
54+
55+
if load_balancer_id is not None:
56+
self.load_balancer_id = load_balancer_id
57+
if status is not None:
58+
self.status = status
59+
60+
@property
61+
def load_balancer_id(self):
62+
"""Gets the load_balancer_id of this DescribeLoadBalancerStatusResponse. # noqa: E501
63+
64+
65+
:return: The load_balancer_id of this DescribeLoadBalancerStatusResponse. # noqa: E501
66+
:rtype: str
67+
"""
68+
return self._load_balancer_id
69+
70+
@load_balancer_id.setter
71+
def load_balancer_id(self, load_balancer_id):
72+
"""Sets the load_balancer_id of this DescribeLoadBalancerStatusResponse.
73+
74+
75+
:param load_balancer_id: The load_balancer_id of this DescribeLoadBalancerStatusResponse. # noqa: E501
76+
:type: str
77+
"""
78+
79+
self._load_balancer_id = load_balancer_id
80+
81+
@property
82+
def status(self):
83+
"""Gets the status of this DescribeLoadBalancerStatusResponse. # noqa: E501
84+
85+
86+
:return: The status of this DescribeLoadBalancerStatusResponse. # noqa: E501
87+
:rtype: str
88+
"""
89+
return self._status
90+
91+
@status.setter
92+
def status(self, status):
93+
"""Sets the status of this DescribeLoadBalancerStatusResponse.
94+
95+
96+
:param status: The status of this DescribeLoadBalancerStatusResponse. # noqa: E501
97+
:type: str
98+
"""
99+
100+
self._status = status
101+
102+
def to_dict(self):
103+
"""Returns the model properties as a dict"""
104+
result = {}
105+
106+
for attr, _ in six.iteritems(self.swagger_types):
107+
value = getattr(self, attr)
108+
if isinstance(value, list):
109+
result[attr] = list(map(
110+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
111+
value
112+
))
113+
elif hasattr(value, "to_dict"):
114+
result[attr] = value.to_dict()
115+
elif isinstance(value, dict):
116+
result[attr] = dict(map(
117+
lambda item: (item[0], item[1].to_dict())
118+
if hasattr(item[1], "to_dict") else item,
119+
value.items()
120+
))
121+
else:
122+
result[attr] = value
123+
if issubclass(DescribeLoadBalancerStatusResponse, dict):
124+
for key, value in self.items():
125+
result[key] = value
126+
127+
return result
128+
129+
def to_str(self):
130+
"""Returns the string representation of the model"""
131+
return pprint.pformat(self.to_dict())
132+
133+
def __repr__(self):
134+
"""For `print` and `pprint`"""
135+
return self.to_str()
136+
137+
def __eq__(self, other):
138+
"""Returns true if both objects are equal"""
139+
if not isinstance(other, DescribeLoadBalancerStatusResponse):
140+
return False
141+
142+
return self.to_dict() == other.to_dict()
143+
144+
def __ne__(self, other):
145+
"""Returns true if both objects are not equal"""
146+
if not isinstance(other, DescribeLoadBalancerStatusResponse):
147+
return True
148+
149+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)