Skip to content

Commit 3c2be9d

Browse files
authored
Merge pull request #1 from volcengine/for_vke_and_as
feat: auto generate for for_vke_and_as
2 parents a6829da + b714319 commit 3c2be9d

File tree

198 files changed

+16279
-114
lines changed

Some content is hidden

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

198 files changed

+16279
-114
lines changed

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.volcengine</groupId>
55
<artifactId>volcengine-java-sdk</artifactId>
66
<packaging>pom</packaging>
7-
<version>0.1.2</version>
7+
<version>0.1.3</version>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1010
<java.source.version>1.7</java.source.version>
@@ -127,5 +127,6 @@
127127
<module>volcengine-java-sdk-directconnect</module>
128128
<module>volcengine-java-sdk-bom</module>
129129
<module>volcengine-java-sdk-autoscaling</module>
130+
<module>volcengine-java-sdk-vke</module>
130131
</modules>
131132
</project>

volcengine-java-sdk-autoscaling/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>volcengine-java-sdk</artifactId>
55
<groupId>com.volcengine</groupId>
6-
<version>0.1.2</version>
6+
<version>0.1.3</version>
77
<relativePath>../pom.xml</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>

volcengine-java-sdk-autoscaling/src/main/java/com/volcengine/autoscaling/AutoScalingApi.java

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
import javax.validation.constraints.*;
2929

30+
import com.volcengine.autoscaling.model.AttachDBInstancesRequest;
31+
import com.volcengine.autoscaling.model.AttachDBInstancesResponse;
3032
import com.volcengine.autoscaling.model.AttachInstancesRequest;
3133
import com.volcengine.autoscaling.model.AttachInstancesResponse;
3234
import com.volcengine.autoscaling.model.AttachServerGroupsRequest;
@@ -63,6 +65,8 @@
6365
import com.volcengine.autoscaling.model.DescribeScalingInstancesResponse;
6466
import com.volcengine.autoscaling.model.DescribeScalingPoliciesRequest;
6567
import com.volcengine.autoscaling.model.DescribeScalingPoliciesResponse;
68+
import com.volcengine.autoscaling.model.DetachDBInstancesRequest;
69+
import com.volcengine.autoscaling.model.DetachDBInstancesResponse;
6670
import com.volcengine.autoscaling.model.DetachInstancesRequest;
6771
import com.volcengine.autoscaling.model.DetachInstancesResponse;
6872
import com.volcengine.autoscaling.model.DetachServerGroupsRequest;
@@ -115,6 +119,130 @@ public void setApiClient(ApiClient apiClient) {
115119
this.apiClient = apiClient;
116120
}
117121

