Skip to content

Commit 8241b5d

Browse files
author
BitsAdmin
committed
Merge 'speech_saas_prod-Java-2025-05-20-online-2006-2026_01_05_15_48_44' into 'integration_2026-01-08_1101390403330'
feat: [development task] speech_saas_prod-2006-Java (2009617) See merge request: !842
2 parents ec73dcc + 2e46724 commit 8241b5d

7 files changed

Lines changed: 1261 additions & 0 deletions

File tree

volcengine-java-sdk-speechsaasprod/src/main/java/com/volcengine/speechsaasprod/SpeechSaasProdApi.java

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
import com.volcengine.speechsaasprod.model.ListAPIKeysResponse;
4242
import com.volcengine.speechsaasprod.model.ListBigModelTTSTimbresRequest;
4343
import com.volcengine.speechsaasprod.model.ListBigModelTTSTimbresResponse;
44+
import com.volcengine.speechsaasprod.model.ListSpeakersRequest;
45+
import com.volcengine.speechsaasprod.model.ListSpeakersResponse;
4446
import com.volcengine.speechsaasprod.model.OrderResourcePacksRequest;
4547
import com.volcengine.speechsaasprod.model.OrderResourcePacksResponse;
4648
import com.volcengine.speechsaasprod.model.PauseServiceRequest;
@@ -949,6 +951,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
949951
apiClient.executeAsync(call, localVarReturnType, callback);
950952
return call;
951953
}
954+
/**
955+
* Build call for listSpeakers
956+
* @param body (required)
957+
* @param progressListener Progress listener
958+
* @param progressRequestListener Progress request listener
959+
* @return Call to execute
960+
* @throws ApiException If fail to serialize the request body object
961+
*/
962+
public com.squareup.okhttp.Call listSpeakersCall(ListSpeakersRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
963+
Object localVarPostBody = body;
964+
965+
// create path and map variables
966+
String localVarPath = "/ListSpeakers/2025-05-20/speech_saas_prod/post/application_json/";
967+
968+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
969+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
970+
971+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
972+
973+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
974+
975+
final String[] localVarAccepts = {
976+
"application/json"
977+
};
978+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
979+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
980+
981+
final String[] localVarContentTypes = {
982+
"text/plain"
983+
};
984+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
985+
localVarHeaderParams.put("Content-Type", localVarContentType);
986+
987+
if(progressListener != null) {
988+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
989+
@Override
990+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
991+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
992+
return originalResponse.newBuilder()
993+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
994+
.build();
995+
}
996+
});
997+
}
998+
999+
String[] localVarAuthNames = new String[] { "volcengineSign" };
1000+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1001+
}
1002+
1003+
@SuppressWarnings("rawtypes")
1004+
private com.squareup.okhttp.Call listSpeakersValidateBeforeCall(ListSpeakersRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1005+
// verify the required parameter 'body' is set
1006+
if (body == null) {
1007+
throw new ApiException("Missing the required parameter 'body' when calling listSpeakers(Async)");
1008+
}
1009+
1010+
com.squareup.okhttp.Call call = listSpeakersCall(body, progressListener, progressRequestListener);
1011+
return call;
1012+
1013+
1014+
1015+
1016+
1017+
}
1018+
1019+
/**
1020+
*
1021+
*
1022+
* @param body (required)
1023+
* @return ListSpeakersResponse
1024+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1025+
*/
1026+
public ListSpeakersResponse listSpeakers(ListSpeakersRequest body) throws ApiException {
1027+
ApiResponse<ListSpeakersResponse> resp = listSpeakersWithHttpInfo(body);
1028+
return resp.getData();
1029+
}
1030+
1031+
/**
1032+
*
1033+
*
1034+
* @param body (required)
1035+
* @return ApiResponse&lt;ListSpeakersResponse&gt;
1036+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1037+
*/
1038+
public ApiResponse<ListSpeakersResponse> listSpeakersWithHttpInfo( @NotNull ListSpeakersRequest body) throws ApiException {
1039+
com.squareup.okhttp.Call call = listSpeakersValidateBeforeCall(body, null, null);
1040+
Type localVarReturnType = new TypeToken<ListSpeakersResponse>(){}.getType();
1041+
return apiClient.execute(call, localVarReturnType);
1042+
}
1043+
1044+
/**
1045+
* (asynchronously)
1046+
*
1047+
* @param body (required)
1048+
* @param callback The callback to be executed when the API call finishes
1049+
* @return The request call
1050+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1051+
*/
1052+
public com.squareup.okhttp.Call listSpeakersAsync(ListSpeakersRequest body, final ApiCallback<ListSpeakersResponse> callback) throws ApiException {
1053+
1054+
ProgressResponseBody.ProgressListener progressListener = null;
1055+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1056+
1057+
if (callback != null) {
1058+
progressListener = new ProgressResponseBody.ProgressListener() {
1059+
@Override
1060+
public void update(long bytesRead, long contentLength, boolean done) {
1061+
callback.onDownloadProgress(bytesRead, contentLength, done);
1062+
}
1063+
};
1064+
1065+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1066+
@Override
1067+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1068+
callback.onUploadProgress(bytesWritten, contentLength, done);
1069+
}
1070+
};
1071+
}
1072+
1073+
com.squareup.okhttp.Call call = listSpeakersValidateBeforeCall(body, progressListener, progressRequestListener);
1074+
Type localVarReturnType = new TypeToken<ListSpeakersResponse>(){}.getType();
1075+
apiClient.executeAsync(call, localVarReturnType, callback);
1076+
return call;
1077+
}
9521078
/**
9531079
* Build call for orderResourcePacks
9541080
* @param body (required)
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/*
2+
* speech_saas_prod
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.speechsaasprod.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 java.util.ArrayList;
25+
import java.util.List;
26+
import javax.validation.constraints.*;
27+
import javax.validation.Valid;
28+
/**
29+
* CategoryForListSpeakersOutput
30+
*/
31+
32+
33+
34+
public class CategoryForListSpeakersOutput {
35+
@SerializedName("Categories")
36+
private List<String> categories = null;
37+
38+
public CategoryForListSpeakersOutput categories(List<String> categories) {
39+
this.categories = categories;
40+
return this;
41+
}
42+
43+
public CategoryForListSpeakersOutput addCategoriesItem(String categoriesItem) {
44+
if (this.categories == null) {
45+
this.categories = new ArrayList<String>();
46+
}
47+
this.categories.add(categoriesItem);
48+
return this;
49+
}
50+
51+
/**
52+
* Get categories
53+
* @return categories
54+
**/
55+
@Schema(description = "")
56+
public List<String> getCategories() {
57+
return categories;
58+
}
59+
60+
public void setCategories(List<String> categories) {
61+
this.categories = categories;
62+
}
63+
64+
65+
@Override
66+
public boolean equals(java.lang.Object o) {
67+
if (this == o) {
68+
return true;
69+
}
70+
if (o == null || getClass() != o.getClass()) {
71+
return false;
72+
}
73+
CategoryForListSpeakersOutput categoryForListSpeakersOutput = (CategoryForListSpeakersOutput) o;
74+
return Objects.equals(this.categories, categoryForListSpeakersOutput.categories);
75+
}
76+
77+
@Override
78+
public int hashCode() {
79+
return Objects.hash(categories);
80+
}
81+
82+
83+
@Override
84+
public String toString() {
85+
StringBuilder sb = new StringBuilder();
86+
sb.append("class CategoryForListSpeakersOutput {\n");
87+
88+
sb.append(" categories: ").append(toIndentedString(categories)).append("\n");
89+
sb.append("}");
90+
return sb.toString();
91+
}
92+
93+
/**
94+
* Convert the given object to string with each line indented by 4 spaces
95+
* (except the first line).
96+
*/
97+
private String toIndentedString(java.lang.Object o) {
98+
if (o == null) {
99+
return "null";
100+
}
101+
return o.toString().replace("\n", "\n ");
102+
}
103+
104+
}
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/*
2+
* speech_saas_prod
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.speechsaasprod.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+
* EmotionForListSpeakersOutput
28+
*/
29+
30+
31+
32+
public class EmotionForListSpeakersOutput {
33+
@SerializedName("Icon")
34+
private String icon = null;
35+
36+
@SerializedName("Label")
37+
private String label = null;
38+
39+
@SerializedName("Value")
40+
private String value = null;
41+
42+
public EmotionForListSpeakersOutput icon(String icon) {
43+
this.icon = icon;
44+
return this;
45+
}
46+
47+
/**
48+
* Get icon
49+
* @return icon
50+
**/
51+
@Schema(description = "")
52+
public String getIcon() {
53+
return icon;
54+
}
55+
56+
public void setIcon(String icon) {
57+
this.icon = icon;
58+
}
59+
60+
public EmotionForListSpeakersOutput label(String label) {
61+
this.label = label;
62+
return this;
63+
}
64+
65+
/**
66+
* Get label
67+
* @return label
68+
**/
69+
@Schema(description = "")
70+
public String getLabel() {
71+
return label;
72+
}
73+
74+
public void setLabel(String label) {
75+
this.label = label;
76+
}
77+
78+
public EmotionForListSpeakersOutput value(String value) {
79+
this.value = value;
80+
return this;
81+
}
82+
83+
/**
84+
* Get value
85+
* @return value
86+
**/
87+
@Schema(description = "")
88+
public String getValue() {
89+
return value;
90+
}
91+
92+
public void setValue(String value) {
93+
this.value = value;
94+
}
95+
96+
97+
@Override
98+
public boolean equals(java.lang.Object o) {
99+
if (this == o) {
100+
return true;
101+
}
102+
if (o == null || getClass() != o.getClass()) {
103+
return false;
104+
}
105+
EmotionForListSpeakersOutput emotionForListSpeakersOutput = (EmotionForListSpeakersOutput) o;
106+
return Objects.equals(this.icon, emotionForListSpeakersOutput.icon) &&
107+
Objects.equals(this.label, emotionForListSpeakersOutput.label) &&
108+
Objects.equals(this.value, emotionForListSpeakersOutput.value);
109+
}
110+
111+
@Override
112+
public int hashCode() {
113+
return Objects.hash(icon, label, value);
114+
}
115+
116+
117+
@Override
118+
public String toString() {
119+
StringBuilder sb = new StringBuilder();
120+
sb.append("class EmotionForListSpeakersOutput {\n");
121+
122+
sb.append(" icon: ").append(toIndentedString(icon)).append("\n");
123+
sb.append(" label: ").append(toIndentedString(label)).append("\n");
124+
sb.append(" value: ").append(toIndentedString(value)).append("\n");
125+
sb.append("}");
126+
return sb.toString();
127+
}
128+
129+
/**
130+
* Convert the given object to string with each line indented by 4 spaces
131+
* (except the first line).
132+
*/
133+
private String toIndentedString(java.lang.Object o) {
134+
if (o == null) {
135+
return "null";
136+
}
137+
return o.toString().replace("\n", "\n ");
138+
}
139+
140+
}

0 commit comments

Comments
 (0)