Skip to content

Commit 7c42a60

Browse files
author
BitsAdmin
committed
Merge 'apig-Java-2022-11-12-online-1871-2025_11_25_15_17_23' into 'integration_2025-12-04_1090536471554'
feat: [development task] apig-1871-Java (1900793) See merge request: !783
2 parents 2daccfa + e1c7cb6 commit 7c42a60

File tree

7 files changed

+366
-96
lines changed

7 files changed

+366
-96
lines changed

volcengine-java-sdk-apig20221112/src/main/java/com/volcengine/apig20221112/Apig20221112Api.java

Lines changed: 126 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.apig20221112.model.CheckRouteExistRequest;
31+
import com.volcengine.apig20221112.model.CheckRouteExistResponse;
3032
import com.volcengine.apig20221112.model.CreateRouteRequest;
3133
import com.volcengine.apig20221112.model.CreateRouteResponse;
3234
import com.volcengine.apig20221112.model.DeleteRouteRequest;
@@ -63,6 +65,130 @@ public void setApiClient(ApiClient apiClient) {
6365
this.apiClient = apiClient;
6466
}
6567

68+
/**
69+
* Build call for checkRouteExist
70+
* @param body (required)
71+
* @param progressListener Progress listener
72+
* @param progressRequestListener Progress request listener
73+
* @return Call to execute
74+
* @throws ApiException If fail to serialize the request body object
75+
*/
76+
public com.squareup.okhttp.Call checkRouteExistCall(CheckRouteExistRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
77+
Object localVarPostBody = body;
78+
79+
// create path and map variables
80+
String localVarPath = "/CheckRouteExist/2022-11-12/apig/post/application_json/";
81+
82+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
83+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
84+
85+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
86+
87+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
88+
89+
final String[] localVarAccepts = {
90+
"application/json"
91+
};
92+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
93+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
94+
95+
final String[] localVarContentTypes = {
96+
"text/plain"
97+
};
98+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
99+
localVarHeaderParams.put("Content-Type", localVarContentType);
100+
101+
if(progressListener != null) {
102+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
103+
@Override
104+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
105+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
106+
return originalResponse.newBuilder()
107+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
108+
.build();
109+
}
110+
});
111+
}
112+
113+
String[] localVarAuthNames = new String[] { "volcengineSign" };
114+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
115+
}
116+
117+
@SuppressWarnings("rawtypes")
118+
private com.squareup.okhttp.Call checkRouteExistValidateBeforeCall(CheckRouteExistRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
119+
// verify the required parameter 'body' is set
120+
if (body == null) {
121+
throw new ApiException("Missing the required parameter 'body' when calling checkRouteExist(Async)");
122+
}
123+
124+
com.squareup.okhttp.Call call = checkRouteExistCall(body, progressListener, progressRequestListener);
125+
return call;
126+
127+
128+
129+
130+
131+
}
132+
133+
/**
134+
*
135+
*
136+
* @param body (required)
137+
* @return CheckRouteExistResponse
138+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
139+
*/
140+
public CheckRouteExistResponse checkRouteExist(CheckRouteExistRequest body) throws ApiException {
141+
ApiResponse<CheckRouteExistResponse> resp = checkRouteExistWithHttpInfo(body);
142+
return resp.getData();
143+
}
144+
145+
/**
146+
*
147+
*
148+
* @param body (required)
149+
* @return ApiResponse&lt;CheckRouteExistResponse&gt;
150+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
151+
*/
152+
public ApiResponse<CheckRouteExistResponse> checkRouteExistWithHttpInfo( @NotNull CheckRouteExistRequest body) throws ApiException {
153+
com.squareup.okhttp.Call call = checkRouteExistValidateBeforeCall(body, null, null);
154+
Type localVarReturnType = new TypeToken<CheckRouteExistResponse>(){}.getType();
155+
return apiClient.execute(call, localVarReturnType);
156+
}
157+
158+
/**
159+
* (asynchronously)
160+
*
161+
* @param body (required)
162+
* @param callback The callback to be executed when the API call finishes
163+
* @return The request call
164+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
165+
*/
166+
public com.squareup.okhttp.Call checkRouteExistAsync(CheckRouteExistRequest body, final ApiCallback<CheckRouteExistResponse> callback) throws ApiException {
167+
168+
ProgressResponseBody.ProgressListener progressListener = null;
169+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
170+
171+
if (callback != null) {
172+
progressListener = new ProgressResponseBody.ProgressListener() {
173+
@Override
174+
public void update(long bytesRead, long contentLength, boolean done) {
175+
callback.onDownloadProgress(bytesRead, contentLength, done);
176+
}
177+
};
178+
179+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
180+
@Override
181+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
182+
callback.onUploadProgress(bytesWritten, contentLength, done);
183+
}
184+
};
185+
}
186+
187+
com.squareup.okhttp.Call call = checkRouteExistValidateBeforeCall(body, progressListener, progressRequestListener);
188+
Type localVarReturnType = new TypeToken<CheckRouteExistResponse>(){}.getType();
189+
apiClient.executeAsync(call, localVarReturnType, callback);
190+
return call;
191+
}
66192
/**
67193
* Build call for createRoute
68194
* @param body (required)
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/*
2+
* apig20221112
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.apig20221112.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+
* CheckRouteExistRequest
28+
*/
29+
30+
31+
32+
public class CheckRouteExistRequest {
33+
@SerializedName("Name")
34+
private String name = null;
35+
36+
@SerializedName("ServiceId")
37+
private String serviceId = null;
38+
39+
public CheckRouteExistRequest name(String name) {
40+
this.name = name;
41+
return this;
42+
}
43+
44+
/**
45+
* Get name
46+
* @return name
47+
**/
48+
@NotNull
49+
@Schema(required = true, description = "")
50+
public String getName() {
51+
return name;
52+
}
53+
54+
public void setName(String name) {
55+
this.name = name;
56+
}
57+
58+
public CheckRouteExistRequest serviceId(String serviceId) {
59+
this.serviceId = serviceId;
60+
return this;
61+
}
62+
63+
/**
64+
* Get serviceId
65+
* @return serviceId
66+
**/
67+
@NotNull
68+
@Schema(required = true, description = "")
69+
public String getServiceId() {
70+
return serviceId;
71+
}
72+
73+
public void setServiceId(String serviceId) {
74+
this.serviceId = serviceId;
75+
}
76+
77+
78+
@Override
79+
public boolean equals(java.lang.Object o) {
80+
if (this == o) {
81+
return true;
82+
}
83+
if (o == null || getClass() != o.getClass()) {
84+
return false;
85+
}
86+
CheckRouteExistRequest checkRouteExistRequest = (CheckRouteExistRequest) o;
87+
return Objects.equals(this.name, checkRouteExistRequest.name) &&
88+
Objects.equals(this.serviceId, checkRouteExistRequest.serviceId);
89+
}
90+
91+
@Override
92+
public int hashCode() {
93+
return Objects.hash(name, serviceId);
94+
}
95+
96+
97+
@Override
98+
public String toString() {
99+
StringBuilder sb = new StringBuilder();
100+
sb.append("class CheckRouteExistRequest {\n");
101+
102+
sb.append(" name: ").append(toIndentedString(name)).append("\n");
103+
sb.append(" serviceId: ").append(toIndentedString(serviceId)).append("\n");
104+
sb.append("}");
105+
return sb.toString();
106+
}
107+
108+
/**
109+
* Convert the given object to string with each line indented by 4 spaces
110+
* (except the first line).
111+
*/
112+
private String toIndentedString(java.lang.Object o) {
113+
if (o == null) {
114+
return "null";
115+
}
116+
return o.toString().replace("\n", "\n ");
117+
}
118+
119+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/*
2+
* apig20221112
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.apig20221112.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+
* CheckRouteExistResponse
28+
*/
29+
30+
31+
32+
public class CheckRouteExistResponse extends com.volcengine.model.AbstractResponse {
33+
@SerializedName("Exist")
34+
private Boolean exist = null;
35+
36+
@SerializedName("Id")
37+
private String id = null;
38+
39+
public CheckRouteExistResponse exist(Boolean exist) {
40+
this.exist = exist;
41+
return this;
42+
}
43+
44+
/**
45+
* Get exist
46+
* @return exist
47+
**/
48+
@Schema(description = "")
49+
public Boolean isExist() {
50+
return exist;
51+
}
52+
53+
public void setExist(Boolean exist) {
54+
this.exist = exist;
55+
}
56+
57+
public CheckRouteExistResponse id(String id) {
58+
this.id = id;
59+
return this;
60+
}
61+
62+
/**
63+
* Get id
64+
* @return id
65+
**/
66+
@Schema(description = "")
67+
public String getId() {
68+
return id;
69+
}
70+
71+
public void setId(String id) {
72+
this.id = id;
73+
}
74+
75+
76+
@Override
77+
public boolean equals(java.lang.Object o) {
78+
if (this == o) {
79+
return true;
80+
}
81+
if (o == null || getClass() != o.getClass()) {
82+
return false;
83+
}
84+
CheckRouteExistResponse checkRouteExistResponse = (CheckRouteExistResponse) o;
85+
return Objects.equals(this.exist, checkRouteExistResponse.exist) &&
86+
Objects.equals(this.id, checkRouteExistResponse.id);
87+
}
88+
89+
@Override
90+
public int hashCode() {
91+
return Objects.hash(exist, id);
92+
}
93+
94+
95+
@Override
96+
public String toString() {
97+
StringBuilder sb = new StringBuilder();
98+
sb.append("class CheckRouteExistResponse {\n");
99+
100+
sb.append(" exist: ").append(toIndentedString(exist)).append("\n");
101+
sb.append(" id: ").append(toIndentedString(id)).append("\n");
102+
sb.append("}");
103+
return sb.toString();
104+
}
105+
106+
/**
107+
* Convert the given object to string with each line indented by 4 spaces
108+
* (except the first line).
109+
*/
110+
private String toIndentedString(java.lang.Object o) {
111+
if (o == null) {
112+
return "null";
113+
}
114+
return o.toString().replace("\n", "\n ");
115+
}
116+
117+
}

0 commit comments

Comments
 (0)