Skip to content

Commit 96437bd

Browse files
author
BitsAdmin
committed
Merge branch 'tis-Python-2024-07-31-online-1162-2025_05_14_19_45_31' into 'integration_2025-05-15_905360636418'
feat: [development task] tis-1162-Python (1224951) See merge request iaasng/volcengine-python-sdk!605
2 parents 3094782 + f48be0a commit 96437bd

5 files changed

Lines changed: 375 additions & 0 deletions

File tree

volcenginesdktis/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@
2626
from volcenginesdktis.models.get_quota_info_request import GetQuotaInfoRequest
2727
from volcenginesdktis.models.get_quota_info_response import GetQuotaInfoResponse
2828
from volcenginesdktis.models.quota_info_list_for_get_quota_info_output import QuotaInfoListForGetQuotaInfoOutput
29+
from volcenginesdktis.models.top_action_dispatch_request import TopActionDispatchRequest
30+
from volcenginesdktis.models.top_action_dispatch_response import TopActionDispatchResponse

volcenginesdktis/api/tis_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,3 +323,100 @@ def get_quota_info_with_http_info(self, body, **kwargs): # noqa: E501
323323
_preload_content=params.get('_preload_content', True),
324324
_request_timeout=params.get('_request_timeout'),
325325
collection_formats=collection_formats)
326+
327+
def top_action_dispatch(self, body, **kwargs): # noqa: E501
328+
"""top_action_dispatch # noqa: E501
329+
330+
This method makes a synchronous HTTP request by default. To make an
331+
asynchronous HTTP request, please pass async_req=True
332+
>>> thread = api.top_action_dispatch(body, async_req=True)
333+
>>> result = thread.get()
334+
335+
:param async_req bool
336+
:param TopActionDispatchRequest body: (required)
337+
:return: TopActionDispatchResponse
338+
If the method is called asynchronously,
339+
returns the request thread.
340+
"""
341+
kwargs['_return_http_data_only'] = True
342+
if kwargs.get('async_req'):
343+
return self.top_action_dispatch_with_http_info(body, **kwargs) # noqa: E501
344+
else:
345+
(data) = self.top_action_dispatch_with_http_info(body, **kwargs) # noqa: E501
346+
return data
347+
348+
def top_action_dispatch_with_http_info(self, body, **kwargs): # noqa: E501
349+
"""top_action_dispatch # noqa: E501
350+
351+
This method makes a synchronous HTTP request by default. To make an
352+
asynchronous HTTP request, please pass async_req=True
353+
>>> thread = api.top_action_dispatch_with_http_info(body, async_req=True)
354+
>>> result = thread.get()
355+
356+
:param async_req bool
357+
:param TopActionDispatchRequest body: (required)
358+
:return: TopActionDispatchResponse
359+
If the method is called asynchronously,
360+
returns the request thread.
361+
"""
362+
363+
all_params = ['body'] # noqa: E501
364+
all_params.append('async_req')
365+
all_params.append('_return_http_data_only')
366+
all_params.append('_preload_content')
367+
all_params.append('_request_timeout')
368+
369+
params = locals()
370+
for key, val in six.iteritems(params['kwargs']):
371+
if key not in all_params:
372+
raise TypeError(
373+
"Got an unexpected keyword argument '%s'"
374+
" to method top_action_dispatch" % key
375+
)
376+
params[key] = val
377+
del params['kwargs']
378+
# verify the required parameter 'body' is set
379+
if self.api_client.client_side_validation and ('body' not in params or
380+
params['body'] is None): # noqa: E501
381+
raise ValueError("Missing the required parameter `body` when calling `top_action_dispatch`") # noqa: E501
382+
383+
collection_formats = {}
384+
385+
path_params = {}
386+
387+
query_params = []
388+
389+
header_params = {}
390+
391+
form_params = []
392+
local_var_files = {}
393+
394+
body_params = None
395+
if 'body' in params:
396+
body_params = params['body']
397+
# HTTP header `Accept`
398+
header_params['Accept'] = self.api_client.select_header_accept(
399+
['application/json']) # noqa: E501
400+
401+
# HTTP header `Content-Type`
402+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
403+
['application/json']) # noqa: E501
404+
405+
# Authentication setting
406+
auth_settings = ['volcengineSign'] # noqa: E501
407+
408+
return self.api_client.call_api(
409+
'/TopActionDispatch/2024-07-31/tis/post/application_json/', 'POST',
410+
path_params,
411+
query_params,
412+
header_params,
413+
body=body_params,
414+
post_params=form_params,
415+
files=local_var_files,
416+
response_type='TopActionDispatchResponse', # noqa: E501
417+
auth_settings=auth_settings,
418+
async_req=params.get('async_req'),
419+
_return_http_data_only=params.get('_return_http_data_only'),
420+
_preload_content=params.get('_preload_content', True),
421+
_request_timeout=params.get('_request_timeout'),
422+
collection_formats=collection_formats)

