Skip to content

Commit 2ae59bd

Browse files
author
BitsAdmin
committed
Merge branch 'vod-Python-2025-01-01-online-1431-2025_08_06_14_09_55' into 'integration_2025-08-07_1026539369730'
feat: [development task] vod-1431-Python (1527829) See merge request iaasng/volcengine-python-sdk!736
2 parents 0adc1cb + f08cacf commit 2ae59bd

File tree

6 files changed

+580
-0
lines changed

6 files changed

+580
-0
lines changed

volcenginesdkvod20250101/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@
9797
from volcenginesdkvod20250101.models.preview_video_muted_for_get_ai_translation_project_output import PreviewVideoMutedForGetAITranslationProjectOutput
9898
from volcenginesdkvod20250101.models.process_config_for_submit_ai_translation_workflow_input import ProcessConfigForSubmitAITranslationWorkflowInput
9999
from volcenginesdkvod20250101.models.project_base_info_for_continue_ai_translation_workflow_output import ProjectBaseInfoForContinueAITranslationWorkflowOutput
100+
from volcenginesdkvod20250101.models.project_base_info_for_refresh_ai_translation_project_output import ProjectBaseInfoForRefreshAITranslationProjectOutput
100101
from volcenginesdkvod20250101.models.project_base_info_for_submit_ai_translation_workflow_output import ProjectBaseInfoForSubmitAITranslationWorkflowOutput
101102
from volcenginesdkvod20250101.models.project_base_info_for_update_ai_translation_utterances_output import ProjectBaseInfoForUpdateAITranslationUtterancesOutput
102103
from volcenginesdkvod20250101.models.project_for_list_ai_translation_project_output import ProjectForListAITranslationProjectOutput
103104
from volcenginesdkvod20250101.models.project_info_for_get_ai_translation_project_output import ProjectInfoForGetAITranslationProjectOutput
105+
from volcenginesdkvod20250101.models.refresh_ai_translation_project_request import RefreshAITranslationProjectRequest
106+
from volcenginesdkvod20250101.models.refresh_ai_translation_project_response import RefreshAITranslationProjectResponse
104107
from volcenginesdkvod20250101.models.segment_for_get_execution_output import SegmentForGetExecutionOutput
105108
from volcenginesdkvod20250101.models.segment_for_start_execution_input import SegmentForStartExecutionInput
106109
from volcenginesdkvod20250101.models.source_blueprint_for_get_ai_translation_project_output import SourceBlueprintForGetAITranslationProjectOutput

volcenginesdkvod20250101/api/vod20250101_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,103 @@ def list_ai_translation_project_with_http_info(self, body, **kwargs): # noqa: E
421421
_request_timeout=params.get('_request_timeout'),
422422
collection_formats=collection_formats)
423423

