Skip to content

Commit 58306a0

Browse files
author
BitsAdmin
committed
Merge 'bmq-Java-2023-06-01-online-2402-2026_03_24_18_05_23' into 'integration_2026-03-26_1130262513410'
feat: [development task] bmq-2402-Java (2222528) See merge request: !938
2 parents b22b20e + 1dda56e commit 58306a0

14 files changed

Lines changed: 1139 additions & 21 deletions

volcengine-java-sdk-bmq/src/main/java/com/volcengine/bmq/BmqApi.java

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
import com.volcengine.bmq.model.PreviewTopicDataResponse;
8888
import com.volcengine.bmq.model.ResetSubscriptionOffsetRequest;
8989
import com.volcengine.bmq.model.ResetSubscriptionOffsetResponse;
90+
import com.volcengine.bmq.model.ScaleDownInstanceRequest;
91+
import com.volcengine.bmq.model.ScaleDownInstanceResponse;
9092
import com.volcengine.bmq.model.ScaleUpTopicRequest;
9193
import com.volcengine.bmq.model.ScaleUpTopicResponse;
9294
import com.volcengine.bmq.model.SearchGroupsRequest;
@@ -95,6 +97,8 @@
9597
import com.volcengine.bmq.model.SearchInstancesResponse;
9698
import com.volcengine.bmq.model.SearchTopicsRequest;
9799
import com.volcengine.bmq.model.SearchTopicsResponse;
100+
import com.volcengine.bmq.model.TopicExistRequest;
101+
import com.volcengine.bmq.model.TopicExistResponse;
98102
import com.volcengine.bmq.model.UpdateInstanceMessageRetentionRequest;
99103
import com.volcengine.bmq.model.UpdateInstanceMessageRetentionResponse;
100104
import com.volcengine.bmq.model.UpdateTopicMessageRetentionRequest;
@@ -3845,6 +3849,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
38453849
apiClient.executeAsync(call, localVarReturnType, callback);
38463850
return call;
38473851
}
3852+
/**
3853+
* Build call for scaleDownInstance
3854+
* @param body (required)
3855+
* @param progressListener Progress listener
3856+
* @param progressRequestListener Progress request listener
3857+
* @return Call to execute
3858+
* @throws ApiException If fail to serialize the request body object
3859+
*/
3860+
public com.squareup.okhttp.Call scaleDownInstanceCall(ScaleDownInstanceRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
3861+
Object localVarPostBody = body;
3862+
3863+
// create path and map variables
3864+
String localVarPath = "/ScaleDownInstance/2023-06-01/bmq/post/application_json/";
3865+
3866+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
3867+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
3868+
3869+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
3870+
3871+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
3872+
3873+
final String[] localVarAccepts = {
3874+
"application/json"
3875+
};
3876+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
3877+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
3878+
3879+
final String[] localVarContentTypes = {
3880+
"text/plain"
3881+
};
3882+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
3883+
localVarHeaderParams.put("Content-Type", localVarContentType);
3884+
3885+
if(progressListener != null) {
3886+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
3887+
@Override
3888+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
3889+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
3890+
return originalResponse.newBuilder()
3891+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
3892+
.build();
3893+
}
3894+
});
3895+
}
3896+
3897+
String[] localVarAuthNames = new String[] { "volcengineSign" };
3898+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
3899+
}
3900+
3901+
@SuppressWarnings("rawtypes")
3902+
private com.squareup.okhttp.Call scaleDownInstanceValidateBeforeCall(ScaleDownInstanceRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
3903+
// verify the required parameter 'body' is set
3904+
if (body == null) {
3905+
throw new ApiException("Missing the required parameter 'body' when calling scaleDownInstance(Async)");
3906+
}
3907+
3908+
com.squareup.okhttp.Call call = scaleDownInstanceCall(body, progressListener, progressRequestListener);
3909+
return call;
3910+
3911+
3912+
3913+
3914+
3915+
}
3916+
3917+
/**
3918+
*
3919+
*
3920+
* @param body (required)
3921+
* @return ScaleDownInstanceResponse
3922+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
3923+
*/
3924+
public ScaleDownInstanceResponse scaleDownInstance(ScaleDownInstanceRequest body) throws ApiException {
3925+
ApiResponse<ScaleDownInstanceResponse> resp = scaleDownInstanceWithHttpInfo(body);
3926+
return resp.getData();
3927+
}
3928+
3929+
/**
3930+
*
3931+
*
3932+
* @param body (required)
3933+
* @return ApiResponse&lt;ScaleDownInstanceResponse&gt;
3934+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
3935+
*/
3936+
public ApiResponse<ScaleDownInstanceResponse> scaleDownInstanceWithHttpInfo( @NotNull ScaleDownInstanceRequest body) throws ApiException {
3937+
com.squareup.okhttp.Call call = scaleDownInstanceValidateBeforeCall(body, null, null);
3938+
Type localVarReturnType = new TypeToken<ScaleDownInstanceResponse>(){}.getType();
3939+
return apiClient.execute(call, localVarReturnType);
3940+
}
3941+
3942+
/**
3943+
* (asynchronously)
3944+
*
3945+
* @param body (required)
3946+
* @param callback The callback to be executed when the API call finishes
3947+
* @return The request call
3948+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
3949+
*/
3950+
public com.squareup.okhttp.Call scaleDownInstanceAsync(ScaleDownInstanceRequest body, final ApiCallback<ScaleDownInstanceResponse> callback) throws ApiException {
3951+
3952+
ProgressResponseBody.ProgressListener progressListener = null;
3953+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
3954+
3955+
if (callback != null) {
3956+
progressListener = new ProgressResponseBody.ProgressListener() {
3957+
@Override
3958+
public void update(long bytesRead, long contentLength, boolean done) {
3959+
callback.onDownloadProgress(bytesRead, contentLength, done);
3960+
}
3961+
};
3962+
3963+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
3964+
@Override
3965+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
3966+
callback.onUploadProgress(bytesWritten, contentLength, done);
3967+
}
3968+
};
3969+
}
3970+
3971+
com.squareup.okhttp.Call call = scaleDownInstanceValidateBeforeCall(body, progressListener, progressRequestListener);
3972+
Type localVarReturnType = new TypeToken<ScaleDownInstanceResponse>(){}.getType();
3973+
apiClient.executeAsync(call, localVarReturnType, callback);
3974+
return call;
3975+
}
38483976
/**
38493977
* Build call for scaleUpTopic
38503978
* @param body (required)
@@ -4341,6 +4469,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
43414469
apiClient.executeAsync(call, localVarReturnType, callback);
43424470
return call;
43434471
}
4472+
/**
4473+
* Build call for topicExist
4474+
* @param body (required)
4475+
* @param progressListener Progress listener
4476+
* @param progressRequestListener Progress request listener
4477+
* @return Call to execute
4478+
* @throws ApiException If fail to serialize the request body object
4479+
*/
4480+
public com.squareup.okhttp.Call topicExistCall(TopicExistRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
4481+
Object localVarPostBody = body;
4482+
4483+
// create path and map variables
4484+
String localVarPath = "/TopicExist/2023-06-01/bmq/get/text_plain/";
4485+
4486+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
4487+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
4488+
4489+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
4490+
4491+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
4492+
4493+
final String[] localVarAccepts = {
4494+
"application/json"
4495+
};
4496+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
4497+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
4498+
4499+
final String[] localVarContentTypes = {
4500+
"text/plain"
4501+
};
4502+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
4503+
localVarHeaderParams.put("Content-Type", localVarContentType);
4504+
4505+
if(progressListener != null) {
4506+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
4507+
@Override
4508+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
4509+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
4510+
return originalResponse.newBuilder()
4511+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
4512+
.build();
4513+
}
4514+
});
4515+
}
4516+
4517+
String[] localVarAuthNames = new String[] { "volcengineSign" };
4518+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
4519+
}
4520+
4521+
@SuppressWarnings("rawtypes")
4522+
private com.squareup.okhttp.Call topicExistValidateBeforeCall(TopicExistRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
4523+
// verify the required parameter 'body' is set
4524+
if (body == null) {
4525+
throw new ApiException("Missing the required parameter 'body' when calling topicExist(Async)");
4526+
}
4527+
4528+
com.squareup.okhttp.Call call = topicExistCall(body, progressListener, progressRequestListener);
4529+
return call;
4530+
4531+
4532+
4533+
4534+
4535+
}
4536+
4537+
/**
4538+
*
4539+
*
4540+
* @param body (required)
4541+
* @return TopicExistResponse
4542+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4543+
*/
4544+
public TopicExistResponse topicExist(TopicExistRequest body) throws ApiException {
4545+
ApiResponse<TopicExistResponse> resp = topicExistWithHttpInfo(body);
4546+
return resp.getData();
4547+
}
4548+
4549+
/**
4550+
*
4551+
*
4552+
* @param body (required)
4553+
* @return ApiResponse&lt;TopicExistResponse&gt;
4554+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4555+
*/
4556+
public ApiResponse<TopicExistResponse> topicExistWithHttpInfo( @NotNull TopicExistRequest body) throws ApiException {
4557+
com.squareup.okhttp.Call call = topicExistValidateBeforeCall(body, null, null);
4558+
Type localVarReturnType = new TypeToken<TopicExistResponse>(){}.getType();
4559+
return apiClient.execute(call, localVarReturnType);
4560+
}
4561+
4562+
/**
4563+
* (asynchronously)
4564+
*
4565+
* @param body (required)
4566+
* @param callback The callback to be executed when the API call finishes
4567+
* @return The request call
4568+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
4569+
*/
4570+
public com.squareup.okhttp.Call topicExistAsync(TopicExistRequest body, final ApiCallback<TopicExistResponse> callback) throws ApiException {
4571+
4572+
ProgressResponseBody.ProgressListener progressListener = null;
4573+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
4574+
4575+
if (callback != null) {
4576+
progressListener = new ProgressResponseBody.ProgressListener() {
4577+
@Override
4578+
public void update(long bytesRead, long contentLength, boolean done) {
4579+
callback.onDownloadProgress(bytesRead, contentLength, done);
4580+
}
4581+
};
4582+
4583+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
4584+
@Override
4585+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
4586+
callback.onUploadProgress(bytesWritten, contentLength, done);
4587+
}
4588+
};
4589+
}
4590+
4591+
com.squareup.okhttp.Call call = topicExistValidateBeforeCall(body, progressListener, progressRequestListener);
4592+
Type localVarReturnType = new TypeToken<TopicExistResponse>(){}.getType();
4593+
apiClient.executeAsync(call, localVarReturnType, callback);
4594+
return call;
4595+
}
43444596
/**
43454597
* Build call for updateInstanceMessageRetention
43464598
* @param body (required)

volcengine-java-sdk-bmq/src/main/java/com/volcengine/bmq/model/DeleteGroupRequest.java

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ public class DeleteGroupRequest {
3333
@SerializedName("GroupId")
3434
private String groupId = null;
3535

36+
@SerializedName("GroupName")
37+
private String groupName = null;
38+
39+
@SerializedName("InstanceId")
40+
private String instanceId = null;
41+
3642
public DeleteGroupRequest groupId(String groupId) {
3743
this.groupId = groupId;
3844
return this;
@@ -42,8 +48,7 @@ public DeleteGroupRequest groupId(String groupId) {
4248
* Get groupId
4349
* @return groupId
4450
**/
45-
@NotNull
46-
@Schema(required = true, description = "")
51+
@Schema(description = "")
4752
public String getGroupId() {
4853
return groupId;
4954
}
@@ -52,6 +57,42 @@ public void setGroupId(String groupId) {
5257
this.groupId = groupId;
5358
}
5459

