|
153 | 153 | import com.volcengine.clb.model.ModifyLoadBalancerAttributesResponse; |
154 | 154 | import com.volcengine.clb.model.ModifyNLBBackendServersAttributesRequest; |
155 | 155 | import com.volcengine.clb.model.ModifyNLBBackendServersAttributesResponse; |
| 156 | +import com.volcengine.clb.model.ModifyNLBListenerAdditionalCertificatesRequest; |
| 157 | +import com.volcengine.clb.model.ModifyNLBListenerAdditionalCertificatesResponse; |
156 | 158 | import com.volcengine.clb.model.ModifyNLBListenerAttributesRequest; |
157 | 159 | import com.volcengine.clb.model.ModifyNLBListenerAttributesResponse; |
158 | 160 | import com.volcengine.clb.model.ModifyNLBSecurityPolicyAttributesRequest; |
@@ -8031,6 +8033,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
8031 | 8033 | apiClient.executeAsync(call, localVarReturnType, callback); |
8032 | 8034 | return call; |
8033 | 8035 | } |
| 8036 | + /** |
| 8037 | + * Build call for modifyNLBListenerAdditionalCertificates |
| 8038 | + * @param body (required) |
| 8039 | + * @param progressListener Progress listener |
| 8040 | + * @param progressRequestListener Progress request listener |
| 8041 | + * @return Call to execute |
| 8042 | + * @throws ApiException If fail to serialize the request body object |
| 8043 | + */ |
| 8044 | + public com.squareup.okhttp.Call modifyNLBListenerAdditionalCertificatesCall(ModifyNLBListenerAdditionalCertificatesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 8045 | + Object localVarPostBody = body; |
| 8046 | + |
| 8047 | + // create path and map variables |
| 8048 | + String localVarPath = "/ModifyNLBListenerAdditionalCertificates/2020-04-01/clb/get/text_plain/"; |
| 8049 | + |
| 8050 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 8051 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 8052 | + |
| 8053 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 8054 | + |
| 8055 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 8056 | + |
| 8057 | + final String[] localVarAccepts = { |
| 8058 | + "application/json" |
| 8059 | + }; |
| 8060 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 8061 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 8062 | + |
| 8063 | + final String[] localVarContentTypes = { |
| 8064 | + "text/plain" |
| 8065 | + }; |
| 8066 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 8067 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 8068 | + |
| 8069 | + if(progressListener != null) { |
| 8070 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 8071 | + @Override |
| 8072 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 8073 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 8074 | + return originalResponse.newBuilder() |
| 8075 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 8076 | + .build(); |
| 8077 | + } |
| 8078 | + }); |
| 8079 | + } |
| 8080 | + |
| 8081 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 8082 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 8083 | + } |
| 8084 | + |
| 8085 | + @SuppressWarnings("rawtypes") |
| 8086 | + private com.squareup.okhttp.Call modifyNLBListenerAdditionalCertificatesValidateBeforeCall(ModifyNLBListenerAdditionalCertificatesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 8087 | + // verify the required parameter 'body' is set |
| 8088 | + if (body == null) { |
| 8089 | + throw new ApiException("Missing the required parameter 'body' when calling modifyNLBListenerAdditionalCertificates(Async)"); |
| 8090 | + } |
| 8091 | + |
| 8092 | + com.squareup.okhttp.Call call = modifyNLBListenerAdditionalCertificatesCall(body, progressListener, progressRequestListener); |
| 8093 | + return call; |
| 8094 | + |
| 8095 | + |
| 8096 | + |
| 8097 | + |
| 8098 | + |
| 8099 | + } |
| 8100 | + |
| 8101 | + /** |
| 8102 | + * |
| 8103 | + * |
| 8104 | + * @param body (required) |
| 8105 | + * @return ModifyNLBListenerAdditionalCertificatesResponse |
| 8106 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 8107 | + */ |
| 8108 | + public ModifyNLBListenerAdditionalCertificatesResponse modifyNLBListenerAdditionalCertificates(ModifyNLBListenerAdditionalCertificatesRequest body) throws ApiException { |
| 8109 | + ApiResponse<ModifyNLBListenerAdditionalCertificatesResponse> resp = modifyNLBListenerAdditionalCertificatesWithHttpInfo(body); |
| 8110 | + return resp.getData(); |
| 8111 | + } |
| 8112 | + |
| 8113 | + /** |
| 8114 | + * |
| 8115 | + * |
| 8116 | + * @param body (required) |
| 8117 | + * @return ApiResponse<ModifyNLBListenerAdditionalCertificatesResponse> |
| 8118 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 8119 | + */ |
| 8120 | + public ApiResponse<ModifyNLBListenerAdditionalCertificatesResponse> modifyNLBListenerAdditionalCertificatesWithHttpInfo( @NotNull ModifyNLBListenerAdditionalCertificatesRequest body) throws ApiException { |
| 8121 | + com.squareup.okhttp.Call call = modifyNLBListenerAdditionalCertificatesValidateBeforeCall(body, null, null); |
| 8122 | + Type localVarReturnType = new TypeToken<ModifyNLBListenerAdditionalCertificatesResponse>(){}.getType(); |
| 8123 | + return apiClient.execute(call, localVarReturnType); |
| 8124 | + } |
| 8125 | + |
| 8126 | + /** |
| 8127 | + * (asynchronously) |
| 8128 | + * |
| 8129 | + * @param body (required) |
| 8130 | + * @param callback The callback to be executed when the API call finishes |
| 8131 | + * @return The request call |
| 8132 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 8133 | + */ |
| 8134 | + public com.squareup.okhttp.Call modifyNLBListenerAdditionalCertificatesAsync(ModifyNLBListenerAdditionalCertificatesRequest body, final ApiCallback<ModifyNLBListenerAdditionalCertificatesResponse> callback) throws ApiException { |
| 8135 | + |
| 8136 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 8137 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 8138 | + |
| 8139 | + if (callback != null) { |
| 8140 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 8141 | + @Override |
| 8142 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 8143 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 8144 | + } |
| 8145 | + }; |
| 8146 | + |
| 8147 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 8148 | + @Override |
| 8149 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 8150 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 8151 | + } |
| 8152 | + }; |
| 8153 | + } |
| 8154 | + |
| 8155 | + com.squareup.okhttp.Call call = modifyNLBListenerAdditionalCertificatesValidateBeforeCall(body, progressListener, progressRequestListener); |
| 8156 | + Type localVarReturnType = new TypeToken<ModifyNLBListenerAdditionalCertificatesResponse>(){}.getType(); |
| 8157 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 8158 | + return call; |
| 8159 | + } |
8034 | 8160 | /** |
8035 | 8161 | * Build call for modifyNLBListenerAttributes |
8036 | 8162 | * @param body (required) |
|
0 commit comments