122+
/**
123+
* Build call for attachDBInstances
124+
* @param body (required)
125+
* @param progressListener Progress listener
126+
* @param progressRequestListener Progress request listener
127+
* @return Call to execute
128+
* @throws ApiException If fail to serialize the request body object
129+
*/
130+
public com.squareup.okhttp.Call attachDBInstancesCall(AttachDBInstancesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
131+
Object localVarPostBody = body;
132+
133+
// create path and map variables
134+
String localVarPath = "/AttachDBInstances/2020-01-01/auto_scaling/get/";
135+
136+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
137+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
138+
139+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
140+
141+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
142+
143+
final String[] localVarAccepts = {
144+
"application/json"
145+
};
146+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
147+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
148+
149+
final String[] localVarContentTypes = {
150+
"text/plain"
151+
};
152+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
153+
localVarHeaderParams.put("Content-Type", localVarContentType);
154+
155+
if(progressListener != null) {
156+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
157+
@Override
158+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
159+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
160+
return originalResponse.newBuilder()
161+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
162+
.build();
163+
}
164+
});
165+
}
166+
167+
String[] localVarAuthNames = new String[] { "volcengineSign" };
168+
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
169+
}
170+
171+
@SuppressWarnings("rawtypes")
172+
private com.squareup.okhttp.Call attachDBInstancesValidateBeforeCall(AttachDBInstancesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
173+
// verify the required parameter 'body' is set
174+
if (body == null) {
175+
throw new ApiException("Missing the required parameter 'body' when calling attachDBInstances(Async)");
176+
}
177+
178+
com.squareup.okhttp.Call call = attachDBInstancesCall(body, progressListener, progressRequestListener);
179+
return call;
180+
181+
182+
183+
184+
185+
}
186+
187+
/**
188+
*
189+
*
190+
* @param body (required)
191+
* @return AttachDBInstancesResponse
192+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
193+
*/
194+
public AttachDBInstancesResponse attachDBInstances(AttachDBInstancesRequest body) throws ApiException {
195+
ApiResponse<AttachDBInstancesResponse> resp = attachDBInstancesWithHttpInfo(body);
196+
return resp.getData();
197+
}
198+
199+
/**
200+
*
201+
*
202+
* @param body (required)
203+
* @return ApiResponse&lt;AttachDBInstancesResponse&gt;
204+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
205+
*/
206+
public ApiResponse<AttachDBInstancesResponse> attachDBInstancesWithHttpInfo( @NotNull AttachDBInstancesRequest body) throws ApiException {
207+
com.squareup.okhttp.Call call = attachDBInstancesValidateBeforeCall(body, null, null);
208+
Type localVarReturnType = new TypeToken<AttachDBInstancesResponse>(){}.getType();
209+
return apiClient.execute(call, localVarReturnType);
210+
}
211+
212+
/**
213+
* (asynchronously)
214+
*
215+
* @param body (required)
216+
* @param callback The callback to be executed when the API call finishes
217+
* @return The request call
218+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
219+
*/
220+
public com.squareup.okhttp.Call attachDBInstancesAsync(AttachDBInstancesRequest body, final ApiCallback<AttachDBInstancesResponse> callback) throws ApiException {
221+
222+
ProgressResponseBody.ProgressListener progressListener = null;
223+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
224+
225+
if (callback != null) {
226+
progressListener = new ProgressResponseBody.ProgressListener() {
227+
@Override
228+
public void update(long bytesRead, long contentLength, boolean done) {
229+
callback.onDownloadProgress(bytesRead, contentLength, done);
230+
}
231+
};
232+
233+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
234+
@Override
235+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
236+
callback.onUploadProgress(bytesWritten, contentLength, done);
237+
}
238+
};
239+
}
240+
241+
com.squareup.okhttp.Call call = attachDBInstancesValidateBeforeCall(body, progressListener, progressRequestListener);
242+
Type localVarReturnType = new TypeToken<AttachDBInstancesResponse>(){}.getType();
243+
apiClient.executeAsync(call, localVarReturnType, callback);
244+
return call;
245+
}
118246
/**
119247
* Build call for attachInstances
120248
* @param body (required)
@@ -2347,6 +2475,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
23472475
apiClient.executeAsync(call, localVarReturnType, callback);
23482476
return call;
23492477
}
2478+
/**
2479+
* Build call for detachDBInstances
2480+
* @param body (required)
2481+
* @param progressListener Progress listener
2482+
* @param progressRequestListener Progress request listener
2483+
* @return Call to execute
2484+
* @throws ApiException If fail to serialize the request body object
2485+
*/
2486+
public com.squareup.okhttp.Call detachDBInstancesCall(DetachDBInstancesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
2487+
Object localVarPostBody = body;
2488+
2489+
// create path and map variables
2490+
String localVarPath = "/DetachDBInstances/2020-01-01/auto_scaling/get/";
2491+
2492+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
2493+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
2494+
2495+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
2496+
2497+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
2498+
2499+
final String[] localVarAccepts = {
2500+
"application/json"
2501+
};
2502+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
2503+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
2504+
2505+
final String[] localVarContentTypes = {
2506+
"text/plain"
2507+
};
2508+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
2509+
localVarHeaderParams.put("Content-Type", localVarContentType);
2510+
2511+
if(progressListener != null) {
2512+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
2513+
@Override
2514+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
2515+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
2516+
return originalResponse.newBuilder()
2517+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
2518+
.build();
2519+
}
2520+
});
2521+
}
2522+
2523+
String[] localVarAuthNames = new String[] { "volcengineSign" };
2524+
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
2525+
}
2526+
2527+
@SuppressWarnings("rawtypes")
2528+
private com.squareup.okhttp.Call detachDBInstancesValidateBeforeCall(DetachDBInstancesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
2529+
// verify the required parameter 'body' is set
2530+
if (body == null) {
2531+
throw new ApiException("Missing the required parameter 'body' when calling detachDBInstances(Async)");
2532+
}
2533+
2534+
com.squareup.okhttp.Call call = detachDBInstancesCall(body, progressListener, progressRequestListener);
2535+
return call;
2536+
2537+
2538+
2539+
2540+
2541+
}
2542+
2543+
/**
2544+
*
2545+
*
2546+
* @param body (required)
2547+
* @return DetachDBInstancesResponse
2548+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2549+
*/
2550+
public DetachDBInstancesResponse detachDBInstances(DetachDBInstancesRequest body) throws ApiException {
2551+
ApiResponse<DetachDBInstancesResponse> resp = detachDBInstancesWithHttpInfo(body);
2552+
return resp.getData();
2553+
}
2554+
2555+
/**
2556+
*
2557+
*
2558+
* @param body (required)
2559+
* @return ApiResponse&lt;DetachDBInstancesResponse&gt;
2560+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2561+
*/
2562+
public ApiResponse<DetachDBInstancesResponse> detachDBInstancesWithHttpInfo( @NotNull DetachDBInstancesRequest body) throws ApiException {
2563+
com.squareup.okhttp.Call call = detachDBInstancesValidateBeforeCall(body, null, null);
2564+
Type localVarReturnType = new TypeToken<DetachDBInstancesResponse>(){}.getType();
2565+
return apiClient.execute(call, localVarReturnType);
2566+
}
2567+
2568+
/**
2569+
* (asynchronously)
2570+
*
2571+
* @param body (required)
2572+
* @param callback The callback to be executed when the API call finishes
2573+
* @return The request call
2574+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
2575+
*/
2576+
public com.squareup.okhttp.Call detachDBInstancesAsync(DetachDBInstancesRequest body, final ApiCallback<DetachDBInstancesResponse> callback) throws ApiException {
2577+
2578+
ProgressResponseBody.ProgressListener progressListener = null;
2579+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
2580+
2581+
if (callback != null) {
2582+
progressListener = new ProgressResponseBody.ProgressListener() {
2583+
@Override
2584+
public void update(long bytesRead, long contentLength, boolean done) {
2585+
callback.onDownloadProgress(bytesRead, contentLength, done);
2586+
}
2587+
};
2588+
2589+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
2590+
@Override
2591+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
2592+
callback.onUploadProgress(bytesWritten, contentLength, done);
2593+
}
2594+
};
2595+
}
2596+
2597+
com.squareup.okhttp.Call call = detachDBInstancesValidateBeforeCall(body, progressListener, progressRequestListener);
2598+
Type localVarReturnType = new TypeToken<DetachDBInstancesResponse>(){}.getType();
2599+
apiClient.executeAsync(call, localVarReturnType, callback);
2600+
return call;
2601+
}
23502602
/**
23512603
* Build call for detachInstances
23522604
* @param body (required)

volcengine-java-sdk-autoscaling/src/main/java/com/volcengine/autoscaling/model/AlarmPolicyConditionForCreateScalingPolicyInput.java

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

30-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-06-30T20:17:46.205154+08:00[Asia/Shanghai]")
30+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-04T12:08:52.868690+08:00[Asia/Shanghai]")
3131
public class AlarmPolicyConditionForCreateScalingPolicyInput {
3232
@SerializedName("ComparisonOperator")
3333
private String comparisonOperator = null;

volcengine-java-sdk-autoscaling/src/main/java/com/volcengine/autoscaling/model/AlarmPolicyConditionForModifyScalingPolicyInput.java

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

30-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-06-30T20:17:46.205154+08:00[Asia/Shanghai]")
30+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-04T12:08:52.868690+08:00[Asia/Shanghai]")
3131
public class AlarmPolicyConditionForModifyScalingPolicyInput {
3232
@SerializedName("ComparisonOperator")
3333
private String comparisonOperator = null;

volcengine-java-sdk-autoscaling/src/main/java/com/volcengine/autoscaling/model/AlarmPolicyForCreateScalingPolicyInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* AlarmPolicyForCreateScalingPolicyInput
2929
*/
3030

