|
49 | 49 | import com.volcengine.vefaas.model.DeleteTimerResponse; |
50 | 50 | import com.volcengine.vefaas.model.DescribeSandboxRequest; |
51 | 51 | import com.volcengine.vefaas.model.DescribeSandboxResponse; |
| 52 | +import com.volcengine.vefaas.model.EnableUserCrVpcTunnelRequest; |
| 53 | +import com.volcengine.vefaas.model.EnableUserCrVpcTunnelResponse; |
52 | 54 | import com.volcengine.vefaas.model.GenWebshellEndpointRequest; |
53 | 55 | import com.volcengine.vefaas.model.GenWebshellEndpointResponse; |
54 | 56 | import com.volcengine.vefaas.model.GetCodeUploadAddressRequest; |
|
101 | 103 | import com.volcengine.vefaas.model.ListTriggersResponse; |
102 | 104 | import com.volcengine.vefaas.model.PrecacheSandboxImagesRequest; |
103 | 105 | import com.volcengine.vefaas.model.PrecacheSandboxImagesResponse; |
| 106 | +import com.volcengine.vefaas.model.QueryUserCrVpcTunnelRequest; |
| 107 | +import com.volcengine.vefaas.model.QueryUserCrVpcTunnelResponse; |
104 | 108 | import com.volcengine.vefaas.model.ReleaseRequest; |
105 | 109 | import com.volcengine.vefaas.model.ReleaseResponse; |
106 | 110 | import com.volcengine.vefaas.model.RunCodeRequest; |
@@ -1515,6 +1519,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
1515 | 1519 | apiClient.executeAsync(call, localVarReturnType, callback); |
1516 | 1520 | return call; |
1517 | 1521 | } |
| 1522 | + /** |
| 1523 | + * Build call for enableUserCrVpcTunnel |
| 1524 | + * @param body (required) |
| 1525 | + * @param progressListener Progress listener |
| 1526 | + * @param progressRequestListener Progress request listener |
| 1527 | + * @return Call to execute |
| 1528 | + * @throws ApiException If fail to serialize the request body object |
| 1529 | + */ |
| 1530 | + public com.squareup.okhttp.Call enableUserCrVpcTunnelCall(EnableUserCrVpcTunnelRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 1531 | + Object localVarPostBody = body; |
| 1532 | + |
| 1533 | + // create path and map variables |
| 1534 | + String localVarPath = "/EnableUserCrVpcTunnel/2024-06-06/vefaas/post/application_json/"; |
| 1535 | + |
| 1536 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 1537 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 1538 | + |
| 1539 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 1540 | + |
| 1541 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 1542 | + |
| 1543 | + final String[] localVarAccepts = { |
| 1544 | + "application/json" |
| 1545 | + }; |
| 1546 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 1547 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 1548 | + |
| 1549 | + final String[] localVarContentTypes = { |
| 1550 | + "text/plain" |
| 1551 | + }; |
| 1552 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 1553 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 1554 | + |
| 1555 | + if(progressListener != null) { |
| 1556 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 1557 | + @Override |
| 1558 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 1559 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 1560 | + return originalResponse.newBuilder() |
| 1561 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 1562 | + .build(); |
| 1563 | + } |
| 1564 | + }); |
| 1565 | + } |
| 1566 | + |
| 1567 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 1568 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 1569 | + } |
| 1570 | + |
| 1571 | + @SuppressWarnings("rawtypes") |
| 1572 | + private com.squareup.okhttp.Call enableUserCrVpcTunnelValidateBeforeCall(EnableUserCrVpcTunnelRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 1573 | + // verify the required parameter 'body' is set |
| 1574 | + if (body == null) { |
| 1575 | + throw new ApiException("Missing the required parameter 'body' when calling enableUserCrVpcTunnel(Async)"); |
| 1576 | + } |
| 1577 | + |
| 1578 | + com.squareup.okhttp.Call call = enableUserCrVpcTunnelCall(body, progressListener, progressRequestListener); |
| 1579 | + return call; |
| 1580 | + |
| 1581 | + |
| 1582 | + |
| 1583 | + |
| 1584 | + |
| 1585 | + } |
| 1586 | + |
| 1587 | + /** |
| 1588 | + * |
| 1589 | + * |
| 1590 | + * @param body (required) |
| 1591 | + * @return EnableUserCrVpcTunnelResponse |
| 1592 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 1593 | + */ |
| 1594 | + public EnableUserCrVpcTunnelResponse enableUserCrVpcTunnel(EnableUserCrVpcTunnelRequest body) throws ApiException { |
| 1595 | + ApiResponse<EnableUserCrVpcTunnelResponse> resp = enableUserCrVpcTunnelWithHttpInfo(body); |
| 1596 | + return resp.getData(); |
| 1597 | + } |
| 1598 | + |
| 1599 | + /** |
| 1600 | + * |
| 1601 | + * |
| 1602 | + * @param body (required) |
| 1603 | + * @return ApiResponse<EnableUserCrVpcTunnelResponse> |
| 1604 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 1605 | + */ |
| 1606 | + public ApiResponse<EnableUserCrVpcTunnelResponse> enableUserCrVpcTunnelWithHttpInfo( @NotNull EnableUserCrVpcTunnelRequest body) throws ApiException { |
| 1607 | + com.squareup.okhttp.Call call = enableUserCrVpcTunnelValidateBeforeCall(body, null, null); |
| 1608 | + Type localVarReturnType = new TypeToken<EnableUserCrVpcTunnelResponse>(){}.getType(); |
| 1609 | + return apiClient.execute(call, localVarReturnType); |
| 1610 | + } |
| 1611 | + |
| 1612 | + /** |
| 1613 | + * (asynchronously) |
| 1614 | + * |
| 1615 | + * @param body (required) |
| 1616 | + * @param callback The callback to be executed when the API call finishes |
| 1617 | + * @return The request call |
| 1618 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 1619 | + */ |
| 1620 | + public com.squareup.okhttp.Call enableUserCrVpcTunnelAsync(EnableUserCrVpcTunnelRequest body, final ApiCallback<EnableUserCrVpcTunnelResponse> callback) throws ApiException { |
| 1621 | + |
| 1622 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 1623 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 1624 | + |
| 1625 | + if (callback != null) { |
| 1626 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 1627 | + @Override |
| 1628 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 1629 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 1630 | + } |
| 1631 | + }; |
| 1632 | + |
| 1633 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 1634 | + @Override |
| 1635 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 1636 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 1637 | + } |
| 1638 | + }; |
| 1639 | + } |
| 1640 | + |
| 1641 | + com.squareup.okhttp.Call call = enableUserCrVpcTunnelValidateBeforeCall(body, progressListener, progressRequestListener); |
| 1642 | + Type localVarReturnType = new TypeToken<EnableUserCrVpcTunnelResponse>(){}.getType(); |
| 1643 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 1644 | + return call; |
| 1645 | + } |
1518 | 1646 | /** |
1519 | 1647 | * Build call for genWebshellEndpoint |
1520 | 1648 | * @param body (required) |
@@ -4739,6 +4867,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don |
4739 | 4867 | apiClient.executeAsync(call, localVarReturnType, callback); |
4740 | 4868 | return call; |
4741 | 4869 | } |
| 4870 | + /** |
| 4871 | + * Build call for queryUserCrVpcTunnel |
| 4872 | + * @param body (required) |
| 4873 | + * @param progressListener Progress listener |
| 4874 | + * @param progressRequestListener Progress request listener |
| 4875 | + * @return Call to execute |
| 4876 | + * @throws ApiException If fail to serialize the request body object |
| 4877 | + */ |
| 4878 | + public com.squareup.okhttp.Call queryUserCrVpcTunnelCall(QueryUserCrVpcTunnelRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4879 | + Object localVarPostBody = body; |
| 4880 | + |
| 4881 | + // create path and map variables |
| 4882 | + String localVarPath = "/QueryUserCrVpcTunnel/2024-06-06/vefaas/post/application_json/"; |
| 4883 | + |
| 4884 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 4885 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 4886 | + |
| 4887 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 4888 | + |
| 4889 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 4890 | + |
| 4891 | + final String[] localVarAccepts = { |
| 4892 | + "application/json" |
| 4893 | + }; |
| 4894 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 4895 | + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); |
| 4896 | + |
| 4897 | + final String[] localVarContentTypes = { |
| 4898 | + "text/plain" |
| 4899 | + }; |
| 4900 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 4901 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 4902 | + |
| 4903 | + if(progressListener != null) { |
| 4904 | + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { |
| 4905 | + @Override |
| 4906 | + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { |
| 4907 | + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); |
| 4908 | + return originalResponse.newBuilder() |
| 4909 | + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) |
| 4910 | + .build(); |
| 4911 | + } |
| 4912 | + }); |
| 4913 | + } |
| 4914 | + |
| 4915 | + String[] localVarAuthNames = new String[] { "volcengineSign" }; |
| 4916 | + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
| 4917 | + } |
| 4918 | + |
| 4919 | + @SuppressWarnings("rawtypes") |
| 4920 | + private com.squareup.okhttp.Call queryUserCrVpcTunnelValidateBeforeCall(QueryUserCrVpcTunnelRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
| 4921 | + // verify the required parameter 'body' is set |
| 4922 | + if (body == null) { |
| 4923 | + throw new ApiException("Missing the required parameter 'body' when calling queryUserCrVpcTunnel(Async)"); |
| 4924 | + } |
| 4925 | + |
| 4926 | + com.squareup.okhttp.Call call = queryUserCrVpcTunnelCall(body, progressListener, progressRequestListener); |
| 4927 | + return call; |
| 4928 | + |
| 4929 | + |
| 4930 | + |
| 4931 | + |
| 4932 | + |
| 4933 | + } |
| 4934 | + |
| 4935 | + /** |
| 4936 | + * |
| 4937 | + * |
| 4938 | + * @param body (required) |
| 4939 | + * @return QueryUserCrVpcTunnelResponse |
| 4940 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4941 | + */ |
| 4942 | + public QueryUserCrVpcTunnelResponse queryUserCrVpcTunnel(QueryUserCrVpcTunnelRequest body) throws ApiException { |
| 4943 | + ApiResponse<QueryUserCrVpcTunnelResponse> resp = queryUserCrVpcTunnelWithHttpInfo(body); |
| 4944 | + return resp.getData(); |
| 4945 | + } |
| 4946 | + |
| 4947 | + /** |
| 4948 | + * |
| 4949 | + * |
| 4950 | + * @param body (required) |
| 4951 | + * @return ApiResponse<QueryUserCrVpcTunnelResponse> |
| 4952 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 4953 | + */ |
| 4954 | + public ApiResponse<QueryUserCrVpcTunnelResponse> queryUserCrVpcTunnelWithHttpInfo( @NotNull QueryUserCrVpcTunnelRequest body) throws ApiException { |
| 4955 | + com.squareup.okhttp.Call call = queryUserCrVpcTunnelValidateBeforeCall(body, null, null); |
| 4956 | + Type localVarReturnType = new TypeToken<QueryUserCrVpcTunnelResponse>(){}.getType(); |
| 4957 | + return apiClient.execute(call, localVarReturnType); |
| 4958 | + } |
| 4959 | + |
| 4960 | + /** |
| 4961 | + * (asynchronously) |
| 4962 | + * |
| 4963 | + * @param body (required) |
| 4964 | + * @param callback The callback to be executed when the API call finishes |
| 4965 | + * @return The request call |
| 4966 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 4967 | + */ |
| 4968 | + public com.squareup.okhttp.Call queryUserCrVpcTunnelAsync(QueryUserCrVpcTunnelRequest body, final ApiCallback<QueryUserCrVpcTunnelResponse> callback) throws ApiException { |
| 4969 | + |
| 4970 | + ProgressResponseBody.ProgressListener progressListener = null; |
| 4971 | + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; |
| 4972 | + |
| 4973 | + if (callback != null) { |
| 4974 | + progressListener = new ProgressResponseBody.ProgressListener() { |
| 4975 | + @Override |
| 4976 | + public void update(long bytesRead, long contentLength, boolean done) { |
| 4977 | + callback.onDownloadProgress(bytesRead, contentLength, done); |
| 4978 | + } |
| 4979 | + }; |
| 4980 | + |
| 4981 | + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { |
| 4982 | + @Override |
| 4983 | + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { |
| 4984 | + callback.onUploadProgress(bytesWritten, contentLength, done); |
| 4985 | + } |
| 4986 | + }; |
| 4987 | + } |
| 4988 | + |
| 4989 | + com.squareup.okhttp.Call call = queryUserCrVpcTunnelValidateBeforeCall(body, progressListener, progressRequestListener); |
| 4990 | + Type localVarReturnType = new TypeToken<QueryUserCrVpcTunnelResponse>(){}.getType(); |
| 4991 | + apiClient.executeAsync(call, localVarReturnType, callback); |
| 4992 | + return call; |
| 4993 | + } |
4742 | 4994 | /** |
4743 | 4995 | * Build call for release |
4744 | 4996 | * @param body (required) |
|
0 commit comments