Skip to content

Commit c6c1982

Browse files
author
BitsAdmin
committed
Merge branch 'filenas-Java-2022-01-01-online-1249-2025_06_04_20_24_02' into 'integration_2025-06-05_933333271298'
feat: [development task] FileNAS-1249-Java (1295196) See merge request iaasng/volcengine-java-sdk!515
2 parents 1e36fc0 + 276ab1f commit c6c1982

File tree

7 files changed

+1013
-0
lines changed

7 files changed

+1013
-0
lines changed

volcengine-java-sdk-filenas/src/main/java/com/volcengine/filenas/FilenasApi.java

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
import com.volcengine.filenas.model.CreatePreSignedUrlResponse;
4646
import com.volcengine.filenas.model.CreateSnapshotRequest;
4747
import com.volcengine.filenas.model.CreateSnapshotResponse;
48+
import com.volcengine.filenas.model.DeleteDataFlowRequest;
49+
import com.volcengine.filenas.model.DeleteDataFlowResponse;
4850
import com.volcengine.filenas.model.DeleteDataFlowTaskRequest;
4951
import com.volcengine.filenas.model.DeleteDataFlowTaskResponse;
5052
import com.volcengine.filenas.model.DeleteFileSystemRequest;
@@ -1243,6 +1245,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
12431245
apiClient.executeAsync(call, localVarReturnType, callback);
12441246
return call;
12451247
}
1248+
/**
1249+
* Build call for deleteDataFlow
1250+
* @param body (required)
1251+
* @param progressListener Progress listener
1252+
* @param progressRequestListener Progress request listener
1253+
* @return Call to execute
1254+
* @throws ApiException If fail to serialize the request body object
1255+
*/
1256+
public com.squareup.okhttp.Call deleteDataFlowCall(DeleteDataFlowRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1257+
Object localVarPostBody = body;
1258+
1259+
// create path and map variables
1260+
String localVarPath = "/DeleteDataFlow/2022-01-01/filenas/post/application_json/";
1261+
1262+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1263+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1264+
1265+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1266+
1267+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1268+
1269+
final String[] localVarAccepts = {
1270+
"application/json"
1271+
};
1272+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1273+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
1274+
1275+
final String[] localVarContentTypes = {
1276+
"text/plain"
1277+
};
1278+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1279+
localVarHeaderParams.put("Content-Type", localVarContentType);
1280+
1281+
if(progressListener != null) {
1282+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
1283+
@Override
1284+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
1285+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
1286+
return originalResponse.newBuilder()
1287+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
1288+
.build();
1289+
}
1290+
});
1291+
}
1292+
1293+
String[] localVarAuthNames = new String[] { "volcengineSign" };
1294+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
1295+
}
1296+
1297+
@SuppressWarnings("rawtypes")
1298+
private com.squareup.okhttp.Call deleteDataFlowValidateBeforeCall(DeleteDataFlowRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
1299+
// verify the required parameter 'body' is set
1300+
if (body == null) {
1301+
throw new ApiException("Missing the required parameter 'body' when calling deleteDataFlow(Async)");
1302+
}
1303+
1304+
com.squareup.okhttp.Call call = deleteDataFlowCall(body, progressListener, progressRequestListener);
1305+
return call;
1306+
1307+
1308+
1309+
1310+
1311+
}
1312+
1313+
/**
1314+
*
1315+
*
1316+
* @param body (required)
1317+
* @return DeleteDataFlowResponse
1318+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1319+
*/
1320+
public DeleteDataFlowResponse deleteDataFlow(DeleteDataFlowRequest body) throws ApiException {
1321+
ApiResponse<DeleteDataFlowResponse> resp = deleteDataFlowWithHttpInfo(body);
1322+
return resp.getData();
1323+
}
1324+
1325+
/**
1326+
*
1327+
*
1328+
* @param body (required)
1329+
* @return ApiResponse&lt;DeleteDataFlowResponse&gt;
1330+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1331+
*/
1332+
public ApiResponse<DeleteDataFlowResponse> deleteDataFlowWithHttpInfo( @NotNull DeleteDataFlowRequest body) throws ApiException {
1333+
com.squareup.okhttp.Call call = deleteDataFlowValidateBeforeCall(body, null, null);
1334+
Type localVarReturnType = new TypeToken<DeleteDataFlowResponse>(){}.getType();
1335+
return apiClient.execute(call, localVarReturnType);
1336+
}
1337+
1338+
/**
1339+
* (asynchronously)
1340+
*
1341+
* @param body (required)
1342+
* @param callback The callback to be executed when the API call finishes
1343+
* @return The request call
1344+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1345+
*/
1346+
public com.squareup.okhttp.Call deleteDataFlowAsync(DeleteDataFlowRequest body, final ApiCallback<DeleteDataFlowResponse> callback) throws ApiException {
1347+
1348+
ProgressResponseBody.ProgressListener progressListener = null;
1349+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
1350+
1351+
if (callback != null) {
1352+
progressListener = new ProgressResponseBody.ProgressListener() {
1353+
@Override
1354+
public void update(long bytesRead, long contentLength, boolean done) {
1355+
callback.onDownloadProgress(bytesRead, contentLength, done);
1356+
}
1357+
};
1358+
1359+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
1360+
@Override
1361+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
1362+
callback.onUploadProgress(bytesWritten, contentLength, done);
1363+
}
1364+
};
1365+
}
1366+
1367+
com.squareup.okhttp.Call call = deleteDataFlowValidateBeforeCall(body, progressListener, progressRequestListener);
1368+
Type localVarReturnType = new TypeToken<DeleteDataFlowResponse>(){}.getType();
1369+
apiClient.executeAsync(call, localVarReturnType, callback);
1370+
return call;
1371+
}
12461372
/**
12471373
* Build call for deleteDataFlowTask
12481374
* @param body (required)
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
/*
2+
* filenas
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.filenas.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.filenas.model.PolicyForDeleteDataFlowInput;
23+
import io.swagger.v3.oas.annotations.media.Schema;
24+
import java.io.IOException;
25+
import javax.validation.constraints.*;
26+
import javax.validation.Valid;
27+
/**
28+
* DeleteDataFlowRequest
29+
*/
30+
31+
32+
33+
public class DeleteDataFlowRequest {
34+
@SerializedName("EnableDeleteTlsLogTopic")
35+
private Boolean enableDeleteTlsLogTopic = null;
36+
37+
@SerializedName("Id")
38+
private String id = null;
39+
40+
@SerializedName("Policy")
41+
private PolicyForDeleteDataFlowInput policy = null;
42+
43+
public DeleteDataFlowRequest enableDeleteTlsLogTopic(Boolean enableDeleteTlsLogTopic) {
44+
this.enableDeleteTlsLogTopic = enableDeleteTlsLogTopic;
45+
return this;
46+
}
47+
48+
/**
49+
* Get enableDeleteTlsLogTopic
50+
* @return enableDeleteTlsLogTopic
51+
**/
52+
@Schema(description = "")
53+
public Boolean isEnableDeleteTlsLogTopic() {
54+
return enableDeleteTlsLogTopic;
55+
}
56+
57+
public void setEnableDeleteTlsLogTopic(Boolean enableDeleteTlsLogTopic) {
58+
this.enableDeleteTlsLogTopic = enableDeleteTlsLogTopic;
59+
}
60+
61+
public DeleteDataFlowRequest id(String id) {
62+
this.id = id;
63+
return this;
64+
}
65+
66+
/**
67+
* Get id
68+
* @return id
69+
**/
70+
@NotNull
71+
@Schema(required = true, description = "")
72+
public String getId() {
73+
return id;
74+
}
75+
76+
public void setId(String id) {
77+
this.id = id;
78+
}
79+
80+
public DeleteDataFlowRequest policy(PolicyForDeleteDataFlowInput policy) {
81+
this.policy = policy;
82+
return this;
83+
}
84+
85+
/**
86+
* Get policy
87+
* @return policy
88+
**/
89+
@Valid
90+
@Schema(description = "")
91+
public PolicyForDeleteDataFlowInput getPolicy() {
92+
return policy;
93+
}
94+
95+
public void setPolicy(PolicyForDeleteDataFlowInput policy) {
96+
this.policy = policy;
97+
}
98+
99+
100+
@Override
101+
public boolean equals(java.lang.Object o) {
102+
if (this == o) {
103+
return true;
104+
}
105+
if (o == null || getClass() != o.getClass()) {
106+
return false;
107+
}
108+
DeleteDataFlowRequest deleteDataFlowRequest = (DeleteDataFlowRequest) o;
109+
return Objects.equals(this.enableDeleteTlsLogTopic, deleteDataFlowRequest.enableDeleteTlsLogTopic) &&
110+
Objects.equals(this.id, deleteDataFlowRequest.id) &&
111+
Objects.equals(this.policy, deleteDataFlowRequest.policy);
112+
}
113+
114+
@Override
115+
public int hashCode() {
116+
return Objects.hash(enableDeleteTlsLogTopic, id, policy);
117+
}
118+
119+
120+
@Override
121+
public String toString() {
122+
StringBuilder sb = new StringBuilder();
123+
sb.append("class DeleteDataFlowRequest {\n");
124+
125+
sb.append(" enableDeleteTlsLogTopic: ").append(toIndentedString(enableDeleteTlsLogTopic)).append("\n");
126+
sb.append(" id: ").append(toIndentedString(id)).append("\n");
127+
sb.append(" policy: ").append(toIndentedString(policy)).append("\n");
128+
sb.append("}");
129+
return sb.toString();
130+
}
131+
132+
/**
133+
* Convert the given object to string with each line indented by 4 spaces
134+
* (except the first line).
135+
*/
136+
private String toIndentedString(java.lang.Object o) {
137+
if (o == null) {
138+
return "null";
139+
}
140+
return o.toString().replace("\n", "\n ");
141+
}
142+
143+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* filenas
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.filenas.model;
14+
15+
import java.util.Objects;
16+
import java.util.Arrays;
17+
import javax.validation.constraints.*;
18+
import javax.validation.Valid;
19+
/**
20+
* DeleteDataFlowResponse
21+
*/
22+
23+
24+
25+
public class DeleteDataFlowResponse extends com.volcengine.model.AbstractResponse {
26+
27+
@Override
28+
public boolean equals(java.lang.Object o) {
29+
if (this == o) {
30+
return true;
31+
}
32+
if (o == null || getClass() != o.getClass()) {
33+
return false;
34+
}
35+
return true;
36+
}
37+
38+
@Override
39+
public int hashCode() {
40+
return Objects.hash();
41+
}
42+
43+
44+
@Override
45+
public String toString() {
46+
StringBuilder sb = new StringBuilder();
47+
sb.append("class DeleteDataFlowResponse {\n");
48+
49+
sb.append("}");
50+
return sb.toString();
51+
}
52+
53+
/**
54+
* Convert the given object to string with each line indented by 4 spaces
55+
* (except the first line).
56+
*/
57+
private String toIndentedString(java.lang.Object o) {
58+
if (o == null) {
59+
return "null";
60+
}
61+
return o.toString().replace("\n", "\n ");
62+
}
63+
64+
}

0 commit comments

Comments
 (0)