424+
def refresh_ai_translation_project(self, body, **kwargs): # noqa: E501
425+
"""refresh_ai_translation_project # noqa: E501
426+
427+
This method makes a synchronous HTTP request by default. To make an
428+
asynchronous HTTP request, please pass async_req=True
429+
>>> thread = api.refresh_ai_translation_project(body, async_req=True)
430+
>>> result = thread.get()
431+
432+
:param async_req bool
433+
:param RefreshAITranslationProjectRequest body: (required)
434+
:return: RefreshAITranslationProjectResponse
435+
If the method is called asynchronously,
436+
returns the request thread.
437+
"""
438+
kwargs['_return_http_data_only'] = True
439+
if kwargs.get('async_req'):
440+
return self.refresh_ai_translation_project_with_http_info(body, **kwargs) # noqa: E501
441+
else:
442+
(data) = self.refresh_ai_translation_project_with_http_info(body, **kwargs) # noqa: E501
443+
return data
444+
445+
def refresh_ai_translation_project_with_http_info(self, body, **kwargs): # noqa: E501
446+
"""refresh_ai_translation_project # noqa: E501
447+
448+
This method makes a synchronous HTTP request by default. To make an
449+
asynchronous HTTP request, please pass async_req=True
450+
>>> thread = api.refresh_ai_translation_project_with_http_info(body, async_req=True)
451+
>>> result = thread.get()
452+
453+
:param async_req bool
454+
:param RefreshAITranslationProjectRequest body: (required)
455+
:return: RefreshAITranslationProjectResponse
456+
If the method is called asynchronously,
457+
returns the request thread.
458+
"""
459+
460+
all_params = ['body'] # noqa: E501
461+
all_params.append('async_req')
462+
all_params.append('_return_http_data_only')
463+
all_params.append('_preload_content')
464+
all_params.append('_request_timeout')
465+
466+
params = locals()
467+
for key, val in six.iteritems(params['kwargs']):
468+
if key not in all_params:
469+
raise TypeError(
470+
"Got an unexpected keyword argument '%s'"
471+
" to method refresh_ai_translation_project" % key
472+
)
473+
params[key] = val
474+
del params['kwargs']
475+
# verify the required parameter 'body' is set
476+
if self.api_client.client_side_validation and ('body' not in params or
477+
params['body'] is None): # noqa: E501
478+
raise ValueError("Missing the required parameter `body` when calling `refresh_ai_translation_project`") # noqa: E501
479+
480+
collection_formats = {}
481+
482+
path_params = {}
483+
484+
query_params = []
485+
486+
header_params = {}
487+
488+
form_params = []
489+
local_var_files = {}
490+
491+
body_params = None
492+
if 'body' in params:
493+
body_params = params['body']
494+
# HTTP header `Accept`
495+
header_params['Accept'] = self.api_client.select_header_accept(
496+
['application/json']) # noqa: E501
497+
498+
# HTTP header `Content-Type`
499+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
500+
['application/json']) # noqa: E501
501+
502+
# Authentication setting
503+
auth_settings = ['volcengineSign'] # noqa: E501
504+
505+
return self.api_client.call_api(
506+
'/RefreshAITranslationProject/2025-01-01/vod/post/application_json/', 'POST',
507+
path_params,
508+
query_params,
509+
header_params,
510+
body=body_params,
511+
post_params=form_params,
512+
files=local_var_files,
513+
response_type='RefreshAITranslationProjectResponse', # noqa: E501
514+
auth_settings=auth_settings,
515+
async_req=params.get('async_req'),
516+
_return_http_data_only=params.get('_return_http_data_only'),
517+
_preload_content=params.get('_preload_content', True),
518+
_request_timeout=params.get('_request_timeout'),
519+
collection_formats=collection_formats)
520+
424521
def start_execution(self, body, **kwargs): # noqa: E501
425522
"""start_execution # noqa: E501
426523

volcenginesdkvod20250101/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,13 @@
9393
from volcenginesdkvod20250101.models.preview_video_muted_for_get_ai_translation_project_output import PreviewVideoMutedForGetAITranslationProjectOutput
9494
from volcenginesdkvod20250101.models.process_config_for_submit_ai_translation_workflow_input import ProcessConfigForSubmitAITranslationWorkflowInput
9595
from volcenginesdkvod20250101.models.project_base_info_for_continue_ai_translation_workflow_output import ProjectBaseInfoForContinueAITranslationWorkflowOutput
96+
from volcenginesdkvod20250101.models.project_base_info_for_refresh_ai_translation_project_output import ProjectBaseInfoForRefreshAITranslationProjectOutput
9697
from volcenginesdkvod20250101.models.project_base_info_for_submit_ai_translation_workflow_output import ProjectBaseInfoForSubmitAITranslationWorkflowOutput
9798
from volcenginesdkvod20250101.models.project_base_info_for_update_ai_translation_utterances_output import ProjectBaseInfoForUpdateAITranslationUtterancesOutput
9899
from volcenginesdkvod20250101.models.project_for_list_ai_translation_project_output import ProjectForListAITranslationProjectOutput
99100
from volcenginesdkvod20250101.models.project_info_for_get_ai_translation_project_output import ProjectInfoForGetAITranslationProjectOutput
101+
from volcenginesdkvod20250101.models.refresh_ai_translation_project_request import RefreshAITranslationProjectRequest
102+
from volcenginesdkvod20250101.models.refresh_ai_translation_project_response import RefreshAITranslationProjectResponse
100103
from volcenginesdkvod20250101.models.segment_for_get_execution_output import SegmentForGetExecutionOutput
101104
from volcenginesdkvod20250101.models.segment_for_start_execution_input import SegmentForStartExecutionInput
102105
from volcenginesdkvod20250101.models.source_blueprint_for_get_ai_translation_project_output import SourceBlueprintForGetAITranslationProjectOutput
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+
vod20250101
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 ProjectBaseInfoForRefreshAITranslationProjectOutput(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+
'project_id': 'str',
37+
'project_version': 'str'
38+
}
39+
40+
attribute_map = {
41+
'project_id': 'ProjectId',
42+
'project_version': 'ProjectVersion'
43+
}
44+
45+
def __init__(self, project_id=None, project_version=None, _configuration=None): # noqa: E501
46+
"""ProjectBaseInfoForRefreshAITranslationProjectOutput - a model defined in Swagger""" # noqa: E501
47+
if _configuration is None:
48+
_configuration = Configuration()
49+
self._configuration = _configuration
50+
51+
self._project_id = None
52+
self._project_version = None
53+
self.discriminator = None
54+
55+
if project_id is not None:
56+
self.project_id = project_id
57+
if project_version is not None:
58+
self.project_version = project_version
59+
60+
@property
61+
def project_id(self):
62+
"""Gets the project_id of this ProjectBaseInfoForRefreshAITranslationProjectOutput. # noqa: E501
63+
64+
65+
:return: The project_id of this ProjectBaseInfoForRefreshAITranslationProjectOutput. # noqa: E501
66+
:rtype: str
67+
"""
68+
return self._project_id
69+
70+
@project_id.setter
71+
def project_id(self, project_id):
72+
"""Sets the project_id of this ProjectBaseInfoForRefreshAITranslationProjectOutput.
73+
74+
75+
:param project_id: The project_id of this ProjectBaseInfoForRefreshAITranslationProjectOutput. # noqa: E501
76+
:type: str
77+
"""
78+
79+
self._project_id = project_id
80+
81+
@property
82+
def project_version(self):
83+
"""Gets the project_version of this ProjectBaseInfoForRefreshAITranslationProjectOutput. # noqa: E501
84+
85+
86+
:return: The project_version of this ProjectBaseInfoForRefreshAITranslationProjectOutput. # noqa: E501
87+
:rtype: str
88+
"""
89+
return self._project_version
90+
91+
@project_version.setter
92+
def project_version(self, project_version):
93+
"""Sets the project_version of this ProjectBaseInfoForRefreshAITranslationProjectOutput.
94+
95+
96+
:param project_version: The project_version of this ProjectBaseInfoForRefreshAITranslationProjectOutput. # noqa: E501
97+
:type: str
98+
"""
99+
100+
self._project_version = project_version
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(ProjectBaseInfoForRefreshAITranslationProjectOutput, 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, ProjectBaseInfoForRefreshAITranslationProjectOutput):
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, ProjectBaseInfoForRefreshAITranslationProjectOutput):
147+
return True
148+
149+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)