|
115 | 115 | import com.volcengine.alb.model.EnableTLSAccessLogResponse; |
116 | 116 | import com.volcengine.alb.model.ListTagsForResourcesRequest; |
117 | 117 | import com.volcengine.alb.model.ListTagsForResourcesResponse; |
| 118 | +import com.volcengine.alb.model.LoadBalancerJoinSecurityGroupRequest; |
| 119 | +import com.volcengine.alb.model.LoadBalancerJoinSecurityGroupResponse; |
| 120 | +import com.volcengine.alb.model.LoadBalancerLeaveSecurityGroupRequest; |
| 121 | +import com.volcengine.alb.model.LoadBalancerLeaveSecurityGroupResponse; |
118 | 122 | import com.volcengine.alb.model.ModifyAclAttributesRequest; |
119 | 123 | import com.volcengine.alb.model.ModifyAclAttributesResponse; |
120 | 124 | import com.volcengine.alb.model.ModifyCACertificateAttributesRequest; |
@@ -5637,6 +5641,254 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
5637 | 5641 | apiClient.executeAsync(call, localVarReturnType, callback); |
5638 | 5642 | return call; |
5639 | 5643 | } |
| 5644 | + /** |
| 5645 | + * Build call for loadBalancerJoinSecurityGroup |
| 5646 | + * @param body (required) |
| 5647 | + * @param progressListener Progress listener |
| 5648 | + * @param progressRequestListener Progress request listener |
| 5649 | + * @return Call to execute |
| 5650 | + * @throws ApiException If fail to serialize the request body object |
| 5651 | + */ |
| 5652 | + public com.squareup.okhttp.Call loadBalancerJoinSecurityGroupCall(LoadBalancerJoinSecurityGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 5653 | + Object localVarPostBody = body; |
| 5654 | + |
| 5655 | + // create path and map variables |
| 5656 | + String localVarPath = "/LoadBalancerJoinSecurityGroup/2020-04-01/alb/get/text_plain/"; |
| 5657 | + |
| 5658 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 5659 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 5660 | + |
| 5661 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 5662 | + |
| 5663 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 5664 | + |
| 5665 | + final String[] localVarAccepts = { |
| 5666 | + "application/json" |
| 5667 | + }; |
| 5668 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 5669 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 5670 | + |
| 5671 | + final String[] localVarContentTypes = { |
| 5672 | + "text/plain" |
| 5673 | + }; |
| 5674 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 5675 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 5676 | + |
| 5677 | + if(progressListener != null) { |
| 5678 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 5679 | + @Override |
| 5680 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 5681 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 5682 | + return originalResponse.newBuilder() |
| 5683 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 5684 | + .build(); |
| 5685 | + } |
| 5686 | + }); |
| 5687 | + } |
| 5688 | + |
| 5689 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 5690 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 5691 | + } |
| 5692 | + |
| 5693 | + @SuppressWarnings("rawtypes") |
| 5694 | + private com.squareup.okhttp.Call loadBalancerJoinSecurityGroupValidateBeforeCall(LoadBalancerJoinSecurityGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 5695 | + // verify the required parameter 'body' is set |
| 5696 | + if (body == null) { |
| 5697 | + throw new ApiException("Missing the required parameter 'body' when calling loadBalancerJoinSecurityGroup(Async)"); |
| 5698 | + } |
| 5699 | + |
| 5700 | + com.squareup.okhttp.Call call = loadBalancerJoinSecurityGroupCall(body, progressListener, progressRequestListener); |
| 5701 | + return call; |
| 5702 | + |
| 5703 | + |
| 5704 | + |
| 5705 | + |
| 5706 | + |
| 5707 | + } |
| 5708 | + |
| 5709 | + /** |
| 5710 | + * |
| 5711 | + * |
| 5712 | + * @param body (required) |
| 5713 | + * @return LoadBalancerJoinSecurityGroupResponse |
| 5714 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 5715 | + */ |
| 5716 | + public LoadBalancerJoinSecurityGroupResponse loadBalancerJoinSecurityGroup(LoadBalancerJoinSecurityGroupRequest body) throws ApiException { |
| 5717 | + ApiResponse<LoadBalancerJoinSecurityGroupResponse> resp = loadBalancerJoinSecurityGroupWithHttpInfo(body); |
| 5718 | + return resp.getData(); |
| 5719 | + } |
| 5720 | + |
| 5721 | + /** |
| 5722 | + * |
| 5723 | + * |
| 5724 | + * @param body (required) |
| 5725 | + * @return ApiResponse<LoadBalancerJoinSecurityGroupResponse> |
| 5726 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 5727 | + */ |
| 5728 | + public ApiResponse<LoadBalancerJoinSecurityGroupResponse> loadBalancerJoinSecurityGroupWithHttpInfo( @NotNull LoadBalancerJoinSecurityGroupRequest body) throws ApiException { |
| 5729 | + com.squareup.okhttp.Call call = loadBalancerJoinSecurityGroupValidateBeforeCall(body, null, null); |
| 5730 | + Type localVarReturnType = new TypeToken<LoadBalancerJoinSecurityGroupResponse>(){}.getType(); |
| 5731 | + return apiClient.execute(call, localVarReturnType); |
| 5732 | + } |
| 5733 | + |
| 5734 | + /** |
| 5735 | + * (asynchronously) |
| 5736 | + * |
| 5737 | + * @param body (required) |
| 5738 | + * @param callback The callback to be executed when the API call finishes |
| 5739 | + * @return The request call |
| 5740 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 5741 | + */ |
| 5742 | + public com.squareup.okhttp.Call loadBalancerJoinSecurityGroupAsync(LoadBalancerJoinSecurityGroupRequest body, final ApiCallback<LoadBalancerJoinSecurityGroupResponse> callback) throws ApiException { |
| 5743 | + |
| 5744 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 5745 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 5746 | + |
| 5747 | + if (callback != null) { |
| 5748 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 5749 | + @Override |
| 5750 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 5751 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 5752 | + } |
| 5753 | + }; |
| 5754 | + |
| 5755 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 5756 | + @Override |
| 5757 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 5758 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 5759 | + } |
| 5760 | + }; |
| 5761 | + } |
| 5762 | + |
| 5763 | + com.squareup.okhttp.Call call = loadBalancerJoinSecurityGroupValidateBeforeCall(body, progressListener, progressRequestListener); |
| 5764 | + Type localVarReturnType = new TypeToken<LoadBalancerJoinSecurityGroupResponse>(){}.getType(); |
| 5765 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 5766 | + return call; |
| 5767 | + } |
| 5768 | + /** |
| 5769 | + * Build call for loadBalancerLeaveSecurityGroup |
| 5770 | + * @param body (required) |
| 5771 | + * @param progressListener Progress listener |
| 5772 | + * @param progressRequestListener Progress request listener |
| 5773 | + * @return Call to execute |
| 5774 | + * @throws ApiException If fail to serialize the request body object |
| 5775 | + */ |
| 5776 | + public com.squareup.okhttp.Call loadBalancerLeaveSecurityGroupCall(LoadBalancerLeaveSecurityGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 5777 | + Object localVarPostBody = body; |
| 5778 | + |
| 5779 | + // create path and map variables |
| 5780 | + String localVarPath = "/LoadBalancerLeaveSecurityGroup/2020-04-01/alb/get/text_plain/"; |
| 5781 | + |
| 5782 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 5783 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 5784 | + |
| 5785 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 5786 | + |
| 5787 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 5788 | + |
| 5789 | + final String[] localVarAccepts = { |
| 5790 | + "application/json" |
| 5791 | + }; |
| 5792 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 5793 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 5794 | + |
| 5795 | + final String[] localVarContentTypes = { |
| 5796 | + "text/plain" |
| 5797 | + }; |
| 5798 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 5799 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 5800 | + |
| 5801 | + if(progressListener != null) { |
| 5802 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 5803 | + @Override |
| 5804 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 5805 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 5806 | + return originalResponse.newBuilder() |
| 5807 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 5808 | + .build(); |
| 5809 | + } |
| 5810 | + }); |
| 5811 | + } |
| 5812 | + |
| 5813 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 5814 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 5815 | + } |
| 5816 | + |
| 5817 | + @SuppressWarnings("rawtypes") |
| 5818 | + private com.squareup.okhttp.Call loadBalancerLeaveSecurityGroupValidateBeforeCall(LoadBalancerLeaveSecurityGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 5819 | + // verify the required parameter 'body' is set |
| 5820 | + if (body == null) { |
| 5821 | + throw new ApiException("Missing the required parameter 'body' when calling loadBalancerLeaveSecurityGroup(Async)"); |
| 5822 | + } |
| 5823 | + |
| 5824 | + com.squareup.okhttp.Call call = loadBalancerLeaveSecurityGroupCall(body, progressListener, progressRequestListener); |
| 5825 | + return call; |
| 5826 | + |
| 5827 | + |
| 5828 | + |
| 5829 | + |
| 5830 | + |
| 5831 | + } |
| 5832 | + |
| 5833 | + /** |
| 5834 | + * |
| 5835 | + * |
| 5836 | + * @param body (required) |
| 5837 | + * @return LoadBalancerLeaveSecurityGroupResponse |
| 5838 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 5839 | + */ |
| 5840 | + public LoadBalancerLeaveSecurityGroupResponse loadBalancerLeaveSecurityGroup(LoadBalancerLeaveSecurityGroupRequest body) throws ApiException { |
| 5841 | + ApiResponse<LoadBalancerLeaveSecurityGroupResponse> resp = loadBalancerLeaveSecurityGroupWithHttpInfo(body); |
| 5842 | + return resp.getData(); |
| 5843 | + } |
| 5844 | + |
| 5845 | + /** |
| 5846 | + * |
| 5847 | + * |
| 5848 | + * @param body (required) |
| 5849 | + * @return ApiResponse<LoadBalancerLeaveSecurityGroupResponse> |
| 5850 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 5851 | + */ |
| 5852 | + public ApiResponse<LoadBalancerLeaveSecurityGroupResponse> loadBalancerLeaveSecurityGroupWithHttpInfo( @NotNull LoadBalancerLeaveSecurityGroupRequest body) throws ApiException { |
| 5853 | + com.squareup.okhttp.Call call = loadBalancerLeaveSecurityGroupValidateBeforeCall(body, null, null); |
| 5854 | + Type localVarReturnType = new TypeToken<LoadBalancerLeaveSecurityGroupResponse>(){}.getType(); |
| 5855 | + return apiClient.execute(call, localVarReturnType); |
| 5856 | + } |
| 5857 | + |
| 5858 | + /** |
| 5859 | + * (asynchronously) |
| 5860 | + * |
| 5861 | + * @param body (required) |
| 5862 | + * @param callback The callback to be executed when the API call finishes |
| 5863 | + * @return The request call |
| 5864 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 5865 | + */ |
| 5866 | + public com.squareup.okhttp.Call loadBalancerLeaveSecurityGroupAsync(LoadBalancerLeaveSecurityGroupRequest body, final ApiCallback<LoadBalancerLeaveSecurityGroupResponse> callback) throws ApiException { |
| 5867 | + |
| 5868 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 5869 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 5870 | + |
| 5871 | + if (callback != null) { |
| 5872 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 5873 | + @Override |
| 5874 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 5875 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 5876 | + } |
| 5877 | + }; |
| 5878 | + |
| 5879 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 5880 | + @Override |
| 5881 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 5882 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 5883 | + } |
| 5884 | + }; |
| 5885 | + } |
| 5886 | + |
| 5887 | + com.squareup.okhttp.Call call = loadBalancerLeaveSecurityGroupValidateBeforeCall(body, progressListener, progressRequestListener); |
| 5888 | + Type localVarReturnType = new TypeToken<LoadBalancerLeaveSecurityGroupResponse>(){}.getType(); |
| 5889 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 5890 | + return call; |
| 5891 | + } |
5640 | 5892 | /** |
5641 | 5893 | * Build call for modifyAclAttributes |
5642 | 5894 | * @param body (required) |
|
0 commit comments