2727
2828import javax .validation .constraints .*;
2929
30+ import com .volcengine .vod20250101 .model .ContinueAITranslationWorkflowRequest ;
31+ import com .volcengine .vod20250101 .model .ContinueAITranslationWorkflowResponse ;
3032import com .volcengine .vod20250101 .model .GetAITranslationProjectRequest ;
3133import com .volcengine .vod20250101 .model .GetAITranslationProjectResponse ;
3234import com .volcengine .vod20250101 .model .GetExecutionRequest ;
3739import com .volcengine .vod20250101 .model .StartExecutionResponse ;
3840import com .volcengine .vod20250101 .model .SubmitAITranslationWorkflowRequest ;
3941import com .volcengine .vod20250101 .model .SubmitAITranslationWorkflowResponse ;
42+ import com .volcengine .vod20250101 .model .UpdateAITranslationUtterancesRequest ;
43+ import com .volcengine .vod20250101 .model .UpdateAITranslationUtterancesResponse ;
4044
4145import java .lang .reflect .Type ;
4246import java .util .ArrayList ;
@@ -63,6 +67,130 @@ public void setApiClient(ApiClient apiClient) {
6367 this .apiClient = apiClient ;
6468 }
6569
70+ /**
71+ * Build call for continueAITranslationWorkflow
72+ * @param body (required)
73+ * @param progressListener Progress listener
74+ * @param progressRequestListener Progress request listener
75+ * @return Call to execute
76+ * @throws ApiException If fail to serialize the request body object
77+ */
78+ public com .squareup .okhttp .Call continueAITranslationWorkflowCall (ContinueAITranslationWorkflowRequest body , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
79+ Object localVarPostBody = body ;
80+
81+ // create path and map variables
82+ String localVarPath = "/ContinueAITranslationWorkflow/2025-01-01/vod/post/application_json/" ;
83+
84+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
85+ List <Pair > localVarCollectionQueryParams = new ArrayList <Pair >();
86+
87+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
88+
89+ Map <String , Object > localVarFormParams = new HashMap <String , Object >();
90+
91+ final String [] localVarAccepts = {
92+ "application/json"
93+ };
94+ final String localVarAccept = apiClient .selectHeaderAccept (localVarAccepts );
95+ if (localVarAccept != null ) localVarHeaderParams .put ("Accept" , localVarAccept );
96+
97+ final String [] localVarContentTypes = {
98+ "text/plain"
99+ };
100+ final String localVarContentType = apiClient .selectHeaderContentType (localVarContentTypes );
101+ localVarHeaderParams .put ("Content-Type" , localVarContentType );
102+
103+ if (progressListener != null ) {
104+ apiClient .getHttpClient ().networkInterceptors ().add (new com .squareup .okhttp .Interceptor () {
105+ @ Override
106+ public com .squareup .okhttp .Response intercept (com .squareup .okhttp .Interceptor .Chain chain ) throws IOException {
107+ com .squareup .okhttp .Response originalResponse = chain .proceed (chain .request ());
108+ return originalResponse .newBuilder ()
109+ .body (new ProgressResponseBody (originalResponse .body (), progressListener ))
110+ .build ();
111+ }
112+ });
113+ }
114+
115+ String [] localVarAuthNames = new String [] { "volcengineSign" };
116+ return apiClient .buildCall (localVarPath , "POST" , localVarQueryParams , localVarCollectionQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAuthNames , progressRequestListener );
117+ }
118+
119+ @ SuppressWarnings ("rawtypes" )
120+ private com .squareup .okhttp .Call continueAITranslationWorkflowValidateBeforeCall (ContinueAITranslationWorkflowRequest body , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
121+ // verify the required parameter 'body' is set
122+ if (body == null ) {
123+ throw new ApiException ("Missing the required parameter 'body' when calling continueAITranslationWorkflow(Async)" );
124+ }
125+
126+ com .squareup .okhttp .Call call = continueAITranslationWorkflowCall (body , progressListener , progressRequestListener );
127+ return call ;
128+
129+
130+
131+
132+
133+ }
134+
135+ /**
136+ *
137+ *
138+ * @param body (required)
139+ * @return ContinueAITranslationWorkflowResponse
140+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
141+ */
142+ public ContinueAITranslationWorkflowResponse continueAITranslationWorkflow (ContinueAITranslationWorkflowRequest body ) throws ApiException {
143+ ApiResponse <ContinueAITranslationWorkflowResponse > resp = continueAITranslationWorkflowWithHttpInfo (body );
144+ return resp .getData ();
145+ }
146+
147+ /**
148+ *
149+ *
150+ * @param body (required)
151+ * @return ApiResponse<ContinueAITranslationWorkflowResponse>
152+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
153+ */
154+ public ApiResponse <ContinueAITranslationWorkflowResponse > continueAITranslationWorkflowWithHttpInfo ( @ NotNull ContinueAITranslationWorkflowRequest body ) throws ApiException {
155+ com .squareup .okhttp .Call call = continueAITranslationWorkflowValidateBeforeCall (body , null , null );
156+ Type localVarReturnType = new TypeToken <ContinueAITranslationWorkflowResponse >(){}.getType ();
157+ return apiClient .execute (call , localVarReturnType );
158+ }
159+
160+ /**
161+ * (asynchronously)
162+ *
163+ * @param body (required)
164+ * @param callback The callback to be executed when the API call finishes
165+ * @return The request call
166+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
167+ */
168+ public com .squareup .okhttp .Call continueAITranslationWorkflowAsync (ContinueAITranslationWorkflowRequest body , final ApiCallback <ContinueAITranslationWorkflowResponse > callback ) throws ApiException {
169+
170+ ProgressResponseBody .ProgressListener progressListener = null ;
171+ ProgressRequestBody .ProgressRequestListener progressRequestListener = null ;
172+
173+ if (callback != null ) {
174+ progressListener = new ProgressResponseBody .ProgressListener () {
175+ @ Override
176+ public void update (long bytesRead , long contentLength , boolean done ) {
177+ callback .onDownloadProgress (bytesRead , contentLength , done );
178+ }
179+ };
180+
181+ progressRequestListener = new ProgressRequestBody .ProgressRequestListener () {
182+ @ Override
183+ public void onRequestProgress (long bytesWritten , long contentLength , boolean done ) {
184+ callback .onUploadProgress (bytesWritten , contentLength , done );
185+ }
186+ };
187+ }
188+
189+ com .squareup .okhttp .Call call = continueAITranslationWorkflowValidateBeforeCall (body , progressListener , progressRequestListener );
190+ Type localVarReturnType = new TypeToken <ContinueAITranslationWorkflowResponse >(){}.getType ();
191+ apiClient .executeAsync (call , localVarReturnType , callback );
192+ return call ;
193+ }
66194 /**
67195 * Build call for getAITranslationProject
68196 * @param body (required)
@@ -683,4 +811,128 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
683811 apiClient .executeAsync (call , localVarReturnType , callback );
684812 return call ;
685813 }
814+ /**
815+ * Build call for updateAITranslationUtterances
816+ * @param body (required)
817+ * @param progressListener Progress listener
818+ * @param progressRequestListener Progress request listener
819+ * @return Call to execute
820+ * @throws ApiException If fail to serialize the request body object
821+ */
822+ public com .squareup .okhttp .Call updateAITranslationUtterancesCall (UpdateAITranslationUtterancesRequest body , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
823+ Object localVarPostBody = body ;
824+
825+ // create path and map variables
826+ String localVarPath = "/UpdateAITranslationUtterances/2025-01-01/vod/post/application_json/" ;
827+
828+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
829+ List <Pair > localVarCollectionQueryParams = new ArrayList <Pair >();
830+
831+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
832+
833+ Map <String , Object > localVarFormParams = new HashMap <String , Object >();
834+
835+ final String [] localVarAccepts = {
836+ "application/json"
837+ };
838+ final String localVarAccept = apiClient .selectHeaderAccept (localVarAccepts );
839+ if (localVarAccept != null ) localVarHeaderParams .put ("Accept" , localVarAccept );
840+
841+ final String [] localVarContentTypes = {
842+ "text/plain"
843+ };
844+ final String localVarContentType = apiClient .selectHeaderContentType (localVarContentTypes );
845+ localVarHeaderParams .put ("Content-Type" , localVarContentType );
846+
847+ if (progressListener != null ) {
848+ apiClient .getHttpClient ().networkInterceptors ().add (new com .squareup .okhttp .Interceptor () {
849+ @ Override
850+ public com .squareup .okhttp .Response intercept (com .squareup .okhttp .Interceptor .Chain chain ) throws IOException {
851+ com .squareup .okhttp .Response originalResponse = chain .proceed (chain .request ());
852+ return originalResponse .newBuilder ()
853+ .body (new ProgressResponseBody (originalResponse .body (), progressListener ))
854+ .build ();
855+ }
856+ });
857+ }
858+
859+ String [] localVarAuthNames = new String [] { "volcengineSign" };
860+ return apiClient .buildCall (localVarPath , "POST" , localVarQueryParams , localVarCollectionQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAuthNames , progressRequestListener );
861+ }
862+
863+ @ SuppressWarnings ("rawtypes" )
864+ private com .squareup .okhttp .Call updateAITranslationUtterancesValidateBeforeCall (UpdateAITranslationUtterancesRequest body , final ProgressResponseBody .ProgressListener progressListener , final ProgressRequestBody .ProgressRequestListener progressRequestListener ) throws ApiException {
865+ // verify the required parameter 'body' is set
866+ if (body == null ) {
867+ throw new ApiException ("Missing the required parameter 'body' when calling updateAITranslationUtterances(Async)" );
868+ }
869+
870+ com .squareup .okhttp .Call call = updateAITranslationUtterancesCall (body , progressListener , progressRequestListener );
871+ return call ;
872+
873+
874+
875+
876+
877+ }
878+
879+ /**
880+ *
881+ *
882+ * @param body (required)
883+ * @return UpdateAITranslationUtterancesResponse
884+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
885+ */
886+ public UpdateAITranslationUtterancesResponse updateAITranslationUtterances (UpdateAITranslationUtterancesRequest body ) throws ApiException {
887+ ApiResponse <UpdateAITranslationUtterancesResponse > resp = updateAITranslationUtterancesWithHttpInfo (body );
888+ return resp .getData ();
889+ }
890+
891+ /**
892+ *
893+ *
894+ * @param body (required)
895+ * @return ApiResponse<UpdateAITranslationUtterancesResponse>
896+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
897+ */
898+ public ApiResponse <UpdateAITranslationUtterancesResponse > updateAITranslationUtterancesWithHttpInfo ( @ NotNull UpdateAITranslationUtterancesRequest body ) throws ApiException {
899+ com .squareup .okhttp .Call call = updateAITranslationUtterancesValidateBeforeCall (body , null , null );
900+ Type localVarReturnType = new TypeToken <UpdateAITranslationUtterancesResponse >(){}.getType ();
901+ return apiClient .execute (call , localVarReturnType );
902+ }
903+
904+ /**
905+ * (asynchronously)
906+ *
907+ * @param body (required)
908+ * @param callback The callback to be executed when the API call finishes
909+ * @return The request call
910+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
911+ */
912+ public com .squareup .okhttp .Call updateAITranslationUtterancesAsync (UpdateAITranslationUtterancesRequest body , final ApiCallback <UpdateAITranslationUtterancesResponse > callback ) throws ApiException {
913+
914+ ProgressResponseBody .ProgressListener progressListener = null ;
915+ ProgressRequestBody .ProgressRequestListener progressRequestListener = null ;
916+
917+ if (callback != null ) {
918+ progressListener = new ProgressResponseBody .ProgressListener () {
919+ @ Override
920+ public void update (long bytesRead , long contentLength , boolean done ) {
921+ callback .onDownloadProgress (bytesRead , contentLength , done );
922+ }
923+ };
924+
925+ progressRequestListener = new ProgressRequestBody .ProgressRequestListener () {
926+ @ Override
927+ public void onRequestProgress (long bytesWritten , long contentLength , boolean done ) {
928+ callback .onUploadProgress (bytesWritten , contentLength , done );
929+ }
930+ };
931+ }
932+
933+ com .squareup .okhttp .Call call = updateAITranslationUtterancesValidateBeforeCall (body , progressListener , progressRequestListener );
934+ Type localVarReturnType = new TypeToken <UpdateAITranslationUtterancesResponse >(){}.getType ();
935+ apiClient .executeAsync (call , localVarReturnType , callback );
936+ return call ;
937+ }
686938}
0 commit comments