60+
public DeleteGroupRequest groupName(String groupName) {
61+
this.groupName = groupName;
62+
return this;
63+
}
64+
65+
/**
66+
* Get groupName
67+
* @return groupName
68+
**/
69+
@Schema(description = "")
70+
public String getGroupName() {
71+
return groupName;
72+
}
73+
74+
public void setGroupName(String groupName) {
75+
this.groupName = groupName;
76+
}
77+
78+
public DeleteGroupRequest instanceId(String instanceId) {
79+
this.instanceId = instanceId;
80+
return this;
81+
}
82+
83+
/**
84+
* Get instanceId
85+
* @return instanceId
86+
**/
87+
@Schema(description = "")
88+
public String getInstanceId() {
89+
return instanceId;
90+
}
91+
92+
public void setInstanceId(String instanceId) {
93+
this.instanceId = instanceId;
94+
}
95+
5596

5697
@Override
5798
public boolean equals(java.lang.Object o) {
@@ -62,12 +103,14 @@ public boolean equals(java.lang.Object o) {
62103
return false;
63104
}
64105
DeleteGroupRequest deleteGroupRequest = (DeleteGroupRequest) o;
65-
return Objects.equals(this.groupId, deleteGroupRequest.groupId);
106+
return Objects.equals(this.groupId, deleteGroupRequest.groupId) &&
107+
Objects.equals(this.groupName, deleteGroupRequest.groupName) &&
108+
Objects.equals(this.instanceId, deleteGroupRequest.instanceId);
66109
}
67110

68111
@Override
69112
public int hashCode() {
70-
return Objects.hash(groupId);
113+
return Objects.hash(groupId, groupName, instanceId);
71114
}
72115

73116

@@ -77,6 +120,8 @@ public String toString() {
77120
sb.append("class DeleteGroupRequest {\n");
78121

79122
sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n");
123+
sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n");
124+
sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n");
80125
sb.append("}");
81126
return sb.toString();
82127
}

0 commit comments

Comments
 (0)