|
91 | 91 | import com.volcengine.alb.model.DescribeServerGroupAttributesResponse; |
92 | 92 | import com.volcengine.alb.model.DescribeServerGroupsRequest; |
93 | 93 | import com.volcengine.alb.model.DescribeServerGroupsResponse; |
| 94 | +import com.volcengine.alb.model.DescribeZonesRequest; |
| 95 | +import com.volcengine.alb.model.DescribeZonesResponse; |
94 | 96 | import com.volcengine.alb.model.DisableAccessLogRequest; |
95 | 97 | import com.volcengine.alb.model.DisableAccessLogResponse; |
96 | 98 | import com.volcengine.alb.model.DisableHealthLogRequest; |
@@ -4117,6 +4119,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
4117 | 4119 | apiClient.executeAsync(call, localVarReturnType, callback); |
4118 | 4120 | return call; |
4119 | 4121 | } |
| 4122 | + /** |
| 4123 | + * Build call for describeZones |
| 4124 | + * @param body (required) |
| 4125 | + * @param progressListener Progress listener |
| 4126 | + * @param progressRequestListener Progress request listener |
| 4127 | + * @return Call to execute |
| 4128 | + * @throws ApiException If fail to serialize the request body object |
| 4129 | + */ |
| 4130 | + public com.squareup.okhttp.Call describeZonesCall(DescribeZonesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4131 | + Object localVarPostBody = body; |
| 4132 | + |
| 4133 | + // create path and map variables |
| 4134 | + String localVarPath = "/DescribeZones/2020-04-01/alb/get/"; |
| 4135 | + |
| 4136 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 4137 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 4138 | + |
| 4139 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 4140 | + |
| 4141 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 4142 | + |
| 4143 | + final String[] localVarAccepts = { |
| 4144 | + "application/json" |
| 4145 | + }; |
| 4146 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 4147 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 4148 | + |
| 4149 | + final String[] localVarContentTypes = { |
| 4150 | + "text/plain" |
| 4151 | + }; |
| 4152 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 4153 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 4154 | + |
| 4155 | + if(progressListener != null) { |
| 4156 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 4157 | + @Override |
| 4158 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 4159 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 4160 | + return originalResponse.newBuilder() |
| 4161 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 4162 | + .build(); |
| 4163 | + } |
| 4164 | + }); |
| 4165 | + } |
| 4166 | + |
| 4167 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 4168 | + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 4169 | + } |
| 4170 | + |
| 4171 | + @SuppressWarnings("rawtypes") |
| 4172 | + private com.squareup.okhttp.Call describeZonesValidateBeforeCall(DescribeZonesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4173 | + // verify the required parameter 'body' is set |
| 4174 | + if (body == null) { |
| 4175 | + throw new ApiException("Missing the required parameter 'body' when calling describeZones(Async)"); |
| 4176 | + } |
| 4177 | + |
| 4178 | + com.squareup.okhttp.Call call = describeZonesCall(body, progressListener, progressRequestListener); |
| 4179 | + return call; |
| 4180 | + |
| 4181 | + |
| 4182 | + |
| 4183 | + |
| 4184 | + |
| 4185 | + } |
| 4186 | + |
| 4187 | + /** |
| 4188 | + * |
| 4189 | + * |
| 4190 | + * @param body (required) |
| 4191 | + * @return DescribeZonesResponse |
| 4192 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4193 | + */ |
| 4194 | + public DescribeZonesResponse describeZones(DescribeZonesRequest body) throws ApiException { |
| 4195 | + ApiResponse<DescribeZonesResponse> resp = describeZonesWithHttpInfo(body); |
| 4196 | + return resp.getData(); |
| 4197 | + } |
| 4198 | + |
| 4199 | + /** |
| 4200 | + * |
| 4201 | + * |
| 4202 | + * @param body (required) |
| 4203 | + * @return ApiResponse<DescribeZonesResponse> |
| 4204 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4205 | + */ |
| 4206 | + public ApiResponse<DescribeZonesResponse> describeZonesWithHttpInfo( @NotNull DescribeZonesRequest body) throws ApiException { |
| 4207 | + com.squareup.okhttp.Call call = describeZonesValidateBeforeCall(body, null, null); |
| 4208 | + Type localVarReturnType = new TypeToken<DescribeZonesResponse>(){}.getType(); |
| 4209 | + return apiClient.execute(call, localVarReturnType); |
| 4210 | + } |
| 4211 | + |
| 4212 | + /** |
| 4213 | + * (asynchronously) |
| 4214 | + * |
| 4215 | + * @param body (required) |
| 4216 | + * @param callback The callback to be executed when the API call finishes |
| 4217 | + * @return The request call |
| 4218 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 4219 | + */ |
| 4220 | + public com.squareup.okhttp.Call describeZonesAsync(DescribeZonesRequest body, final ApiCallback<DescribeZonesResponse> callback) throws ApiException { |
| 4221 | + |
| 4222 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 4223 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 4224 | + |
| 4225 | + if (callback != null) { |
| 4226 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 4227 | + @Override |
| 4228 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 4229 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 4230 | + } |
| 4231 | + }; |
| 4232 | + |
| 4233 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 4234 | + @Override |
| 4235 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 4236 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 4237 | + } |
| 4238 | + }; |
| 4239 | + } |
| 4240 | + |
| 4241 | + com.squareup.okhttp.Call call = describeZonesValidateBeforeCall(body, progressListener, progressRequestListener); |
| 4242 | + Type localVarReturnType = new TypeToken<DescribeZonesResponse>(){}.getType(); |
| 4243 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 4244 | + return call; |
| 4245 | + } |
4120 | 4246 | /** |
4121 | 4247 | * Build call for disableAccessLog |
4122 | 4248 | * @param body (required) |
|
0 commit comments