Skip to content

Commit cb4f057

Browse files
author
BitsAdmin
committed
Merge 'rcs_5g-Java-2025-11-17-online-1854-2025_11_20_14_10_23' into 'integration_2025-12-04_1090536471554'
feat: [development task] rcs_5g-1854-Java (1900795) See merge request: !785
2 parents 4f243eb + d59c122 commit cb4f057

File tree

11 files changed

+1661
-0
lines changed

11 files changed

+1661
-0
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@
321321
<module>volcengine-java-sdk-cbr</module>
322322
<module>volcengine-java-sdk-milvus</module>
323323
<module>volcengine-java-sdk-smc</module>
324+
<module>volcengine-java-sdk-rcs5g</module>
324325
<module>volcengine-java-sdk-i18nopenapi</module>
325326
<module>volcengine-java-sdk-pca20251001</module>
326327
<module>volcengine-java-sdk-config</module>

volcengine-java-sdk-bom/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,12 @@
643643
<optional>false</optional>
644644
<version>${project.version}</version>
645645
</dependency>
646+
<dependency>
647+
<groupId>com.volcengine</groupId>
648+
<artifactId>volcengine-java-sdk-rcs5g</artifactId>
649+
<optional>false</optional>
650+
<version>${project.version}</version>
651+
</dependency>
646652
<dependency>
647653
<groupId>com.volcengine</groupId>
648654
<artifactId>volcengine-java-sdk-i18nopenapi</artifactId>

