|
99 | 99 | import com.volcengine.clb.model.DescribeLoadBalancerAttributesResponse; |
100 | 100 | import com.volcengine.clb.model.DescribeLoadBalancerSpecsRequest; |
101 | 101 | import com.volcengine.clb.model.DescribeLoadBalancerSpecsResponse; |
| 102 | +import com.volcengine.clb.model.DescribeLoadBalancerStatusRequest; |
| 103 | +import com.volcengine.clb.model.DescribeLoadBalancerStatusResponse; |
102 | 104 | import com.volcengine.clb.model.DescribeLoadBalancersBillingRequest; |
103 | 105 | import com.volcengine.clb.model.DescribeLoadBalancersBillingResponse; |
104 | 106 | import com.volcengine.clb.model.DescribeLoadBalancersRequest; |
@@ -4689,6 +4691,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
4689 | 4691 | apiClient.executeAsync(call, localVarReturnType, callback); |
4690 | 4692 | return call; |
4691 | 4693 | } |
| 4694 | + /** |
| 4695 | + * Build call for describeLoadBalancerStatus |
| 4696 | + * @param body (required) |
| 4697 | + * @param progressListener Progress listener |
| 4698 | + * @param progressRequestListener Progress request listener |
| 4699 | + * @return Call to execute |
| 4700 | + * @throws ApiException If fail to serialize the request body object |
| 4701 | + */ |
| 4702 | + public com.squareup.okhttp.Call describeLoadBalancerStatusCall(DescribeLoadBalancerStatusRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4703 | + Object localVarPostBody = body; |
| 4704 | + |
| 4705 | + // create path and map variables |
| 4706 | + String localVarPath = "/DescribeLoadBalancerStatus/2020-04-01/clb/get/text_plain/"; |
| 4707 | + |
| 4708 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 4709 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 4710 | + |
| 4711 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 4712 | + |
| 4713 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 4714 | + |
| 4715 | + final String[] localVarAccepts = { |
| 4716 | + "application/json" |
| 4717 | + }; |
| 4718 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 4719 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 4720 | + |
| 4721 | + final String[] localVarContentTypes = { |
| 4722 | + "text/plain" |
| 4723 | + }; |
| 4724 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 4725 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 4726 | + |
| 4727 | + if(progressListener != null) { |
| 4728 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 4729 | + @Override |
| 4730 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 4731 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 4732 | + return originalResponse.newBuilder() |
| 4733 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 4734 | + .build(); |
| 4735 | + } |
| 4736 | + }); |
| 4737 | + } |
| 4738 | + |
| 4739 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 4740 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 4741 | + } |
| 4742 | + |
| 4743 | + @SuppressWarnings("rawtypes") |
| 4744 | + private com.squareup.okhttp.Call describeLoadBalancerStatusValidateBeforeCall(DescribeLoadBalancerStatusRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4745 | + // verify the required parameter 'body' is set |
| 4746 | + if (body == null) { |
| 4747 | + throw new ApiException("Missing the required parameter 'body' when calling describeLoadBalancerStatus(Async)"); |
| 4748 | + } |
| 4749 | + |
| 4750 | + com.squareup.okhttp.Call call = describeLoadBalancerStatusCall(body, progressListener, progressRequestListener); |
| 4751 | + return call; |
| 4752 | + |
| 4753 | + |
| 4754 | + |
| 4755 | + |
| 4756 | + |
| 4757 | + } |
| 4758 | + |
| 4759 | + /** |
| 4760 | + * |
| 4761 | + * |
| 4762 | + * @param body (required) |
| 4763 | + * @return DescribeLoadBalancerStatusResponse |
| 4764 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4765 | + */ |
| 4766 | + public DescribeLoadBalancerStatusResponse describeLoadBalancerStatus(DescribeLoadBalancerStatusRequest body) throws ApiException { |
| 4767 | + ApiResponse<DescribeLoadBalancerStatusResponse> resp = describeLoadBalancerStatusWithHttpInfo(body); |
| 4768 | + return resp.getData(); |
| 4769 | + } |
| 4770 | + |
| 4771 | + /** |
| 4772 | + * |
| 4773 | + * |
| 4774 | + * @param body (required) |
| 4775 | + * @return ApiResponse<DescribeLoadBalancerStatusResponse> |
| 4776 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4777 | + */ |
| 4778 | + public ApiResponse<DescribeLoadBalancerStatusResponse> describeLoadBalancerStatusWithHttpInfo( @NotNull DescribeLoadBalancerStatusRequest body) throws ApiException { |
| 4779 | + com.squareup.okhttp.Call call = describeLoadBalancerStatusValidateBeforeCall(body, null, null); |
| 4780 | + Type localVarReturnType = new TypeToken<DescribeLoadBalancerStatusResponse>(){}.getType(); |
| 4781 | + return apiClient.execute(call, localVarReturnType); |
| 4782 | + } |
| 4783 | + |
| 4784 | + /** |
| 4785 | + * (asynchronously) |
| 4786 | + * |
| 4787 | + * @param body (required) |
| 4788 | + * @param callback The callback to be executed when the API call finishes |
| 4789 | + * @return The request call |
| 4790 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 4791 | + */ |
| 4792 | + public com.squareup.okhttp.Call describeLoadBalancerStatusAsync(DescribeLoadBalancerStatusRequest body, final ApiCallback<DescribeLoadBalancerStatusResponse> callback) throws ApiException { |
| 4793 | + |
| 4794 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 4795 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 4796 | + |
| 4797 | + if (callback != null) { |
| 4798 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 4799 | + @Override |
| 4800 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 4801 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 4802 | + } |
| 4803 | + }; |
| 4804 | + |
| 4805 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 4806 | + @Override |
| 4807 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 4808 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 4809 | + } |
| 4810 | + }; |
| 4811 | + } |
| 4812 | + |
| 4813 | + com.squareup.okhttp.Call call = describeLoadBalancerStatusValidateBeforeCall(body, progressListener, progressRequestListener); |
| 4814 | + Type localVarReturnType = new TypeToken<DescribeLoadBalancerStatusResponse>(){}.getType(); |
| 4815 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 4816 | + return call; |
| 4817 | + } |
4692 | 4818 | /** |
4693 | 4819 | * Build call for describeLoadBalancers |
4694 | 4820 | * @param body (required) |
|
0 commit comments