Skip to content

Commit d46e552

Browse files
author
BitsAdmin
committed
Merge branch 'vod-Java-2025-01-01-online-1431-2025_08_06_14_09_55' into 'integration_2025-08-07_1026535329026'
feat: [development task] vod-1431-Java (1527776) See merge request iaasng/volcengine-java-sdk!597
2 parents a14d0c2 + 718d044 commit d46e552

File tree

4 files changed

+506
-0
lines changed

4 files changed

+506
-0
lines changed

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

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
import com.volcengine.vod20250101.model.GetExecutionResponse;
3636
import com.volcengine.vod20250101.model.ListAITranslationProjectRequest;
3737
import com.volcengine.vod20250101.model.ListAITranslationProjectResponse;
38+
import com.volcengine.vod20250101.model.RefreshAITranslationProjectRequest;
39+
import com.volcengine.vod20250101.model.RefreshAITranslationProjectResponse;
3840
import com.volcengine.vod20250101.model.StartExecutionRequest;
3941
import com.volcengine.vod20250101.model.StartExecutionResponse;
4042
import com.volcengine.vod20250101.model.SubmitAITranslationWorkflowRequest;
@@ -563,6 +565,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
563565
apiClient.executeAsync(call, localVarReturnType, callback);
564566
return call;
565567
}
568+
/**
569+
* Build call for refreshAITranslationProject
570+
* @param body (required)
571+
* @param progressListener Progress listener
572+
* @param progressRequestListener Progress request listener
573+
* @return Call to execute
574+
* @throws ApiException If fail to serialize the request body object
575+
*/
576+
public com.squareup.okhttp.Call refreshAITranslationProjectCall(RefreshAITranslationProjectRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
577+
Object localVarPostBody = body;
578+
579+
// create path and map variables
580+
String localVarPath = "/RefreshAITranslationProject/2025-01-01/vod/post/application_json/";
581+
582+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
583+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
584+
585+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
586+
587+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
588+
589+
final String[] localVarAccepts = {
590+
"application/json"
591+
};
592+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
593+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
594+
595+
final String[] localVarContentTypes = {
596+
"text/plain"
597+
};
598+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
599+
localVarHeaderParams.put("Content-Type", localVarContentType);
600+
601+
if(progressListener != null) {
602+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
603+
@Override
604+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
605+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
606+
return originalResponse.newBuilder()
607+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
608+
.build();
609+
}
610+
});
611+
}
612+
613+
String[] localVarAuthNames = new String[] { "volcengineSign" };
614+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
615+
}
616+
617+
@SuppressWarnings("rawtypes")
618+
private com.squareup.okhttp.Call refreshAITranslationProjectValidateBeforeCall(RefreshAITranslationProjectRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
619+
// verify the required parameter 'body' is set
620+
if (body == null) {
621+
throw new ApiException("Missing the required parameter 'body' when calling refreshAITranslationProject(Async)");
622+
}
623+
624+
com.squareup.okhttp.Call call = refreshAITranslationProjectCall(body, progressListener, progressRequestListener);
625+
return call;
626+
627+
628+
629+
630+
631+
}
632+
633+
/**
634+
*
635+
*
636+
* @param body (required)
637+
* @return RefreshAITranslationProjectResponse
638+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
639+
*/
640+
public RefreshAITranslationProjectResponse refreshAITranslationProject(RefreshAITranslationProjectRequest body) throws ApiException {
641+
ApiResponse<RefreshAITranslationProjectResponse> resp = refreshAITranslationProjectWithHttpInfo(body);
642+
return resp.getData();
643+
}
644+
645+
/**
646+
*
647+
*
648+
* @param body (required)
649+
* @return ApiResponse&lt;RefreshAITranslationProjectResponse&gt;
650+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
651+
*/
652+
public ApiResponse<RefreshAITranslationProjectResponse> refreshAITranslationProjectWithHttpInfo( @NotNull RefreshAITranslationProjectRequest body) throws ApiException {
653+
com.squareup.okhttp.Call call = refreshAITranslationProjectValidateBeforeCall(body, null, null);
654+
Type localVarReturnType = new TypeToken<RefreshAITranslationProjectResponse>(){}.getType();
655+
return apiClient.execute(call, localVarReturnType);
656+
}
657+
658+
/**
659+
* (asynchronously)
660+
*
661+
* @param body (required)
662+
* @param callback The callback to be executed when the API call finishes
663+
* @return The request call
664+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
665+
*/
666+
public com.squareup.okhttp.Call refreshAITranslationProjectAsync(RefreshAITranslationProjectRequest body, final ApiCallback<RefreshAITranslationProjectResponse> callback) throws ApiException {
667+
668+
ProgressResponseBody.ProgressListener progressListener = null;
669+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
670+
671+
if (callback != null) {
672+
progressListener = new ProgressResponseBody.ProgressListener() {
673+
@Override
674+
public void update(long bytesRead, long contentLength, boolean done) {
675+
callback.onDownloadProgress(bytesRead, contentLength, done);
676+
}
677+
};
678+
679+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
680+
@Override
681+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
682+
callback.onUploadProgress(bytesWritten, contentLength, done);
683+
}
684+
};
685+
}
686+
687+
com.squareup.okhttp.Call call = refreshAITranslationProjectValidateBeforeCall(body, progressListener, progressRequestListener);
688+
Type localVarReturnType = new TypeToken<RefreshAITranslationProjectResponse>(){}.getType();
689+
apiClient.executeAsync(call, localVarReturnType, callback);
690+
return call;
691+
}
566692
/**
567693
* Build call for startExecution
568694
* @param body (required)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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+
* ProjectBaseInfoForRefreshAITranslationProjectOutput
28+
*/
29+
30+
31+
32+
public class ProjectBaseInfoForRefreshAITranslationProjectOutput {
33+
@SerializedName("ProjectId")
34+
private String projectId = null;
35+
36+
@SerializedName("ProjectVersion")
37+
private String projectVersion = null;
38+
39+
public ProjectBaseInfoForRefreshAITranslationProjectOutput projectId(String projectId) {
40+
this.projectId = projectId;
41+
return this;
42+
}
43+
44+
/**
45+
* Get projectId
46+
* @return projectId
47+
**/
48+
@Schema(description = "")
49+
public String getProjectId() {
50+
return projectId;
51+
}
52+
53+
public void setProjectId(String projectId) {
54+
this.projectId = projectId;
55+
}
56+
57+
public ProjectBaseInfoForRefreshAITranslationProjectOutput projectVersion(String projectVersion) {
58+
this.projectVersion = projectVersion;
59+
return this;
60+
}
61+
62+
/**
63+
* Get projectVersion
64+
* @return projectVersion
65+
**/
66+
@Schema(description = "")
67+
public String getProjectVersion() {
68+
return projectVersion;
69+
}
70+
71+
public void setProjectVersion(String projectVersion) {
72+
this.projectVersion = projectVersion;
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+
ProjectBaseInfoForRefreshAITranslationProjectOutput projectBaseInfoForRefreshAITranslationProjectOutput = (ProjectBaseInfoForRefreshAITranslationProjectOutput) o;
85+
return Objects.equals(this.projectId, projectBaseInfoForRefreshAITranslationProjectOutput.projectId) &&
86+
Objects.equals(this.projectVersion, projectBaseInfoForRefreshAITranslationProjectOutput.projectVersion);
87+
}
88+
89+
@Override
90+
public int hashCode() {
91+
return Objects.hash(projectId, projectVersion);
92+
}
93+
94+
95+
@Override
96+
public String toString() {
97+
StringBuilder sb = new StringBuilder();
98+
sb.append("class ProjectBaseInfoForRefreshAITranslationProjectOutput {\n");
99+
100+
sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n");
101+
sb.append(" projectVersion: ").append(toIndentedString(projectVersion)).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)