Skip to content

Commit 3e2d848

Browse files
author
BitsAdmin
committed
Merge branch 'vod-Java-2025-01-01-online-1401-2025_07_29_16_06_47' into 'integration_2025-07-31_1022673037826'
feat: [development task] vod-1401-Java (1504124) See merge request iaasng/volcengine-java-sdk!589
2 parents fb9760b + e4054f5 commit 3e2d848

12 files changed

+1572
-2
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
@@ -27,6 +27,8 @@
2727

2828
import javax.validation.constraints.*;
2929

30+
import com.volcengine.vod20250101.model.ContinueAITranslationWorkflowRequest;
31+
import com.volcengine.vod20250101.model.ContinueAITranslationWorkflowResponse;
3032
import com.volcengine.vod20250101.model.GetAITranslationProjectRequest;
3133
import com.volcengine.vod20250101.model.GetAITranslationProjectResponse;
3234
import com.volcengine.vod20250101.model.GetExecutionRequest;
@@ -37,6 +39,8 @@
3739
import com.volcengine.vod20250101.model.StartExecutionResponse;
3840
import com.volcengine.vod20250101.model.SubmitAITranslationWorkflowRequest;
3941
import com.volcengine.vod20250101.model.SubmitAITranslationWorkflowResponse;
42+
import com.volcengine.vod20250101.model.UpdateAITranslationUtterancesRequest;
43+
import com.volcengine.vod20250101.model.UpdateAITranslationUtterancesResponse;
4044

4145
import java.lang.reflect.Type;
4246
import 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&lt;ContinueAITranslationWorkflowResponse&gt;
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&lt;UpdateAITranslationUtterancesResponse&gt;
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
}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/*
2+
* vod20250101
3+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4+
*
5+
* OpenAPI spec version: common-version
6+
*
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
13+
package com.volcengine.vod20250101.model;
14+
15+
import java.util.Objects;
16+
import java.util.Arrays;
17+
import com.google.gson.TypeAdapter;
18+
import com.google.gson.annotations.JsonAdapter;
19+
import com.google.gson.annotations.SerializedName;
20+
import com.google.gson.stream.JsonReader;
21+
import com.google.gson.stream.JsonWriter;
22+
import io.swagger.v3.oas.annotations.media.Schema;
23+
import java.io.IOException;
24+
import javax.validation.constraints.*;
25+
import javax.validation.Valid;
26+
/**
27+
* ContinueAITranslationWorkflowRequest
28+
*/
29+
30+
31+
32+
public class ContinueAITranslationWorkflowRequest {
33+
@SerializedName("ProjectId")
34+
private String projectId = null;
35+
36+
@SerializedName("SpaceName")
37+
private String spaceName = null;
38+
39+
public ContinueAITranslationWorkflowRequest projectId(String projectId) {
40+
this.projectId = projectId;
41+
return this;
42+
}
43+
44+
/**
45+
* Get projectId
46+
* @return projectId
47+
**/
48+
@NotNull
49+
@Schema(required = true, description = "")
50+
public String getProjectId() {
51+
return projectId;
52+
}
53+
54+
public void setProjectId(String projectId) {
55+
this.projectId = projectId;
56+
}
57+
58+
public ContinueAITranslationWorkflowRequest spaceName(String spaceName) {
59+
this.spaceName = spaceName;
60+
return this;
61+
}
62+
63+
/**
64+
* Get spaceName
65+
* @return spaceName
66+
**/
67+
@NotNull
68+
@Schema(required = true, description = "")
69+
public String getSpaceName() {
70+
return spaceName;
71+
}
72+
73+
public void setSpaceName(String spaceName) {
74+
this.spaceName = spaceName;
75+
}
76+
77+
78+
@Override
79+
public boolean equals(java.lang.Object o) {
80+
if (this == o) {
81+
return true;
82+
}
83+
if (o == null || getClass() != o.getClass()) {
84+
return false;
85+
}
86+
ContinueAITranslationWorkflowRequest continueAITranslationWorkflowRequest = (ContinueAITranslationWorkflowRequest) o;
87+
return Objects.equals(this.projectId, continueAITranslationWorkflowRequest.projectId) &&
88+
Objects.equals(this.spaceName, continueAITranslationWorkflowRequest.spaceName);
89+
}
90+
91+
@Override
92+
public int hashCode() {
93+
return Objects.hash(projectId, spaceName);
94+
}
95+
96+
97+
@Override
98+
public String toString() {
99+
StringBuilder sb = new StringBuilder();
100+
sb.append("class ContinueAITranslationWorkflowRequest {\n");
101+
102+
sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
103+
sb.append(" spaceName: ").append(toIndentedString(spaceName)).append("\n");
104+
sb.append("}");
105+
return sb.toString();
106+
}
107+
108+
/**
109+
* Convert the given object to string with each line indented by 4 spaces
110+
* (except the first line).
111+
*/
112+
private String toIndentedString(java.lang.Object o) {
113+
if (o == null) {
114+
return "null";
115+
}
116+
return o.toString().replace("\n", "\n ");
117+
}
118+
119+
}

0 commit comments

Comments
 (0)