Skip to content

Commit fafe4e3

Browse files
author
BitsAdmin
committed
Merge branch 'vod-Java-2025-01-01-online-1615-2025_09_23_14_33_45' into 'integration_2025-09-25_1060179278594'
feat: [development task] vod-1615-Java (1697075) See merge request iaasng/volcengine-java-sdk!675
2 parents 1121410 + 8034656 commit fafe4e3

29 files changed

+4178
-19
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
@@ -33,6 +33,8 @@
3333
import com.volcengine.vod20250101.model.CreateAITranslationSpeakerResponse;
3434
import com.volcengine.vod20250101.model.CreateAITranslationSpeechRequest;
3535
import com.volcengine.vod20250101.model.CreateAITranslationSpeechResponse;
36+
import com.volcengine.vod20250101.model.CreateAITranslationUtteranceRequest;
37+
import com.volcengine.vod20250101.model.CreateAITranslationUtteranceResponse;
3638
import com.volcengine.vod20250101.model.DeleteAITranslationSpeechRequest;
3739
import com.volcengine.vod20250101.model.DeleteAITranslationSpeechResponse;
3840
import com.volcengine.vod20250101.model.GenerateAITranslationUtteranceAudioRequest;
@@ -47,6 +49,8 @@
4749
import com.volcengine.vod20250101.model.ListAITranslationSpeechResponse;
4850
import com.volcengine.vod20250101.model.RefreshAITranslationProjectRequest;
4951
import com.volcengine.vod20250101.model.RefreshAITranslationProjectResponse;
52+
import com.volcengine.vod20250101.model.RemoveAITranslationUtteranceRequest;
53+
import com.volcengine.vod20250101.model.RemoveAITranslationUtteranceResponse;
5054
import com.volcengine.vod20250101.model.StartExecutionRequest;
5155
import com.volcengine.vod20250101.model.StartExecutionResponse;
5256
import com.volcengine.vod20250101.model.SubmitAITranslationWorkflowRequest;
@@ -455,6 +459,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
455459
apiClient.executeAsync(call, localVarReturnType, callback);
456460
return call;
457461
}
462+
/**
463+
* Build call for createAITranslationUtterance
464+
* @param body (required)
465+
* @param progressListener Progress listener
466+
* @param progressRequestListener Progress request listener
467+
* @return Call to execute
468+
* @throws ApiException If fail to serialize the request body object
469+
*/
470+
public com.squareup.okhttp.Call createAITranslationUtteranceCall(CreateAITranslationUtteranceRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
471+
Object localVarPostBody = body;
472+
473+
// create path and map variables
474+
String localVarPath = "/CreateAITranslationUtterance/2025-01-01/vod/post/application_json/";
475+
476+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
477+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
478+
479+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
480+
481+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
482+
483+
final String[] localVarAccepts = {
484+
"application/json"
485+
};
486+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
487+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
488+
489+
final String[] localVarContentTypes = {
490+
"text/plain"
491+
};
492+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
493+
localVarHeaderParams.put("Content-Type", localVarContentType);
494+
495+
if(progressListener != null) {
496+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
497+
@Override
498+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
499+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
500+
return originalResponse.newBuilder()
501+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
502+
.build();
503+
}
504+
});
505+
}
506+
507+
String[] localVarAuthNames = new String[] { "volcengineSign" };
508+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
509+
}
510+
511+
@SuppressWarnings("rawtypes")
512+
private com.squareup.okhttp.Call createAITranslationUtteranceValidateBeforeCall(CreateAITranslationUtteranceRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
513+
// verify the required parameter 'body' is set
514+
if (body == null) {
515+
throw new ApiException("Missing the required parameter 'body' when calling createAITranslationUtterance(Async)");
516+
}
517+
518+
com.squareup.okhttp.Call call = createAITranslationUtteranceCall(body, progressListener, progressRequestListener);
519+
return call;
520+
521+
522+
523+
524+
525+
}
526+
527+
/**
528+
*
529+
*
530+
* @param body (required)
531+
* @return CreateAITranslationUtteranceResponse
532+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
533+
*/
534+
public CreateAITranslationUtteranceResponse createAITranslationUtterance(CreateAITranslationUtteranceRequest body) throws ApiException {
535+
ApiResponse<CreateAITranslationUtteranceResponse> resp = createAITranslationUtteranceWithHttpInfo(body);
536+
return resp.getData();
537+
}
538+
539+
/**
540+
*
541+
*
542+
* @param body (required)
543+
* @return ApiResponse&lt;CreateAITranslationUtteranceResponse&gt;
544+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
545+
*/
546+
public ApiResponse<CreateAITranslationUtteranceResponse> createAITranslationUtteranceWithHttpInfo( @NotNull CreateAITranslationUtteranceRequest body) throws ApiException {
547+
com.squareup.okhttp.Call call = createAITranslationUtteranceValidateBeforeCall(body, null, null);
548+
Type localVarReturnType = new TypeToken<CreateAITranslationUtteranceResponse>(){}.getType();
549+
return apiClient.execute(call, localVarReturnType);
550+
}
551+
552+
/**
553+
* (asynchronously)
554+
*
555+
* @param body (required)
556+
* @param callback The callback to be executed when the API call finishes
557+
* @return The request call
558+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
559+
*/
560+
public com.squareup.okhttp.Call createAITranslationUtteranceAsync(CreateAITranslationUtteranceRequest body, final ApiCallback<CreateAITranslationUtteranceResponse> callback) throws ApiException {
561+
562+
ProgressResponseBody.ProgressListener progressListener = null;
563+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
564+
565+
if (callback != null) {
566+
progressListener = new ProgressResponseBody.ProgressListener() {
567+
@Override
568+
public void update(long bytesRead, long contentLength, boolean done) {
569+
callback.onDownloadProgress(bytesRead, contentLength, done);
570+
}
571+
};
572+
573+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
574+
@Override
575+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
576+
callback.onUploadProgress(bytesWritten, contentLength, done);
577+
}
578+
};
579+
}
580+
581+
com.squareup.okhttp.Call call = createAITranslationUtteranceValidateBeforeCall(body, progressListener, progressRequestListener);
582+
Type localVarReturnType = new TypeToken<CreateAITranslationUtteranceResponse>(){}.getType();
583+
apiClient.executeAsync(call, localVarReturnType, callback);
584+
return call;
585+
}
458586
/**
459587
* Build call for deleteAITranslationSpeech
460588
* @param body (required)
@@ -1323,6 +1451,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
13231451
apiClient.executeAsync(call, localVarReturnType, callback);
13241452
return call;
13251453
}
1454+
/**
1455+
* Build call for removeAITranslationUtterance
1456+
* @param body (required)
1457+
* @param progressListener Progress listener
1458+
* @param progressRequestListener Progress request listener
1459+
* @return Call to execute
1460+
* @throws ApiException If fail to serialize the request body object
1461+
*/
1462+
public com.squareup.okhttp.Call removeAITranslationUtteranceCall(RemoveAITranslationUtteranceRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1463+
Object localVarPostBody = body;
1464+
1465+
// create path and map variables
1466+
String localVarPath = "/RemoveAITranslationUtterance/2025-01-01/vod/post/application_json/";
1467+
1468+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1469+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1470+
1471+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1472+
1473+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1474+
1475+
final String[] localVarAccepts = {
1476+
"application/json"
1477+
};
1478+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1479+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
1480+
1481+
final String[] localVarContentTypes = {
1482+
"text/plain"
1483+
};
1484+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1485+
localVarHeaderParams.put("Content-Type", localVarContentType);
1486+
1487+
if(progressListener != null) {
1488+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
1489+
@Override
1490+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
1491+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
1492+
return originalResponse.newBuilder()
1493+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
1494+
.build();
1495+
}
1496+
});
1497+
}
1498+
1499+
String[] localVarAuthNames = new String[] { "volcengineSign" };
1500+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1501+
}
1502+
1503+
@SuppressWarnings("rawtypes")
1504+
private com.squareup.okhttp.Call removeAITranslationUtteranceValidateBeforeCall(RemoveAITranslationUtteranceRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1505+
// verify the required parameter 'body' is set
1506+
if (body == null) {
1507+
throw new ApiException("Missing the required parameter 'body' when calling removeAITranslationUtterance(Async)");
1508+
}
1509+
1510+
com.squareup.okhttp.Call call = removeAITranslationUtteranceCall(body, progressListener, progressRequestListener);
1511+
return call;
1512+
1513+
1514+
1515+
1516+
1517+
}
1518+
1519+
/**
1520+
*
1521+
*
1522+
* @param body (required)
1523+
* @return RemoveAITranslationUtteranceResponse
1524+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1525+
*/
1526+
public RemoveAITranslationUtteranceResponse removeAITranslationUtterance(RemoveAITranslationUtteranceRequest body) throws ApiException {
1527+
ApiResponse<RemoveAITranslationUtteranceResponse> resp = removeAITranslationUtteranceWithHttpInfo(body);
1528+
return resp.getData();
1529+
}
1530+
1531+
/**
1532+
*
1533+
*
1534+
* @param body (required)
1535+
* @return ApiResponse&lt;RemoveAITranslationUtteranceResponse&gt;
1536+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1537+
*/
1538+
public ApiResponse<RemoveAITranslationUtteranceResponse> removeAITranslationUtteranceWithHttpInfo( @NotNull RemoveAITranslationUtteranceRequest body) throws ApiException {
1539+
com.squareup.okhttp.Call call = removeAITranslationUtteranceValidateBeforeCall(body, null, null);
1540+
Type localVarReturnType = new TypeToken<RemoveAITranslationUtteranceResponse>(){}.getType();
1541+
return apiClient.execute(call, localVarReturnType);
1542+
}
1543+
1544+
/**
1545+
* (asynchronously)
1546+
*
1547+
* @param body (required)
1548+
* @param callback The callback to be executed when the API call finishes
1549+
* @return The request call
1550+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1551+
*/
1552+
public com.squareup.okhttp.Call removeAITranslationUtteranceAsync(RemoveAITranslationUtteranceRequest body, final ApiCallback<RemoveAITranslationUtteranceResponse> callback) throws ApiException {
1553+
1554+
ProgressResponseBody.ProgressListener progressListener = null;
1555+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1556+
1557+
if (callback != null) {
1558+
progressListener = new ProgressResponseBody.ProgressListener() {
1559+
@Override
1560+
public void update(long bytesRead, long contentLength, boolean done) {
1561+
callback.onDownloadProgress(bytesRead, contentLength, done);
1562+
}
1563+
};
1564+
1565+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1566+
@Override
1567+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1568+
callback.onUploadProgress(bytesWritten, contentLength, done);
1569+
}
1570+
};
1571+
}
1572+
1573+
com.squareup.okhttp.Call call = removeAITranslationUtteranceValidateBeforeCall(body, progressListener, progressRequestListener);
1574+
Type localVarReturnType = new TypeToken<RemoveAITranslationUtteranceResponse>(){}.getType();
1575+
apiClient.executeAsync(call, localVarReturnType, callback);
1576+
return call;
1577+
}
13261578
/**
13271579
* Build call for startExecution
13281580
* @param body (required)

0 commit comments

Comments
 (0)