Skip to content

Commit bebe0b8

Browse files
author
BitsAdmin
committed
Merge branch 'escloud-Java-2023-01-01-online-1469-2025_08_21_11_03_09' into 'integration_2025-08-21_1037883052802'
feat: [development task] ESCloud-1469-Java (1576755) See merge request iaasng/volcengine-java-sdk!615
2 parents 700105c + 4a79f84 commit bebe0b8

9 files changed

+1238
-0
lines changed

volcengine-java-sdk-escloud/src/main/java/com/volcengine/escloud/EscloudApi.java

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
import com.volcengine.escloud.model.DescribeInstanceResponse;
4040
import com.volcengine.escloud.model.DescribeInstancesRequest;
4141
import com.volcengine.escloud.model.DescribeInstancesResponse;
42+
import com.volcengine.escloud.model.DescribeIpAllowListRequest;
43+
import com.volcengine.escloud.model.DescribeIpAllowListResponse;
4244
import com.volcengine.escloud.model.DescribeNodeAvailableSpecsRequest;
4345
import com.volcengine.escloud.model.DescribeNodeAvailableSpecsResponse;
4446
import com.volcengine.escloud.model.DescribeZonesRequest;
@@ -51,6 +53,8 @@
5153
import com.volcengine.escloud.model.ModifyDeletionProtectionResponse;
5254
import com.volcengine.escloud.model.ModifyIpAllowListRequest;
5355
import com.volcengine.escloud.model.ModifyIpAllowListResponse;
56+
import com.volcengine.escloud.model.ModifyIpAllowListV2Request;
57+
import com.volcengine.escloud.model.ModifyIpAllowListV2Response;
5458
import com.volcengine.escloud.model.ModifyMaintenanceSettingRequest;
5559
import com.volcengine.escloud.model.ModifyMaintenanceSettingResponse;
5660
import com.volcengine.escloud.model.ModifyNodeSpecInOneStepRequest;
@@ -839,6 +843,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
839843
apiClient.executeAsync(call, localVarReturnType, callback);
840844
return call;
841845
}
846+
/**
847+
* Build call for describeIpAllowList
848+
* @param body (required)
849+
* @param progressListener Progress listener
850+
* @param progressRequestListener Progress request listener
851+
* @return Call to execute
852+
* @throws ApiException If fail to serialize the request body object
853+
*/
854+
public com.squareup.okhttp.Call describeIpAllowListCall(DescribeIpAllowListRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
855+
Object localVarPostBody = body;
856+
857+
// create path and map variables
858+
String localVarPath = "/DescribeIpAllowList/2023-01-01/escloud/post/application_json/";
859+
860+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
861+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
862+
863+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
864+
865+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
866+
867+
final String[] localVarAccepts = {
868+
"application/json"
869+
};
870+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
871+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
872+
873+
final String[] localVarContentTypes = {
874+
"text/plain"
875+
};
876+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
877+
localVarHeaderParams.put("Content-Type", localVarContentType);
878+
879+
if(progressListener != null) {
880+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
881+
@Override
882+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
883+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
884+
return originalResponse.newBuilder()
885+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
886+
.build();
887+
}
888+
});
889+
}
890+
891+
String[] localVarAuthNames = new String[] { "volcengineSign" };
892+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
893+
}
894+
895+
@SuppressWarnings("rawtypes")
896+
private com.squareup.okhttp.Call describeIpAllowListValidateBeforeCall(DescribeIpAllowListRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
897+
// verify the required parameter 'body' is set
898+
if (body == null) {
899+
throw new ApiException("Missing the required parameter 'body' when calling describeIpAllowList(Async)");
900+
}
901+
902+
com.squareup.okhttp.Call call = describeIpAllowListCall(body, progressListener, progressRequestListener);
903+
return call;
904+
905+
906+
907+
908+
909+
}
910+
911+
/**
912+
*
913+
*
914+
* @param body (required)
915+
* @return DescribeIpAllowListResponse
916+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
917+
*/
918+
public DescribeIpAllowListResponse describeIpAllowList(DescribeIpAllowListRequest body) throws ApiException {
919+
ApiResponse<DescribeIpAllowListResponse> resp = describeIpAllowListWithHttpInfo(body);
920+
return resp.getData();
921+
}
922+
923+
/**
924+
*
925+
*
926+
* @param body (required)
927+
* @return ApiResponse&lt;DescribeIpAllowListResponse&gt;
928+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
929+
*/
930+
public ApiResponse<DescribeIpAllowListResponse> describeIpAllowListWithHttpInfo( @NotNull DescribeIpAllowListRequest body) throws ApiException {
931+
com.squareup.okhttp.Call call = describeIpAllowListValidateBeforeCall(body, null, null);
932+
Type localVarReturnType = new TypeToken<DescribeIpAllowListResponse>(){}.getType();
933+
return apiClient.execute(call, localVarReturnType);
934+
}
935+
936+
/**
937+
* (asynchronously)
938+
*
939+
* @param body (required)
940+
* @param callback The callback to be executed when the API call finishes
941+
* @return The request call
942+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
943+
*/
944+
public com.squareup.okhttp.Call describeIpAllowListAsync(DescribeIpAllowListRequest body, final ApiCallback<DescribeIpAllowListResponse> callback) throws ApiException {
945+
946+
ProgressResponseBody.ProgressListener progressListener = null;
947+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
948+
949+
if (callback != null) {
950+
progressListener = new ProgressResponseBody.ProgressListener() {
951+
@Override
952+
public void update(long bytesRead, long contentLength, boolean done) {
953+
callback.onDownloadProgress(bytesRead, contentLength, done);
954+
}
955+
};
956+
957+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
958+
@Override
959+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
960+
callback.onUploadProgress(bytesWritten, contentLength, done);
961+
}
962+
};
963+
}
964+
965+
com.squareup.okhttp.Call call = describeIpAllowListValidateBeforeCall(body, progressListener, progressRequestListener);
966+
Type localVarReturnType = new TypeToken<DescribeIpAllowListResponse>(){}.getType();
967+
apiClient.executeAsync(call, localVarReturnType, callback);
968+
return call;
969+
}
842970
/**
843971
* Build call for describeNodeAvailableSpecs
844972
* @param body (required)
@@ -1583,6 +1711,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
15831711
apiClient.executeAsync(call, localVarReturnType, callback);
15841712
return call;
15851713
}
1714+
/**
1715+
* Build call for modifyIpAllowListV2
1716+
* @param body (required)
1717+
* @param progressListener Progress listener
1718+
* @param progressRequestListener Progress request listener
1719+
* @return Call to execute
1720+
* @throws ApiException If fail to serialize the request body object
1721+
*/
1722+
public com.squareup.okhttp.Call modifyIpAllowListV2Call(ModifyIpAllowListV2Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1723+
Object localVarPostBody = body;
1724+
1725+
// create path and map variables
1726+
String localVarPath = "/ModifyIpAllowListV2/2023-01-01/escloud/post/application_json/";
1727+
1728+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1729+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1730+
1731+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1732+
1733+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1734+
1735+
final String[] localVarAccepts = {
1736+
"application/json"
1737+
};
1738+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1739+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
1740+
1741+
final String[] localVarContentTypes = {
1742+
"text/plain"
1743+
};
1744+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1745+
localVarHeaderParams.put("Content-Type", localVarContentType);
1746+
1747+
if(progressListener != null) {
1748+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
1749+
@Override
1750+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
1751+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
1752+
return originalResponse.newBuilder()
1753+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
1754+
.build();
1755+
}
1756+
});
1757+
}
1758+
1759+
String[] localVarAuthNames = new String[] { "volcengineSign" };
1760+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1761+
}
1762+
1763+
@SuppressWarnings("rawtypes")
1764+
private com.squareup.okhttp.Call modifyIpAllowListV2ValidateBeforeCall(ModifyIpAllowListV2Request body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1765+
// verify the required parameter 'body' is set
1766+
if (body == null) {
1767+
throw new ApiException("Missing the required parameter 'body' when calling modifyIpAllowListV2(Async)");
1768+
}
1769+
1770+
com.squareup.okhttp.Call call = modifyIpAllowListV2Call(body, progressListener, progressRequestListener);
1771+
return call;
1772+
1773+
1774+
1775+
1776+
1777+
}
1778+
1779+
/**
1780+
*
1781+
*
1782+
* @param body (required)
1783+
* @return ModifyIpAllowListV2Response
1784+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1785+
*/
1786+
public ModifyIpAllowListV2Response modifyIpAllowListV2(ModifyIpAllowListV2Request body) throws ApiException {
1787+
ApiResponse<ModifyIpAllowListV2Response> resp = modifyIpAllowListV2WithHttpInfo(body);
1788+
return resp.getData();
1789+
}
1790+
1791+
/**
1792+
*
1793+
*
1794+
* @param body (required)
1795+
* @return ApiResponse&lt;ModifyIpAllowListV2Response&gt;
1796+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1797+
*/
1798+
public ApiResponse<ModifyIpAllowListV2Response> modifyIpAllowListV2WithHttpInfo( @NotNull ModifyIpAllowListV2Request body) throws ApiException {
1799+
com.squareup.okhttp.Call call = modifyIpAllowListV2ValidateBeforeCall(body, null, null);
1800+
Type localVarReturnType = new TypeToken<ModifyIpAllowListV2Response>(){}.getType();
1801+
return apiClient.execute(call, localVarReturnType);
1802+
}
1803+
1804+
/**
1805+
* (asynchronously)
1806+
*
1807+
* @param body (required)
1808+
* @param callback The callback to be executed when the API call finishes
1809+
* @return The request call
1810+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1811+
*/
1812+
public com.squareup.okhttp.Call modifyIpAllowListV2Async(ModifyIpAllowListV2Request body, final ApiCallback<ModifyIpAllowListV2Response> callback) throws ApiException {
1813+
1814+
ProgressResponseBody.ProgressListener progressListener = null;
1815+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1816+
1817+
if (callback != null) {
1818+
progressListener = new ProgressResponseBody.ProgressListener() {
1819+
@Override
1820+
public void update(long bytesRead, long contentLength, boolean done) {
1821+
callback.onDownloadProgress(bytesRead, contentLength, done);
1822+
}
1823+
};
1824+
1825+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1826+
@Override
1827+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1828+
callback.onUploadProgress(bytesWritten, contentLength, done);
1829+
}
1830+
};
1831+
}
1832+
1833+
com.squareup.okhttp.Call call = modifyIpAllowListV2ValidateBeforeCall(body, progressListener, progressRequestListener);
1834+
Type localVarReturnType = new TypeToken<ModifyIpAllowListV2Response>(){}.getType();
1835+
apiClient.executeAsync(call, localVarReturnType, callback);
1836+
return call;
1837+
}
15861838
/**
15871839
* Build call for modifyMaintenanceSetting
15881840
* @param body (required)

0 commit comments

Comments
 (0)