volcenginesdktis/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@
2222
from volcenginesdktis.models.get_quota_info_request import GetQuotaInfoRequest
2323
from volcenginesdktis.models.get_quota_info_response import GetQuotaInfoResponse
2424
from volcenginesdktis.models.quota_info_list_for_get_quota_info_output import QuotaInfoListForGetQuotaInfoOutput
25+
from volcenginesdktis.models.top_action_dispatch_request import TopActionDispatchRequest
26+
from volcenginesdktis.models.top_action_dispatch_response import TopActionDispatchResponse
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+
tis
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 TopActionDispatchRequest(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+
'action_name': 'str',
37+
'request_json': 'str'
38+
}
39+
40+
attribute_map = {
41+
'action_name': 'ActionName',
42+
'request_json': 'RequestJson'
43+
}
44+
45+
def __init__(self, action_name=None, request_json=None, _configuration=None): # noqa: E501
46+
"""TopActionDispatchRequest - a model defined in Swagger""" # noqa: E501
47+
if _configuration is None:
48+
_configuration = Configuration()
49+
self._configuration = _configuration
50+
51+
self._action_name = None
52+
self._request_json = None
53+
self.discriminator = None
54+
55+
self.action_name = action_name
56+
self.request_json = request_json
57+
58+
@property
59+
def action_name(self):
60+
"""Gets the action_name of this TopActionDispatchRequest. # noqa: E501
61+
62+
63+
:return: The action_name of this TopActionDispatchRequest. # noqa: E501
64+
:rtype: str
65+
"""
66+
return self._action_name
67+
68+
@action_name.setter
69+
def action_name(self, action_name):
70+
"""Sets the action_name of this TopActionDispatchRequest.
71+
72+
73+
:param action_name: The action_name of this TopActionDispatchRequest. # noqa: E501
74+
:type: str
75+
"""
76+
if self._configuration.client_side_validation and action_name is None:
77+
raise ValueError("Invalid value for `action_name`, must not be `None`") # noqa: E501
78+
79+
self._action_name = action_name
80+
81+
@property
82+
def request_json(self):
83+
"""Gets the request_json of this TopActionDispatchRequest. # noqa: E501
84+
85+
86+
:return: The request_json of this TopActionDispatchRequest. # noqa: E501
87+
:rtype: str
88+
"""
89+
return self._request_json
90+
91+
@request_json.setter
92+
def request_json(self, request_json):
93+
"""Sets the request_json of this TopActionDispatchRequest.
94+
95+
96+
:param request_json: The request_json of this TopActionDispatchRequest. # noqa: E501
97+
:type: str
98+
"""
99+
if self._configuration.client_side_validation and request_json is None:
100+
raise ValueError("Invalid value for `request_json`, must not be `None`") # noqa: E501
101+
102+
self._request_json = request_json
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(TopActionDispatchRequest, 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, TopActionDispatchRequest):
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, TopActionDispatchRequest):
149+
return True
150+
151+
return self.to_dict() != other.to_dict()
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# coding: utf-8
2+
3+
"""
4+
tis
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 TopActionDispatchResponse(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+
'response_json': 'str'
37+
}
38+
39+
attribute_map = {
40+
'response_json': 'ResponseJson'
41+
}
42+
43+
def __init__(self, response_json=None, _configuration=None): # noqa: E501
44+
"""TopActionDispatchResponse - a model defined in Swagger""" # noqa: E501
45+
if _configuration is None:
46+
_configuration = Configuration()
47+
self._configuration = _configuration
48+
49+
self._response_json = None
50+
self.discriminator = None
51+
52+
if response_json is not None:
53+
self.response_json = response_json
54+
55+
@property
56+
def response_json(self):
57+
"""Gets the response_json of this TopActionDispatchResponse. # noqa: E501
58+
59+
60+
:return: The response_json of this TopActionDispatchResponse. # noqa: E501
61+
:rtype: str
62+
"""
63+
return self._response_json
64+
65+
@response_json.setter
66+
def response_json(self, response_json):
67+
"""Sets the response_json of this TopActionDispatchResponse.
68+
69+
70+
:param response_json: The response_json of this TopActionDispatchResponse. # noqa: E501
71+
:type: str
72+
"""
73+
74+
self._response_json = response_json
75+
76+
def to_dict(self):
77+
"""Returns the model properties as a dict"""
78+
result = {}
79+
80+
for attr, _ in six.iteritems(self.swagger_types):
81+
value = getattr(self, attr)
82+
if isinstance(value, list):
83+
result[attr] = list(map(
84+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
85+
value
86+
))
87+
elif hasattr(value, "to_dict"):
88+
result[attr] = value.to_dict()
89+
elif isinstance(value, dict):
90+
result[attr] = dict(map(
91+
lambda item: (item[0], item[1].to_dict())
92+
if hasattr(item[1], "to_dict") else item,
93+
value.items()
94+
))
95+
else:
96+
result[attr] = value
97+
if issubclass(TopActionDispatchResponse, dict):
98+
for key, value in self.items():
99+
result[key] = value
100+
101+
return result
102+
103+
def to_str(self):
104+
"""Returns the string representation of the model"""
105+
return pprint.pformat(self.to_dict())
106+
107+
def __repr__(self):
108+
"""For `print` and `pprint`"""
109+
return self.to_str()
110+
111+
def __eq__(self, other):
112+
"""Returns true if both objects are equal"""
113+
if not isinstance(other, TopActionDispatchResponse):
114+
return False
115+
116+
return self.to_dict() == other.to_dict()
117+
118+
def __ne__(self, other):
119+
"""Returns true if both objects are not equal"""
120+
if not isinstance(other, TopActionDispatchResponse):
121+
return True
122+
123+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)