Skip to content

Commit 9a5a176

Browse files
author
BitsAdmin
committed
Merge branch 'ml_platform-Java-2024-07-01-online-1849-2025_11_19_21_06_39' into 'integration_2025-11-20_1086065921538'
feat: [development task] ml_platform-1849-Java (1852995) See merge request iaasng/volcengine-java-sdk!756
2 parents 8082dd3 + 2ccdaae commit 9a5a176

File tree

172 files changed

+15539
-7253
lines changed

Some content is hidden

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

172 files changed

+15539
-7253
lines changed

volcengine-java-sdk-mlplatform20240701/src/main/java/com/volcengine/mlplatform20240701/MlPlatform20240701Api.java

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565
import com.volcengine.mlplatform20240701.model.GetDevInstanceResponse;
6666
import com.volcengine.mlplatform20240701.model.GetInstanceTypeRequest;
6767
import com.volcengine.mlplatform20240701.model.GetInstanceTypeResponse;
68+
import com.volcengine.mlplatform20240701.model.GetJobRequest;
69+
import com.volcengine.mlplatform20240701.model.GetJobResponse;
6870
import com.volcengine.mlplatform20240701.model.GetResourceGroupRequest;
6971
import com.volcengine.mlplatform20240701.model.GetResourceGroupResponse;
7072
import com.volcengine.mlplatform20240701.model.GetResourceQueueRequest;
@@ -2531,6 +2533,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
25312533
apiClient.executeAsync(call, localVarReturnType, callback);
25322534
return call;
25332535
}
2536+
/**
2537+
* Build call for getJob
2538+
* @param body (required)
2539+
* @param progressListener Progress listener
2540+
* @param progressRequestListener Progress request listener
2541+
* @return Call to execute
2542+
* @throws ApiException If fail to serialize the request body object
2543+
*/
2544+
public com.squareup.okhttp.Call getJobCall(GetJobRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
2545+
Object localVarPostBody = body;
2546+
2547+
// create path and map variables
2548+
String localVarPath = "/GetJob/2024-07-01/ml_platform/post/application_json/";
2549+
2550+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
2551+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
2552+
2553+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
2554+
2555+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
2556+
2557+
final String[] localVarAccepts = {
2558+
"application/json"
2559+
};
2560+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
2561+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
2562+
2563+
final String[] localVarContentTypes = {
2564+
"text/plain"
2565+
};
2566+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
2567+
localVarHeaderParams.put("Content-Type", localVarContentType);
2568+
2569+
if(progressListener != null) {
2570+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
2571+
@Override
2572+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
2573+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
2574+
return originalResponse.newBuilder()
2575+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
2576+
.build();
2577+
}
2578+
});
2579+
}
2580+
2581+
String[] localVarAuthNames = new String[] { "volcengineSign" };
2582+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
2583+
}
2584+
2585+
@SuppressWarnings("rawtypes")
2586+
private com.squareup.okhttp.Call getJobValidateBeforeCall(GetJobRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
2587+
// verify the required parameter 'body' is set
2588+
if (body == null) {
2589+
throw new ApiException("Missing the required parameter 'body' when calling getJob(Async)");
2590+
}
2591+
2592+
com.squareup.okhttp.Call call = getJobCall(body, progressListener, progressRequestListener);
2593+
return call;
2594+
2595+
2596+
2597+
2598+
2599+
}
2600+
2601+
/**
2602+
*
2603+
*
2604+
* @param body (required)
2605+
* @return GetJobResponse
2606+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2607+
*/
2608+
public GetJobResponse getJob(GetJobRequest body) throws ApiException {
2609+
ApiResponse<GetJobResponse> resp = getJobWithHttpInfo(body);
2610+
return resp.getData();
2611+
}
2612+
2613+
/**
2614+
*
2615+
*
2616+
* @param body (required)
2617+
* @return ApiResponse&lt;GetJobResponse&gt;
2618+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
2619+
*/
2620+
public ApiResponse<GetJobResponse> getJobWithHttpInfo( @NotNull GetJobRequest body) throws ApiException {
2621+
com.squareup.okhttp.Call call = getJobValidateBeforeCall(body, null, null);
2622+
Type localVarReturnType = new TypeToken<GetJobResponse>(){}.getType();
2623+
return apiClient.execute(call, localVarReturnType);
2624+
}
2625+
2626+
/**
2627+
* (asynchronously)
2628+
*
2629+
* @param body (required)
2630+
* @param callback The callback to be executed when the API call finishes
2631+
* @return The request call
2632+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
2633+
*/
2634+
public com.squareup.okhttp.Call getJobAsync(GetJobRequest body, final ApiCallback<GetJobResponse> callback) throws ApiException {
2635+
2636+
ProgressResponseBody.ProgressListener progressListener = null;
2637+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
2638+
2639+
if (callback != null) {
2640+
progressListener = new ProgressResponseBody.ProgressListener() {
2641+
@Override
2642+
public void update(long bytesRead, long contentLength, boolean done) {
2643+
callback.onDownloadProgress(bytesRead, contentLength, done);
2644+
}
2645+
};
2646+
2647+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
2648+
@Override
2649+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
2650+
callback.onUploadProgress(bytesWritten, contentLength, done);
2651+
}
2652+
};
2653+
}
2654+
2655+
com.squareup.okhttp.Call call = getJobValidateBeforeCall(body, progressListener, progressRequestListener);
2656+
Type localVarReturnType = new TypeToken<GetJobResponse>(){}.getType();
2657+
apiClient.executeAsync(call, localVarReturnType, callback);
2658+
return call;
2659+
}
25342660
/**
25352661
* Build call for getResourceGroup
25362662
* @param body (required)

volcengine-java-sdk-mlplatform20240701/src/main/java/com/volcengine/mlplatform20240701/model/ApigConfigForCreateDeploymentInput.java

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ public class ApigConfigForCreateDeploymentInput {
3737
@SerializedName("UpstreamConfig")
3838
private UpstreamConfigForCreateDeploymentInput upstreamConfig = null;
3939

40-
@SerializedName("UsePublicInstance")
41-
private Boolean usePublicInstance = null;
42-
4340
public ApigConfigForCreateDeploymentInput instanceID(String instanceID) {
4441
this.instanceID = instanceID;
4542
return this;
@@ -77,24 +74,6 @@ public void setUpstreamConfig(UpstreamConfigForCreateDeploymentInput upstreamCon
7774
this.upstreamConfig = upstreamConfig;
7875
}
7976

80-
public ApigConfigForCreateDeploymentInput usePublicInstance(Boolean usePublicInstance) {
81-
this.usePublicInstance = usePublicInstance;
82-
return this;
83-
}
84-
85-
/**
86-
* Get usePublicInstance
87-
* @return usePublicInstance
88-
**/
89-
@Schema(description = "")
90-
public Boolean isUsePublicInstance() {
91-
return usePublicInstance;
92-
}
93-
94-
public void setUsePublicInstance(Boolean usePublicInstance) {
95-
this.usePublicInstance = usePublicInstance;
96-
}
97-
9877

