Skip to content

Commit 095cd04

Browse files
committed
feat: for ecs 3.7.1
1 parent daa05b6 commit 095cd04

File tree

53 files changed

+1022
-410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1022
-410
lines changed

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/EcsApi.java

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
10351035
apiClient.executeAsync(call, localVarReturnType, callback);
10361036
return call;
10371037
}
1038+
/**
1039+
* Build call for describeZones
1040+
* @param body (required)
1041+
* @param progressListener Progress listener
1042+
* @param progressRequestListener Progress request listener
1043+
* @return Call to execute
1044+
* @throws ApiException If fail to serialize the request body object
1045+
*/
1046+
public com.squareup.okhttp.Call describeZonesCall(DescribeZonesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1047+
Object localVarPostBody = body;
1048+
1049+
// create path and map variables
1050+
String localVarPath = "/DescribeZones/2020-04-01/ecs/get/";
1051+
1052+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1053+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1054+
1055+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1056+
1057+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1058+
1059+
final String[] localVarAccepts = {
1060+
"application/json"
1061+
};
1062+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1063+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
1064+
1065+
final String[] localVarContentTypes = {
1066+
"text/plain"
1067+
};
1068+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1069+
localVarHeaderParams.put("Content-Type", localVarContentType);
1070+
1071+
if(progressListener != null) {
1072+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
1073+
@Override
1074+
public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {
1075+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
1076+
return originalResponse.newBuilder()
1077+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
1078+
.build();
1079+
}
1080+
});
1081+
}
1082+
1083+
String[] localVarAuthNames = new String[] { "volcstackSign" };
1084+
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1085+
}
1086+
1087+
@SuppressWarnings("rawtypes")
1088+
private com.squareup.okhttp.Call describeZonesValidateBeforeCall(DescribeZonesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1089+
// verify the required parameter 'body' is set
1090+
if (body == null) {
1091+
throw new ApiException("Missing the required parameter 'body' when calling describeZones(Async)");
1092+
}
1093+
1094+
com.squareup.okhttp.Call call = describeZonesCall(body, progressListener, progressRequestListener);
1095+
return call;
1096+
1097+
1098+
1099+
1100+
1101+
}
1102+
1103+
/**
1104+
*
1105+
*
1106+
* @param body (required)
1107+
* @return DescribeZonesResponse
1108+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1109+
*/
1110+
public DescribeZonesResponse describeZones(DescribeZonesRequest body) throws ApiException {
1111+
ApiResponse<DescribeZonesResponse> resp = describeZonesWithHttpInfo(body);
1112+
return resp.getData();
1113+
}
1114+
1115+
/**
1116+
*
1117+
*
1118+
* @param body (required)
1119+
* @return ApiResponse&lt;DescribeZonesResponse&gt;
1120+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1121+
*/
1122+
public ApiResponse<DescribeZonesResponse> describeZonesWithHttpInfo( @NotNull DescribeZonesRequest body) throws ApiException {
1123+
com.squareup.okhttp.Call call = describeZonesValidateBeforeCall(body, null, null);
1124+
Type localVarReturnType = new TypeToken<DescribeZonesResponse>(){}.getType();
1125+
return apiClient.execute(call, localVarReturnType);
1126+
}
1127+
1128+
/**
1129+
* (asynchronously)
1130+
*
1131+
* @param body (required)
1132+
* @param callback The callback to be executed when the API call finishes
1133+
* @return The request call
1134+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1135+
*/
1136+
public com.squareup.okhttp.Call describeZonesAsync(DescribeZonesRequest body, final ApiCallback<DescribeZonesResponse> callback) throws ApiException {
1137+
1138+
ProgressResponseBody.ProgressListener progressListener = null;
1139+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1140+
1141+
if (callback != null) {
1142+
progressListener = new ProgressResponseBody.ProgressListener() {
1143+
@Override
1144+
public void update(long bytesRead, long contentLength, boolean done) {
1145+
callback.onDownloadProgress(bytesRead, contentLength, done);
1146+
}
1147+
};
1148+
1149+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1150+
@Override
1151+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1152+
callback.onUploadProgress(bytesWritten, contentLength, done);
1153+
}
1154+
};
1155+
}
1156+
1157+
com.squareup.okhttp.Call call = describeZonesValidateBeforeCall(body, progressListener, progressRequestListener);
1158+
Type localVarReturnType = new TypeToken<DescribeZonesResponse>(){}.getType();
1159+
apiClient.executeAsync(call, localVarReturnType, callback);
1160+
return call;
1161+
}
10381162
/**
10391163
* Build call for modifyInstanceAttribute
10401164
* @param body (required)
@@ -1655,6 +1779,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
16551779
apiClient.executeAsync(call, localVarReturnType, callback);
16561780
return call;
16571781
}
1782+
/**
1783+
* Build call for replaceSystemVolume
1784+
* @param body (required)
1785+
* @param progressListener Progress listener
1786+
* @param progressRequestListener Progress request listener
1787+
* @return Call to execute
1788+
* @throws ApiException If fail to serialize the request body object
1789+
*/
1790+
public com.squareup.okhttp.Call replaceSystemVolumeCall(ReplaceSystemVolumeRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1791+
Object localVarPostBody = body;
1792+
1793+
// create path and map variables
1794+
String localVarPath = "/ReplaceSystemVolume/2020-04-01/ecs/get/";
1795+
1796+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1797+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1798+
1799+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1800+
1801+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1802+
1803+
final String[] localVarAccepts = {
1804+
"application/json"
1805+
};
1806+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1807+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
1808+
1809+
final String[] localVarContentTypes = {
1810+
"text/plain"
1811+
};
1812+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1813+
localVarHeaderParams.put("Content-Type", localVarContentType);
1814+
1815+
if(progressListener != null) {
1816+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
1817+
@Override
1818+
public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {
1819+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
1820+
return originalResponse.newBuilder()
1821+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
1822+
.build();
1823+
}
1824+
});
1825+
}
1826+
1827+
String[] localVarAuthNames = new String[] { "volcstackSign" };
1828+
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1829+
}
1830+
1831+
@SuppressWarnings("rawtypes")
1832+
private com.squareup.okhttp.Call replaceSystemVolumeValidateBeforeCall(ReplaceSystemVolumeRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1833+
// verify the required parameter 'body' is set
1834+
if (body == null) {
1835+
throw new ApiException("Missing the required parameter 'body' when calling replaceSystemVolume(Async)");
1836+
}
1837+
1838+
com.squareup.okhttp.Call call = replaceSystemVolumeCall(body, progressListener, progressRequestListener);
1839+
return call;
1840+
1841+
1842+
1843+
1844+
1845+
}
1846+
1847+
/**
1848+
*
1849+
*
1850+
* @param body (required)
1851+
* @return ReplaceSystemVolumeResponse
1852+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1853+
*/
1854+
public ReplaceSystemVolumeResponse replaceSystemVolume(ReplaceSystemVolumeRequest body) throws ApiException {
1855+
ApiResponse<ReplaceSystemVolumeResponse> resp = replaceSystemVolumeWithHttpInfo(body);
1856+
return resp.getData();
1857+
}
1858+
1859+
/**
1860+
*
1861+
*
1862+
* @param body (required)
1863+
* @return ApiResponse&lt;ReplaceSystemVolumeResponse&gt;
1864+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1865+
*/
1866+
public ApiResponse<ReplaceSystemVolumeResponse> replaceSystemVolumeWithHttpInfo( @NotNull ReplaceSystemVolumeRequest body) throws ApiException {
1867+
com.squareup.okhttp.Call call = replaceSystemVolumeValidateBeforeCall(body, null, null);
1868+
Type localVarReturnType = new TypeToken<ReplaceSystemVolumeResponse>(){}.getType();
1869+
return apiClient.execute(call, localVarReturnType);
1870+
}
1871+
1872+
/**
1873+
* (asynchronously)
1874+
*
1875+
* @param body (required)
1876+
* @param callback The callback to be executed when the API call finishes
1877+
* @return The request call
1878+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1879+
*/
1880+
public com.squareup.okhttp.Call replaceSystemVolumeAsync(ReplaceSystemVolumeRequest body, final ApiCallback<ReplaceSystemVolumeResponse> callback) throws ApiException {
1881+
1882+
ProgressResponseBody.ProgressListener progressListener = null;
1883+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1884+
1885+
if (callback != null) {
1886+
progressListener = new ProgressResponseBody.ProgressListener() {
1887+
@Override
1888+
public void update(long bytesRead, long contentLength, boolean done) {
1889+
callback.onDownloadProgress(bytesRead, contentLength, done);
1890+
}
1891+
};
1892+
1893+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1894+
@Override
1895+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1896+
callback.onUploadProgress(bytesWritten, contentLength, done);
1897+
}
1898+
};
1899+
}
1900+
1901+
com.squareup.okhttp.Call call = replaceSystemVolumeValidateBeforeCall(body, progressListener, progressRequestListener);
1902+
Type localVarReturnType = new TypeToken<ReplaceSystemVolumeResponse>(){}.getType();
1903+
apiClient.executeAsync(call, localVarReturnType, callback);
1904+
return call;
1905+
}
16581906
/**
16591907
* Build call for runInstances
16601908
* @param body (required)

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/model/AvailableResourceForDescribeAvailableResourceOutput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* AvailableResourceForDescribeAvailableResourceOutput
3131
*/
3232

