Skip to content

Commit 3844035

Browse files
author
BitsAdmin
committed
Merge branch 'vke-Java-2022-05-12-online-978-2025_02_19_11_32_53' into 'integration_2025-02-20_759260291074'
feat: [development task] vke-978-Java (1027513) See merge request iaasng/volcengine-java-sdk!383
2 parents 48de328 + f66f8d0 commit 3844035

File tree

7 files changed

+766
-2
lines changed

7 files changed

+766
-2
lines changed

volcengine-java-sdk-vke/src/main/java/com/volcengine/vke/VkeApi.java

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
import com.volcengine.vke.model.DeleteNodePoolResponse;
5050
import com.volcengine.vke.model.DeleteNodesRequest;
5151
import com.volcengine.vke.model.DeleteNodesResponse;
52+
import com.volcengine.vke.model.ExecContainerImageCommitmentRequest;
53+
import com.volcengine.vke.model.ExecContainerImageCommitmentResponse;
5254
import com.volcengine.vke.model.ForwardKubernetesApiRequest;
5355
import com.volcengine.vke.model.ForwardKubernetesApiResponse;
5456
import com.volcengine.vke.model.GetGlobalDefaultDeleteOptionRequest;
@@ -1475,6 +1477,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
14751477
apiClient.executeAsync(call, localVarReturnType, callback);
14761478
return call;
14771479
}
1480+
/**
1481+
* Build call for execContainerImageCommitment
1482+
* @param body (required)
1483+
* @param progressListener Progress listener
1484+
* @param progressRequestListener Progress request listener
1485+
* @return Call to execute
1486+
* @throws ApiException If fail to serialize the request body object
1487+
*/
1488+
public com.squareup.okhttp.Call execContainerImageCommitmentCall(ExecContainerImageCommitmentRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1489+
Object localVarPostBody = body;
1490+
1491+
// create path and map variables
1492+
String localVarPath = "/ExecContainerImageCommitment/2022-05-12/vke/post/application_json/";
1493+
1494+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1495+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1496+
1497+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1498+
1499+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1500+
1501+
final String[] localVarAccepts = {
1502+
"application/json"
1503+
};
1504+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1505+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
1506+
1507+
final String[] localVarContentTypes = {
1508+
"text/plain"
1509+
};
1510+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1511+
localVarHeaderParams.put("Content-Type", localVarContentType);
1512+
1513+
if(progressListener != null) {
1514+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
1515+
@Override
1516+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
1517+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
1518+
return originalResponse.newBuilder()
1519+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
1520+
.build();
1521+
}
1522+
});
1523+
}
1524+
1525+
String[] localVarAuthNames = new String[] { "volcengineSign" };
1526+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1527+
}
1528+
1529+
@SuppressWarnings("rawtypes")
1530+
private com.squareup.okhttp.Call execContainerImageCommitmentValidateBeforeCall(ExecContainerImageCommitmentRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1531+
// verify the required parameter 'body' is set
1532+
if (body == null) {
1533+
throw new ApiException("Missing the required parameter 'body' when calling execContainerImageCommitment(Async)");
1534+
}
1535+
1536+
com.squareup.okhttp.Call call = execContainerImageCommitmentCall(body, progressListener, progressRequestListener);
1537+
return call;
1538+
1539+
1540+
1541+
1542+
1543+
}
1544+
1545+
/**
1546+
*
1547+
*
1548+
* @param body (required)
1549+
* @return ExecContainerImageCommitmentResponse
1550+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1551+
*/
1552+
public ExecContainerImageCommitmentResponse execContainerImageCommitment(ExecContainerImageCommitmentRequest body) throws ApiException {
1553+
ApiResponse<ExecContainerImageCommitmentResponse> resp = execContainerImageCommitmentWithHttpInfo(body);
1554+
return resp.getData();
1555+
}
1556+
1557+
/**
1558+
*
1559+
*
1560+
* @param body (required)
1561+
* @return ApiResponse&lt;ExecContainerImageCommitmentResponse&gt;
1562+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1563+
*/
1564+
public ApiResponse<ExecContainerImageCommitmentResponse> execContainerImageCommitmentWithHttpInfo( @NotNull ExecContainerImageCommitmentRequest body) throws ApiException {
1565+
com.squareup.okhttp.Call call = execContainerImageCommitmentValidateBeforeCall(body, null, null);
1566+
Type localVarReturnType = new TypeToken<ExecContainerImageCommitmentResponse>(){}.getType();
1567+
return apiClient.execute(call, localVarReturnType);
1568+
}
1569+
1570+
/**
1571+
* (asynchronously)
1572+
*
1573+
* @param body (required)
1574+
* @param callback The callback to be executed when the API call finishes
1575+
* @return The request call
1576+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1577+
*/
1578+
public com.squareup.okhttp.Call execContainerImageCommitmentAsync(ExecContainerImageCommitmentRequest body, final ApiCallback<ExecContainerImageCommitmentResponse> callback) throws ApiException {
1579+
1580+
ProgressResponseBody.ProgressListener progressListener = null;
1581+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1582+
1583+
if (callback != null) {
1584+
progressListener = new ProgressResponseBody.ProgressListener() {
1585+
@Override
1586+
public void update(long bytesRead, long contentLength, boolean done) {
1587+
callback.onDownloadProgress(bytesRead, contentLength, done);
1588+
}
1589+
};
1590+
1591+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1592+
@Override
1593+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1594+
callback.onUploadProgress(bytesWritten, contentLength, done);
1595+
}
1596+
};
1597+
}
1598+
1599+
com.squareup.okhttp.Call call = execContainerImageCommitmentValidateBeforeCall(body, progressListener, progressRequestListener);
1600+
Type localVarReturnType = new TypeToken<ExecContainerImageCommitmentResponse>(){}.getType();
1601+
apiClient.executeAsync(call, localVarReturnType, callback);
1602+
return call;
1603+
}
14781604
/**
14791605
* Build call for forwardKubernetesApi
14801606
* @param body (required)
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
/*
2+
* vke
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.vke.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+
* AuthConfigForExecContainerImageCommitmentInput
28+
*/
29+
30+
31+
32+
public class AuthConfigForExecContainerImageCommitmentInput {
33+
@SerializedName("Password")
34+
private String password = null;
35+
36+
@SerializedName("PlainHTTP")
37+
private Boolean plainHTTP = null;
38+
39+
@SerializedName("SkipTLSVerify")
40+
private Boolean skipTLSVerify = null;
41+
42+
@SerializedName("Username")
43+
private String username = null;
44+
45+
public AuthConfigForExecContainerImageCommitmentInput password(String password) {
46+
this.password = password;
47+
return this;
48+
}
49+
50+
/**
51+
* Get password
52+
* @return password
53+
**/
54+
@Schema(description = "")
55+
public String getPassword() {
56+
return password;
57+
}
58+
59+
public void setPassword(String password) {
60+
this.password = password;
61+
}
62+
63+
public AuthConfigForExecContainerImageCommitmentInput plainHTTP(Boolean plainHTTP) {
64+
this.plainHTTP = plainHTTP;
65+
return this;
66+
}
67+
68+
/**
69+
* Get plainHTTP
70+
* @return plainHTTP
71+
**/
72+
@Schema(description = "")
73+
public Boolean isPlainHTTP() {
74+
return plainHTTP;
75+
}
76+
77+
public void setPlainHTTP(Boolean plainHTTP) {
78+
this.plainHTTP = plainHTTP;
79+
}
80+
81+
public AuthConfigForExecContainerImageCommitmentInput skipTLSVerify(Boolean skipTLSVerify) {
82+
this.skipTLSVerify = skipTLSVerify;
83+
return this;
84+
}
85+
86+
/**
87+
* Get skipTLSVerify
88+
* @return skipTLSVerify
89+
**/
90+
@Schema(description = "")
91+
public Boolean isSkipTLSVerify() {
92+
return skipTLSVerify;
93+
}
94+
95+
public void setSkipTLSVerify(Boolean skipTLSVerify) {
96+
this.skipTLSVerify = skipTLSVerify;
97+
}
98+
99+
public AuthConfigForExecContainerImageCommitmentInput username(String username) {
100+
this.username = username;
101+
return this;
102+
}
103+
104+
/**
105+
* Get username
106+
* @return username
107+
**/
108+
@Schema(description = "")
109+
public String getUsername() {
110+
return username;
111+
}
112+
113+
public void setUsername(String username) {
114+
this.username = username;
115+
}
116+
117+
118+
@Override
119+
public boolean equals(java.lang.Object o) {
120+
if (this == o) {
121+
return true;
122+
}
123+
if (o == null || getClass() != o.getClass()) {
124+
return false;
125+
}
126+
AuthConfigForExecContainerImageCommitmentInput authConfigForExecContainerImageCommitmentInput = (AuthConfigForExecContainerImageCommitmentInput) o;
127+
return Objects.equals(this.password, authConfigForExecContainerImageCommitmentInput.password) &&
128+
Objects.equals(this.plainHTTP, authConfigForExecContainerImageCommitmentInput.plainHTTP) &&
129+
Objects.equals(this.skipTLSVerify, authConfigForExecContainerImageCommitmentInput.skipTLSVerify) &&
130+
Objects.equals(this.username, authConfigForExecContainerImageCommitmentInput.username);
131+
}
132+
133+
@Override
134+
public int hashCode() {
135+
return Objects.hash(password, plainHTTP, skipTLSVerify, username);
136+
}
137+
138+
139+
@Override
140+
public String toString() {
141+
StringBuilder sb = new StringBuilder();
142+
sb.append("class AuthConfigForExecContainerImageCommitmentInput {\n");
143+
144+
sb.append(" password: ").append(toIndentedString(password)).append("\n");
145+
sb.append(" plainHTTP: ").append(toIndentedString(plainHTTP)).append("\n");
146+
sb.append(" skipTLSVerify: ").append(toIndentedString(skipTLSVerify)).append("\n");
147+
sb.append(" username: ").append(toIndentedString(username)).append("\n");
148+
sb.append("}");
149+
return sb.toString();
150+
}
151+
152+
/**
153+
* Convert the given object to string with each line indented by 4 spaces
154+
* (except the first line).
155+
*/
156+
private String toIndentedString(java.lang.Object o) {
157+
if (o == null) {
158+
return "null";
159+
}
160+
return o.toString().replace("\n", "\n ");
161+
}
162+
163+
}

0 commit comments

Comments
 (0)