Skip to content

Commit dd08be4

Browse files
author
BitsAdmin
committed
Merge branch 'redis-Java-2020-12-07-online-1878-2025_11_26_12_37_43' into 'integration_2025-12-04_1090136622594'
feat: [development task] Redis-1878-Java (1900548) See merge request iaasng/volcengine-java-sdk!781
2 parents cec4d0a + 6005ebe commit dd08be4

File tree

5 files changed

+681
-0
lines changed

5 files changed

+681
-0
lines changed

volcengine-java-sdk-redis/src/main/java/com/volcengine/redis/RedisApi.java

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@
201201
import com.volcengine.redis.model.StopContinuousBackupResponse;
202202
import com.volcengine.redis.model.SwitchOverRequest;
203203
import com.volcengine.redis.model.SwitchOverResponse;
204+
import com.volcengine.redis.model.TestFailoverDBInstanceZoneRequest;
205+
import com.volcengine.redis.model.TestFailoverDBInstanceZoneResponse;
206+
import com.volcengine.redis.model.TestShutDownDBInstanceNodesRequest;
207+
import com.volcengine.redis.model.TestShutDownDBInstanceNodesResponse;
204208
import com.volcengine.redis.model.UpgradeAllowListVersionRequest;
205209
import com.volcengine.redis.model.UpgradeAllowListVersionResponse;
206210

