You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SearchRequest.java 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2023 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. package org.sonarqube.ws.client.issues;
  21. import java.util.List;
  22. import javax.annotation.Generated;
  23. /**
  24. * This is part of the internal API.
  25. * This is a POST request.
  26. * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/search">Further information about this action online (including a response example)</a>
  27. * @since 3.6
  28. */
  29. @Generated("sonar-ws-generator")
  30. public class SearchRequest {
  31. private List<String> additionalFields;
  32. private String asc;
  33. private String assigned;
  34. private List<String> assignees;
  35. private List<String> author;
  36. private String branch;
  37. private List<String> componentKeys;
  38. private String createdAfter;
  39. private String createdAt;
  40. private String createdBefore;
  41. private String createdInLast;
  42. private List<String> cwe;
  43. private List<String> directories;
  44. private String facetMode;
  45. private List<String> facets;
  46. private List<String> fileUuids;
  47. private List<String> issues;
  48. private List<String> languages;
  49. private String onComponentOnly;
  50. private List<String> owaspTop10;
  51. private String p;
  52. private List<String> projects;
  53. private String ps;
  54. private String pullRequest;
  55. private List<String> resolutions;
  56. private String resolved;
  57. private List<String> rules;
  58. private String s;
  59. private List<String> sansTop25;
  60. private List<String> severities;
  61. private String inNewCodePeriod;
  62. private List<String> sonarsourceSecurity;
  63. private List<String> statuses;
  64. private List<String> tags;
  65. private List<String> types;
  66. /**
  67. * Possible values:
  68. * <ul>
  69. * <li>"_all"</li>
  70. * <li>"comments"</li>
  71. * <li>"languages"</li>
  72. * <li>"actionPlans"</li>
  73. * <li>"rules"</li>
  74. * <li>"transitions"</li>
  75. * <li>"actions"</li>
  76. * <li>"users"</li>
  77. * </ul>
  78. */
  79. public SearchRequest setAdditionalFields(List<String> additionalFields) {
  80. this.additionalFields = additionalFields;
  81. return this;
  82. }
  83. public List<String> getAdditionalFields() {
  84. return additionalFields;
  85. }
  86. /**
  87. * Possible values:
  88. * <ul>
  89. * <li>"true"</li>
  90. * <li>"false"</li>
  91. * <li>"yes"</li>
  92. * <li>"no"</li>
  93. * </ul>
  94. */
  95. public SearchRequest setAsc(String asc) {
  96. this.asc = asc;
  97. return this;
  98. }
  99. public String getAsc() {
  100. return asc;
  101. }
  102. /**
  103. * Possible values:
  104. * <ul>
  105. * <li>"true"</li>
  106. * <li>"false"</li>
  107. * <li>"yes"</li>
  108. * <li>"no"</li>
  109. * </ul>
  110. */
  111. public SearchRequest setAssigned(String assigned) {
  112. this.assigned = assigned;
  113. return this;
  114. }
  115. public String getAssigned() {
  116. return assigned;
  117. }
  118. /**
  119. * Example value: "admin,usera,__me__"
  120. */
  121. public SearchRequest setAssignees(List<String> assignees) {
  122. this.assignees = assignees;
  123. return this;
  124. }
  125. public List<String> getAssignees() {
  126. return assignees;
  127. }
  128. /**
  129. * Example value: "author=torvalds@linux-foundation.org&author=linux@fondation.org"
  130. */
  131. public SearchRequest setAuthor(List<String> author) {
  132. this.author = author;
  133. return this;
  134. }
  135. public List<String> getAuthor() {
  136. return author;
  137. }
  138. /**
  139. * This is part of the internal API.
  140. * Example value: "feature/my_branch"
  141. */
  142. public SearchRequest setBranch(String branch) {
  143. this.branch = branch;
  144. return this;
  145. }
  146. public String getBranch() {
  147. return branch;
  148. }
  149. /**
  150. * Example value: "my_project"
  151. */
  152. public SearchRequest setComponentKeys(List<String> componentKeys) {
  153. this.componentKeys = componentKeys;
  154. return this;
  155. }
  156. public List<String> getComponentKeys() {
  157. return componentKeys;
  158. }
  159. /**
  160. * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
  161. */
  162. public SearchRequest setCreatedAfter(String createdAfter) {
  163. this.createdAfter = createdAfter;
  164. return this;
  165. }
  166. public String getCreatedAfter() {
  167. return createdAfter;
  168. }
  169. /**
  170. * Example value: "2017-10-19T13:00:00+0200"
  171. */
  172. public SearchRequest setCreatedAt(String createdAt) {
  173. this.createdAt = createdAt;
  174. return this;
  175. }
  176. public String getCreatedAt() {
  177. return createdAt;
  178. }
  179. /**
  180. * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
  181. */
  182. public SearchRequest setCreatedBefore(String createdBefore) {
  183. this.createdBefore = createdBefore;
  184. return this;
  185. }
  186. public String getCreatedBefore() {
  187. return createdBefore;
  188. }
  189. /**
  190. * Example value: "1m2w (1 month 2 weeks)"
  191. */
  192. public SearchRequest setCreatedInLast(String createdInLast) {
  193. this.createdInLast = createdInLast;
  194. return this;
  195. }
  196. public String getCreatedInLast() {
  197. return createdInLast;
  198. }
  199. /**
  200. * Example value: "12,125,unknown"
  201. */
  202. public SearchRequest setCwe(List<String> cwe) {
  203. this.cwe = cwe;
  204. return this;
  205. }
  206. public List<String> getCwe() {
  207. return cwe;
  208. }
  209. /**
  210. * This is part of the internal API.
  211. * Example value: "src/main/java/org/sonar/server/"
  212. */
  213. public SearchRequest setDirectories(List<String> directories) {
  214. this.directories = directories;
  215. return this;
  216. }
  217. public List<String> getDirectories() {
  218. return directories;
  219. }
  220. /**
  221. * Possible values:
  222. * <ul>
  223. * <li>"projects"</li>
  224. * <li>"fileUuids"</li>
  225. * <li>"assigned_to_me"</li>
  226. * <li>"severities"</li>
  227. * <li>"statuses"</li>
  228. * <li>"resolutions"</li>
  229. * <li>"actionPlans"</li>
  230. * <li>"rules"</li>
  231. * <li>"assignees"</li>
  232. * <li>"reporters"</li>
  233. * <li>"authors"</li>
  234. * <li>"author"</li>
  235. * <li>"directories"</li>
  236. * <li>"languages"</li>
  237. * <li>"tags"</li>
  238. * <li>"types"</li>
  239. * <li>"owaspTop10"</li>
  240. * <li>"sansTop25"</li>
  241. * <li>"cwe"</li>
  242. * <li>"createdAt"</li>
  243. * <li>"sonarsourceSecurity"</li>
  244. * </ul>
  245. */
  246. public SearchRequest setFacets(List<String> facets) {
  247. this.facets = facets;
  248. return this;
  249. }
  250. public List<String> getFacets() {
  251. return facets;
  252. }
  253. /**
  254. * This is part of the internal API.
  255. * Example value: "bdd82933-3070-4903-9188-7d8749e8bb92"
  256. */
  257. public SearchRequest setFileUuids(List<String> fileUuids) {
  258. this.fileUuids = fileUuids;
  259. return this;
  260. }
  261. public List<String> getFileUuids() {
  262. return fileUuids;
  263. }
  264. /**
  265. * Example value: "5bccd6e8-f525-43a2-8d76-fcb13dde79ef"
  266. */
  267. public SearchRequest setIssues(List<String> issues) {
  268. this.issues = issues;
  269. return this;
  270. }
  271. public List<String> getIssues() {
  272. return issues;
  273. }
  274. /**
  275. * Example value: "java,js"
  276. */
  277. public SearchRequest setLanguages(List<String> languages) {
  278. this.languages = languages;
  279. return this;
  280. }
  281. public List<String> getLanguages() {
  282. return languages;
  283. }
  284. /**
  285. * Possible values:
  286. * <ul>
  287. * <li>"true"</li>
  288. * <li>"false"</li>
  289. * <li>"yes"</li>
  290. * <li>"no"</li>
  291. * </ul>
  292. */
  293. public SearchRequest setOnComponentOnly(String onComponentOnly) {
  294. this.onComponentOnly = onComponentOnly;
  295. return this;
  296. }
  297. public String getOnComponentOnly() {
  298. return onComponentOnly;
  299. }
  300. /**
  301. * Possible values:
  302. * <ul>
  303. * <li>"a1"</li>
  304. * <li>"a2"</li>
  305. * <li>"a3"</li>
  306. * <li>"a4"</li>
  307. * <li>"a5"</li>
  308. * <li>"a6"</li>
  309. * <li>"a7"</li>
  310. * <li>"a8"</li>
  311. * <li>"a9"</li>
  312. * <li>"a10"</li>
  313. * <li>"unknown"</li>
  314. * </ul>
  315. */
  316. public SearchRequest setOwaspTop10(List<String> owaspTop10) {
  317. this.owaspTop10 = owaspTop10;
  318. return this;
  319. }
  320. public List<String> getOwaspTop10() {
  321. return owaspTop10;
  322. }
  323. /**
  324. * Example value: "42"
  325. */
  326. public SearchRequest setP(String p) {
  327. this.p = p;
  328. return this;
  329. }
  330. public String getP() {
  331. return p;
  332. }
  333. /**
  334. * This is part of the internal API.
  335. * Example value: "my_project"
  336. */
  337. public SearchRequest setProjects(List<String> projects) {
  338. this.projects = projects;
  339. return this;
  340. }
  341. public List<String> getProjects() {
  342. return projects;
  343. }
  344. /**
  345. * Example value: "20"
  346. */
  347. public SearchRequest setPs(String ps) {
  348. this.ps = ps;
  349. return this;
  350. }
  351. public String getPs() {
  352. return ps;
  353. }
  354. /**
  355. * This is part of the internal API.
  356. * Example value: "5461"
  357. */
  358. public SearchRequest setPullRequest(String pullRequest) {
  359. this.pullRequest = pullRequest;
  360. return this;
  361. }
  362. public String getPullRequest() {
  363. return pullRequest;
  364. }
  365. /**
  366. * Example value: "FIXED,REMOVED"
  367. * Possible values:
  368. * <ul>
  369. * <li>"FALSE-POSITIVE"</li>
  370. * <li>"WONTFIX"</li>
  371. * <li>"FIXED"</li>
  372. * <li>"REMOVED"</li>
  373. * </ul>
  374. */
  375. public SearchRequest setResolutions(List<String> resolutions) {
  376. this.resolutions = resolutions;
  377. return this;
  378. }
  379. public List<String> getResolutions() {
  380. return resolutions;
  381. }
  382. /**
  383. * Possible values:
  384. * <ul>
  385. * <li>"true"</li>
  386. * <li>"false"</li>
  387. * <li>"yes"</li>
  388. * <li>"no"</li>
  389. * </ul>
  390. */
  391. public SearchRequest setResolved(String resolved) {
  392. this.resolved = resolved;
  393. return this;
  394. }
  395. public String getResolved() {
  396. return resolved;
  397. }
  398. /**
  399. * Example value: "java:AvoidCycles"
  400. */
  401. public SearchRequest setRules(List<String> rules) {
  402. this.rules = rules;
  403. return this;
  404. }
  405. public List<String> getRules() {
  406. return rules;
  407. }
  408. /**
  409. * Possible values:
  410. * <ul>
  411. * <li>"CREATION_DATE"</li>
  412. * <li>"UPDATE_DATE"</li>
  413. * <li>"CLOSE_DATE"</li>
  414. * <li>"ASSIGNEE"</li>
  415. * <li>"SEVERITY"</li>
  416. * <li>"STATUS"</li>
  417. * <li>"FILE_LINE"</li>
  418. * </ul>
  419. */
  420. public SearchRequest setS(String s) {
  421. this.s = s;
  422. return this;
  423. }
  424. public String getS() {
  425. return s;
  426. }
  427. /**
  428. * Possible values:
  429. * <ul>
  430. * <li>"insecure-interaction"</li>
  431. * <li>"risky-resource"</li>
  432. * <li>"porous-defenses"</li>
  433. * </ul>
  434. */
  435. public SearchRequest setSansTop25(List<String> sansTop25) {
  436. this.sansTop25 = sansTop25;
  437. return this;
  438. }
  439. public List<String> getSansTop25() {
  440. return sansTop25;
  441. }
  442. /**
  443. * Example value: "BLOCKER,CRITICAL"
  444. * Possible values:
  445. * <ul>
  446. * <li>"INFO"</li>
  447. * <li>"MINOR"</li>
  448. * <li>"MAJOR"</li>
  449. * <li>"CRITICAL"</li>
  450. * <li>"BLOCKER"</li>
  451. * </ul>
  452. */
  453. public SearchRequest setSeverities(List<String> severities) {
  454. this.severities = severities;
  455. return this;
  456. }
  457. public List<String> getSeverities() {
  458. return severities;
  459. }
  460. /**
  461. * Possible values:
  462. * <ul>
  463. * <li>"true"</li>
  464. * <li>"false"</li>
  465. * <li>"yes"</li>
  466. * <li>"no"</li>
  467. * </ul>
  468. */
  469. public SearchRequest setInNewCodePeriod(String inNewCodePeriod) {
  470. this.inNewCodePeriod = inNewCodePeriod;
  471. return this;
  472. }
  473. public String isInNewCodePeriod() {
  474. return inNewCodePeriod;
  475. }
  476. /**
  477. * Possible values:
  478. * <ul>
  479. * <li>"sql-injection"</li>
  480. * <li>"command-injection"</li>
  481. * <li>"path-traversal-injection"</li>
  482. * <li>"ldap-injection"</li>
  483. * <li>"xpath-injection"</li>
  484. * <li>"expression-lang-injection"</li>
  485. * <li>"rce"</li>
  486. * <li>"dos"</li>
  487. * <li>"ssrf"</li>
  488. * <li>"csrf"</li>
  489. * <li>"xss"</li>
  490. * <li>"log-injection"</li>
  491. * <li>"http-response-splitting"</li>
  492. * <li>"open-redirect"</li>
  493. * <li>"xxe"</li>
  494. * <li>"object-injection"</li>
  495. * <li>"weak-cryptography"</li>
  496. * <li>"auth"</li>
  497. * <li>"insecure-conf"</li>
  498. * <li>"file-manipulation"</li>
  499. * </ul>
  500. */
  501. public SearchRequest setSonarsourceSecurity(List<String> sonarsourceSecurity) {
  502. this.sonarsourceSecurity = sonarsourceSecurity;
  503. return this;
  504. }
  505. public List<String> getSonarsourceSecurity() {
  506. return sonarsourceSecurity;
  507. }
  508. /**
  509. * Example value: "OPEN,REOPENED"
  510. * Possible values:
  511. * <ul>
  512. * <li>"OPEN"</li>
  513. * <li>"CONFIRMED"</li>
  514. * <li>"REOPENED"</li>
  515. * <li>"RESOLVED"</li>
  516. * <li>"CLOSED"</li>
  517. * </ul>
  518. */
  519. public SearchRequest setStatuses(List<String> statuses) {
  520. this.statuses = statuses;
  521. return this;
  522. }
  523. public List<String> getStatuses() {
  524. return statuses;
  525. }
  526. /**
  527. * Example value: "security,convention"
  528. */
  529. public SearchRequest setTags(List<String> tags) {
  530. this.tags = tags;
  531. return this;
  532. }
  533. public List<String> getTags() {
  534. return tags;
  535. }
  536. /**
  537. * Example value: "CODE_SMELL,BUG"
  538. * Possible values:
  539. * <ul>
  540. * <li>"CODE_SMELL"</li>
  541. * <li>"BUG"</li>
  542. * <li>"VULNERABILITY"</li>
  543. * <li>"SECURITY_HOTSPOT"</li>
  544. * </ul>
  545. */
  546. public SearchRequest setTypes(List<String> types) {
  547. this.types = types;
  548. return this;
  549. }
  550. public List<String> getTypes() {
  551. return types;
  552. }
  553. }