View Javadoc
1   /*
2    * Cloudformation Plugin for SonarQube
3    * Copyright (C) 2019 James Pether Sörling
4    * james@hack23.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 com.hack23.sonar.cloudformation.reports.checkov;
21  
22  import java.util.List;
23  
24  import org.apache.commons.lang3.builder.EqualsBuilder;
25  import org.apache.commons.lang3.builder.HashCodeBuilder;
26  import org.apache.commons.lang3.builder.ToStringBuilder;
27  import org.apache.commons.lang3.builder.ToStringStyle;
28  
29  import com.fasterxml.jackson.annotation.JsonProperty;
30  
31  /**
32   * The Class CheckovPassedCheck.
33   */
34  public final class CheckovPassedCheck {
35  
36      /** The check id. */
37      private String checkId;
38  
39      /** The check name. */
40      private String checkName;
41  
42      /** The check result. */
43      private Object checkResult;
44  
45      /** The bc check id. */
46      private String bcCheckId;
47  
48      /** The code block. */
49      private List<Object>  codeBlock;
50  
51      /** The file path. */
52      private String filePath;
53  
54      /** The repo file path. */
55      private String repoFilePath;
56  
57      /** The file line range. */
58      private List<Integer> fileLineRange;
59  
60      /** The resource. */
61      private String resource;
62  
63      /** The file abs path. */
64      private String fileAbsPath;
65  
66      /** The entity tags. */
67      private EntityTags entityTags;
68  
69      /** The caller file path. */
70      private String callerFilePath;
71  
72      /** The caller file line range. */
73      private List<Integer> callerFileLineRange;
74  
75      /** The fixed definition. */
76      private String fixedDefinition;
77  
78  	/** The evaluations. */
79      private Object evaluations;
80  
81      /** The check class. */
82      private String checkClass;
83  
84      /** The guideline. */
85      private String guideline;
86  
87  	/**
88  	 * Gets the check id.
89  	 *
90  	 * @return the check id
91  	 */
92      @JsonProperty("check_id")
93  	public String getCheckId() {
94  		return checkId;
95  	}
96  
97  	/**
98  	 * Sets the check id.
99  	 *
100 	 * @param checkId the new check id
101 	 */
102 	public void setCheckId(final String checkId) {
103 		this.checkId = checkId;
104 	}
105 
106 
107 
108 
109 	/**
110 	 * Gets the bc check id.
111 	 *
112 	 * @return the bc check id
113 	 */
114     @JsonProperty("bc_check_id")
115 	public String getBcCheckId() {
116 		return bcCheckId;
117 	}
118 
119 	/**
120 	 * Sets the bc check id.
121 	 *
122 	 * @param bcCheckId the new bc check id
123 	 */
124 	public void setBcCheckId(final String bcCheckId) {
125 		this.bcCheckId = bcCheckId;
126 	}
127 
128 	/**
129 	 * Gets the check name.
130 	 *
131 	 * @return the check name
132 	 */
133     @JsonProperty("check_name")
134 	public String getCheckName() {
135 		return checkName;
136 	}
137 
138 	/**
139 	 * Sets the check name.
140 	 *
141 	 * @param checkName the new check name
142 	 */
143 	public void setCheckName(final String checkName) {
144 		this.checkName = checkName;
145 	}
146 
147 	/**
148 	 * Gets the check result.
149 	 *
150 	 * @return the check result
151 	 */
152     @JsonProperty("check_result")
153 	public Object getCheckResult() {
154 		return checkResult;
155 	}
156 
157 	/**
158 	 * Sets the check result.
159 	 *
160 	 * @param checkResult the new check result
161 	 */
162 	public void setCheckResult(final Object checkResult) {
163 		this.checkResult = checkResult;
164 	}
165 
166 	/**
167 	 * Gets the code block.
168 	 *
169 	 * @return the code block
170 	 */
171     @JsonProperty("code_block")
172 	public List<Object> getCodeBlock() {
173 		return codeBlock;
174 	}
175 
176 	/**
177 	 * Sets the code block.
178 	 *
179 	 * @param codeBlock the new code block
180 	 */
181 	public void setCodeBlock(final List<Object> codeBlock) {
182 		this.codeBlock = codeBlock;
183 	}
184 
185 
186 
187 	/**
188 	 * Gets the file path.
189 	 *
190 	 * @return the file path
191 	 */
192     @JsonProperty("file_path")
193 	public String getFilePath() {
194 		return filePath;
195 	}
196 
197 	/**
198 	 * Sets the file path.
199 	 *
200 	 * @param filePath the new file path
201 	 */
202 	public void setFilePath(final String filePath) {
203 		this.filePath = filePath;
204 	}
205 
206 
207 
208 	/**
209 	 * Gets the repo file path.
210 	 *
211 	 * @return the repo file path
212 	 */
213     @JsonProperty("repo_file_path")
214 	public String getRepoFilePath() {
215 		return repoFilePath;
216 	}
217 
218 	/**
219 	 * Sets the repo file path.
220 	 *
221 	 * @param repoFilePath the new repo file path
222 	 */
223 	public void setRepoFilePath(final String repoFilePath) {
224 		this.repoFilePath = repoFilePath;
225 	}
226 
227 	/**
228 	 * Gets the file line range.
229 	 *
230 	 * @return the file line range
231 	 */
232     @JsonProperty("file_line_range")
233 	public List<Integer> getFileLineRange() {
234 		return fileLineRange;
235 	}
236 
237 	/**
238 	 * Sets the file line range.
239 	 *
240 	 * @param fileLineRange the new file line range
241 	 */
242 	public void setFileLineRange(final List<Integer> fileLineRange) {
243 		this.fileLineRange = fileLineRange;
244 	}
245 
246 	/**
247 	 * Gets the resource.
248 	 *
249 	 * @return the resource
250 	 */
251 	public String getResource() {
252 		return resource;
253 	}
254 
255 	/**
256 	 * Sets the resource.
257 	 *
258 	 * @param resource the new resource
259 	 */
260 	public void setResource(final String resource) {
261 		this.resource = resource;
262 	}
263 
264 	/**
265 	 * Gets the evaluations.
266 	 *
267 	 * @return the evaluations
268 	 */
269 	public Object getEvaluations() {
270 		return evaluations;
271 	}
272 
273 	/**
274 	 * Sets the evaluations.
275 	 *
276 	 * @param evaluations the new evaluations
277 	 */
278 	public void setEvaluations(final Object evaluations) {
279 		this.evaluations = evaluations;
280 	}
281 
282 	/**
283 	 * Gets the check class.
284 	 *
285 	 * @return the check class
286 	 */
287     @JsonProperty("check_class")
288 	public String getCheckClass() {
289 		return checkClass;
290 	}
291 
292 	/**
293 	 * Sets the check class.
294 	 *
295 	 * @param checkClass the new check class
296 	 */
297 	public void setCheckClass(final String checkClass) {
298 		this.checkClass = checkClass;
299 	}
300 
301 	/**
302 	 * Gets the guideline.
303 	 *
304 	 * @return the guideline
305 	 */
306 	public String getGuideline() {
307 		return guideline;
308 	}
309 
310 	/**
311 	 * Sets the guideline.
312 	 *
313 	 * @param guideline the new guideline
314 	 */
315 	public void setGuideline(final String guideline) {
316 		this.guideline = guideline;
317 	}
318 
319     /**
320      * Gets the file abs path.
321      *
322      * @return the file abs path
323      */
324     @JsonProperty("file_abs_path")
325 	public String getFileAbsPath() {
326 		return fileAbsPath;
327 	}
328 
329 	/**
330 	 * Sets the file abs path.
331 	 *
332 	 * @param fileAbsPath the new file abs path
333 	 */
334 	public void setFileAbsPath(final String fileAbsPath) {
335 		this.fileAbsPath = fileAbsPath;
336 	}
337 
338 
339 
340 	/**
341 	 * Gets the entity tags.
342 	 *
343 	 * @return the entity tags
344 	 */
345     @JsonProperty("entity_tags")
346 	public EntityTags getEntityTags() {
347 		return entityTags;
348 	}
349 
350 	/**
351 	 * Sets the entity tags.
352 	 *
353 	 * @param entityTags the new entity tags
354 	 */
355 	public void setEntityTags(final EntityTags entityTags) {
356 		this.entityTags = entityTags;
357 	}
358 
359 	/**
360 	 * Gets the caller file path.
361 	 *
362 	 * @return the caller file path
363 	 */
364     @JsonProperty("caller_file_path")
365 	public String getCallerFilePath() {
366 		return callerFilePath;
367 	}
368 
369 	/**
370 	 * Sets the caller file path.
371 	 *
372 	 * @param callerFilePath the new caller file path
373 	 */
374 	public void setCallerFilePath(final String callerFilePath) {
375 		this.callerFilePath = callerFilePath;
376 	}
377 
378 	/**
379 	 * Gets the caller file line range.
380 	 *
381 	 * @return the caller file line range
382 	 */
383     @JsonProperty("caller_file_line_range")
384 	public List<Integer> getCallerFileLineRange() {
385 		return callerFileLineRange;
386 	}
387 
388 	/**
389 	 * Sets the caller file line range.
390 	 *
391 	 * @param callerFileLineRange the new caller file line range
392 	 */
393 	public void setCallerFileLineRange(final List<Integer> callerFileLineRange) {
394 		this.callerFileLineRange = callerFileLineRange;
395 	}
396 
397 	/**
398 	 * Gets the fixed definition.
399 	 *
400 	 * @return the fixed definition
401 	 */
402     @JsonProperty("fixed_definition")
403 	public String getFixedDefinition() {
404 		return fixedDefinition;
405 	}
406 
407 	/**
408 	 * Sets the fixed definition.
409 	 *
410 	 * @param fixedDefinition the new fixed definition
411 	 */
412 	public void setFixedDefinition(final String fixedDefinition) {
413 		this.fixedDefinition = fixedDefinition;
414 	}
415 
416 	/**
417 	 * To string.
418 	 *
419 	 * @return the string
420 	 */
421 	@Override
422 	public String toString() {
423 		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
424 	}
425 
426 	/**
427 	 * Equals.
428 	 *
429 	 * @param object the object
430 	 * @return true, if successful
431 	 */
432 	@Override
433 	public boolean equals(final Object object) {
434 		return EqualsBuilder.reflectionEquals(this, object);
435 	}
436 
437 	/**
438 	 * Hash code.
439 	 *
440 	 * @return the int
441 	 */
442 	@Override
443 	public int hashCode() {
444 		return HashCodeBuilder.reflectionHashCode(this);
445 	}
446 
447 }