Skip to content

Commit 3a9c15a

Browse files
ci_volc_sdk_gensdk-liuzhaoliang
authored andcommitted
feat: auto generate for waf-Java-2023-12-25-online-904-2024_12_31_16_26_32
1 parent 66dd955 commit 3a9c15a

11 files changed

+1041
-10
lines changed

volcengine-java-sdk-waf/src/main/java/com/volcengine/waf/WafApi.java

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
import com.volcengine.waf.model.DeleteCustomPageResponse;
7272
import com.volcengine.waf.model.DeleteDomainRequest;
7373
import com.volcengine.waf.model.DeleteDomainResponse;
74+
import com.volcengine.waf.model.DeleteHostGroupRequest;
75+
import com.volcengine.waf.model.DeleteHostGroupResponse;
7476
import com.volcengine.waf.model.DeleteIpGroupRequest;
7577
import com.volcengine.waf.model.DeleteIpGroupResponse;
7678
import com.volcengine.waf.model.DeleteProhibitionBlackRequest;
@@ -165,6 +167,8 @@
165167
import com.volcengine.waf.model.UpdateCustomSystemVulRuleResponse;
166168
import com.volcengine.waf.model.UpdateDomainRequest;
167169
import com.volcengine.waf.model.UpdateDomainResponse;
170+
import com.volcengine.waf.model.UpdateHostGroupRequest;
171+
import com.volcengine.waf.model.UpdateHostGroupResponse;
168172
import com.volcengine.waf.model.UpdateInstanceCtlRequest;
169173
import com.volcengine.waf.model.UpdateInstanceCtlResponse;
170174
import com.volcengine.waf.model.UpdateIpGroupRequest;
@@ -2933,6 +2937,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
29332937
apiClient.executeAsync(call, localVarReturnType, callback);
29342938
return call;
29352939
}
2940+
/**
2941+
* Build call for deleteHostGroup
2942+
* @param body (required)
2943+
* @param progressListener Progress listener
2944+
* @param progressRequestListener Progress request listener
2945+
* @return Call to execute
2946+
* @throws ApiException If fail to serialize the request body object
2947+
*/
2948+
public com.squareup.okhttp.Call deleteHostGroupCall(DeleteHostGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
2949+
Object localVarPostBody = body;
2950+
2951+
// create path and map variables
2952+
String localVarPath = "/DeleteHostGroup/2023-12-25/waf/post/application_json/";
2953+
2954+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
2955+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
2956+
2957+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
2958+
2959+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
2960+
2961+
final String[] localVarAccepts = {
2962+
"application/json"
2963+
};
2964+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
2965+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
2966+
2967+
final String[] localVarContentTypes = {
2968+
"text/plain"
2969+
};
2970+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
2971+
localVarHeaderParams.put("Content-Type", localVarContentType);
2972+
2973+
if(progressListener != null) {
2974+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
2975+
@Override
2976+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
2977+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
2978+
return originalResponse.newBuilder()
2979+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
2980+
.build();
2981+
}
2982+
});
2983+
}
2984+
2985+
String[] localVarAuthNames = new String[] { "volcengineSign" };
2986+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
2987+
}
2988+
2989+
@SuppressWarnings("rawtypes")
2990+
private com.squareup.okhttp.Call deleteHostGroupValidateBeforeCall(DeleteHostGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
2991+
// verify the required parameter 'body' is set
2992+
if (body == null) {
2993+
throw new ApiException("Missing the required parameter 'body' when calling deleteHostGroup(Async)");
2994+
}
2995+
2996+
com.squareup.okhttp.Call call = deleteHostGroupCall(body, progressListener, progressRequestListener);
2997+
return call;
2998+
2999+
3000+
3001+
3002+
3003+
}
3004+
3005+
/**
3006+
*
3007+
*
3008+
* @param body (required)
3009+
* @return DeleteHostGroupResponse
3010+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
3011+
*/
3012+
public DeleteHostGroupResponse deleteHostGroup(DeleteHostGroupRequest body) throws ApiException {
3013+
ApiResponse<DeleteHostGroupResponse> resp = deleteHostGroupWithHttpInfo(body);
3014+
return resp.getData();
3015+
}
3016+
3017+
/**
3018+
*
3019+
*
3020+
* @param body (required)
3021+
* @return ApiResponse&lt;DeleteHostGroupResponse&gt;
3022+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
3023+
*/
3024+
public ApiResponse<DeleteHostGroupResponse> deleteHostGroupWithHttpInfo( @NotNull DeleteHostGroupRequest body) throws ApiException {
3025+
com.squareup.okhttp.Call call = deleteHostGroupValidateBeforeCall(body, null, null);
3026+
Type localVarReturnType = new TypeToken<DeleteHostGroupResponse>(){}.getType();
3027+
return apiClient.execute(call, localVarReturnType);
3028+
}
3029+
3030+
/**
3031+
* (asynchronously)
3032+
*
3033+
* @param body (required)
3034+
* @param callback The callback to be executed when the API call finishes
3035+
* @return The request call
3036+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
3037+
*/
3038+
public com.squareup.okhttp.Call deleteHostGroupAsync(DeleteHostGroupRequest body, final ApiCallback<DeleteHostGroupResponse> callback) throws ApiException {
3039+
3040+
ProgressResponseBody.ProgressListener progressListener = null;
3041+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
3042+
3043+
if (callback != null) {
3044+
progressListener = new ProgressResponseBody.ProgressListener() {
3045+
@Override
3046+
public void update(long bytesRead, long contentLength, boolean done) {
3047+
callback.onDownloadProgress(bytesRead, contentLength, done);
3048+
}
3049+
};
3050+
3051+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
3052+
@Override
3053+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
3054+
callback.onUploadProgress(bytesWritten, contentLength, done);
3055+
}
3056+
};
3057+
}
3058+
3059+
com.squareup.okhttp.Call call = deleteHostGroupValidateBeforeCall(body, progressListener, progressRequestListener);
3060+
Type localVarReturnType = new TypeToken<DeleteHostGroupResponse>(){}.getType();
3061+
apiClient.executeAsync(call, localVarReturnType, callback);
3062+
return call;
3063+
}
29363064
/**
29373065
* Build call for deleteIpGroup
29383066
* @param body (required)
@@ -8761,6 +8889,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
87618889
apiClient.executeAsync(call, localVarReturnType, callback);
87628890
return call;
87638891
}
8892+
/**
8893+
* Build call for updateHostGroup
8894+
* @param body (required)
8895+
* @param progressListener Progress listener
8896+
* @param progressRequestListener Progress request listener
8897+
* @return Call to execute
8898+
* @throws ApiException If fail to serialize the request body object
8899+
*/
8900+
public com.squareup.okhttp.Call updateHostGroupCall(UpdateHostGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
8901+
Object localVarPostBody = body;
8902+
8903+
// create path and map variables
8904+
String localVarPath = "/UpdateHostGroup/2023-12-25/waf/post/application_json/";
8905+
8906+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
8907+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
8908+
8909+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
8910+
8911+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
8912+
8913+
final String[] localVarAccepts = {
8914+
"application/json"
8915+
};
8916+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
8917+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
8918+
8919+
final String[] localVarContentTypes = {
8920+
"text/plain"
8921+
};
8922+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
8923+
localVarHeaderParams.put("Content-Type", localVarContentType);
8924+
8925+
if(progressListener != null) {
8926+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
8927+
@Override
8928+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
8929+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
8930+
return originalResponse.newBuilder()
8931+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
8932+
.build();
8933+
}
8934+
});
8935+
}
8936+
8937+
String[] localVarAuthNames = new String[] { "volcengineSign" };
8938+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
8939+
}
8940+
8941+
@SuppressWarnings("rawtypes")
8942+
private com.squareup.okhttp.Call updateHostGroupValidateBeforeCall(UpdateHostGroupRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
8943+
// verify the required parameter 'body' is set
8944+
if (body == null) {
8945+
throw new ApiException("Missing the required parameter 'body' when calling updateHostGroup(Async)");
8946+
}
8947+
8948+
com.squareup.okhttp.Call call = updateHostGroupCall(body, progressListener, progressRequestListener);
8949+
return call;
8950+
8951+
8952+
8953+
8954+
8955+
}
8956+
8957+
/**
8958+
*
8959+
*
8960+
* @param body (required)
8961+
* @return UpdateHostGroupResponse
8962+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
8963+
*/
8964+
public UpdateHostGroupResponse updateHostGroup(UpdateHostGroupRequest body) throws ApiException {
8965+
ApiResponse<UpdateHostGroupResponse> resp = updateHostGroupWithHttpInfo(body);
8966+
return resp.getData();
8967+
}
8968+
8969+
/**
8970+
*
8971+
*
8972+
* @param body (required)
8973+
* @return ApiResponse&lt;UpdateHostGroupResponse&gt;
8974+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
8975+
*/
8976+
public ApiResponse<UpdateHostGroupResponse> updateHostGroupWithHttpInfo( @NotNull UpdateHostGroupRequest body) throws ApiException {
8977+
com.squareup.okhttp.Call call = updateHostGroupValidateBeforeCall(body, null, null);
8978+
Type localVarReturnType = new TypeToken<UpdateHostGroupResponse>(){}.getType();
8979+
return apiClient.execute(call, localVarReturnType);
8980+
}
8981+
8982+
/**
8983+
* (asynchronously)
8984+
*
8985+
* @param body (required)
8986+
* @param callback The callback to be executed when the API call finishes
8987+
* @return The request call
8988+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
8989+
*/
8990+
public com.squareup.okhttp.Call updateHostGroupAsync(UpdateHostGroupRequest body, final ApiCallback<UpdateHostGroupResponse> callback) throws ApiException {
8991+
8992+
ProgressResponseBody.ProgressListener progressListener = null;
8993+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
8994+
8995+
if (callback != null) {
8996+
progressListener = new ProgressResponseBody.ProgressListener() {
8997+
@Override
8998+
public void update(long bytesRead, long contentLength, boolean done) {
8999+
callback.onDownloadProgress(bytesRead, contentLength, done);
9000+
}
9001+
};
9002+
9003+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
9004+
@Override
9005+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
9006+
callback.onUploadProgress(bytesWritten, contentLength, done);
9007+
}
9008+
};
9009+
}
9010+
9011+
com.squareup.okhttp.Call call = updateHostGroupValidateBeforeCall(body, progressListener, progressRequestListener);
9012+
Type localVarReturnType = new TypeToken<UpdateHostGroupResponse>(){}.getType();
9013+
apiClient.executeAsync(call, localVarReturnType, callback);
9014+
return call;
9015+
}
87649016
/**
87659017
* Build call for updateInstanceCtl
87669018
* @param body (required)

volcengine-java-sdk-waf/src/main/java/com/volcengine/waf/model/CreateAclRuleRequest.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public class CreateAclRuleRequest {
8181
@SerializedName("PrefixSwitch")
8282
private Integer prefixSwitch = null;
8383

84+
@SerializedName("ProjectName")
85+
private String projectName = null;
86+
8487
@SerializedName("Url")
8588
private String url = null;
8689

@@ -426,6 +429,24 @@ public void setPrefixSwitch(Integer prefixSwitch) {
426429
this.prefixSwitch = prefixSwitch;
427430
}
428431

432+
public CreateAclRuleRequest projectName(String projectName) {
433+
this.projectName = projectName;
434+
return this;
435+
}
436+
437+
/**
438+
* Get projectName
439+
* @return projectName
440+
**/
441+
@Schema(description = "")
442+
public String getProjectName() {
443+
return projectName;
444+
}
445+
446+
public void setProjectName(String projectName) {
447+
this.projectName = projectName;
448+
}
449+
429450
public CreateAclRuleRequest url(String url) {
430451
this.url = url;
431452
return this;
@@ -471,12 +492,13 @@ public boolean equals(java.lang.Object o) {
471492
Objects.equals(this.ipLocationSubregion, createAclRuleRequest.ipLocationSubregion) &&
472493
Objects.equals(this.name, createAclRuleRequest.name) &&
473494
Objects.equals(this.prefixSwitch, createAclRuleRequest.prefixSwitch) &&
495+
Objects.equals(this.projectName, createAclRuleRequest.projectName) &&
474496
Objects.equals(this.url, createAclRuleRequest.url);
475497
}
476498

477499
@Override
478500
public int hashCode() {
479-
return Objects.hash(accurateGroup, aclType, action, advanced, description, enable, hostAddType, hostGroupId, hostList, ipAddType, ipGroupId, ipList, ipLocationCountry, ipLocationSubregion, name, prefixSwitch, url);
501+
return Objects.hash(accurateGroup, aclType, action, advanced, description, enable, hostAddType, hostGroupId, hostList, ipAddType, ipGroupId, ipList, ipLocationCountry, ipLocationSubregion, name, prefixSwitch, projectName, url);
480502
}
481503

482504

@@ -501,6 +523,7 @@ public String toString() {
501523
sb.append(" ipLocationSubregion: ").append(toIndentedString(ipLocationSubregion)).append("\n");
502524
sb.append(" name: ").append(toIndentedString(name)).append("\n");
503525
sb.append(" prefixSwitch: ").append(toIndentedString(prefixSwitch)).append("\n");
526+
sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n");
504527
sb.append(" url: ").append(toIndentedString(url)).append("\n");
505528
sb.append("}");
506529
return sb.toString();

volcengine-java-sdk-waf/src/main/java/com/volcengine/waf/model/DeleteAclRuleRequest.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public class DeleteAclRuleRequest {
3636
@SerializedName("ID")
3737
private Integer ID = null;
3838

39+
@SerializedName("ProjectName")
40+
private String projectName = null;
41+
3942
public DeleteAclRuleRequest aclType(String aclType) {
4043
this.aclType = aclType;
4144
return this;
@@ -74,6 +77,24 @@ public void setID(Integer ID) {
7477
this.ID = ID;
7578
}
7679

80+
public DeleteAclRuleRequest projectName(String projectName) {
81+
this.projectName = projectName;
82+
return this;
83+
}
84+
85+
/**
86+
* Get projectName
87+
* @return projectName
88+
**/
89+
@Schema(description = "")
90+
public String getProjectName() {
91+
return projectName;
92+
}
93+
94+
public void setProjectName(String projectName) {
95+
this.projectName = projectName;
96+
}
97+
7798

7899
@Override
79100
public boolean equals(java.lang.Object o) {
@@ -85,12 +106,13 @@ public boolean equals(java.lang.Object o) {
85106
}
86107
DeleteAclRuleRequest deleteAclRuleRequest = (DeleteAclRuleRequest) o;
87108
return Objects.equals(this.aclType, deleteAclRuleRequest.aclType) &&
88-
Objects.equals(this.ID, deleteAclRuleRequest.ID);
109+
Objects.equals(this.ID, deleteAclRuleRequest.ID) &&
110+
Objects.equals(this.projectName, deleteAclRuleRequest.projectName);
89111
}
90112

91113
@Override
92114
public int hashCode() {
93-
return Objects.hash(aclType, ID);
115+
return Objects.hash(aclType, ID, projectName);
94116
}
95117

96118

@@ -101,6 +123,7 @@ public String toString() {
101123

102124
sb.append(" aclType: ").append(toIndentedString(aclType)).append("\n");
103125
sb.append(" ID: ").append(toIndentedString(ID)).append("\n");
126+
sb.append(" projectName: ").append(toIndentedString(projectName)).append("\n");
104127
sb.append("}");
105128
return sb.toString();
106129
}

0 commit comments

Comments
 (0)