Skip to content

Commit 3fcd8d6

Browse files
author
BitsAdmin
committed
Merge 'apig-Python-2022-11-12-online-1871-2025_11_25_15_16_57' into 'integration_2025-12-04_1090671646466'
feat: [development task] apig-1871-Python (1900530) See merge request: !952
2 parents 15ed05e + dce5d9d commit 3fcd8d6

9 files changed

+405
-108
lines changed

volcenginesdkapig20221112/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
from volcenginesdkapig20221112.models.allow_origin_for_get_route_output import AllowOriginForGetRouteOutput
3232
from volcenginesdkapig20221112.models.allow_origin_for_list_routes_output import AllowOriginForListRoutesOutput
3333
from volcenginesdkapig20221112.models.allow_origin_for_update_route_input import AllowOriginForUpdateRouteInput
34+
from volcenginesdkapig20221112.models.check_route_exist_request import CheckRouteExistRequest
35+
from volcenginesdkapig20221112.models.check_route_exist_response import CheckRouteExistResponse
3436
from volcenginesdkapig20221112.models.cors_policy_setting_for_create_route_input import CorsPolicySettingForCreateRouteInput
3537
from volcenginesdkapig20221112.models.cors_policy_setting_for_get_route_output import CorsPolicySettingForGetRouteOutput
3638
from volcenginesdkapig20221112.models.cors_policy_setting_for_list_routes_output import CorsPolicySettingForListRoutesOutput

volcenginesdkapig20221112/api/apig20221112_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,103 @@ def __init__(self, api_client=None):
3333
api_client = volcenginesdkcore.ApiClient()
3434
self.api_client = api_client
3535

