Skip to content

Commit 961925b

Browse files
author
BitsAdmin
committed
Merge 'i18n_openapi-Java-2021-05-21-online-2245-2026_02_03_14_02_19' into 'integration_2026-02-05_1111767210754'
feat: [development task] i18n_openapi-2245-Java (2098003) See merge request: !879
2 parents 6793701 + ebe2b6b commit 961925b

14 files changed

+2361
-1
lines changed

volcengine-java-sdk-i18nopenapi/src/main/java/com/volcengine/i18nopenapi/I18NOpenapiApi.java

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
import com.volcengine.i18nopenapi.model.VideoProjectCreateResponse;
4848
import com.volcengine.i18nopenapi.model.VideoProjectListRequest;
4949
import com.volcengine.i18nopenapi.model.VideoProjectListResponse;
50+
import com.volcengine.i18nopenapi.model.VideoProjectSerialDubTaskCreateRequest;
51+
import com.volcengine.i18nopenapi.model.VideoProjectSerialDubTaskCreateResponse;
5052
import com.volcengine.i18nopenapi.model.VideoProjectSerialTaskCreateRequest;
5153
import com.volcengine.i18nopenapi.model.VideoProjectSerialTaskCreateResponse;
5254
import com.volcengine.i18nopenapi.model.VideoProjectTaskDetailRequest;
@@ -1323,6 +1325,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
13231325
apiClient.executeAsync(call, localVarReturnType, callback);
13241326
return call;
13251327
}
1328+
/**
1329+
* Build call for videoProjectSerialDubTaskCreate
1330+
* @param body (required)
1331+
* @param progressListener Progress listener
1332+
* @param progressRequestListener Progress request listener
1333+
* @return Call to execute
1334+
* @throws ApiException If fail to serialize the request body object
1335+
*/
1336+
public com.squareup.okhttp.Call videoProjectSerialDubTaskCreateCall(VideoProjectSerialDubTaskCreateRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1337+
Object localVarPostBody = body;
1338+
1339+
// create path and map variables
1340+
String localVarPath = "/VideoProjectSerialDubTaskCreate/2021-05-21/i18n_openapi/post/application_json/";
1341+
1342+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1343+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1344+
1345+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1346+
1347+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1348+
1349+
final String[] localVarAccepts = {
1350+
"application/json"
1351+
};
1352+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1353+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
1354+
1355+
final String[] localVarContentTypes = {
1356+
"text/plain"
1357+
};
1358+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1359+
localVarHeaderParams.put("Content-Type", localVarContentType);
1360+
1361+
if(progressListener != null) {
1362+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
1363+
@Override
1364+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
1365+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
1366+
return originalResponse.newBuilder()
1367+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
1368+
.build();
1369+
}
1370+
});
1371+
}
1372+
1373+
String[] localVarAuthNames = new String[] { "volcengineSign" };
1374+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1375+
}
1376+
1377+
@SuppressWarnings("rawtypes")
1378+
private com.squareup.okhttp.Call videoProjectSerialDubTaskCreateValidateBeforeCall(VideoProjectSerialDubTaskCreateRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1379+
// verify the required parameter 'body' is set
1380+
if (body == null) {
1381+
throw new ApiException("Missing the required parameter 'body' when calling videoProjectSerialDubTaskCreate(Async)");
1382+
}
1383+
1384+
com.squareup.okhttp.Call call = videoProjectSerialDubTaskCreateCall(body, progressListener, progressRequestListener);
1385+
return call;
1386+
1387+
1388+
1389+
1390+
1391+
}
1392+
1393+
/**
1394+
*
1395+
*
1396+
* @param body (required)
1397+
* @return VideoProjectSerialDubTaskCreateResponse
1398+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1399+
*/
1400+
public VideoProjectSerialDubTaskCreateResponse videoProjectSerialDubTaskCreate(VideoProjectSerialDubTaskCreateRequest body) throws ApiException {
1401+
ApiResponse<VideoProjectSerialDubTaskCreateResponse> resp = videoProjectSerialDubTaskCreateWithHttpInfo(body);
1402+
return resp.getData();
1403+
}
1404+
1405+
/**
1406+
*
1407+
*
1408+
* @param body (required)
1409+
* @return ApiResponse&lt;VideoProjectSerialDubTaskCreateResponse&gt;
1410+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1411+
*/
1412+
public ApiResponse<VideoProjectSerialDubTaskCreateResponse> videoProjectSerialDubTaskCreateWithHttpInfo( @NotNull VideoProjectSerialDubTaskCreateRequest body) throws ApiException {
1413+
com.squareup.okhttp.Call call = videoProjectSerialDubTaskCreateValidateBeforeCall(body, null, null);
1414+
Type localVarReturnType = new TypeToken<VideoProjectSerialDubTaskCreateResponse>(){}.getType();
1415+
return apiClient.execute(call, localVarReturnType);
1416+
}
1417+
1418+
/**
1419+
* (asynchronously)
1420+
*
1421+
* @param body (required)
1422+
* @param callback The callback to be executed when the API call finishes
1423+
* @return The request call
1424+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1425+
*/
1426+
public com.squareup.okhttp.Call videoProjectSerialDubTaskCreateAsync(VideoProjectSerialDubTaskCreateRequest body, final ApiCallback<VideoProjectSerialDubTaskCreateResponse> callback) throws ApiException {
1427+
1428+
ProgressResponseBody.ProgressListener progressListener = null;
1429+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1430+
1431+
if (callback != null) {
1432+
progressListener = new ProgressResponseBody.ProgressListener() {
1433+
@Override
1434+
public void update(long bytesRead, long contentLength, boolean done) {
1435+
callback.onDownloadProgress(bytesRead, contentLength, done);
1436+
}
1437+
};
1438+
1439+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1440+
@Override
1441+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1442+
callback.onUploadProgress(bytesWritten, contentLength, done);
1443+
}
1444+
};
1445+
}
1446+
1447+
com.squareup.okhttp.Call call = videoProjectSerialDubTaskCreateValidateBeforeCall(body, progressListener, progressRequestListener);
1448+
Type localVarReturnType = new TypeToken<VideoProjectSerialDubTaskCreateResponse>(){}.getType();
1449+
apiClient.executeAsync(call, localVarReturnType, callback);
1450+
return call;
1451+
}
13261452
/**
13271453
* Build call for videoProjectSerialTaskCreate
13281454
* @param body (required)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/*
2+
* i18n_openapi
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.i18nopenapi.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+
* BaseRespForVideoProjectSerialDubTaskCreateOutput
28+
*/
29+
30+
31+
32+
public class BaseRespForVideoProjectSerialDubTaskCreateOutput {
33+
@SerializedName("StatusCode")
34+
private Integer statusCode = null;
35+
36+
@SerializedName("StatusMessage")
37+
private String statusMessage = null;
38+
39+
public BaseRespForVideoProjectSerialDubTaskCreateOutput statusCode(Integer statusCode) {
40+
this.statusCode = statusCode;
41+
return this;
42+
}
43+
44+
/**
45+
* Get statusCode
46+
* @return statusCode
47+
**/
48+
@Schema(description = "")
49+
public Integer getStatusCode() {
50+
return statusCode;
51+
}
52+
53+
public void setStatusCode(Integer statusCode) {
54+
this.statusCode = statusCode;
55+
}
56+
57+
public BaseRespForVideoProjectSerialDubTaskCreateOutput statusMessage(String statusMessage) {
58+
this.statusMessage = statusMessage;
59+
return this;
60+
}
61+
62+
/**
63+
* Get statusMessage
64+
* @return statusMessage
65+
**/
66+
@Schema(description = "")
67+
public String getStatusMessage() {
68+
return statusMessage;
69+
}
70+
71+
public void setStatusMessage(String statusMessage) {
72+
this.statusMessage = statusMessage;
73+
}
74+
75+
76+
@Override
77+
public boolean equals(java.lang.Object o) {
78+
if (this == o) {
79+
return true;
80+
}
81+
if (o == null || getClass() != o.getClass()) {
82+
return false;
83+
}
84+
BaseRespForVideoProjectSerialDubTaskCreateOutput baseRespForVideoProjectSerialDubTaskCreateOutput = (BaseRespForVideoProjectSerialDubTaskCreateOutput) o;
85+
return Objects.equals(this.statusCode, baseRespForVideoProjectSerialDubTaskCreateOutput.statusCode) &&
86+
Objects.equals(this.statusMessage, baseRespForVideoProjectSerialDubTaskCreateOutput.statusMessage);
87+
}
88+
89+
@Override
90+
public int hashCode() {
91+
return Objects.hash(statusCode, statusMessage);
92+
}
93+
94+
95+
@Override
96+
public String toString() {
97+
StringBuilder sb = new StringBuilder();
98+
sb.append("class BaseRespForVideoProjectSerialDubTaskCreateOutput {\n");
99+
100+
sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n");
101+
sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n");
102+
sb.append("}");
103+
return sb.toString();
104+
}
105+
106+
/**
107+
* Convert the given object to string with each line indented by 4 spaces
108+
* (except the first line).
109+
*/
110+
private String toIndentedString(java.lang.Object o) {
111+
if (o == null) {
112+
return "null";
113+
}
114+
return o.toString().replace("\n", "\n ");
115+
}
116+
117+
}

0 commit comments

Comments
 (0)