|
27 | 27 |
|
28 | 28 | import javax.validation.constraints.*; |
29 | 29 |
|
| 30 | +import com.volcengine.cr.model.CreateEndpointAclPoliciesRequest; |
| 31 | +import com.volcengine.cr.model.CreateEndpointAclPoliciesResponse; |
30 | 32 | import com.volcengine.cr.model.CreateNamespaceRequest; |
31 | 33 | import com.volcengine.cr.model.CreateNamespaceResponse; |
32 | 34 | import com.volcengine.cr.model.CreateRegistryRequest; |
33 | 35 | import com.volcengine.cr.model.CreateRegistryResponse; |
34 | 36 | import com.volcengine.cr.model.CreateRepositoryRequest; |
35 | 37 | import com.volcengine.cr.model.CreateRepositoryResponse; |
| 38 | +import com.volcengine.cr.model.DeleteEndpointAclPoliciesRequest; |
| 39 | +import com.volcengine.cr.model.DeleteEndpointAclPoliciesResponse; |
36 | 40 | import com.volcengine.cr.model.DeleteNamespaceRequest; |
37 | 41 | import com.volcengine.cr.model.DeleteNamespaceResponse; |
38 | 42 | import com.volcengine.cr.model.DeleteRegistryRequest; |
@@ -95,6 +99,130 @@ public void setApiClient(ApiClient apiClient) { |
95 | 99 | this.apiClient = apiClient; |
96 | 100 | } |
97 | 101 |
|
| 102 | + /** |
| 103 | + * Build call for createEndpointAclPolicies |
| 104 | + * @param body (required) |
| 105 | + * @param progressListener Progress listener |
| 106 | + * @param progressRequestListener Progress request listener |
| 107 | + * @return Call to execute |
| 108 | + * @throws ApiException If fail to serialize the request body object |
| 109 | + */ |
| 110 | + public com.squareup.okhttp.Call createEndpointAclPoliciesCall(CreateEndpointAclPoliciesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 111 | + Object localVarPostBody = body; |
| 112 | + |
| 113 | + // create path and map variables |
| 114 | + String localVarPath = "/CreateEndpointAclPolicies/2022-05-12/cr/post/application_json/"; |
| 115 | + |
| 116 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 117 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 118 | + |
| 119 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 120 | + |
| 121 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 122 | + |
| 123 | + final String[] localVarAccepts = { |
| 124 | + "application/json" |
| 125 | + }; |
| 126 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 127 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 128 | + |
| 129 | + final String[] localVarContentTypes = { |
| 130 | + "text/plain" |
| 131 | + }; |
| 132 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 133 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 134 | + |
| 135 | + if(progressListener != null) { |
| 136 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 137 | + @Override |
| 138 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 139 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 140 | + return originalResponse.newBuilder() |
| 141 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 142 | + .build(); |
| 143 | + } |
| 144 | + }); |
| 145 | + } |
| 146 | + |
| 147 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 148 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 149 | + } |
| 150 | + |
| 151 | + @SuppressWarnings("rawtypes") |
| 152 | + private com.squareup.okhttp.Call createEndpointAclPoliciesValidateBeforeCall(CreateEndpointAclPoliciesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 153 | + // verify the required parameter 'body' is set |
| 154 | + if (body == null) { |
| 155 | + throw new ApiException("Missing the required parameter 'body' when calling createEndpointAclPolicies(Async)"); |
| 156 | + } |
| 157 | + |
| 158 | + com.squareup.okhttp.Call call = createEndpointAclPoliciesCall(body, progressListener, progressRequestListener); |
| 159 | + return call; |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + } |
| 166 | + |
| 167 | + /** |
| 168 | + * |
| 169 | + * |
| 170 | + * @param body (required) |
| 171 | + * @return CreateEndpointAclPoliciesResponse |
| 172 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 173 | + */ |
| 174 | + public CreateEndpointAclPoliciesResponse createEndpointAclPolicies(CreateEndpointAclPoliciesRequest body) throws ApiException { |
| 175 | + ApiResponse<CreateEndpointAclPoliciesResponse> resp = createEndpointAclPoliciesWithHttpInfo(body); |
| 176 | + return resp.getData(); |
| 177 | + } |
| 178 | + |
| 179 | + /** |
| 180 | + * |
| 181 | + * |
| 182 | + * @param body (required) |
| 183 | + * @return ApiResponse<CreateEndpointAclPoliciesResponse> |
| 184 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 185 | + */ |
| 186 | + public ApiResponse<CreateEndpointAclPoliciesResponse> createEndpointAclPoliciesWithHttpInfo( @NotNull CreateEndpointAclPoliciesRequest body) throws ApiException { |
| 187 | + com.squareup.okhttp.Call call = createEndpointAclPoliciesValidateBeforeCall(body, null, null); |
| 188 | + Type localVarReturnType = new TypeToken<CreateEndpointAclPoliciesResponse>(){}.getType(); |
| 189 | + return apiClient.execute(call, localVarReturnType); |
| 190 | + } |
| 191 | + |
| 192 | + /** |
| 193 | + * (asynchronously) |
| 194 | + * |
| 195 | + * @param body (required) |
| 196 | + * @param callback The callback to be executed when the API call finishes |
| 197 | + * @return The request call |
| 198 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 199 | + */ |
| 200 | + public com.squareup.okhttp.Call createEndpointAclPoliciesAsync(CreateEndpointAclPoliciesRequest body, final ApiCallback<CreateEndpointAclPoliciesResponse> callback) throws ApiException { |
| 201 | + |
| 202 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 203 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 204 | + |
| 205 | + if (callback != null) { |
| 206 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 207 | + @Override |
| 208 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 209 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 210 | + } |
| 211 | + }; |
| 212 | + |
| 213 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 214 | + @Override |
| 215 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 216 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 217 | + } |
| 218 | + }; |
| 219 | + } |
| 220 | + |
| 221 | + com.squareup.okhttp.Call call = createEndpointAclPoliciesValidateBeforeCall(body, progressListener, progressRequestListener); |
| 222 | + Type localVarReturnType = new TypeToken<CreateEndpointAclPoliciesResponse>(){}.getType(); |
| 223 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 224 | + return call; |
| 225 | + } |
98 | 226 | /** |
99 | 227 | * Build call for createNamespace |
100 | 228 | * @param body (required) |
@@ -467,6 +595,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
467 | 595 | apiClient.executeAsync(call, localVarReturnType, callback); |
468 | 596 | return call; |
469 | 597 | } |
| 598 | + /** |
| 599 | + * Build call for deleteEndpointAclPolicies |
| 600 | + * @param body (required) |
| 601 | + * @param progressListener Progress listener |
| 602 | + * @param progressRequestListener Progress request listener |
| 603 | + * @return Call to execute |
| 604 | + * @throws ApiException If fail to serialize the request body object |
| 605 | + */ |
| 606 | + public com.squareup.okhttp.Call deleteEndpointAclPoliciesCall(DeleteEndpointAclPoliciesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 607 | + Object localVarPostBody = body; |
| 608 | + |
| 609 | + // create path and map variables |
| 610 | + String localVarPath = "/DeleteEndpointAclPolicies/2022-05-12/cr/post/application_json/"; |
| 611 | + |
| 612 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 613 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 614 | + |
| 615 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 616 | + |
| 617 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 618 | + |
| 619 | + final String[] localVarAccepts = { |
| 620 | + "application/json" |
| 621 | + }; |
| 622 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 623 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 624 | + |
| 625 | + final String[] localVarContentTypes = { |
| 626 | + "text/plain" |
| 627 | + }; |
| 628 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 629 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 630 | + |
| 631 | + if(progressListener != null) { |
| 632 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 633 | + @Override |
| 634 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 635 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 636 | + return originalResponse.newBuilder() |
| 637 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 638 | + .build(); |
| 639 | + } |
| 640 | + }); |
| 641 | + } |
| 642 | + |
| 643 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 644 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 645 | + } |
| 646 | + |
| 647 | + @SuppressWarnings("rawtypes") |
| 648 | + private com.squareup.okhttp.Call deleteEndpointAclPoliciesValidateBeforeCall(DeleteEndpointAclPoliciesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 649 | + // verify the required parameter 'body' is set |
| 650 | + if (body == null) { |
| 651 | + throw new ApiException("Missing the required parameter 'body' when calling deleteEndpointAclPolicies(Async)"); |
| 652 | + } |
| 653 | + |
| 654 | + com.squareup.okhttp.Call call = deleteEndpointAclPoliciesCall(body, progressListener, progressRequestListener); |
| 655 | + return call; |
| 656 | + |
| 657 | + |
| 658 | + |
| 659 | + |
| 660 | + |
| 661 | + } |
| 662 | + |
| 663 | + /** |
| 664 | + * |
| 665 | + * |
| 666 | + * @param body (required) |
| 667 | + * @return DeleteEndpointAclPoliciesResponse |
| 668 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 669 | + */ |
| 670 | + public DeleteEndpointAclPoliciesResponse deleteEndpointAclPolicies(DeleteEndpointAclPoliciesRequest body) throws ApiException { |
| 671 | + ApiResponse<DeleteEndpointAclPoliciesResponse> resp = deleteEndpointAclPoliciesWithHttpInfo(body); |
| 672 | + return resp.getData(); |
| 673 | + } |
| 674 | + |
| 675 | + /** |
| 676 | + * |
| 677 | + * |
| 678 | + * @param body (required) |
| 679 | + * @return ApiResponse<DeleteEndpointAclPoliciesResponse> |
| 680 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 681 | + */ |
| 682 | + public ApiResponse<DeleteEndpointAclPoliciesResponse> deleteEndpointAclPoliciesWithHttpInfo( @NotNull DeleteEndpointAclPoliciesRequest body) throws ApiException { |
| 683 | + com.squareup.okhttp.Call call = deleteEndpointAclPoliciesValidateBeforeCall(body, null, null); |
| 684 | + Type localVarReturnType = new TypeToken<DeleteEndpointAclPoliciesResponse>(){}.getType(); |
| 685 | + return apiClient.execute(call, localVarReturnType); |
| 686 | + } |
| 687 | + |
| 688 | + /** |
| 689 | + * (asynchronously) |
| 690 | + * |
| 691 | + * @param body (required) |
| 692 | + * @param callback The callback to be executed when the API call finishes |
| 693 | + * @return The request call |
| 694 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 695 | + */ |
| 696 | + public com.squareup.okhttp.Call deleteEndpointAclPoliciesAsync(DeleteEndpointAclPoliciesRequest body, final ApiCallback<DeleteEndpointAclPoliciesResponse> callback) throws ApiException { |
| 697 | + |
| 698 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 699 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 700 | + |
| 701 | + if (callback != null) { |
| 702 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 703 | + @Override |
| 704 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 705 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 706 | + } |
| 707 | + }; |
| 708 | + |
| 709 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 710 | + @Override |
| 711 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 712 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 713 | + } |
| 714 | + }; |
| 715 | + } |
| 716 | + |
| 717 | + com.squareup.okhttp.Call call = deleteEndpointAclPoliciesValidateBeforeCall(body, progressListener, progressRequestListener); |
| 718 | + Type localVarReturnType = new TypeToken<DeleteEndpointAclPoliciesResponse>(){}.getType(); |
| 719 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 720 | + return call; |
| 721 | + } |
470 | 722 | /** |
471 | 723 | * Build call for deleteNamespace |
472 | 724 | * @param body (required) |
|
0 commit comments