9978
@Override
10079
public boolean equals(java.lang.Object o) {
@@ -106,13 +85,12 @@ public boolean equals(java.lang.Object o) {
10685
}
10786
ApigConfigForCreateDeploymentInput apigConfigForCreateDeploymentInput = (ApigConfigForCreateDeploymentInput) o;
10887
return Objects.equals(this.instanceID, apigConfigForCreateDeploymentInput.instanceID) &&
109-
Objects.equals(this.upstreamConfig, apigConfigForCreateDeploymentInput.upstreamConfig) &&
110-
Objects.equals(this.usePublicInstance, apigConfigForCreateDeploymentInput.usePublicInstance);
88+
Objects.equals(this.upstreamConfig, apigConfigForCreateDeploymentInput.upstreamConfig);
11189
}
11290

11391
@Override
11492
public int hashCode() {
115-
return Objects.hash(instanceID, upstreamConfig, usePublicInstance);
93+
return Objects.hash(instanceID, upstreamConfig);
11694
}
11795

11896

@@ -123,7 +101,6 @@ public String toString() {
123101

124102
sb.append(" instanceID: ").append(toIndentedString(instanceID)).append("\n");
125103
sb.append(" upstreamConfig: ").append(toIndentedString(upstreamConfig)).append("\n");
126-
sb.append(" usePublicInstance: ").append(toIndentedString(usePublicInstance)).append("\n");
127104
sb.append("}");
128105
return sb.toString();
129106
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
/*
2+
* ml_platform20240701
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.mlplatform20240701.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 com.volcengine.mlplatform20240701.model.OptionsForCreateDeploymentInput;
23+
import com.volcengine.mlplatform20240701.model.TosForCreateDeploymentInput;
24+
import io.swagger.v3.oas.annotations.media.Schema;
25+
import java.io.IOException;
26+
import javax.validation.constraints.*;
27+
import javax.validation.Valid;
28+
/**
29+
* CfsForCreateDeploymentInput
30+
*/
31+
32+
33+
34+
public class CfsForCreateDeploymentInput {
35+
@SerializedName("FileSystemName")
36+
private String fileSystemName = null;
37+
38+
@SerializedName("NamespaceId")
39+
private String namespaceId = null;
40+
41+
@SerializedName("Options")
42+
private OptionsForCreateDeploymentInput options = null;
43+
44+
@SerializedName("Tos")
45+
private TosForCreateDeploymentInput tos = null;
46+
47+
public CfsForCreateDeploymentInput fileSystemName(String fileSystemName) {
48+
this.fileSystemName = fileSystemName;
49+
return this;
50+
}
51+
52+
/**
53+
* Get fileSystemName
54+
* @return fileSystemName
55+
**/
56+
@Schema(description = "")
57+
public String getFileSystemName() {
58+
return fileSystemName;
59+
}
60+
61+
public void setFileSystemName(String fileSystemName) {
62+
this.fileSystemName = fileSystemName;
63+
}
64+
65+
public CfsForCreateDeploymentInput namespaceId(String namespaceId) {
66+
this.namespaceId = namespaceId;
67+
return this;
68+
}
69+
70+
/**
71+
* Get namespaceId
72+
* @return namespaceId
73+
**/
74+
@Schema(description = "")
75+
public String getNamespaceId() {
76+
return namespaceId;
77+
}
78+
79+
public void setNamespaceId(String namespaceId) {
80+
this.namespaceId = namespaceId;
81+
}
82+
83+
public CfsForCreateDeploymentInput options(OptionsForCreateDeploymentInput options) {
84+
this.options = options;
85+
return this;
86+
}
87+
88+
/**
89+
* Get options
90+
* @return options
91+
**/
92+
@Valid
93+
@Schema(description = "")
94+
public OptionsForCreateDeploymentInput getOptions() {
95+
return options;
96+
}
97+
98+
public void setOptions(OptionsForCreateDeploymentInput options) {
99+
this.options = options;
100+
}
101+
102+
public CfsForCreateDeploymentInput tos(TosForCreateDeploymentInput tos) {
103+
this.tos = tos;
104+
return this;
105+
}
106+
107+
/**
108+
* Get tos
109+
* @return tos
110+
**/
111+
@Valid
112+
@Schema(description = "")
113+
public TosForCreateDeploymentInput getTos() {
114+
return tos;
115+
}
116+
117+
public void setTos(TosForCreateDeploymentInput tos) {
118+
this.tos = tos;
119+
}
120+
121+
122+
@Override
123+
public boolean equals(java.lang.Object o) {
124+
if (this == o) {
125+
return true;
126+
}
127+
if (o == null || getClass() != o.getClass()) {
128+
return false;
129+
}
130+
CfsForCreateDeploymentInput cfsForCreateDeploymentInput = (CfsForCreateDeploymentInput) o;
131+
return Objects.equals(this.fileSystemName, cfsForCreateDeploymentInput.fileSystemName) &&
132+
Objects.equals(this.namespaceId, cfsForCreateDeploymentInput.namespaceId) &&
133+
Objects.equals(this.options, cfsForCreateDeploymentInput.options) &&
134+
Objects.equals(this.tos, cfsForCreateDeploymentInput.tos);
135+
}
136+
137+
@Override
138+
public int hashCode() {
139+
return Objects.hash(fileSystemName, namespaceId, options, tos);
140+
}
141+
142+
143+
@Override
144+
public String toString() {
145+
StringBuilder sb = new StringBuilder();
146+
sb.append("class CfsForCreateDeploymentInput {\n");
147+
148+
sb.append(" fileSystemName: ").append(toIndentedString(fileSystemName)).append("\n");
149+
sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n");
150+
sb.append(" options: ").append(toIndentedString(options)).append("\n");
151+
sb.append(" tos: ").append(toIndentedString(tos)).append("\n");
152+
sb.append("}");
153+
return sb.toString();
154+
}
155+
156+
/**
157+
* Convert the given object to string with each line indented by 4 spaces
158+
* (except the first line).
159+
*/
160+
private String toIndentedString(java.lang.Object o) {
161+
if (o == null) {
162+
return "null";
163+
}
164+
return o.toString().replace("\n", "\n ");
165+
}
166+
167+
}

0 commit comments

Comments
 (0)