@@ -11017,6 +11021,254 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
1101711021
apiClient.executeAsync(call, localVarReturnType, callback);
1101811022
return call;
1101911023
}
11024+
/**
11025+
* Build call for testFailoverDBInstanceZone
11026+
* @param body (required)
11027+
* @param progressListener Progress listener
11028+
* @param progressRequestListener Progress request listener
11029+
* @return Call to execute
11030+
* @throws ApiException If fail to serialize the request body object
11031+
*/
11032+
public com.squareup.okhttp.Call testFailoverDBInstanceZoneCall(TestFailoverDBInstanceZoneRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
11033+
Object localVarPostBody = body;
11034+
11035+
// create path and map variables
11036+
String localVarPath = "/TestFailoverDBInstanceZone/2020-12-07/redis/post/application_json/";
11037+
11038+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
11039+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
11040+
11041+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
11042+
11043+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
11044+
11045+
final String[] localVarAccepts = {
11046+
"application/json"
11047+
};
11048+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
11049+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
11050+
11051+
final String[] localVarContentTypes = {
11052+
"text/plain"
11053+
};
11054+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
11055+
localVarHeaderParams.put("Content-Type", localVarContentType);
11056+
11057+
if(progressListener != null) {
11058+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
11059+
@Override
11060+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
11061+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
11062+
return originalResponse.newBuilder()
11063+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
11064+
.build();
11065+
}
11066+
});
11067+
}
11068+
11069+
String[] localVarAuthNames = new String[] { "volcengineSign" };
11070+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
11071+
}
11072+
11073+
@SuppressWarnings("rawtypes")
11074+
private com.squareup.okhttp.Call testFailoverDBInstanceZoneValidateBeforeCall(TestFailoverDBInstanceZoneRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
11075+
// verify the required parameter 'body' is set
11076+
if (body == null) {
11077+
throw new ApiException("Missing the required parameter 'body' when calling testFailoverDBInstanceZone(Async)");
11078+
}
11079+
11080+
com.squareup.okhttp.Call call = testFailoverDBInstanceZoneCall(body, progressListener, progressRequestListener);
11081+
return call;
11082+
11083+
11084+
11085+
11086+
11087+
}
11088+
11089+
/**
11090+
*
11091+
*
11092+
* @param body (required)
11093+
* @return TestFailoverDBInstanceZoneResponse
11094+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
11095+
*/
11096+
public TestFailoverDBInstanceZoneResponse testFailoverDBInstanceZone(TestFailoverDBInstanceZoneRequest body) throws ApiException {
11097+
ApiResponse<TestFailoverDBInstanceZoneResponse> resp = testFailoverDBInstanceZoneWithHttpInfo(body);
11098+
return resp.getData();
11099+
}
11100+
11101+
/**
11102+
*
11103+
*
11104+
* @param body (required)
11105+
* @return ApiResponse&lt;TestFailoverDBInstanceZoneResponse&gt;
11106+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
11107+
*/
11108+
public ApiResponse<TestFailoverDBInstanceZoneResponse> testFailoverDBInstanceZoneWithHttpInfo( @NotNull TestFailoverDBInstanceZoneRequest body) throws ApiException {
11109+
com.squareup.okhttp.Call call = testFailoverDBInstanceZoneValidateBeforeCall(body, null, null);
11110+
Type localVarReturnType = new TypeToken<TestFailoverDBInstanceZoneResponse>(){}.getType();
11111+
return apiClient.execute(call, localVarReturnType);
11112+
}
11113+
11114+
/**
11115+
* (asynchronously)
11116+
*
11117+
* @param body (required)
11118+
* @param callback The callback to be executed when the API call finishes
11119+
* @return The request call
11120+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
11121+
*/
11122+
public com.squareup.okhttp.Call testFailoverDBInstanceZoneAsync(TestFailoverDBInstanceZoneRequest body, final ApiCallback<TestFailoverDBInstanceZoneResponse> callback) throws ApiException {
11123+
11124+
ProgressResponseBody.ProgressListener progressListener = null;
11125+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
11126+
11127+
if (callback != null) {
11128+
progressListener = new ProgressResponseBody.ProgressListener() {
11129+
@Override
11130+
public void update(long bytesRead, long contentLength, boolean done) {
11131+
callback.onDownloadProgress(bytesRead, contentLength, done);
11132+
}
11133+
};
11134+
11135+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
11136+
@Override
11137+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
11138+
callback.onUploadProgress(bytesWritten, contentLength, done);
11139+
}
11140+
};
11141+
}
11142+
11143+
com.squareup.okhttp.Call call = testFailoverDBInstanceZoneValidateBeforeCall(body, progressListener, progressRequestListener);
11144+
Type localVarReturnType = new TypeToken<TestFailoverDBInstanceZoneResponse>(){}.getType();
11145+
apiClient.executeAsync(call, localVarReturnType, callback);
11146+
return call;
11147+
}
11148+
/**
11149+
* Build call for testShutDownDBInstanceNodes
11150+
* @param body (required)
11151+
* @param progressListener Progress listener
11152+
* @param progressRequestListener Progress request listener
11153+
* @return Call to execute
11154+
* @throws ApiException If fail to serialize the request body object
11155+
*/
11156+
public com.squareup.okhttp.Call testShutDownDBInstanceNodesCall(TestShutDownDBInstanceNodesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
11157+
Object localVarPostBody = body;
11158+
11159+
// create path and map variables
11160+
String localVarPath = "/TestShutDownDBInstanceNodes/2020-12-07/redis/post/application_json/";
11161+
11162+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
11163+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
11164+
11165+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
11166+
11167+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
11168+
11169+
final String[] localVarAccepts = {
11170+
"application/json"
11171+
};
11172+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
11173+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
11174+
11175+
final String[] localVarContentTypes = {
11176+
"text/plain"
11177+
};
11178+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
11179+
localVarHeaderParams.put("Content-Type", localVarContentType);
11180+
11181+
if(progressListener != null) {
11182+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
11183+
@Override
11184+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
11185+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
11186+
return originalResponse.newBuilder()
11187+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
11188+
.build();
11189+
}
11190+
});
11191+
}
11192+
11193+
String[] localVarAuthNames = new String[] { "volcengineSign" };
11194+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
11195+
}
11196+
11197+
@SuppressWarnings("rawtypes")
11198+
private com.squareup.okhttp.Call testShutDownDBInstanceNodesValidateBeforeCall(TestShutDownDBInstanceNodesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
11199+
// verify the required parameter 'body' is set
11200+
if (body == null) {
11201+
throw new ApiException("Missing the required parameter 'body' when calling testShutDownDBInstanceNodes(Async)");
11202+
}
11203+
11204+
com.squareup.okhttp.Call call = testShutDownDBInstanceNodesCall(body, progressListener, progressRequestListener);
11205+
return call;
11206+
11207+
11208+
11209+
11210+
11211+
}
11212+
11213+
/**
11214+
*
11215+
*
11216+
* @param body (required)
11217+
* @return TestShutDownDBInstanceNodesResponse
11218+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
11219+
*/
11220+
public TestShutDownDBInstanceNodesResponse testShutDownDBInstanceNodes(TestShutDownDBInstanceNodesRequest body) throws ApiException {
11221+
ApiResponse<TestShutDownDBInstanceNodesResponse> resp = testShutDownDBInstanceNodesWithHttpInfo(body);
11222+
return resp.getData();
11223+
}
11224+
11225+
/**
11226+
*
11227+
*
11228+
* @param body (required)
11229+
* @return ApiResponse&lt;TestShutDownDBInstanceNodesResponse&gt;
11230+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
11231+
*/
11232+
public ApiResponse<TestShutDownDBInstanceNodesResponse> testShutDownDBInstanceNodesWithHttpInfo( @NotNull TestShutDownDBInstanceNodesRequest body) throws ApiException {
11233+
com.squareup.okhttp.Call call = testShutDownDBInstanceNodesValidateBeforeCall(body, null, null);
11234+
Type localVarReturnType = new TypeToken<TestShutDownDBInstanceNodesResponse>(){}.getType();
11235+
return apiClient.execute(call, localVarReturnType);
11236+
}
11237+
11238+
/**
11239+
* (asynchronously)
11240+
*
11241+
* @param body (required)
11242+
* @param callback The callback to be executed when the API call finishes
11243+
* @return The request call
11244+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
11245+
*/
11246+
public com.squareup.okhttp.Call testShutDownDBInstanceNodesAsync(TestShutDownDBInstanceNodesRequest body, final ApiCallback<TestShutDownDBInstanceNodesResponse> callback) throws ApiException {
11247+
11248+
ProgressResponseBody.ProgressListener progressListener = null;
11249+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
11250+
11251+
if (callback != null) {
11252+
progressListener = new ProgressResponseBody.ProgressListener() {
11253+
@Override
11254+
public void update(long bytesRead, long contentLength, boolean done) {
11255+
callback.onDownloadProgress(bytesRead, contentLength, done);
11256+
}
11257+
};
11258+
11259+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
11260+
@Override
11261+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
11262+
callback.onUploadProgress(bytesWritten, contentLength, done);
11263+
}
11264+
};
11265+
}
11266+
11267+
com.squareup.okhttp.Call call = testShutDownDBInstanceNodesValidateBeforeCall(body, progressListener, progressRequestListener);
11268+
Type localVarReturnType = new TypeToken<TestShutDownDBInstanceNodesResponse>(){}.getType();
11269+
apiClient.executeAsync(call, localVarReturnType, callback);
11270+
return call;
11271+
}
1102011272
/**
1102111273
* Build call for upgradeAllowListVersion
1102211274
* @param body (required)

0 commit comments

Comments
 (0)