blob: e16d741e48cb80fdb78100a54e72454d4ef06b6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
/*
* SonarQube
* Copyright (C) 2009-2025 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonarqube.ws.client.rules;
import java.util.List;
import jakarta.annotation.Generated;
/**
* This is part of the internal API.
* This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/create">Further information about this action online (including a response example)</a>
* @since 4.4
*/
@Generated("sonar-ws-generator")
public class CreateRequest {
private String customKey;
private String markdownDescription;
private String name;
private List<String> params;
private String preventReactivation;
private String severity;
private String status;
private String templateKey;
private String cleanCodeAttribute;
private String type;
/**
* This is a mandatory parameter.
* Example value: "Todo_should_not_be_used"
*/
public CreateRequest setCustomKey(String customKey) {
this.customKey = customKey;
return this;
}
public String getCustomKey() {
return customKey;
}
/**
* This is a mandatory parameter.
* Example value: "Description of my custom rule"
*/
public CreateRequest setMarkdownDescription(String markdownDescription) {
this.markdownDescription = markdownDescription;
return this;
}
public String getMarkdownDescription() {
return markdownDescription;
}
/**
* This is a mandatory parameter.
* Example value: "My custom rule"
*/
public CreateRequest setName(String name) {
this.name = name;
return this;
}
public String getName() {
return name;
}
/**
*/
public CreateRequest setParams(List<String> params) {
this.params = params;
return this;
}
public List<String> getParams() {
return params;
}
/**
* Possible values:
* <ul>
* <li>"true"</li>
* <li>"false"</li>
* <li>"yes"</li>
* <li>"no"</li>
* </ul>
*/
public CreateRequest setPreventReactivation(String preventReactivation) {
this.preventReactivation = preventReactivation;
return this;
}
public String getPreventReactivation() {
return preventReactivation;
}
/**
* Possible values:
* <ul>
* <li>"INFO"</li>
* <li>"MINOR"</li>
* <li>"MAJOR"</li>
* <li>"CRITICAL"</li>
* <li>"BLOCKER"</li>
* </ul>
*/
public CreateRequest setSeverity(String severity) {
this.severity = severity;
return this;
}
public String getSeverity() {
return severity;
}
/**
* Possible values:
* <ul>
* <li>"BETA"</li>
* <li>"DEPRECATED"</li>
* <li>"READY"</li>
* <li>"REMOVED"</li>
* </ul>
*/
public CreateRequest setStatus(String status) {
this.status = status;
return this;
}
public String getStatus() {
return status;
}
/**
* Example value: "java:XPath"
*/
public CreateRequest setTemplateKey(String templateKey) {
this.templateKey = templateKey;
return this;
}
public String getTemplateKey() {
return templateKey;
}
/**
* Possible values:
* <ul>
* <li>CONVENTIONAL</li>
* <li>FORMATTED</li>
* <li>IDENTIFIABLE</li>
* <li>CLEAR</li>
* <li>COMPLETE</li>
* <li>EFFICIENT</li>
* <li>LOGICAL</li>
* <li>DISTINCT</li>
* <li>FOCUSED</li>
* <li>MODULAR</li>
* <li>TESTED</li>
* <li>LAWFUL</li>
* <li>RESPECTFUL</li>
* <li>TRUSTWORTHY</li>
* </ul>
*/
public CreateRequest setCleanCodeAttribute(String cleanCodeAttribute) {
this.cleanCodeAttribute = cleanCodeAttribute;
return this;
}
public String getCleanCodeAttribute() {
return cleanCodeAttribute;
}
/**
* Possible values:
* <ul>
* <li>"CODE_SMELL"</li>
* <li>"BUG"</li>
* <li>"VULNERABILITY"</li>
* </ul>
*/
public CreateRequest setType(String type) {
this.type = type;
return this;
}
public String getType() {
return type;
}
}
|