Skip to content

Commit e66c37b

Browse files
author
BitsAdmin
committed
Merge branch 'vod-Java-2025-01-01-online-1463-2025_08_20_11_46_56' into 'integration_2025-08-21_1037883052802'
feat: [development task] vod-1463-Java (1576757) See merge request iaasng/volcengine-java-sdk!617
2 parents 9c126de + f933989 commit e66c37b

File tree

104 files changed

+11519
-431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+11519
-431
lines changed

volcengine-java-sdk-vod20250101/src/main/java/com/volcengine/vod20250101/Vod20250101Api.java

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
import com.volcengine.vod20250101.model.ContinueAITranslationWorkflowRequest;
3131
import com.volcengine.vod20250101.model.ContinueAITranslationWorkflowResponse;
32+
import com.volcengine.vod20250101.model.GenerateAITranslationUtteranceAudioRequest;
33+
import com.volcengine.vod20250101.model.GenerateAITranslationUtteranceAudioResponse;
3234
import com.volcengine.vod20250101.model.GetAITranslationProjectRequest;
3335
import com.volcengine.vod20250101.model.GetAITranslationProjectResponse;
3436
import com.volcengine.vod20250101.model.GetExecutionRequest;
@@ -41,6 +43,8 @@
4143
import com.volcengine.vod20250101.model.StartExecutionResponse;
4244
import com.volcengine.vod20250101.model.SubmitAITranslationWorkflowRequest;
4345
import com.volcengine.vod20250101.model.SubmitAITranslationWorkflowResponse;
46+
import com.volcengine.vod20250101.model.UpdateAITranslationSpeakersRequest;
47+
import com.volcengine.vod20250101.model.UpdateAITranslationSpeakersResponse;
4448
import com.volcengine.vod20250101.model.UpdateAITranslationUtterancesRequest;
4549
import com.volcengine.vod20250101.model.UpdateAITranslationUtterancesResponse;
4650

