View Javadoc
1   
2   package org.owasp.dependencycheck.data.knownexploited.json;
3   
4   import java.util.LinkedHashMap;
5   import java.util.Map;
6   import javax.annotation.Generated;
7   import com.fasterxml.jackson.annotation.JsonAnyGetter;
8   import com.fasterxml.jackson.annotation.JsonAnySetter;
9   import com.fasterxml.jackson.annotation.JsonIgnore;
10  import com.fasterxml.jackson.annotation.JsonInclude;
11  import com.fasterxml.jackson.annotation.JsonProperty;
12  import com.fasterxml.jackson.annotation.JsonPropertyDescription;
13  import com.fasterxml.jackson.annotation.JsonPropertyOrder;
14  
15  @JsonInclude(JsonInclude.Include.NON_NULL)
16  @JsonPropertyOrder({
17      "cveID",
18      "vendorProject",
19      "product",
20      "vulnerabilityName",
21      "dateAdded",
22      "shortDescription",
23      "requiredAction",
24      "dueDate",
25      "notes"
26  })
27  @Generated("jsonschema2pojo")
28  public class Vulnerability {
29  
30      /**
31       * The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits
32       * (Required)
33       * 
34       */
35      @JsonProperty("cveID")
36      @JsonPropertyDescription("The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits")
37      private String cveID;
38      /**
39       * The vendor or project name for the vulnerability
40       * (Required)
41       * 
42       */
43      @JsonProperty("vendorProject")
44      @JsonPropertyDescription("The vendor or project name for the vulnerability")
45      private String vendorProject;
46      /**
47       * The vulnerability product
48       * (Required)
49       * 
50       */
51      @JsonProperty("product")
52      @JsonPropertyDescription("The vulnerability product")
53      private String product;
54      /**
55       * The name of the vulnerability
56       * (Required)
57       * 
58       */
59      @JsonProperty("vulnerabilityName")
60      @JsonPropertyDescription("The name of the vulnerability")
61      private String vulnerabilityName;
62      /**
63       * The date the vulnerability was added to the catalog in the format YYYY-MM-DD
64       * (Required)
65       * 
66       */
67      @JsonProperty("dateAdded")
68      @JsonPropertyDescription("The date the vulnerability was added to the catalog in the format YYYY-MM-DD")
69      private String dateAdded;
70      /**
71       * A short description of the vulnerability
72       * (Required)
73       * 
74       */
75      @JsonProperty("shortDescription")
76      @JsonPropertyDescription("A short description of the vulnerability")
77      private String shortDescription;
78      /**
79       * The required action to address the vulnerability
80       * (Required)
81       * 
82       */
83      @JsonProperty("requiredAction")
84      @JsonPropertyDescription("The required action to address the vulnerability")
85      private String requiredAction;
86      /**
87       * The date the required action is due in the format YYYY-MM-DD
88       * (Required)
89       * 
90       */
91      @JsonProperty("dueDate")
92      @JsonPropertyDescription("The date the required action is due in the format YYYY-MM-DD")
93      private String dueDate;
94      /**
95       * Any additional notes about the vulnerability
96       * 
97       */
98      @JsonProperty("notes")
99      @JsonPropertyDescription("Any additional notes about the vulnerability")
100     private String notes;
101     @JsonIgnore
102     private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();
103 
104     /**
105      * The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits
106      * (Required)
107      * 
108      */
109     @JsonProperty("cveID")
110     public String getCveID() {
111         return cveID;
112     }
113 
114     /**
115      * The CVE ID of the vulnerability in the format CVE-YYYY-NNNN, note that the number portion can have more than 4 digits
116      * (Required)
117      * 
118      */
119     @JsonProperty("cveID")
120     public void setCveID(String cveID) {
121         this.cveID = cveID;
122     }
123 
124     /**
125      * The vendor or project name for the vulnerability
126      * (Required)
127      * 
128      */
129     @JsonProperty("vendorProject")
130     public String getVendorProject() {
131         return vendorProject;
132     }
133 
134     /**
135      * The vendor or project name for the vulnerability
136      * (Required)
137      * 
138      */
139     @JsonProperty("vendorProject")
140     public void setVendorProject(String vendorProject) {
141         this.vendorProject = vendorProject;
142     }
143 
144     /**
145      * The vulnerability product
146      * (Required)
147      * 
148      */
149     @JsonProperty("product")
150     public String getProduct() {
151         return product;
152     }
153 
154     /**
155      * The vulnerability product
156      * (Required)
157      * 
158      */
159     @JsonProperty("product")
160     public void setProduct(String product) {
161         this.product = product;
162     }
163 
164     /**
165      * The name of the vulnerability
166      * (Required)
167      * 
168      */
169     @JsonProperty("vulnerabilityName")
170     public String getVulnerabilityName() {
171         return vulnerabilityName;
172     }
173 
174     /**
175      * The name of the vulnerability
176      * (Required)
177      * 
178      */
179     @JsonProperty("vulnerabilityName")
180     public void setVulnerabilityName(String vulnerabilityName) {
181         this.vulnerabilityName = vulnerabilityName;
182     }
183 
184     /**
185      * The date the vulnerability was added to the catalog in the format YYYY-MM-DD
186      * (Required)
187      * 
188      */
189     @JsonProperty("dateAdded")
190     public String getDateAdded() {
191         return dateAdded;
192     }
193 
194     /**
195      * The date the vulnerability was added to the catalog in the format YYYY-MM-DD
196      * (Required)
197      * 
198      */
199     @JsonProperty("dateAdded")
200     public void setDateAdded(String dateAdded) {
201         this.dateAdded = dateAdded;
202     }
203 
204     /**
205      * A short description of the vulnerability
206      * (Required)
207      * 
208      */
209     @JsonProperty("shortDescription")
210     public String getShortDescription() {
211         return shortDescription;
212     }
213 
214     /**
215      * A short description of the vulnerability
216      * (Required)
217      * 
218      */
219     @JsonProperty("shortDescription")
220     public void setShortDescription(String shortDescription) {
221         this.shortDescription = shortDescription;
222     }
223 
224     /**
225      * The required action to address the vulnerability
226      * (Required)
227      * 
228      */
229     @JsonProperty("requiredAction")
230     public String getRequiredAction() {
231         return requiredAction;
232     }
233 
234     /**
235      * The required action to address the vulnerability
236      * (Required)
237      * 
238      */
239     @JsonProperty("requiredAction")
240     public void setRequiredAction(String requiredAction) {
241         this.requiredAction = requiredAction;
242     }
243 
244     /**
245      * The date the required action is due in the format YYYY-MM-DD
246      * (Required)
247      * 
248      */
249     @JsonProperty("dueDate")
250     public String getDueDate() {
251         return dueDate;
252     }
253 
254     /**
255      * The date the required action is due in the format YYYY-MM-DD
256      * (Required)
257      * 
258      */
259     @JsonProperty("dueDate")
260     public void setDueDate(String dueDate) {
261         this.dueDate = dueDate;
262     }
263 
264     /**
265      * Any additional notes about the vulnerability
266      * 
267      */
268     @JsonProperty("notes")
269     public String getNotes() {
270         return notes;
271     }
272 
273     /**
274      * Any additional notes about the vulnerability
275      * 
276      */
277     @JsonProperty("notes")
278     public void setNotes(String notes) {
279         this.notes = notes;
280     }
281 
282     @JsonAnyGetter
283     public Map<String, Object> getAdditionalProperties() {
284         return this.additionalProperties;
285     }
286 
287     @JsonAnySetter
288     public void setAdditionalProperty(String name, Object value) {
289         this.additionalProperties.put(name, value);
290     }
291 
292     @Override
293     public String toString() {
294         StringBuilder sb = new StringBuilder();
295         sb.append(Vulnerability.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
296         sb.append("cveID");
297         sb.append('=');
298         sb.append(((this.cveID == null)?"<null>":this.cveID));
299         sb.append(',');
300         sb.append("vendorProject");
301         sb.append('=');
302         sb.append(((this.vendorProject == null)?"<null>":this.vendorProject));
303         sb.append(',');
304         sb.append("product");
305         sb.append('=');
306         sb.append(((this.product == null)?"<null>":this.product));
307         sb.append(',');
308         sb.append("vulnerabilityName");
309         sb.append('=');
310         sb.append(((this.vulnerabilityName == null)?"<null>":this.vulnerabilityName));
311         sb.append(',');
312         sb.append("dateAdded");
313         sb.append('=');
314         sb.append(((this.dateAdded == null)?"<null>":this.dateAdded));
315         sb.append(',');
316         sb.append("shortDescription");
317         sb.append('=');
318         sb.append(((this.shortDescription == null)?"<null>":this.shortDescription));
319         sb.append(',');
320         sb.append("requiredAction");
321         sb.append('=');
322         sb.append(((this.requiredAction == null)?"<null>":this.requiredAction));
323         sb.append(',');
324         sb.append("dueDate");
325         sb.append('=');
326         sb.append(((this.dueDate == null)?"<null>":this.dueDate));
327         sb.append(',');
328         sb.append("notes");
329         sb.append('=');
330         sb.append(((this.notes == null)?"<null>":this.notes));
331         sb.append(',');
332         sb.append("additionalProperties");
333         sb.append('=');
334         sb.append(((this.additionalProperties == null)?"<null>":this.additionalProperties));
335         sb.append(',');
336         if (sb.charAt((sb.length()- 1)) == ',') {
337             sb.setCharAt((sb.length()- 1), ']');
338         } else {
339             sb.append(']');
340         }
341         return sb.toString();
342     }
343 
344     @Override
345     public int hashCode() {
346         int result = 1;
347         result = ((result* 31)+((this.product == null)? 0 :this.product.hashCode()));
348         result = ((result* 31)+((this.vulnerabilityName == null)? 0 :this.vulnerabilityName.hashCode()));
349         result = ((result* 31)+((this.notes == null)? 0 :this.notes.hashCode()));
350         result = ((result* 31)+((this.cveID == null)? 0 :this.cveID.hashCode()));
351         result = ((result* 31)+((this.dueDate == null)? 0 :this.dueDate.hashCode()));
352         result = ((result* 31)+((this.vendorProject == null)? 0 :this.vendorProject.hashCode()));
353         result = ((result* 31)+((this.shortDescription == null)? 0 :this.shortDescription.hashCode()));
354         result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
355         result = ((result* 31)+((this.requiredAction == null)? 0 :this.requiredAction.hashCode()));
356         result = ((result* 31)+((this.dateAdded == null)? 0 :this.dateAdded.hashCode()));
357         return result;
358     }
359 
360     @Override
361     public boolean equals(Object other) {
362         if (other == this) {
363             return true;
364         }
365         if ((other instanceof Vulnerability) == false) {
366             return false;
367         }
368         Vulnerability rhs = ((Vulnerability) other);
369         return (((((((((((this.product == rhs.product)||((this.product!= null)&&this.product.equals(rhs.product)))&&((this.vulnerabilityName == rhs.vulnerabilityName)||((this.vulnerabilityName!= null)&&this.vulnerabilityName.equals(rhs.vulnerabilityName))))&&((this.notes == rhs.notes)||((this.notes!= null)&&this.notes.equals(rhs.notes))))&&((this.cveID == rhs.cveID)||((this.cveID!= null)&&this.cveID.equals(rhs.cveID))))&&((this.dueDate == rhs.dueDate)||((this.dueDate!= null)&&this.dueDate.equals(rhs.dueDate))))&&((this.vendorProject == rhs.vendorProject)||((this.vendorProject!= null)&&this.vendorProject.equals(rhs.vendorProject))))&&((this.shortDescription == rhs.shortDescription)||((this.shortDescription!= null)&&this.shortDescription.equals(rhs.shortDescription))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.requiredAction == rhs.requiredAction)||((this.requiredAction!= null)&&this.requiredAction.equals(rhs.requiredAction))))&&((this.dateAdded == rhs.dateAdded)||((this.dateAdded!= null)&&this.dateAdded.equals(rhs.dateAdded))));
370     }
371 
372 }