36+
def check_route_exist(self, body, **kwargs): # noqa: E501
37+
"""check_route_exist # noqa: E501
38+
39+
This method makes a synchronous HTTP request by default. To make an
40+
asynchronous HTTP request, please pass async_req=True
41+
>>> thread = api.check_route_exist(body, async_req=True)
42+
>>> result = thread.get()
43+
44+
:param async_req bool
45+
:param CheckRouteExistRequest body: (required)
46+
:return: CheckRouteExistResponse
47+
If the method is called asynchronously,
48+
returns the request thread.
49+
"""
50+
kwargs['_return_http_data_only'] = True
51+
if kwargs.get('async_req'):
52+
return self.check_route_exist_with_http_info(body, **kwargs) # noqa: E501
53+
else:
54+
(data) = self.check_route_exist_with_http_info(body, **kwargs) # noqa: E501
55+
return data
56+
57+
def check_route_exist_with_http_info(self, body, **kwargs): # noqa: E501
58+
"""check_route_exist # noqa: E501
59+
60+
This method makes a synchronous HTTP request by default. To make an
61+
asynchronous HTTP request, please pass async_req=True
62+
>>> thread = api.check_route_exist_with_http_info(body, async_req=True)
63+
>>> result = thread.get()
64+
65+
:param async_req bool
66+
:param CheckRouteExistRequest body: (required)
67+
:return: CheckRouteExistResponse
68+
If the method is called asynchronously,
69+
returns the request thread.
70+
"""
71+
72+
all_params = ['body'] # noqa: E501
73+
all_params.append('async_req')
74+
all_params.append('_return_http_data_only')
75+
all_params.append('_preload_content')
76+
all_params.append('_request_timeout')
77+
78+
params = locals()
79+
for key, val in six.iteritems(params['kwargs']):
80+
if key not in all_params:
81+
raise TypeError(
82+
"Got an unexpected keyword argument '%s'"
83+
" to method check_route_exist" % key
84+
)
85+
params[key] = val
86+
del params['kwargs']
87+
# verify the required parameter 'body' is set
88+
if self.api_client.client_side_validation and ('body' not in params or
89+
params['body'] is None): # noqa: E501
90+
raise ValueError("Missing the required parameter `body` when calling `check_route_exist`") # noqa: E501
91+
92+
collection_formats = {}
93+
94+
path_params = {}
95+
96+
query_params = []
97+
98+
header_params = {}
99+
100+
form_params = []
101+
local_var_files = {}
102+
103+
body_params = None
104+
if 'body' in params:
105+
body_params = params['body']
106+
# HTTP header `Accept`
107+
header_params['Accept'] = self.api_client.select_header_accept(
108+
['application/json']) # noqa: E501
109+
110+
# HTTP header `Content-Type`
111+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
112+
['application/json']) # noqa: E501
113+
114+
# Authentication setting
115+
auth_settings = ['volcengineSign'] # noqa: E501
116+
117+
return self.api_client.call_api(
118+
'/CheckRouteExist/2022-11-12/apig/post/application_json/', 'POST',
119+
path_params,
120+
query_params,
121+
header_params,
122+
body=body_params,
123+
post_params=form_params,
124+
files=local_var_files,
125+
response_type='CheckRouteExistResponse', # noqa: E501
126+
auth_settings=auth_settings,
127+
async_req=params.get('async_req'),
128+
_return_http_data_only=params.get('_return_http_data_only'),
129+
_preload_content=params.get('_preload_content', True),
130+
_request_timeout=params.get('_request_timeout'),
131+
collection_formats=collection_formats)
132+
36133
def create_route(self, body, **kwargs): # noqa: E501
37134
"""create_route # noqa: E501
38135

volcenginesdkapig20221112/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from volcenginesdkapig20221112.models.allow_origin_for_get_route_output import AllowOriginForGetRouteOutput
2828
from volcenginesdkapig20221112.models.allow_origin_for_list_routes_output import AllowOriginForListRoutesOutput
2929
from volcenginesdkapig20221112.models.allow_origin_for_update_route_input import AllowOriginForUpdateRouteInput
30+
from volcenginesdkapig20221112.models.check_route_exist_request import CheckRouteExistRequest
31+
from volcenginesdkapig20221112.models.check_route_exist_response import CheckRouteExistResponse
3032
from volcenginesdkapig20221112.models.cors_policy_setting_for_create_route_input import CorsPolicySettingForCreateRouteInput
3133
from volcenginesdkapig20221112.models.cors_policy_setting_for_get_route_output import CorsPolicySettingForGetRouteOutput
3234
from volcenginesdkapig20221112.models.cors_policy_setting_for_list_routes_output import CorsPolicySettingForListRoutesOutput
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# coding: utf-8
2+
3+
"""
4+
apig20221112
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 CheckRouteExistRequest(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+
'name': 'str',
37+
'service_id': 'str'
38+
}
39+
40+
attribute_map = {
41+
'name': 'Name',
42+
'service_id': 'ServiceId'
43+
}
44+
45+
def __init__(self, name=None, service_id=None, _configuration=None): # noqa: E501
46+
"""CheckRouteExistRequest - a model defined in Swagger""" # noqa: E501
47+
if _configuration is None:
48+
_configuration = Configuration()
49+
self._configuration = _configuration
50+
51+
self._name = None
52+
self._service_id = None
53+
self.discriminator = None
54+
55+
self.name = name
56+
self.service_id = service_id
57+
58+
@property
59+
def name(self):
60+
"""Gets the name of this CheckRouteExistRequest. # noqa: E501
61+
62+
63+
:return: The name of this CheckRouteExistRequest. # noqa: E501
64+
:rtype: str
65+
"""
66+
return self._name
67+
68+
@name.setter
69+
def name(self, name):
70+
"""Sets the name of this CheckRouteExistRequest.
71+
72+
73+
:param name: The name of this CheckRouteExistRequest. # noqa: E501
74+
:type: str
75+
"""
76+
if self._configuration.client_side_validation and name is None:
77+
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
78+
79+
self._name = name
80+
81+
@property
82+
def service_id(self):
83+
"""Gets the service_id of this CheckRouteExistRequest. # noqa: E501
84+
85+
86+
:return: The service_id of this CheckRouteExistRequest. # noqa: E501
87+
:rtype: str
88+
"""
89+
return self._service_id
90+
91+
@service_id.setter
92+
def service_id(self, service_id):
93+
"""Sets the service_id of this CheckRouteExistRequest.
94+
95+
96+
:param service_id: The service_id of this CheckRouteExistRequest. # noqa: E501
97+
:type: str
98+
"""
99+
if self._configuration.client_side_validation and service_id is None:
100+
raise ValueError("Invalid value for `service_id`, must not be `None`") # noqa: E501
101+
102+
self._service_id = service_id
103+
104+
def to_dict(self):
105+
"""Returns the model properties as a dict"""
106+
result = {}
107+
108+
for attr, _ in six.iteritems(self.swagger_types):
109+
value = getattr(self, attr)
110+
if isinstance(value, list):
111+
result[attr] = list(map(
112+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
113+
value
114+
))
115+
elif hasattr(value, "to_dict"):
116+
result[attr] = value.to_dict()
117+
elif isinstance(value, dict):
118+
result[attr] = dict(map(
119+
lambda item: (item[0], item[1].to_dict())
120+
if hasattr(item[1], "to_dict") else item,
121+
value.items()
122+
))
123+
else:
124+
result[attr] = value
125+
if issubclass(CheckRouteExistRequest, dict):
126+
for key, value in self.items():
127+
result[key] = value
128+
129+
return result
130+
131+
def to_str(self):
132+
"""Returns the string representation of the model"""
133+
return pprint.pformat(self.to_dict())
134+
135+
def __repr__(self):
136+
"""For `print` and `pprint`"""
137+
return self.to_str()
138+
139+
def __eq__(self, other):
140+
"""Returns true if both objects are equal"""
141+
if not isinstance(other, CheckRouteExistRequest):
142+
return False
143+
144+
return self.to_dict() == other.to_dict()
145+
146+
def __ne__(self, other):
147+
"""Returns true if both objects are not equal"""
148+
if not isinstance(other, CheckRouteExistRequest):
149+
return True
150+
151+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)