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.

UpdateRequest.java 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2019 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.rules;
  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/rules/update">Further information about this action online (including a response example)</a>
  27. * @since 4.4
  28. */
  29. @Generated("sonar-ws-generator")
  30. public class UpdateRequest {
  31. private String key;
  32. private String markdownDescription;
  33. private String markdownNote;
  34. private String name;
  35. private String organization;
  36. private List<String> params;
  37. private String remediationFnBaseEffort;
  38. private String remediationFnType;
  39. private String remediationFyGapMultiplier;
  40. private String severity;
  41. private String status;
  42. private List<String> tags;
  43. /**
  44. * This is a mandatory parameter.
  45. * Example value: "javascript:NullCheck"
  46. */
  47. public UpdateRequest setKey(String key) {
  48. this.key = key;
  49. return this;
  50. }
  51. public String getKey() {
  52. return key;
  53. }
  54. /**
  55. * Example value: "Description of my custom rule"
  56. */
  57. public UpdateRequest setMarkdownDescription(String markdownDescription) {
  58. this.markdownDescription = markdownDescription;
  59. return this;
  60. }
  61. public String getMarkdownDescription() {
  62. return markdownDescription;
  63. }
  64. /**
  65. * Example value: "my *note*"
  66. */
  67. public UpdateRequest setMarkdownNote(String markdownNote) {
  68. this.markdownNote = markdownNote;
  69. return this;
  70. }
  71. public String getMarkdownNote() {
  72. return markdownNote;
  73. }
  74. /**
  75. * Example value: "My custom rule"
  76. */
  77. public UpdateRequest setName(String name) {
  78. this.name = name;
  79. return this;
  80. }
  81. public String getName() {
  82. return name;
  83. }
  84. /**
  85. * This is part of the internal API.
  86. * Example value: "my-org"
  87. */
  88. public UpdateRequest setOrganization(String organization) {
  89. this.organization = organization;
  90. return this;
  91. }
  92. public String getOrganization() {
  93. return organization;
  94. }
  95. /**
  96. */
  97. public UpdateRequest setParams(List<String> params) {
  98. this.params = params;
  99. return this;
  100. }
  101. public List<String> getParams() {
  102. return params;
  103. }
  104. /**
  105. * Example value: "1d"
  106. */
  107. public UpdateRequest setRemediationFnBaseEffort(String remediationFnBaseEffort) {
  108. this.remediationFnBaseEffort = remediationFnBaseEffort;
  109. return this;
  110. }
  111. public String getRemediationFnBaseEffort() {
  112. return remediationFnBaseEffort;
  113. }
  114. /**
  115. * Possible values:
  116. * <ul>
  117. * <li>"LINEAR"</li>
  118. * <li>"LINEAR_OFFSET"</li>
  119. * <li>"CONSTANT_ISSUE"</li>
  120. * </ul>
  121. */
  122. public UpdateRequest setRemediationFnType(String remediationFnType) {
  123. this.remediationFnType = remediationFnType;
  124. return this;
  125. }
  126. public String getRemediationFnType() {
  127. return remediationFnType;
  128. }
  129. /**
  130. * Example value: "3min"
  131. */
  132. public UpdateRequest setRemediationFyGapMultiplier(String remediationFyGapMultiplier) {
  133. this.remediationFyGapMultiplier = remediationFyGapMultiplier;
  134. return this;
  135. }
  136. public String getRemediationFyGapMultiplier() {
  137. return remediationFyGapMultiplier;
  138. }
  139. /**
  140. * Possible values:
  141. * <ul>
  142. * <li>"INFO"</li>
  143. * <li>"MINOR"</li>
  144. * <li>"MAJOR"</li>
  145. * <li>"CRITICAL"</li>
  146. * <li>"BLOCKER"</li>
  147. * </ul>
  148. */
  149. public UpdateRequest setSeverity(String severity) {
  150. this.severity = severity;
  151. return this;
  152. }
  153. public String getSeverity() {
  154. return severity;
  155. }
  156. /**
  157. * Possible values:
  158. * <ul>
  159. * <li>"BETA"</li>
  160. * <li>"DEPRECATED"</li>
  161. * <li>"READY"</li>
  162. * <li>"REMOVED"</li>
  163. * </ul>
  164. */
  165. public UpdateRequest setStatus(String status) {
  166. this.status = status;
  167. return this;
  168. }
  169. public String getStatus() {
  170. return status;
  171. }
  172. /**
  173. * Example value: "java8,security"
  174. */
  175. public UpdateRequest setTags(List<String> tags) {
  176. this.tags = tags;
  177. return this;
  178. }
  179. public List<String> getTags() {
  180. return tags;
  181. }
  182. }