volcengine-java-sdk-rcs5g/pom.xml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<parent>
4+
<artifactId>volcengine-java-sdk</artifactId>
5+
<groupId>com.volcengine</groupId>
6+
<version>0.2.50</version>
7+
<relativePath>../pom.xml</relativePath>
8+
</parent>
9+
<modelVersion>4.0.0</modelVersion>
10+
<artifactId>volcengine-java-sdk-rcs5g</artifactId>
11+
<name>volcengine-java-sdk-rcs5g</name>
12+
<description>The Java SDK for Volcengine rcs5g</description>
13+
<dependencies>
14+
<dependency>
15+
<groupId>com.volcengine</groupId>
16+
<artifactId>volcengine-java-sdk-core</artifactId>
17+
<version>${project.version}</version>
18+
</dependency>
19+
</dependencies>
20+
<build>
21+
<plugins>
22+
<plugin>
23+
<groupId>org.apache.maven.plugins</groupId>
24+
<artifactId>maven-source-plugin</artifactId>
25+
<configuration>
26+
<excludes>
27+
<exclude>com/volcengine/rcs5g/examples/**</exclude>
28+
</excludes>
29+
</configuration>
30+
</plugin>
31+
<plugin>
32+
<groupId>org.apache.maven.plugins</groupId>
33+
<artifactId>maven-jar-plugin</artifactId>
34+
<configuration>
35+
<excludes>
36+
<exclude>com/volcengine/rcs5g/examples/**</exclude>
37+
</excludes>
38+
</configuration>
39+
</plugin>
40+
</plugins>
41+
</build>
42+
</project>
Lines changed: 308 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,308 @@
1+
/*
2+
* rcs_5g
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.rcs5g;
14+
15+
import com.volcengine.ApiCallback;
16+
import com.volcengine.ApiClient;
17+
import com.volcengine.ApiException;
18+
import com.volcengine.ApiResponse;
19+
import com.volcengine.Configuration;
20+
import com.volcengine.Pair;
21+
import com.volcengine.ProgressRequestBody;
22+
import com.volcengine.ProgressResponseBody;
23+
24+
import com.google.gson.reflect.TypeToken;
25+
26+
import java.io.IOException;
27+
28+
import javax.validation.constraints.*;
29+
30+
import com.volcengine.rcs5g.model.SendBatchRcsRequest;
31+
import com.volcengine.rcs5g.model.SendBatchRcsResponse;
32+
import com.volcengine.rcs5g.model.SendRcsRequest;
33+
import com.volcengine.rcs5g.model.SendRcsResponse;
34+
35+
import java.lang.reflect.Type;
36+
import java.util.ArrayList;
37+
import java.util.HashMap;
38+
import java.util.List;
39+
import java.util.Map;
40+
41+
public class Rcs5GApi {
42+
private ApiClient apiClient;
43+
44+
public Rcs5GApi() {
45+
this(Configuration.getDefaultApiClient());
46+
}
47+
48+
public Rcs5GApi(ApiClient apiClient) {
49+
this.apiClient = apiClient;
50+
}
51+
52+
public ApiClient getApiClient() {
53+
return apiClient;
54+
}
55+
56+
public void setApiClient(ApiClient apiClient) {
57+
this.apiClient = apiClient;
58+
}
59+
60+
/**
61+
* Build call for sendBatchRcs
62+
* @param body (required)
63+
* @param progressListener Progress listener
64+
* @param progressRequestListener Progress request listener
65+
* @return Call to execute
66+
* @throws ApiException If fail to serialize the request body object
67+
*/
68+
public com.squareup.okhttp.Call sendBatchRcsCall(SendBatchRcsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
69+
Object localVarPostBody = body;
70+
71+
// create path and map variables
72+
String localVarPath = "/SendBatchRcs/2025-11-17/rcs_5g/post/application_json/";
73+
74+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
75+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
76+
77+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
78+
79+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
80+
81+
final String[] localVarAccepts = {
82+
"application/json"
83+
};
84+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
85+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
86+
87+
final String[] localVarContentTypes = {
88+
"text/plain"
89+
};
90+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
91+
localVarHeaderParams.put("Content-Type", localVarContentType);
92+
93+
if(progressListener != null) {
94+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
95+
@Override
96+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
97+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
98+
return originalResponse.newBuilder()
99+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
100+
.build();
101+
}
102+
});
103+
}
104+
105+
String[] localVarAuthNames = new String[] { "volcengineSign" };
106+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
107+
}
108+
109+
@SuppressWarnings("rawtypes")
110+
private com.squareup.okhttp.Call sendBatchRcsValidateBeforeCall(SendBatchRcsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
111+
// verify the required parameter 'body' is set
112+
if (body == null) {
113+
throw new ApiException("Missing the required parameter 'body' when calling sendBatchRcs(Async)");
114+
}
115+
116+
com.squareup.okhttp.Call call = sendBatchRcsCall(body, progressListener, progressRequestListener);
117+
return call;
118+
119+
120+
121+
122+
123+
}
124+
125+
/**
126+
*
127+
*
128+
* @param body (required)
129+
* @return SendBatchRcsResponse
130+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
131+
*/
132+
public SendBatchRcsResponse sendBatchRcs(SendBatchRcsRequest body) throws ApiException {
133+
ApiResponse<SendBatchRcsResponse> resp = sendBatchRcsWithHttpInfo(body);
134+
return resp.getData();
135+
}
136+
137+
/**
138+
*
139+
*
140+
* @param body (required)
141+
* @return ApiResponse&lt;SendBatchRcsResponse&gt;
142+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
143+
*/
144+
public ApiResponse<SendBatchRcsResponse> sendBatchRcsWithHttpInfo( @NotNull SendBatchRcsRequest body) throws ApiException {
145+
com.squareup.okhttp.Call call = sendBatchRcsValidateBeforeCall(body, null, null);
146+
Type localVarReturnType = new TypeToken<SendBatchRcsResponse>(){}.getType();
147+
return apiClient.execute(call, localVarReturnType);
148+
}
149+
150+
/**
151+
* (asynchronously)
152+
*
153+
* @param body (required)
154+
* @param callback The callback to be executed when the API call finishes
155+
* @return The request call
156+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
157+
*/
158+
public com.squareup.okhttp.Call sendBatchRcsAsync(SendBatchRcsRequest body, final ApiCallback<SendBatchRcsResponse> callback) throws ApiException {
159+
160+
ProgressResponseBody.ProgressListener progressListener = null;
161+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
162+
163+
if (callback != null) {
164+
progressListener = new ProgressResponseBody.ProgressListener() {
165+
@Override
166+
public void update(long bytesRead, long contentLength, boolean done) {
167+
callback.onDownloadProgress(bytesRead, contentLength, done);
168+
}
169+
};
170+
171+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
172+
@Override
173+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
174+
callback.onUploadProgress(bytesWritten, contentLength, done);
175+
}
176+
};
177+
}
178+
179+
com.squareup.okhttp.Call call = sendBatchRcsValidateBeforeCall(body, progressListener, progressRequestListener);
180+
Type localVarReturnType = new TypeToken<SendBatchRcsResponse>(){}.getType();
181+
apiClient.executeAsync(call, localVarReturnType, callback);
182+
return call;
183+
}
184+
/**
185+
* Build call for sendRcs
186+
* @param body (required)
187+
* @param progressListener Progress listener
188+
* @param progressRequestListener Progress request listener
189+
* @return Call to execute
190+
* @throws ApiException If fail to serialize the request body object
191+
*/
192+
public com.squareup.okhttp.Call sendRcsCall(SendRcsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
193+
Object localVarPostBody = body;
194+
195+
// create path and map variables
196+
String localVarPath = "/SendRcs/2025-11-17/rcs_5g/post/application_json/";
197+
198+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
199+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
200+
201+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
202+
203+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
204+
205+
final String[] localVarAccepts = {
206+
"application/json"
207+
};
208+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
209+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
210+
211+
final String[] localVarContentTypes = {
212+
"text/plain"
213+
};
214+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
215+
localVarHeaderParams.put("Content-Type", localVarContentType);
216+
217+
if(progressListener != null) {
218+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
219+
@Override
220+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
221+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
222+
return originalResponse.newBuilder()
223+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
224+
.build();
225+
}
226+
});
227+
}
228+
229+
String[] localVarAuthNames = new String[] { "volcengineSign" };
230+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
231+
}
232+
233+
@SuppressWarnings("rawtypes")
234+
private com.squareup.okhttp.Call sendRcsValidateBeforeCall(SendRcsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
235+
// verify the required parameter 'body' is set
236+
if (body == null) {
237+
throw new ApiException("Missing the required parameter 'body' when calling sendRcs(Async)");
238+
}
239+
240+
com.squareup.okhttp.Call call = sendRcsCall(body, progressListener, progressRequestListener);
241+
return call;
242+
243+
244+
245+
246+
247+
}
248+
249+
/**
250+
*
251+
*
252+
* @param body (required)
253+
* @return SendRcsResponse
254+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
255+
*/
256+
public SendRcsResponse sendRcs(SendRcsRequest body) throws ApiException {
257+
ApiResponse<SendRcsResponse> resp = sendRcsWithHttpInfo(body);
258+
return resp.getData();
259+
}
260+
261+
/**
262+
*
263+
*
264+
* @param body (required)
265+
* @return ApiResponse&lt;SendRcsResponse&gt;
266+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
267+
*/
268+
public ApiResponse<SendRcsResponse> sendRcsWithHttpInfo( @NotNull SendRcsRequest body) throws ApiException {
269+
com.squareup.okhttp.Call call = sendRcsValidateBeforeCall(body, null, null);
270+
Type localVarReturnType = new TypeToken<SendRcsResponse>(){}.getType();
271+
return apiClient.execute(call, localVarReturnType);
272+
}
273+
274+
/**
275+
* (asynchronously)
276+
*
277+
* @param body (required)
278+
* @param callback The callback to be executed when the API call finishes
279+
* @return The request call
280+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
281+
*/
282+
public com.squareup.okhttp.Call sendRcsAsync(SendRcsRequest body, final ApiCallback<SendRcsResponse> callback) throws ApiException {
283+
284+
ProgressResponseBody.ProgressListener progressListener = null;
285+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
286+
287+
if (callback != null) {
288+
progressListener = new ProgressResponseBody.ProgressListener() {
289+
@Override
290+
public void update(long bytesRead, long contentLength, boolean done) {
291+
callback.onDownloadProgress(bytesRead, contentLength, done);
292+
}
293+
};
294+
295+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
296+
@Override
297+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
298+
callback.onUploadProgress(bytesWritten, contentLength, done);
299+
}
300+
};
301+
}
302+
303+
com.squareup.okhttp.Call call = sendRcsValidateBeforeCall(body, progressListener, progressRequestListener);
304+
Type localVarReturnType = new TypeToken<SendRcsResponse>(){}.getType();
305+
apiClient.executeAsync(call, localVarReturnType, callback);
306+
return call;
307+
}
308+
}

0 commit comments

Comments
 (0)