2727
2828/** This file was automatically generated. */
2929@ SuppressWarnings ("javadoc" )
30- public class AlertFilter {
30+ public class AlertFilter extends org . zaproxy . clientapi . gen . deprecated . AlertFilterDeprecated {
3131
3232 private final ClientApi api ;
3333
@@ -54,40 +54,13 @@ public ApiResponse alertFilterList(String contextid) throws ClientApiException {
5454 public ApiResponse globalAlertFilterList () throws ClientApiException {
5555 return api .callApi ("alertFilter" , "view" , "globalAlertFilterList" , null );
5656 }
57- /**
58- * Adds a new alert filter for the context with the given ID.
59- *
60- * <p>This component is optional and therefore the API will only work if it is installed
61- */
62- public ApiResponse addAlertFilter (
63- String contextid ,
64- String ruleid ,
65- String newlevel ,
66- String url ,
67- String urlisregex ,
68- String parameter ,
69- String enabled )
70- throws ClientApiException {
71- return addAlertFilter (
72- contextid ,
73- ruleid ,
74- newlevel ,
75- url ,
76- urlisregex ,
77- parameter ,
78- enabled ,
79- null ,
80- null ,
81- null ,
82- null ,
83- null );
84- }
8557
8658 /**
8759 * Adds a new alert filter for the context with the given ID.
8860 *
8961 * <p>This component is optional and therefore the API will only work if it is installed
9062 */
63+ @ Override
9164 public ApiResponse addAlertFilter (
9265 String contextid ,
9366 String ruleid ,
@@ -100,7 +73,8 @@ public ApiResponse addAlertFilter(
10073 String attack ,
10174 String attackisregex ,
10275 String evidence ,
103- String evidenceisregex )
76+ String evidenceisregex ,
77+ String methods )
10478 throws ClientApiException {
10579 Map <String , String > map = new HashMap <>();
10680 map .put ("contextId" , contextid );
@@ -133,6 +107,9 @@ public ApiResponse addAlertFilter(
133107 if (evidenceisregex != null ) {
134108 map .put ("evidenceIsRegex" , evidenceisregex );
135109 }
110+ if (methods != null ) {
111+ map .put ("methods" , methods );
112+ }
136113 return api .callApi ("alertFilter" , "action" , "addAlertFilter" , map );
137114 }
138115
@@ -141,35 +118,7 @@ public ApiResponse addAlertFilter(
141118 *
142119 * <p>This component is optional and therefore the API will only work if it is installed
143120 */
144- public ApiResponse removeAlertFilter (
145- String contextid ,
146- String ruleid ,
147- String newlevel ,
148- String url ,
149- String urlisregex ,
150- String parameter ,
151- String enabled )
152- throws ClientApiException {
153- return removeAlertFilter (
154- contextid ,
155- ruleid ,
156- newlevel ,
157- url ,
158- urlisregex ,
159- parameter ,
160- enabled ,
161- null ,
162- null ,
163- null ,
164- null ,
165- null );
166- }
167-
168- /**
169- * Removes an alert filter from the context with the given ID.
170- *
171- * <p>This component is optional and therefore the API will only work if it is installed
172- */
121+ @ Override
173122 public ApiResponse removeAlertFilter (
174123 String contextid ,
175124 String ruleid ,
@@ -182,7 +131,8 @@ public ApiResponse removeAlertFilter(
182131 String attack ,
183132 String attackisregex ,
184133 String evidence ,
185- String evidenceisregex )
134+ String evidenceisregex ,
135+ String methods )
186136 throws ClientApiException {
187137 Map <String , String > map = new HashMap <>();
188138 map .put ("contextId" , contextid );
@@ -215,6 +165,9 @@ public ApiResponse removeAlertFilter(
215165 if (evidenceisregex != null ) {
216166 map .put ("evidenceIsRegex" , evidenceisregex );
217167 }
168+ if (methods != null ) {
169+ map .put ("methods" , methods );
170+ }
218171 return api .callApi ("alertFilter" , "action" , "removeAlertFilter" , map );
219172 }
220173
@@ -223,6 +176,7 @@ public ApiResponse removeAlertFilter(
223176 *
224177 * <p>This component is optional and therefore the API will only work if it is installed
225178 */
179+ @ Override
226180 public ApiResponse addGlobalAlertFilter (
227181 String ruleid ,
228182 String newlevel ,
@@ -234,7 +188,8 @@ public ApiResponse addGlobalAlertFilter(
234188 String attack ,
235189 String attackisregex ,
236190 String evidence ,
237- String evidenceisregex )
191+ String evidenceisregex ,
192+ String methods )
238193 throws ClientApiException {
239194 Map <String , String > map = new HashMap <>();
240195 map .put ("ruleId" , ruleid );
@@ -266,6 +221,9 @@ public ApiResponse addGlobalAlertFilter(
266221 if (evidenceisregex != null ) {
267222 map .put ("evidenceIsRegex" , evidenceisregex );
268223 }
224+ if (methods != null ) {
225+ map .put ("methods" , methods );
226+ }
269227 return api .callApi ("alertFilter" , "action" , "addGlobalAlertFilter" , map );
270228 }
271229
@@ -274,6 +232,7 @@ public ApiResponse addGlobalAlertFilter(
274232 *
275233 * <p>This component is optional and therefore the API will only work if it is installed
276234 */
235+ @ Override
277236 public ApiResponse removeGlobalAlertFilter (
278237 String ruleid ,
279238 String newlevel ,
@@ -285,7 +244,8 @@ public ApiResponse removeGlobalAlertFilter(
285244 String attack ,
286245 String attackisregex ,
287246 String evidence ,
288- String evidenceisregex )
247+ String evidenceisregex ,
248+ String methods )
289249 throws ClientApiException {
290250 Map <String , String > map = new HashMap <>();
291251 map .put ("ruleId" , ruleid );
@@ -317,6 +277,9 @@ public ApiResponse removeGlobalAlertFilter(
317277 if (evidenceisregex != null ) {
318278 map .put ("evidenceIsRegex" , evidenceisregex );
319279 }
280+ if (methods != null ) {
281+ map .put ("methods" , methods );
282+ }
320283 return api .callApi ("alertFilter" , "action" , "removeGlobalAlertFilter" , map );
321284 }
322285
0 commit comments