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

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