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.

ComponentRequest.java 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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.measures;
  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/measures/component">Further information about this action online (including a response example)</a>
  27. * @since 5.4
  28. */
  29. @Generated("sonar-ws-generator")
  30. public class ComponentRequest {
  31. private List<String> additionalFields;
  32. private String branch;
  33. private String component;
  34. private List<String> metricKeys;
  35. private String pullRequest;
  36. /**
  37. * Example value: "periods,metrics"
  38. * Possible values:
  39. * <ul>
  40. * <li>"metrics"</li>
  41. * <li>"periods"</li>
  42. * </ul>
  43. */
  44. public ComponentRequest setAdditionalFields(List<String> additionalFields) {
  45. this.additionalFields = additionalFields;
  46. return this;
  47. }
  48. public List<String> getAdditionalFields() {
  49. return additionalFields;
  50. }
  51. /**
  52. * This is part of the internal API.
  53. * Example value: "feature/my_branch"
  54. */
  55. public ComponentRequest setBranch(String branch) {
  56. this.branch = branch;
  57. return this;
  58. }
  59. public String getBranch() {
  60. return branch;
  61. }
  62. /**
  63. * Example value: "my_project"
  64. */
  65. public ComponentRequest setComponent(String component) {
  66. this.component = component;
  67. return this;
  68. }
  69. public String getComponent() {
  70. return component;
  71. }
  72. /**
  73. * This is a mandatory parameter.
  74. * Example value: "ncloc,complexity,violations"
  75. */
  76. public ComponentRequest setMetricKeys(List<String> metricKeys) {
  77. this.metricKeys = metricKeys;
  78. return this;
  79. }
  80. public List<String> getMetricKeys() {
  81. return metricKeys;
  82. }
  83. /**
  84. * This is part of the internal API.
  85. * Example value: "5461"
  86. */
  87. public ComponentRequest setPullRequest(String pullRequest) {
  88. this.pullRequest = pullRequest;
  89. return this;
  90. }
  91. public String getPullRequest() {
  92. return pullRequest;
  93. }
  94. }