|
89 | 89 | import com.volcengine.waf.model.DeleteVulWhiteFieldResponse; |
90 | 90 | import com.volcengine.waf.model.DeleteWafServiceCertificateRequest; |
91 | 91 | import com.volcengine.waf.model.DeleteWafServiceCertificateResponse; |
| 92 | +import com.volcengine.waf.model.GetDomainInfoRequest; |
| 93 | +import com.volcengine.waf.model.GetDomainInfoResponse; |
| 94 | +import com.volcengine.waf.model.GetInstanceCtlRequest; |
| 95 | +import com.volcengine.waf.model.GetInstanceCtlResponse; |
92 | 96 | import com.volcengine.waf.model.GetReqQPSAnalysisRequest; |
93 | 97 | import com.volcengine.waf.model.GetReqQPSAnalysisResponse; |
94 | 98 | import com.volcengine.waf.model.GetTLSConfigRequest; |
@@ -4065,6 +4069,254 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
4065 | 4069 | apiClient.executeAsync(call, localVarReturnType, callback); |
4066 | 4070 | return call; |
4067 | 4071 | } |
| 4072 | + /** |
| 4073 | + * Build call for getDomainInfo |
| 4074 | + * @param body (required) |
| 4075 | + * @param progressListener Progress listener |
| 4076 | + * @param progressRequestListener Progress request listener |
| 4077 | + * @return Call to execute |
| 4078 | + * @throws ApiException If fail to serialize the request body object |
| 4079 | + */ |
| 4080 | + public com.squareup.okhttp.Call getDomainInfoCall(GetDomainInfoRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4081 | + Object localVarPostBody = body; |
| 4082 | + |
| 4083 | + // create path and map variables |
| 4084 | + String localVarPath = "/GetDomainInfo/2023-12-25/waf/post/application_json/"; |
| 4085 | + |
| 4086 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 4087 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 4088 | + |
| 4089 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 4090 | + |
| 4091 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 4092 | + |
| 4093 | + final String[] localVarAccepts = { |
| 4094 | + "application/json" |
| 4095 | + }; |
| 4096 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 4097 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 4098 | + |
| 4099 | + final String[] localVarContentTypes = { |
| 4100 | + "text/plain" |
| 4101 | + }; |
| 4102 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 4103 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 4104 | + |
| 4105 | + if(progressListener != null) { |
| 4106 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 4107 | + @Override |
| 4108 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 4109 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 4110 | + return originalResponse.newBuilder() |
| 4111 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 4112 | + .build(); |
| 4113 | + } |
| 4114 | + }); |
| 4115 | + } |
| 4116 | + |
| 4117 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 4118 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 4119 | + } |
| 4120 | + |
| 4121 | + @SuppressWarnings("rawtypes") |
| 4122 | + private com.squareup.okhttp.Call getDomainInfoValidateBeforeCall(GetDomainInfoRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4123 | + // verify the required parameter 'body' is set |
| 4124 | + if (body == null) { |
| 4125 | + throw new ApiException("Missing the required parameter 'body' when calling getDomainInfo(Async)"); |
| 4126 | + } |
| 4127 | + |
| 4128 | + com.squareup.okhttp.Call call = getDomainInfoCall(body, progressListener, progressRequestListener); |
| 4129 | + return call; |
| 4130 | + |
| 4131 | + |
| 4132 | + |
| 4133 | + |
| 4134 | + |
| 4135 | + } |
| 4136 | + |
| 4137 | + /** |
| 4138 | + * |
| 4139 | + * |
| 4140 | + * @param body (required) |
| 4141 | + * @return GetDomainInfoResponse |
| 4142 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4143 | + */ |
| 4144 | + public GetDomainInfoResponse getDomainInfo(GetDomainInfoRequest body) throws ApiException { |
| 4145 | + ApiResponse<GetDomainInfoResponse> resp = getDomainInfoWithHttpInfo(body); |
| 4146 | + return resp.getData(); |
| 4147 | + } |
| 4148 | + |
| 4149 | + /** |
| 4150 | + * |
| 4151 | + * |
| 4152 | + * @param body (required) |
| 4153 | + * @return ApiResponse<GetDomainInfoResponse> |
| 4154 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4155 | + */ |
| 4156 | + public ApiResponse<GetDomainInfoResponse> getDomainInfoWithHttpInfo( @NotNull GetDomainInfoRequest body) throws ApiException { |
| 4157 | + com.squareup.okhttp.Call call = getDomainInfoValidateBeforeCall(body, null, null); |
| 4158 | + Type localVarReturnType = new TypeToken<GetDomainInfoResponse>(){}.getType(); |
| 4159 | + return apiClient.execute(call, localVarReturnType); |
| 4160 | + } |
| 4161 | + |
| 4162 | + /** |
| 4163 | + * (asynchronously) |
| 4164 | + * |
| 4165 | + * @param body (required) |
| 4166 | + * @param callback The callback to be executed when the API call finishes |
| 4167 | + * @return The request call |
| 4168 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 4169 | + */ |
| 4170 | + public com.squareup.okhttp.Call getDomainInfoAsync(GetDomainInfoRequest body, final ApiCallback<GetDomainInfoResponse> callback) throws ApiException { |
| 4171 | + |
| 4172 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 4173 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 4174 | + |
| 4175 | + if (callback != null) { |
| 4176 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 4177 | + @Override |
| 4178 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 4179 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 4180 | + } |
| 4181 | + }; |
| 4182 | + |
| 4183 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 4184 | + @Override |
| 4185 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 4186 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 4187 | + } |
| 4188 | + }; |
| 4189 | + } |
| 4190 | + |
| 4191 | + com.squareup.okhttp.Call call = getDomainInfoValidateBeforeCall(body, progressListener, progressRequestListener); |
| 4192 | + Type localVarReturnType = new TypeToken<GetDomainInfoResponse>(){}.getType(); |
| 4193 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 4194 | + return call; |
| 4195 | + } |
| 4196 | + /** |
| 4197 | + * Build call for getInstanceCtl |
| 4198 | + * @param body (required) |
| 4199 | + * @param progressListener Progress listener |
| 4200 | + * @param progressRequestListener Progress request listener |
| 4201 | + * @return Call to execute |
| 4202 | + * @throws ApiException If fail to serialize the request body object |
| 4203 | + */ |
| 4204 | + public com.squareup.okhttp.Call getInstanceCtlCall(GetInstanceCtlRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4205 | + Object localVarPostBody = body; |
| 4206 | + |
| 4207 | + // create path and map variables |
| 4208 | + String localVarPath = "/GetInstanceCtl/2023-12-25/waf/post/application_json/"; |
| 4209 | + |
| 4210 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 4211 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 4212 | + |
| 4213 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 4214 | + |
| 4215 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 4216 | + |
| 4217 | + final String[] localVarAccepts = { |
| 4218 | + "application/json" |
| 4219 | + }; |
| 4220 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 4221 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 4222 | + |
| 4223 | + final String[] localVarContentTypes = { |
| 4224 | + "text/plain" |
| 4225 | + }; |
| 4226 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 4227 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 4228 | + |
| 4229 | + if(progressListener != null) { |
| 4230 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 4231 | + @Override |
| 4232 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 4233 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 4234 | + return originalResponse.newBuilder() |
| 4235 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 4236 | + .build(); |
| 4237 | + } |
| 4238 | + }); |
| 4239 | + } |
| 4240 | + |
| 4241 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 4242 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 4243 | + } |
| 4244 | + |
| 4245 | + @SuppressWarnings("rawtypes") |
| 4246 | + private com.squareup.okhttp.Call getInstanceCtlValidateBeforeCall(GetInstanceCtlRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4247 | + // verify the required parameter 'body' is set |
| 4248 | + if (body == null) { |
| 4249 | + throw new ApiException("Missing the required parameter 'body' when calling getInstanceCtl(Async)"); |
| 4250 | + } |
| 4251 | + |
| 4252 | + com.squareup.okhttp.Call call = getInstanceCtlCall(body, progressListener, progressRequestListener); |
| 4253 | + return call; |
| 4254 | + |
| 4255 | + |
| 4256 | + |
| 4257 | + |
| 4258 | + |
| 4259 | + } |
| 4260 | + |
| 4261 | + /** |
| 4262 | + * |
| 4263 | + * |
| 4264 | + * @param body (required) |
| 4265 | + * @return GetInstanceCtlResponse |
| 4266 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4267 | + */ |
| 4268 | + public GetInstanceCtlResponse getInstanceCtl(GetInstanceCtlRequest body) throws ApiException { |
| 4269 | + ApiResponse<GetInstanceCtlResponse> resp = getInstanceCtlWithHttpInfo(body); |
| 4270 | + return resp.getData(); |
| 4271 | + } |
| 4272 | + |
| 4273 | + /** |
| 4274 | + * |
| 4275 | + * |
| 4276 | + * @param body (required) |
| 4277 | + * @return ApiResponse<GetInstanceCtlResponse> |
| 4278 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4279 | + */ |
| 4280 | + public ApiResponse<GetInstanceCtlResponse> getInstanceCtlWithHttpInfo( @NotNull GetInstanceCtlRequest body) throws ApiException { |
| 4281 | + com.squareup.okhttp.Call call = getInstanceCtlValidateBeforeCall(body, null, null); |
| 4282 | + Type localVarReturnType = new TypeToken<GetInstanceCtlResponse>(){}.getType(); |
| 4283 | + return apiClient.execute(call, localVarReturnType); |
| 4284 | + } |
| 4285 | + |
| 4286 | + /** |
| 4287 | + * (asynchronously) |
| 4288 | + * |
| 4289 | + * @param body (required) |
| 4290 | + * @param callback The callback to be executed when the API call finishes |
| 4291 | + * @return The request call |
| 4292 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 4293 | + */ |
| 4294 | + public com.squareup.okhttp.Call getInstanceCtlAsync(GetInstanceCtlRequest body, final ApiCallback<GetInstanceCtlResponse> callback) throws ApiException { |
| 4295 | + |
| 4296 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 4297 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 4298 | + |
| 4299 | + if (callback != null) { |
| 4300 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 4301 | + @Override |
| 4302 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 4303 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 4304 | + } |
| 4305 | + }; |
| 4306 | + |
| 4307 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 4308 | + @Override |
| 4309 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 4310 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 4311 | + } |
| 4312 | + }; |
| 4313 | + } |
| 4314 | + |
| 4315 | + com.squareup.okhttp.Call call = getInstanceCtlValidateBeforeCall(body, progressListener, progressRequestListener); |
| 4316 | + Type localVarReturnType = new TypeToken<GetInstanceCtlResponse>(){}.getType(); |
| 4317 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 4318 | + return call; |
| 4319 | + } |
4068 | 4320 | /** |
4069 | 4321 | * Build call for getReqQPSAnalysis |
4070 | 4322 | * @param body (required) |
|
0 commit comments