|
95 | 95 | import com.volcengine.alb.model.DescribeRulesResponse; |
96 | 96 | import com.volcengine.alb.model.DescribeServerGroupAttributesRequest; |
97 | 97 | import com.volcengine.alb.model.DescribeServerGroupAttributesResponse; |
| 98 | +import com.volcengine.alb.model.DescribeServerGroupBackendServersRequest; |
| 99 | +import com.volcengine.alb.model.DescribeServerGroupBackendServersResponse; |
98 | 100 | import com.volcengine.alb.model.DescribeServerGroupsRequest; |
99 | 101 | import com.volcengine.alb.model.DescribeServerGroupsResponse; |
100 | 102 | import com.volcengine.alb.model.DescribeZonesRequest; |
@@ -4395,6 +4397,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
4395 | 4397 | apiClient.executeAsync(call, localVarReturnType, callback); |
4396 | 4398 | return call; |
4397 | 4399 | } |
| 4400 | + /** |
| 4401 | + * Build call for describeServerGroupBackendServers |
| 4402 | + * @param body (required) |
| 4403 | + * @param progressListener Progress listener |
| 4404 | + * @param progressRequestListener Progress request listener |
| 4405 | + * @return Call to execute |
| 4406 | + * @throws ApiException If fail to serialize the request body object |
| 4407 | + */ |
| 4408 | + public com.squareup.okhttp.Call describeServerGroupBackendServersCall(DescribeServerGroupBackendServersRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4409 | + Object localVarPostBody = body; |
| 4410 | + |
| 4411 | + // create path and map variables |
| 4412 | + String localVarPath = "/DescribeServerGroupBackendServers/2020-04-01/alb/get/text_plain/"; |
| 4413 | + |
| 4414 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 4415 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 4416 | + |
| 4417 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 4418 | + |
| 4419 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 4420 | + |
| 4421 | + final String[] localVarAccepts = { |
| 4422 | + "application/json" |
| 4423 | + }; |
| 4424 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 4425 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 4426 | + |
| 4427 | + final String[] localVarContentTypes = { |
| 4428 | + "text/plain" |
| 4429 | + }; |
| 4430 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 4431 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 4432 | + |
| 4433 | + if(progressListener != null) { |
| 4434 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 4435 | + @Override |
| 4436 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 4437 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 4438 | + return originalResponse.newBuilder() |
| 4439 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 4440 | + .build(); |
| 4441 | + } |
| 4442 | + }); |
| 4443 | + } |
| 4444 | + |
| 4445 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 4446 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 4447 | + } |
| 4448 | + |
| 4449 | + @SuppressWarnings("rawtypes") |
| 4450 | + private com.squareup.okhttp.Call describeServerGroupBackendServersValidateBeforeCall(DescribeServerGroupBackendServersRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4451 | + // verify the required parameter 'body' is set |
| 4452 | + if (body == null) { |
| 4453 | + throw new ApiException("Missing the required parameter 'body' when calling describeServerGroupBackendServers(Async)"); |
| 4454 | + } |
| 4455 | + |
| 4456 | + com.squareup.okhttp.Call call = describeServerGroupBackendServersCall(body, progressListener, progressRequestListener); |
| 4457 | + return call; |
| 4458 | + |
| 4459 | + |
| 4460 | + |
| 4461 | + |
| 4462 | + |
| 4463 | + } |
| 4464 | + |
| 4465 | + /** |
| 4466 | + * |
| 4467 | + * |
| 4468 | + * @param body (required) |
| 4469 | + * @return DescribeServerGroupBackendServersResponse |
| 4470 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4471 | + */ |
| 4472 | + public DescribeServerGroupBackendServersResponse describeServerGroupBackendServers(DescribeServerGroupBackendServersRequest body) throws ApiException { |
| 4473 | + ApiResponse<DescribeServerGroupBackendServersResponse> resp = describeServerGroupBackendServersWithHttpInfo(body); |
| 4474 | + return resp.getData(); |
| 4475 | + } |
| 4476 | + |
| 4477 | + /** |
| 4478 | + * |
| 4479 | + * |
| 4480 | + * @param body (required) |
| 4481 | + * @return ApiResponse<DescribeServerGroupBackendServersResponse> |
| 4482 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4483 | + */ |
| 4484 | + public ApiResponse<DescribeServerGroupBackendServersResponse> describeServerGroupBackendServersWithHttpInfo( @NotNull DescribeServerGroupBackendServersRequest body) throws ApiException { |
| 4485 | + com.squareup.okhttp.Call call = describeServerGroupBackendServersValidateBeforeCall(body, null, null); |
| 4486 | + Type localVarReturnType = new TypeToken<DescribeServerGroupBackendServersResponse>(){}.getType(); |
| 4487 | + return apiClient.execute(call, localVarReturnType); |
| 4488 | + } |
| 4489 | + |
| 4490 | + /** |
| 4491 | + * (asynchronously) |
| 4492 | + * |
| 4493 | + * @param body (required) |
| 4494 | + * @param callback The callback to be executed when the API call finishes |
| 4495 | + * @return The request call |
| 4496 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 4497 | + */ |
| 4498 | + public com.squareup.okhttp.Call describeServerGroupBackendServersAsync(DescribeServerGroupBackendServersRequest body, final ApiCallback<DescribeServerGroupBackendServersResponse> callback) throws ApiException { |
| 4499 | + |
| 4500 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 4501 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 4502 | + |
| 4503 | + if (callback != null) { |
| 4504 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 4505 | + @Override |
| 4506 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 4507 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 4508 | + } |
| 4509 | + }; |
| 4510 | + |
| 4511 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 4512 | + @Override |
| 4513 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 4514 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 4515 | + } |
| 4516 | + }; |
| 4517 | + } |
| 4518 | + |
| 4519 | + com.squareup.okhttp.Call call = describeServerGroupBackendServersValidateBeforeCall(body, progressListener, progressRequestListener); |
| 4520 | + Type localVarReturnType = new TypeToken<DescribeServerGroupBackendServersResponse>(){}.getType(); |
| 4521 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 4522 | + return call; |
| 4523 | + } |
4398 | 4524 | /** |
4399 | 4525 | * Build call for describeServerGroups |
4400 | 4526 | * @param body (required) |
|
0 commit comments