|
71 | 71 | import com.volcengine.waf.model.DeleteCustomPageResponse; |
72 | 72 | import com.volcengine.waf.model.DeleteDomainRequest; |
73 | 73 | import com.volcengine.waf.model.DeleteDomainResponse; |
| 74 | +import com.volcengine.waf.model.DeleteHostGroupRequest; |
| 75 | +import com.volcengine.waf.model.DeleteHostGroupResponse; |
74 | 76 | import com.volcengine.waf.model.DeleteIpGroupRequest; |
75 | 77 | import com.volcengine.waf.model.DeleteIpGroupResponse; |
76 | 78 | import com.volcengine.waf.model.DeleteProhibitionBlackRequest; |
|
165 | 167 | import com.volcengine.waf.model.UpdateCustomSystemVulRuleResponse; |
166 | 168 | import com.volcengine.waf.model.UpdateDomainRequest; |
167 | 169 | import com.volcengine.waf.model.UpdateDomainResponse; |
| 170 | +import com.volcengine.waf.model.UpdateHostGroupRequest; |
| 171 | +import com.volcengine.waf.model.UpdateHostGroupResponse; |
168 | 172 | import com.volcengine.waf.model.UpdateInstanceCtlRequest; |
169 | 173 | import com.volcengine.waf.model.UpdateInstanceCtlResponse; |
170 | 174 | import com.volcengine.waf.model.UpdateIpGroupRequest; |
@@ -2933,6 +2937,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
2933 | 2937 | apiClient.executeAsync(call, localVarReturnType, callback); |
2934 | 2938 | return call; |
2935 | 2939 | } |
| 2940 | + /** |
| 2941 | + * Build call for deleteHostGroup |
| 2942 | + * @param body (required) |
| 2943 | + * @param progressListener Progress listener |
| 2944 | + * @param progressRequestListener Progress request listener |
| 2945 | + * @return Call to execute |
| 2946 | + * @throws ApiException If fail to serialize the request body object |
| 2947 | + */ |
| 2948 | + public com.squareup.okhttp.Call deleteHostGroupCall(DeleteHostGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 2949 | + Object localVarPostBody = body; |
| 2950 | + |
| 2951 | + // create path and map variables |
| 2952 | + String localVarPath = "/DeleteHostGroup/2023-12-25/waf/post/application_json/"; |
| 2953 | + |
| 2954 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 2955 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 2956 | + |
| 2957 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 2958 | + |
| 2959 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 2960 | + |
| 2961 | + final String[] localVarAccepts = { |
| 2962 | + "application/json" |
| 2963 | + }; |
| 2964 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 2965 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 2966 | + |
| 2967 | + final String[] localVarContentTypes = { |
| 2968 | + "text/plain" |
| 2969 | + }; |
| 2970 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 2971 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 2972 | + |
| 2973 | + if(progressListener != null) { |
| 2974 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 2975 | + @Override |
| 2976 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 2977 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 2978 | + return originalResponse.newBuilder() |
| 2979 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 2980 | + .build(); |
| 2981 | + } |
| 2982 | + }); |
| 2983 | + } |
| 2984 | + |
| 2985 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 2986 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 2987 | + } |
| 2988 | + |
| 2989 | + @SuppressWarnings("rawtypes") |
| 2990 | + private com.squareup.okhttp.Call deleteHostGroupValidateBeforeCall(DeleteHostGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 2991 | + // verify the required parameter 'body' is set |
| 2992 | + if (body == null) { |
| 2993 | + throw new ApiException("Missing the required parameter 'body' when calling deleteHostGroup(Async)"); |
| 2994 | + } |
| 2995 | + |
| 2996 | + com.squareup.okhttp.Call call = deleteHostGroupCall(body, progressListener, progressRequestListener); |
| 2997 | + return call; |
| 2998 | + |
| 2999 | + |
| 3000 | + |
| 3001 | + |
| 3002 | + |
| 3003 | + } |
| 3004 | + |
| 3005 | + /** |
| 3006 | + * |
| 3007 | + * |
| 3008 | + * @param body (required) |
| 3009 | + * @return DeleteHostGroupResponse |
| 3010 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 3011 | + */ |
| 3012 | + public DeleteHostGroupResponse deleteHostGroup(DeleteHostGroupRequest body) throws ApiException { |
| 3013 | + ApiResponse<DeleteHostGroupResponse> resp = deleteHostGroupWithHttpInfo(body); |
| 3014 | + return resp.getData(); |
| 3015 | + } |
| 3016 | + |
| 3017 | + /** |
| 3018 | + * |
| 3019 | + * |
| 3020 | + * @param body (required) |
| 3021 | + * @return ApiResponse<DeleteHostGroupResponse> |
| 3022 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 3023 | + */ |
| 3024 | + public ApiResponse<DeleteHostGroupResponse> deleteHostGroupWithHttpInfo( @NotNull DeleteHostGroupRequest body) throws ApiException { |
| 3025 | + com.squareup.okhttp.Call call = deleteHostGroupValidateBeforeCall(body, null, null); |
| 3026 | + Type localVarReturnType = new TypeToken<DeleteHostGroupResponse>(){}.getType(); |
| 3027 | + return apiClient.execute(call, localVarReturnType); |
| 3028 | + } |
| 3029 | + |
| 3030 | + /** |
| 3031 | + * (asynchronously) |
| 3032 | + * |
| 3033 | + * @param body (required) |
| 3034 | + * @param callback The callback to be executed when the API call finishes |
| 3035 | + * @return The request call |
| 3036 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 3037 | + */ |
| 3038 | + public com.squareup.okhttp.Call deleteHostGroupAsync(DeleteHostGroupRequest body, final ApiCallback<DeleteHostGroupResponse> callback) throws ApiException { |
| 3039 | + |
| 3040 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 3041 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 3042 | + |
| 3043 | + if (callback != null) { |
| 3044 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 3045 | + @Override |
| 3046 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 3047 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 3048 | + } |
| 3049 | + }; |
| 3050 | + |
| 3051 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 3052 | + @Override |
| 3053 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 3054 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 3055 | + } |
| 3056 | + }; |
| 3057 | + } |
| 3058 | + |
| 3059 | + com.squareup.okhttp.Call call = deleteHostGroupValidateBeforeCall(body, progressListener, progressRequestListener); |
| 3060 | + Type localVarReturnType = new TypeToken<DeleteHostGroupResponse>(){}.getType(); |
| 3061 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 3062 | + return call; |
| 3063 | + } |
2936 | 3064 | /** |
2937 | 3065 | * Build call for deleteIpGroup |
2938 | 3066 | * @param body (required) |
@@ -8761,6 +8889,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
8761 | 8889 | apiClient.executeAsync(call, localVarReturnType, callback); |
8762 | 8890 | return call; |
8763 | 8891 | } |
| 8892 | + /** |
| 8893 | + * Build call for updateHostGroup |
| 8894 | + * @param body (required) |
| 8895 | + * @param progressListener Progress listener |
| 8896 | + * @param progressRequestListener Progress request listener |
| 8897 | + * @return Call to execute |
| 8898 | + * @throws ApiException If fail to serialize the request body object |
| 8899 | + */ |
| 8900 | + public com.squareup.okhttp.Call updateHostGroupCall(UpdateHostGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 8901 | + Object localVarPostBody = body; |
| 8902 | + |
| 8903 | + // create path and map variables |
| 8904 | + String localVarPath = "/UpdateHostGroup/2023-12-25/waf/post/application_json/"; |
| 8905 | + |
| 8906 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 8907 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 8908 | + |
| 8909 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 8910 | + |
| 8911 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 8912 | + |
| 8913 | + final String[] localVarAccepts = { |
| 8914 | + "application/json" |
| 8915 | + }; |
| 8916 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 8917 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 8918 | + |
| 8919 | + final String[] localVarContentTypes = { |
| 8920 | + "text/plain" |
| 8921 | + }; |
| 8922 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 8923 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 8924 | + |
| 8925 | + if(progressListener != null) { |
| 8926 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 8927 | + @Override |
| 8928 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 8929 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 8930 | + return originalResponse.newBuilder() |
| 8931 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 8932 | + .build(); |
| 8933 | + } |
| 8934 | + }); |
| 8935 | + } |
| 8936 | + |
| 8937 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 8938 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 8939 | + } |
| 8940 | + |
| 8941 | + @SuppressWarnings("rawtypes") |
| 8942 | + private com.squareup.okhttp.Call updateHostGroupValidateBeforeCall(UpdateHostGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 8943 | + // verify the required parameter 'body' is set |
| 8944 | + if (body == null) { |
| 8945 | + throw new ApiException("Missing the required parameter 'body' when calling updateHostGroup(Async)"); |
| 8946 | + } |
| 8947 | + |
| 8948 | + com.squareup.okhttp.Call call = updateHostGroupCall(body, progressListener, progressRequestListener); |
| 8949 | + return call; |
| 8950 | + |
| 8951 | + |
| 8952 | + |
| 8953 | + |
| 8954 | + |
| 8955 | + } |
| 8956 | + |
| 8957 | + /** |
| 8958 | + * |
| 8959 | + * |
| 8960 | + * @param body (required) |
| 8961 | + * @return UpdateHostGroupResponse |
| 8962 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 8963 | + */ |
| 8964 | + public UpdateHostGroupResponse updateHostGroup(UpdateHostGroupRequest body) throws ApiException { |
| 8965 | + ApiResponse<UpdateHostGroupResponse> resp = updateHostGroupWithHttpInfo(body); |
| 8966 | + return resp.getData(); |
| 8967 | + } |
| 8968 | + |
| 8969 | + /** |
| 8970 | + * |
| 8971 | + * |
| 8972 | + * @param body (required) |
| 8973 | + * @return ApiResponse<UpdateHostGroupResponse> |
| 8974 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 8975 | + */ |
| 8976 | + public ApiResponse<UpdateHostGroupResponse> updateHostGroupWithHttpInfo( @NotNull UpdateHostGroupRequest body) throws ApiException { |
| 8977 | + com.squareup.okhttp.Call call = updateHostGroupValidateBeforeCall(body, null, null); |
| 8978 | + Type localVarReturnType = new TypeToken<UpdateHostGroupResponse>(){}.getType(); |
| 8979 | + return apiClient.execute(call, localVarReturnType); |
| 8980 | + } |
| 8981 | + |
| 8982 | + /** |
| 8983 | + * (asynchronously) |
| 8984 | + * |
| 8985 | + * @param body (required) |
| 8986 | + * @param callback The callback to be executed when the API call finishes |
| 8987 | + * @return The request call |
| 8988 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 8989 | + */ |
| 8990 | + public com.squareup.okhttp.Call updateHostGroupAsync(UpdateHostGroupRequest body, final ApiCallback<UpdateHostGroupResponse> callback) throws ApiException { |
| 8991 | + |
| 8992 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 8993 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 8994 | + |
| 8995 | + if (callback != null) { |
| 8996 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 8997 | + @Override |
| 8998 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 8999 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 9000 | + } |
| 9001 | + }; |
| 9002 | + |
| 9003 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 9004 | + @Override |
| 9005 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 9006 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 9007 | + } |
| 9008 | + }; |
| 9009 | + } |
| 9010 | + |
| 9011 | + com.squareup.okhttp.Call call = updateHostGroupValidateBeforeCall(body, progressListener, progressRequestListener); |
| 9012 | + Type localVarReturnType = new TypeToken<UpdateHostGroupResponse>(){}.getType(); |
| 9013 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 9014 | + return call; |
| 9015 | + } |
8764 | 9016 | /** |
8765 | 9017 | * Build call for updateInstanceCtl |
8766 | 9018 | * @param body (required) |
|
0 commit comments