Skip to content

Commit 53bc3f2

Browse files
author
BitsAdmin
committed
Merge 'clb-Java-2020-04-01-online-2247-2026_02_03_16_37_09' into 'integration_2026-02-05_1111767210754'
feat: [development task] clb-2247-Java (2098000) See merge request: !878
2 parents 961925b + 08e578e commit 53bc3f2

File tree

3 files changed

+338
-0
lines changed

3 files changed

+338
-0
lines changed

volcengine-java-sdk-clb/src/main/java/com/volcengine/clb/ClbApi.java

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@
9999
import com.volcengine.clb.model.DescribeLoadBalancerAttributesResponse;
100100
import com.volcengine.clb.model.DescribeLoadBalancerSpecsRequest;
101101
import com.volcengine.clb.model.DescribeLoadBalancerSpecsResponse;
102+
import com.volcengine.clb.model.DescribeLoadBalancerStatusRequest;
103+
import com.volcengine.clb.model.DescribeLoadBalancerStatusResponse;
102104
import com.volcengine.clb.model.DescribeLoadBalancersBillingRequest;
103105
import com.volcengine.clb.model.DescribeLoadBalancersBillingResponse;
104106
import com.volcengine.clb.model.DescribeLoadBalancersRequest;
@@ -4689,6 +4691,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
46894691
apiClient.executeAsync(call, localVarReturnType, callback);
46904692
return call;
46914693
}
4694+
/**
4695+
* Build call for describeLoadBalancerStatus
4696+
* @param body (required)
4697+
* @param progressListener Progress listener
4698+
* @param progressRequestListener Progress request listener
4699+
* @return Call to execute
4700+
* @throws ApiException If fail to serialize the request body object
4701+
*/
4702+
public com.squareup.okhttp.Call describeLoadBalancerStatusCall(DescribeLoadBalancerStatusRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
4703+
Object localVarPostBody = body;
4704+
4705+
// create path and map variables
4706+
String localVarPath = "/DescribeLoadBalancerStatus/2020-04-01/clb/get/text_plain/";
4707+
4708+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
4709+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
4710+
4711+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
4712+
4713+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
4714+
4715+
final String[] localVarAccepts = {
4716+
"application/json"
4717+
};
4718+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
4719+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
4720+
4721+
final String[] localVarContentTypes = {
4722+
"text/plain"
4723+
};
4724+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
4725+
localVarHeaderParams.put("Content-Type", localVarContentType);
4726+
4727+
if(progressListener != null) {
4728+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
4729+
@Override
4730+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
4731+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
4732+
return originalResponse.newBuilder()
4733+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
4734+
.build();
4735+
}
4736+
});
4737+
}
4738+
4739+
String[] localVarAuthNames = new String[] { "volcengineSign" };
4740+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
4741+
}
4742+
4743+
@SuppressWarnings("rawtypes")
4744+
private com.squareup.okhttp.Call describeLoadBalancerStatusValidateBeforeCall(DescribeLoadBalancerStatusRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
4745+
// verify the required parameter 'body' is set
4746+
if (body == null) {
4747+
throw new ApiException("Missing the required parameter 'body' when calling describeLoadBalancerStatus(Async)");
4748+
}
4749+
4750+
com.squareup.okhttp.Call call = describeLoadBalancerStatusCall(body, progressListener, progressRequestListener);
4751+
return call;
4752+
4753+
4754+
4755+
4756+
4757+
}
4758+
4759+
/**
4760+
*
4761+
*
4762+
* @param body (required)
4763+
* @return DescribeLoadBalancerStatusResponse
4764+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4765+
*/
4766+
public DescribeLoadBalancerStatusResponse describeLoadBalancerStatus(DescribeLoadBalancerStatusRequest body) throws ApiException {
4767+
ApiResponse<DescribeLoadBalancerStatusResponse> resp = describeLoadBalancerStatusWithHttpInfo(body);
4768+
return resp.getData();
4769+
}
4770+
4771+
/**
4772+
*
4773+
*
4774+
* @param body (required)
4775+
* @return ApiResponse&lt;DescribeLoadBalancerStatusResponse&gt;
4776+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4777+
*/
4778+
public ApiResponse<DescribeLoadBalancerStatusResponse> describeLoadBalancerStatusWithHttpInfo( @NotNull DescribeLoadBalancerStatusRequest body) throws ApiException {
4779+
com.squareup.okhttp.Call call = describeLoadBalancerStatusValidateBeforeCall(body, null, null);
4780+
Type localVarReturnType = new TypeToken<DescribeLoadBalancerStatusResponse>(){}.getType();
4781+
return apiClient.execute(call, localVarReturnType);
4782+
}
4783+
4784+
/**
4785+
* (asynchronously)
4786+
*
4787+
* @param body (required)
4788+
* @param callback The callback to be executed when the API call finishes
4789+
* @return The request call
4790+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
4791+
*/
4792+
public com.squareup.okhttp.Call describeLoadBalancerStatusAsync(DescribeLoadBalancerStatusRequest body, final ApiCallback<DescribeLoadBalancerStatusResponse> callback) throws ApiException {
4793+
4794+
ProgressResponseBody.ProgressListener progressListener = null;
4795+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
4796+
4797+
if (callback != null) {
4798+
progressListener = new ProgressResponseBody.ProgressListener() {
4799+
@Override
4800+
public void update(long bytesRead, long contentLength, boolean done) {
4801+
callback.onDownloadProgress(bytesRead, contentLength, done);
4802+
}
4803+
};
4804+
4805+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
4806+
@Override
4807+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
4808+
callback.onUploadProgress(bytesWritten, contentLength, done);
4809+
}
4810+
};
4811+
}
4812+
4813+
com.squareup.okhttp.Call call = describeLoadBalancerStatusValidateBeforeCall(body, progressListener, progressRequestListener);
4814+
Type localVarReturnType = new TypeToken<DescribeLoadBalancerStatusResponse>(){}.getType();
4815+
apiClient.executeAsync(call, localVarReturnType, callback);
4816+
return call;
4817+
}
46924818
/**
46934819
* Build call for describeLoadBalancers
46944820
* @param body (required)
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/*
2+
* clb
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.clb.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+
* DescribeLoadBalancerStatusRequest
28+
*/
29+
30+
31+
32+
public class DescribeLoadBalancerStatusRequest {
33+
@SerializedName("LoadBalancerId")
34+
private String loadBalancerId = null;
35+
36+
public DescribeLoadBalancerStatusRequest loadBalancerId(String loadBalancerId) {
37+
this.loadBalancerId = loadBalancerId;
38+
return this;
39+
}
40+
41+
/**
42+
* Get loadBalancerId
43+
* @return loadBalancerId
44+
**/
45+
@NotNull
46+
@Schema(required = true, description = "")
47+
public String getLoadBalancerId() {
48+
return loadBalancerId;
49+
}
50+
51+
public void setLoadBalancerId(String loadBalancerId) {
52+
this.loadBalancerId = loadBalancerId;
53+
}
54+
55+
56+
@Override
57+
public boolean equals(java.lang.Object o) {
58+
if (this == o) {
59+
return true;
60+
}
61+
if (o == null || getClass() != o.getClass()) {
62+
return false;
63+
}
64+
DescribeLoadBalancerStatusRequest describeLoadBalancerStatusRequest = (DescribeLoadBalancerStatusRequest) o;
65+
return Objects.equals(this.loadBalancerId, describeLoadBalancerStatusRequest.loadBalancerId);
66+
}
67+
68+
@Override
69+
public int hashCode() {
70+
return Objects.hash(loadBalancerId);
71+
}
72+
73+
74+
@Override
75+
public String toString() {
76+
StringBuilder sb = new StringBuilder();
77+
sb.append("class DescribeLoadBalancerStatusRequest {\n");
78+
79+
sb.append(" loadBalancerId: ").append(toIndentedString(loadBalancerId)).append("\n");
80+
sb.append("}");
81+
return sb.toString();
82+
}
83+
84+
/**
85+
* Convert the given object to string with each line indented by 4 spaces
86+
* (except the first line).
87+
*/
88+
private String toIndentedString(java.lang.Object o) {
89+
if (o == null) {
90+
return "null";
91+
}
92+
return o.toString().replace("\n", "\n ");
93+
}
94+
95+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/*
2+
* clb
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.clb.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+
* DescribeLoadBalancerStatusResponse
28+
*/
29+
30+
31+
32+
public class DescribeLoadBalancerStatusResponse extends com.volcengine.model.AbstractResponse {
33+
@SerializedName("LoadBalancerId")
34+
private String loadBalancerId = null;
35+
36+
@SerializedName("Status")
37+
private String status = null;
38+
39+
public DescribeLoadBalancerStatusResponse loadBalancerId(String loadBalancerId) {
40+
this.loadBalancerId = loadBalancerId;
41+
return this;
42+
}
43+
44+
/**
45+
* Get loadBalancerId
46+
* @return loadBalancerId
47+
**/
48+
@Schema(description = "")
49+
public String getLoadBalancerId() {
50+
return loadBalancerId;
51+
}
52+
53+
public void setLoadBalancerId(String loadBalancerId) {
54+
this.loadBalancerId = loadBalancerId;
55+
}
56+
57+
public DescribeLoadBalancerStatusResponse status(String status) {
58+
this.status = status;
59+
return this;
60+
}
61+
62+
/**
63+
* Get status
64+
* @return status
65+
**/
66+
@Schema(description = "")
67+
public String getStatus() {
68+
return status;
69+
}
70+
71+
public void setStatus(String status) {
72+
this.status = status;
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+
DescribeLoadBalancerStatusResponse describeLoadBalancerStatusResponse = (DescribeLoadBalancerStatusResponse) o;
85+
return Objects.equals(this.loadBalancerId, describeLoadBalancerStatusResponse.loadBalancerId) &&
86+
Objects.equals(this.status, describeLoadBalancerStatusResponse.status);
87+
}
88+
89+
@Override
90+
public int hashCode() {
91+
return Objects.hash(loadBalancerId, status);
92+
}
93+
94+
95+
@Override
96+
public String toString() {
97+
StringBuilder sb = new StringBuilder();
98+
sb.append("class DescribeLoadBalancerStatusResponse {\n");
99+
100+
sb.append(" loadBalancerId: ").append(toIndentedString(loadBalancerId)).append("\n");
101+
sb.append(" status: ").append(toIndentedString(status)).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)