31-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-06-30T20:17:46.205154+08:00[Asia/Shanghai]")
31+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-04T12:08:52.868690+08:00[Asia/Shanghai]")
3232
public class AlarmPolicyForCreateScalingPolicyInput {
3333
@SerializedName("Condition")
3434
private AlarmPolicyConditionForCreateScalingPolicyInput condition = null;

volcengine-java-sdk-autoscaling/src/main/java/com/volcengine/autoscaling/model/AlarmPolicyForDescribeScalingPoliciesOutput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* AlarmPolicyForDescribeScalingPoliciesOutput
2929
*/
3030

31-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-06-30T20:17:46.205154+08:00[Asia/Shanghai]")
31+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-04T12:08:52.868690+08:00[Asia/Shanghai]")
3232
public class AlarmPolicyForDescribeScalingPoliciesOutput {
3333
@SerializedName("Condition")
3434
private ConditionForDescribeScalingPoliciesOutput condition = null;

volcengine-java-sdk-autoscaling/src/main/java/com/volcengine/autoscaling/model/AlarmPolicyForModifyScalingPolicyInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* AlarmPolicyForModifyScalingPolicyInput
2929
*/
3030

31-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-06-30T20:17:46.205154+08:00[Asia/Shanghai]")
31+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-04T12:08:52.868690+08:00[Asia/Shanghai]")
3232
public class AlarmPolicyForModifyScalingPolicyInput {
3333
@SerializedName("Condition")
3434
private AlarmPolicyConditionForModifyScalingPolicyInput condition = null;

volcengine-java-sdk-autoscaling/src/main/java/com/volcengine/autoscaling/model/AttachDBInstancesRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* AttachDBInstancesRequest
3030
*/
3131

32-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-05-24T15:52:12.731669+08:00[Asia/Shanghai]")
32+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-04T12:08:52.868690+08:00[Asia/Shanghai]")
3333
public class AttachDBInstancesRequest {
3434
@SerializedName("DBInstanceIds")
3535
private List<String> dbInstanceIds = null;

volcengine-java-sdk-autoscaling/src/main/java/com/volcengine/autoscaling/model/AttachDBInstancesResponse.java

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

30-
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-05-24T15:52:12.731669+08:00[Asia/Shanghai]")
30+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-07-04T12:08:52.868690+08:00[Asia/Shanghai]")
3131
public class AttachDBInstancesResponse {
3232
@SerializedName("ScalingGroupId")
3333
private String scalingGroupId = null;

0 commit comments

Comments
 (0)