33-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-03-24T18:21:02.503402+08:00[Asia/Shanghai]")
33+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-07T19:27:18.461509+08:00[Asia/Shanghai]")
3434
public class AvailableResourceForDescribeAvailableResourceOutput {
3535
@SerializedName("SupportedResources")
3636
private List<SupportedResourceForDescribeAvailableResourceOutput> supportedResources = null;

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/model/AvailableZoneForDescribeAvailableResourceOutput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* AvailableZoneForDescribeAvailableResourceOutput
3131
*/
3232

33-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-03-24T18:21:02.503402+08:00[Asia/Shanghai]")
33+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-07T19:27:18.461509+08:00[Asia/Shanghai]")
3434
public class AvailableZoneForDescribeAvailableResourceOutput {
3535
@SerializedName("AvailableResources")
3636
private List<AvailableResourceForDescribeAvailableResourceOutput> availableResources = null;

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/model/CreateImageRequest.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,15 @@
1212

1313
package com.volcengine.volcstack.ecs.model;
1414

15-
import java.util.Objects;
16-
import java.util.Arrays;
17-
import com.google.gson.TypeAdapter;
18-
import com.google.gson.annotations.JsonAdapter;
1915
import com.google.gson.annotations.SerializedName;
20-
import com.google.gson.stream.JsonReader;
21-
import com.google.gson.stream.JsonWriter;
2216
import io.swagger.v3.oas.annotations.media.Schema;
23-
import java.io.IOException;
24-
import javax.validation.constraints.*;
25-
import javax.validation.Valid;
17+
18+
import java.util.Objects;
2619
/**
2720
* CreateImageRequest
2821
*/
2922

30-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-03-24T18:21:02.503402+08:00[Asia/Shanghai]")
23+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-07T19:27:18.461509+08:00[Asia/Shanghai]")
3124
public class CreateImageRequest {
3225
@SerializedName("Description")
3326
private String description = null;

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/model/CreateImageResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* CreateImageResponse
2828
*/
2929

30-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-03-24T18:21:02.503402+08:00[Asia/Shanghai]")
30+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-07T19:27:18.461509+08:00[Asia/Shanghai]")
3131
public class CreateImageResponse {
3232
@SerializedName("ImageId")
3333
private String imageId = null;

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/model/DeleteInstanceRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* DeleteInstanceRequest
2828
*/
2929

30-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-03-24T18:21:02.503402+08:00[Asia/Shanghai]")
30+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-07T19:27:18.461509+08:00[Asia/Shanghai]")
3131
public class DeleteInstanceRequest {
3232
@SerializedName("InstanceId")
3333
private String instanceId = null;

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/model/DeleteInstanceResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* DeleteInstanceResponse
2121
*/
2222

23-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-03-24T18:21:02.503402+08:00[Asia/Shanghai]")
23+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-07T19:27:18.461509+08:00[Asia/Shanghai]")
2424
public class DeleteInstanceResponse {
2525

2626
@Override

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/model/DescribeAvailableResourceRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* DescribeAvailableResourceRequest
2828
*/
2929

30-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-03-24T18:21:02.503402+08:00[Asia/Shanghai]")
30+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-07T19:27:18.461509+08:00[Asia/Shanghai]")
3131
public class DescribeAvailableResourceRequest {
3232
@SerializedName("DestinationResource")
3333
private String destinationResource = null;

volcstack-java-sdk-ecs/src/main/java/com/volcengine/volcstack/ecs/model/DescribeAvailableResourceResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* DescribeAvailableResourceResponse
3131
*/
3232

33-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-03-24T18:21:02.503402+08:00[Asia/Shanghai]")
33+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-04-07T19:27:18.461509+08:00[Asia/Shanghai]")
3434
public class DescribeAvailableResourceResponse {
3535
@SerializedName("AvailableZones")
3636
private List<AvailableZoneForDescribeAvailableResourceOutput> availableZones = null;

0 commit comments

Comments
 (0)