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.cfnnag;
21  
22  import org.apache.commons.lang3.builder.EqualsBuilder;
23  import org.apache.commons.lang3.builder.HashCodeBuilder;
24  import org.apache.commons.lang3.builder.ToStringBuilder;
25  import org.apache.commons.lang3.builder.ToStringStyle;
26  
27  import com.fasterxml.jackson.annotation.JsonProperty;
28  
29  /**
30   * The Class CfnNagScanReport.
31   */
32  public final class CfnNagScanReport {
33  
34  	/** The filename. */
35  	private String filename;
36  
37  	/** The file results. */
38  	private CfnNagReport fileResults;
39  
40  	/**
41  	 * Gets the filename.
42  	 *
43  	 * @return the filename
44  	 */
45  	public String getFilename() {
46  		return filename;
47  	}
48  
49  	/**
50  	 * Sets the filename.
51  	 *
52  	 * @param filename the new filename
53  	 */
54  	public void setFilename(final String filename) {
55  		this.filename = filename;
56  	}
57  
58  	/**
59  	 * Gets the file results.
60  	 *
61  	 * @return the file results
62  	 */
63  	@JsonProperty("file_results")
64  	public CfnNagReport getFileResults() {
65  		return fileResults;
66  	}
67  
68  	/**
69  	 * Sets the file results.
70  	 *
71  	 * @param fileResults the new file results
72  	 */
73  	public void setFileResults(final CfnNagReport fileResults) {
74  		this.fileResults = fileResults;
75  	}
76  
77  	/**
78  	 * To string.
79  	 *
80  	 * @return the string
81  	 */
82  	@Override
83  	public String toString() {
84  		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
85  	}
86  
87  	/**
88  	 * Equals.
89  	 *
90  	 * @param object the object
91  	 * @return true, if successful
92  	 */
93  	@Override
94      public boolean equals(final Object object) {
95      	return EqualsBuilder.reflectionEquals(this,object);
96      }
97  
98  	/**
99  	 * Hash code.
100 	 *
101 	 * @return the int
102 	 */
103 	@Override
104 	public int hashCode() {
105 		return HashCodeBuilder.reflectionHashCode(this);
106 	}
107 
108 }