Reduce the number of problems in aai-common by removing unused imports
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / prevalidation / Validation.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  *  Modifications Copyright © 2018 IBM.
8  * ================================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *    http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.aai.prevalidation;
24
25 import com.google.gson.annotations.SerializedName;
26
27 import java.util.List;
28 import java.util.Objects;
29
30 public class Validation {
31
32     @SerializedName("validationId")
33     private String validationId;
34
35     @SerializedName("action")
36     private String action;
37
38     @SerializedName("violations")
39     private List<Violation> violations;
40
41     public String getValidationId() {
42         return validationId;
43     }
44
45     public void setValidationId(String validationId) {
46         this.validationId = validationId;
47     }
48
49     public List<Violation> getViolations() {
50         return violations;
51     }
52
53     public void setViolations(List<Violation> violations) {
54         this.violations = violations;
55     }
56
57     public String getAction() {
58         return action;
59     }
60
61     public void setAction(String action) {
62         this.action = action;
63     }
64
65     @Override
66     public boolean equals(Object o) {
67         if (this == o) {
68             return true;
69         }
70         if (o == null || getClass() != o.getClass()) {
71             return false;
72         }
73         Validation that = (Validation) o;
74         return Objects.equals(validationId, that.validationId) && Objects.equals(action, that.action)
75                 && Objects.equals(violations, that.violations);
76     }
77
78     @Override
79     public int hashCode() {
80         return Objects.hash(validationId, action, violations);
81     }
82
83     @Override
84     public String toString() {
85         return "Validation{" + "validationId='" + validationId + '\'' + ", action='" + action + '\'' + ", violations="
86                 + violations + '}';
87     }
88
89 }