@@ -193,6 +197,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
193197
apiClient.executeAsync(call, localVarReturnType, callback);
194198
return call;
195199
}
200+
/**
201+
* Build call for generateAITranslationUtteranceAudio
202+
* @param body (required)
203+
* @param progressListener Progress listener
204+
* @param progressRequestListener Progress request listener
205+
* @return Call to execute
206+
* @throws ApiException If fail to serialize the request body object
207+
*/
208+
public com.squareup.okhttp.Call generateAITranslationUtteranceAudioCall(GenerateAITranslationUtteranceAudioRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
209+
Object localVarPostBody = body;
210+
211+
// create path and map variables
212+
String localVarPath = "/GenerateAITranslationUtteranceAudio/2025-01-01/vod/post/application_json/";
213+
214+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
215+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
216+
217+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
218+
219+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
220+
221+
final String[] localVarAccepts = {
222+
"application/json"
223+
};
224+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
225+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
226+
227+
final String[] localVarContentTypes = {
228+
"text/plain"
229+
};
230+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
231+
localVarHeaderParams.put("Content-Type", localVarContentType);
232+
233+
if(progressListener != null) {
234+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
235+
@Override
236+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
237+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
238+
return originalResponse.newBuilder()
239+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
240+
.build();
241+
}
242+
});
243+
}
244+
245+
String[] localVarAuthNames = new String[] { "volcengineSign" };
246+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
247+
}
248+
249+
@SuppressWarnings("rawtypes")
250+
private com.squareup.okhttp.Call generateAITranslationUtteranceAudioValidateBeforeCall(GenerateAITranslationUtteranceAudioRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
251+
// verify the required parameter 'body' is set
252+
if (body == null) {
253+
throw new ApiException("Missing the required parameter 'body' when calling generateAITranslationUtteranceAudio(Async)");
254+
}
255+
256+
com.squareup.okhttp.Call call = generateAITranslationUtteranceAudioCall(body, progressListener, progressRequestListener);
257+
return call;
258+
259+
260+
261+
262+
263+
}
264+
265+
/**
266+
*
267+
*
268+
* @param body (required)
269+
* @return GenerateAITranslationUtteranceAudioResponse
270+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
271+
*/
272+
public GenerateAITranslationUtteranceAudioResponse generateAITranslationUtteranceAudio(GenerateAITranslationUtteranceAudioRequest body) throws ApiException {
273+
ApiResponse<GenerateAITranslationUtteranceAudioResponse> resp = generateAITranslationUtteranceAudioWithHttpInfo(body);
274+
return resp.getData();
275+
}
276+
277+
/**
278+
*
279+
*
280+
* @param body (required)
281+
* @return ApiResponse&lt;GenerateAITranslationUtteranceAudioResponse&gt;
282+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
283+
*/
284+
public ApiResponse<GenerateAITranslationUtteranceAudioResponse> generateAITranslationUtteranceAudioWithHttpInfo( @NotNull GenerateAITranslationUtteranceAudioRequest body) throws ApiException {
285+
com.squareup.okhttp.Call call = generateAITranslationUtteranceAudioValidateBeforeCall(body, null, null);
286+
Type localVarReturnType = new TypeToken<GenerateAITranslationUtteranceAudioResponse>(){}.getType();
287+
return apiClient.execute(call, localVarReturnType);
288+
}
289+
290+
/**
291+
* (asynchronously)
292+
*
293+
* @param body (required)
294+
* @param callback The callback to be executed when the API call finishes
295+
* @return The request call
296+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
297+
*/
298+
public com.squareup.okhttp.Call generateAITranslationUtteranceAudioAsync(GenerateAITranslationUtteranceAudioRequest body, final ApiCallback<GenerateAITranslationUtteranceAudioResponse> callback) throws ApiException {
299+
300+
ProgressResponseBody.ProgressListener progressListener = null;
301+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
302+
303+
if (callback != null) {
304+
progressListener = new ProgressResponseBody.ProgressListener() {
305+
@Override
306+
public void update(long bytesRead, long contentLength, boolean done) {
307+
callback.onDownloadProgress(bytesRead, contentLength, done);
308+
}
309+
};
310+
311+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
312+
@Override
313+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
314+
callback.onUploadProgress(bytesWritten, contentLength, done);
315+
}
316+
};
317+
}
318+
319+
com.squareup.okhttp.Call call = generateAITranslationUtteranceAudioValidateBeforeCall(body, progressListener, progressRequestListener);
320+
Type localVarReturnType = new TypeToken<GenerateAITranslationUtteranceAudioResponse>(){}.getType();
321+
apiClient.executeAsync(call, localVarReturnType, callback);
322+
return call;
323+
}
196324
/**
197325
* Build call for getAITranslationProject
198326
* @param body (required)
@@ -937,6 +1065,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
9371065
apiClient.executeAsync(call, localVarReturnType, callback);
9381066
return call;
9391067
}
1068+
/**
1069+
* Build call for updateAITranslationSpeakers
1070+
* @param body (required)
1071+
* @param progressListener Progress listener
1072+
* @param progressRequestListener Progress request listener
1073+
* @return Call to execute
1074+
* @throws ApiException If fail to serialize the request body object
1075+
*/
1076+
public com.squareup.okhttp.Call updateAITranslationSpeakersCall(UpdateAITranslationSpeakersRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1077+
Object localVarPostBody = body;
1078+
1079+
// create path and map variables
1080+
String localVarPath = "/UpdateAITranslationSpeakers/2025-01-01/vod/post/application_json/";
1081+
1082+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1083+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1084+
1085+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1086+
1087+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1088+
1089+
final String[] localVarAccepts = {
1090+
"application/json"
1091+
};
1092+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1093+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
1094+
1095+
final String[] localVarContentTypes = {
1096+
"text/plain"
1097+
};
1098+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1099+
localVarHeaderParams.put("Content-Type", localVarContentType);
1100+
1101+
if(progressListener != null) {
1102+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
1103+
@Override
1104+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
1105+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
1106+
return originalResponse.newBuilder()
1107+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
1108+
.build();
1109+
}
1110+
});
1111+
}
1112+
1113+
String[] localVarAuthNames = new String[] { "volcengineSign" };
1114+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1115+
}
1116+
1117+
@SuppressWarnings("rawtypes")
1118+
private com.squareup.okhttp.Call updateAITranslationSpeakersValidateBeforeCall(UpdateAITranslationSpeakersRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1119+
// verify the required parameter 'body' is set
1120+
if (body == null) {
1121+
throw new ApiException("Missing the required parameter 'body' when calling updateAITranslationSpeakers(Async)");
1122+
}
1123+
1124+
com.squareup.okhttp.Call call = updateAITranslationSpeakersCall(body, progressListener, progressRequestListener);
1125+
return call;
1126+
1127+
1128+
1129+
1130+
1131+
}
1132+
1133+
/**
1134+
*
1135+
*
1136+
* @param body (required)
1137+
* @return UpdateAITranslationSpeakersResponse
1138+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1139+
*/
1140+
public UpdateAITranslationSpeakersResponse updateAITranslationSpeakers(UpdateAITranslationSpeakersRequest body) throws ApiException {
1141+
ApiResponse<UpdateAITranslationSpeakersResponse> resp = updateAITranslationSpeakersWithHttpInfo(body);
1142+
return resp.getData();
1143+
}
1144+
1145+
/**
1146+
*
1147+
*
1148+
* @param body (required)
1149+
* @return ApiResponse&lt;UpdateAITranslationSpeakersResponse&gt;
1150+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1151+
*/
1152+
public ApiResponse<UpdateAITranslationSpeakersResponse> updateAITranslationSpeakersWithHttpInfo( @NotNull UpdateAITranslationSpeakersRequest body) throws ApiException {
1153+
com.squareup.okhttp.Call call = updateAITranslationSpeakersValidateBeforeCall(body, null, null);
1154+
Type localVarReturnType = new TypeToken<UpdateAITranslationSpeakersResponse>(){}.getType();
1155+
return apiClient.execute(call, localVarReturnType);
1156+
}
1157+
1158+
/**
1159+
* (asynchronously)
1160+
*
1161+
* @param body (required)
1162+
* @param callback The callback to be executed when the API call finishes
1163+
* @return The request call
1164+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1165+
*/
1166+
public com.squareup.okhttp.Call updateAITranslationSpeakersAsync(UpdateAITranslationSpeakersRequest body, final ApiCallback<UpdateAITranslationSpeakersResponse> callback) throws ApiException {
1167+
1168+
ProgressResponseBody.ProgressListener progressListener = null;
1169+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1170+
1171+
if (callback != null) {
1172+
progressListener = new ProgressResponseBody.ProgressListener() {
1173+
@Override
1174+
public void update(long bytesRead, long contentLength, boolean done) {
1175+
callback.onDownloadProgress(bytesRead, contentLength, done);
1176+
}
1177+
};
1178+
1179+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1180+
@Override
1181+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1182+
callback.onUploadProgress(bytesWritten, contentLength, done);
1183+
}
1184+
};
1185+
}
1186+
1187+
com.squareup.okhttp.Call call = updateAITranslationSpeakersValidateBeforeCall(body, progressListener, progressRequestListener);
1188+
Type localVarReturnType = new TypeToken<UpdateAITranslationSpeakersResponse>(){}.getType();
1189+
apiClient.executeAsync(call, localVarReturnType, callback);
1190+
return call;
1191+
}
9401192
/**
9411193
* Build call for updateAITranslationUtterances
9421194
* @param body (required)

0 commit comments

Comments
 (0)