Skip to content

Commit 119dfe5

Browse files
author
BitsAdmin
committed
Merge 'emr-Java-2023-08-15-online-2387-2026_03_21_17_37_32' into 'integration_2026-03-26_1130262513410'
feat: [development task] emr-2387-Java (2222525) See merge request: !936
2 parents 07db76f + 2d042cc commit 119dfe5

File tree

5 files changed

+863
-1
lines changed

5 files changed

+863
-1
lines changed

volcengine-java-sdk-emr/src/main/java/com/volcengine/emr/EmrApi.java

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565
import com.volcengine.emr.model.ListComponentInstancesResponse;
6666
import com.volcengine.emr.model.ListComponentsRequest;
6767
import com.volcengine.emr.model.ListComponentsResponse;
68+
import com.volcengine.emr.model.ListNodeGroupElasticScheduledInstancesRequest;
69+
import com.volcengine.emr.model.ListNodeGroupElasticScheduledInstancesResponse;
6870
import com.volcengine.emr.model.ListNodeGroupsRequest;
6971
import com.volcengine.emr.model.ListNodeGroupsResponse;
7072
import com.volcengine.emr.model.ListNodesRequest;
@@ -2485,6 +2487,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
24852487
apiClient.executeAsync(call, localVarReturnType, callback);
24862488
return call;
24872489
}
2490+
/**
2491+
* Build call for listNodeGroupElasticScheduledInstances
2492+
* @param body (required)
2493+
* @param progressListener Progress listener
2494+
* @param progressRequestListener Progress request listener
2495+
* @return Call to execute
2496+
* @throws ApiException If fail to serialize the request body object
2497+
*/
2498+
public com.squareup.okhttp.Call listNodeGroupElasticScheduledInstancesCall(ListNodeGroupElasticScheduledInstancesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
2499+
Object localVarPostBody = body;
2500+
2501+
// create path and map variables
2502+
String localVarPath = "/ListNodeGroupElasticScheduledInstances/2023-08-15/emr/post/application_json/";
2503+
2504+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
2505+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
2506+
2507+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
2508+
2509+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
2510+
2511+
final String[] localVarAccepts = {
2512+
"application/json"
2513+
};
2514+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
2515+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
2516+
2517+
final String[] localVarContentTypes = {
2518+
"text/plain"
2519+
};
2520+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
2521+
localVarHeaderParams.put("Content-Type", localVarContentType);
2522+
2523+
if(progressListener != null) {
2524+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
2525+
@Override
2526+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
2527+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
2528+
return originalResponse.newBuilder()
2529+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
2530+
.build();
2531+
}
2532+
});
2533+
}
2534+
2535+
String[] localVarAuthNames = new String[] { "volcengineSign" };
2536+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
2537+
}
2538+
2539+
@SuppressWarnings("rawtypes")
2540+
private com.squareup.okhttp.Call listNodeGroupElasticScheduledInstancesValidateBeforeCall(ListNodeGroupElasticScheduledInstancesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
2541+
// verify the required parameter 'body' is set
2542+
if (body == null) {
2543+
throw new ApiException("Missing the required parameter 'body' when calling listNodeGroupElasticScheduledInstances(Async)");
2544+
}
2545+
2546+
com.squareup.okhttp.Call call = listNodeGroupElasticScheduledInstancesCall(body, progressListener, progressRequestListener);
2547+
return call;
2548+
2549+
2550+
2551+
2552+
2553+
}
2554+
2555+
/**
2556+
*
2557+
*
2558+
* @param body (required)
2559+
* @return ListNodeGroupElasticScheduledInstancesResponse
2560+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2561+
*/
2562+
public ListNodeGroupElasticScheduledInstancesResponse listNodeGroupElasticScheduledInstances(ListNodeGroupElasticScheduledInstancesRequest body) throws ApiException {
2563+
ApiResponse<ListNodeGroupElasticScheduledInstancesResponse> resp = listNodeGroupElasticScheduledInstancesWithHttpInfo(body);
2564+
return resp.getData();
2565+
}
2566+
2567+
/**
2568+
*
2569+
*
2570+
* @param body (required)
2571+
* @return ApiResponse&lt;ListNodeGroupElasticScheduledInstancesResponse&gt;
2572+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2573+
*/
2574+
public ApiResponse<ListNodeGroupElasticScheduledInstancesResponse> listNodeGroupElasticScheduledInstancesWithHttpInfo( @NotNull ListNodeGroupElasticScheduledInstancesRequest body) throws ApiException {
2575+
com.squareup.okhttp.Call call = listNodeGroupElasticScheduledInstancesValidateBeforeCall(body, null, null);
2576+
Type localVarReturnType = new TypeToken<ListNodeGroupElasticScheduledInstancesResponse>(){}.getType();
2577+
return apiClient.execute(call, localVarReturnType);
2578+
}
2579+
2580+
/**
2581+
* (asynchronously)
2582+
*
2583+
* @param body (required)
2584+
* @param callback The callback to be executed when the API call finishes
2585+
* @return The request call
2586+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
2587+
*/
2588+
public com.squareup.okhttp.Call listNodeGroupElasticScheduledInstancesAsync(ListNodeGroupElasticScheduledInstancesRequest body, final ApiCallback<ListNodeGroupElasticScheduledInstancesResponse> callback) throws ApiException {
2589+
2590+
ProgressResponseBody.ProgressListener progressListener = null;
2591+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
2592+
2593+
if (callback != null) {
2594+
progressListener = new ProgressResponseBody.ProgressListener() {
2595+
@Override
2596+
public void update(long bytesRead, long contentLength, boolean done) {
2597+
callback.onDownloadProgress(bytesRead, contentLength, done);
2598+
}
2599+
};
2600+
2601+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
2602+
@Override
2603+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
2604+
callback.onUploadProgress(bytesWritten, contentLength, done);
2605+
}
2606+
};
2607+
}
2608+
2609+
com.squareup.okhttp.Call call = listNodeGroupElasticScheduledInstancesValidateBeforeCall(body, progressListener, progressRequestListener);
2610+
Type localVarReturnType = new TypeToken<ListNodeGroupElasticScheduledInstancesResponse>(){}.getType();
2611+
apiClient.executeAsync(call, localVarReturnType, callback);
2612+
return call;
2613+
}
24882614
/**
24892615
* Build call for listNodeGroups
24902616
* @param body (required)
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
/*
2+
* emr
3+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4+
*
5+
* OpenAPI spec version: common-version
6+
*
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
13+
package com.volcengine.emr.model;
14+
15+
import java.util.Objects;
16+
import java.util.Arrays;
17+
import com.google.gson.TypeAdapter;
18+
import com.google.gson.annotations.JsonAdapter;
19+
import com.google.gson.annotations.SerializedName;
20+
import com.google.gson.stream.JsonReader;
21+
import com.google.gson.stream.JsonWriter;
22+
import io.swagger.v3.oas.annotations.media.Schema;
23+
import java.io.IOException;
24+
import javax.validation.constraints.*;
25+
import javax.validation.Valid;
26+
/**
27+
* ItemForListNodeGroupElasticScheduledInstancesOutput
28+
*/
29+
30+
31+
32+
public class ItemForListNodeGroupElasticScheduledInstancesOutput {
33+
@SerializedName("AutoReleaseAt")
34+
private String autoReleaseAt = null;
35+
36+
@SerializedName("Count")
37+
private Integer count = null;
38+
39+
@SerializedName("EndDeliveryAt")
40+
private String endDeliveryAt = null;
41+
42+
@SerializedName("ScheduledInstanceId")
43+
private String scheduledInstanceId = null;
44+
45+
@SerializedName("ScheduledInstanceType")
46+
private String scheduledInstanceType = null;
47+
48+
@SerializedName("StartDeliveryAt")
49+
private String startDeliveryAt = null;
50+
51+
@SerializedName("Status")
52+
private String status = null;
53+
54+
public ItemForListNodeGroupElasticScheduledInstancesOutput autoReleaseAt(String autoReleaseAt) {
55+
this.autoReleaseAt = autoReleaseAt;
56+
return this;
57+
}
58+
59+
/**
60+
* Get autoReleaseAt
61+
* @return autoReleaseAt
62+
**/
63+
@Schema(description = "")
64+
public String getAutoReleaseAt() {
65+
return autoReleaseAt;
66+
}
67+
68+
public void setAutoReleaseAt(String autoReleaseAt) {
69+
this.autoReleaseAt = autoReleaseAt;
70+
}
71+
72+
public ItemForListNodeGroupElasticScheduledInstancesOutput count(Integer count) {
73+
this.count = count;
74+
return this;
75+
}
76+
77+
/**
78+
* Get count
79+
* @return count
80+
**/
81+
@Schema(description = "")
82+
public Integer getCount() {
83+
return count;
84+
}
85+
86+
public void setCount(Integer count) {
87+
this.count = count;
88+
}
89+
90+
public ItemForListNodeGroupElasticScheduledInstancesOutput endDeliveryAt(String endDeliveryAt) {
91+
this.endDeliveryAt = endDeliveryAt;
92+
return this;
93+
}
94+
95+
/**
96+
* Get endDeliveryAt
97+
* @return endDeliveryAt
98+
**/
99+
@Schema(description = "")
100+
public String getEndDeliveryAt() {
101+
return endDeliveryAt;
102+
}
103+
104+
public void setEndDeliveryAt(String endDeliveryAt) {
105+
this.endDeliveryAt = endDeliveryAt;
106+
}
107+
108+
public ItemForListNodeGroupElasticScheduledInstancesOutput scheduledInstanceId(String scheduledInstanceId) {
109+
this.scheduledInstanceId = scheduledInstanceId;
110+
return this;
111+
}
112+
113+
/**
114+
* Get scheduledInstanceId
115+
* @return scheduledInstanceId
116+
**/
117+
@Schema(description = "")
118+
public String getScheduledInstanceId() {
119+
return scheduledInstanceId;
120+
}
121+
122+
public void setScheduledInstanceId(String scheduledInstanceId) {
123+
this.scheduledInstanceId = scheduledInstanceId;
124+
}
125+
126+
public ItemForListNodeGroupElasticScheduledInstancesOutput scheduledInstanceType(String scheduledInstanceType) {
127+
this.scheduledInstanceType = scheduledInstanceType;
128+
return this;
129+
}
130+
131+
/**
132+
* Get scheduledInstanceType
133+
* @return scheduledInstanceType
134+
**/
135+
@Schema(description = "")
136+
public String getScheduledInstanceType() {
137+
return scheduledInstanceType;
138+
}
139+
140+
public void setScheduledInstanceType(String scheduledInstanceType) {
141+
this.scheduledInstanceType = scheduledInstanceType;
142+
}
143+
144+
public ItemForListNodeGroupElasticScheduledInstancesOutput startDeliveryAt(String startDeliveryAt) {
145+
this.startDeliveryAt = startDeliveryAt;
146+
return this;
147+
}
148+
149+
/**
150+
* Get startDeliveryAt
151+
* @return startDeliveryAt
152+
**/
153+
@Schema(description = "")
154+
public String getStartDeliveryAt() {
155+
return startDeliveryAt;
156+
}
157+
158+
public void setStartDeliveryAt(String startDeliveryAt) {
159+
this.startDeliveryAt = startDeliveryAt;
160+
}
161+
162+
public ItemForListNodeGroupElasticScheduledInstancesOutput status(String status) {
163+
this.status = status;
164+
return this;
165+
}
166+
167+
/**
168+
* Get status
169+
* @return status
170+
**/
171+
@Schema(description = "")
172+
public String getStatus() {
173+
return status;
174+
}
175+
176+
public void setStatus(String status) {
177+
this.status = status;
178+
}
179+
180+
181+
@Override
182+
public boolean equals(java.lang.Object o) {
183+
if (this == o) {
184+
return true;
185+
}
186+
if (o == null || getClass() != o.getClass()) {
187+
return false;
188+
}
189+
ItemForListNodeGroupElasticScheduledInstancesOutput itemForListNodeGroupElasticScheduledInstancesOutput = (ItemForListNodeGroupElasticScheduledInstancesOutput) o;
190+
return Objects.equals(this.autoReleaseAt, itemForListNodeGroupElasticScheduledInstancesOutput.autoReleaseAt) &&
191+
Objects.equals(this.count, itemForListNodeGroupElasticScheduledInstancesOutput.count) &&
192+
Objects.equals(this.endDeliveryAt, itemForListNodeGroupElasticScheduledInstancesOutput.endDeliveryAt) &&
193+
Objects.equals(this.scheduledInstanceId, itemForListNodeGroupElasticScheduledInstancesOutput.scheduledInstanceId) &&
194+
Objects.equals(this.scheduledInstanceType, itemForListNodeGroupElasticScheduledInstancesOutput.scheduledInstanceType) &&
195+
Objects.equals(this.startDeliveryAt, itemForListNodeGroupElasticScheduledInstancesOutput.startDeliveryAt) &&
196+
Objects.equals(this.status, itemForListNodeGroupElasticScheduledInstancesOutput.status);
197+
}
198+
199+
@Override
200+
public int hashCode() {
201+
return Objects.hash(autoReleaseAt, count, endDeliveryAt, scheduledInstanceId, scheduledInstanceType, startDeliveryAt, status);
202+
}
203+
204+
205+
@Override
206+
public String toString() {
207+
StringBuilder sb = new StringBuilder();
208+
sb.append("class ItemForListNodeGroupElasticScheduledInstancesOutput {\n");
209+
210+
sb.append(" autoReleaseAt: ").append(toIndentedString(autoReleaseAt)).append("\n");
211+
sb.append(" count: ").append(toIndentedString(count)).append("\n");
212+
sb.append(" endDeliveryAt: ").append(toIndentedString(endDeliveryAt)).append("\n");
213+
sb.append(" scheduledInstanceId: ").append(toIndentedString(scheduledInstanceId)).append("\n");
214+
sb.append(" scheduledInstanceType: ").append(toIndentedString(scheduledInstanceType)).append("\n");
215+
sb.append(" startDeliveryAt: ").append(toIndentedString(startDeliveryAt)).append("\n");
216+
sb.append(" status: ").append(toIndentedString(status)).append("\n");
217+
sb.append("}");
218+
return sb.toString();
219+
}
220+
221+
/**
222+
* Convert the given object to string with each line indented by 4 spaces
223+
* (except the first line).
224+
*/
225+
private String toIndentedString(java.lang.Object o) {
226+
if (o == null) {
227+
return "null";
228+
}
229+
return o.toString().replace("\n", "\n ");
230+
}
231+
232+
}

0 commit comments

Comments
 (0)