2 * ============LICENSE_START=======================================================
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
23 package org.onap.aai.prevalidation;
25 import com.google.gson.annotations.SerializedName;
27 import java.util.List;
28 import java.util.Objects;
30 public class Validation {
32 @SerializedName("validationId")
33 private String validationId;
35 @SerializedName("action")
36 private String action;
38 @SerializedName("violations")
39 private List<Violation> violations;
41 public String getValidationId() {
45 public void setValidationId(String validationId) {
46 this.validationId = validationId;
49 public List<Violation> getViolations() {
53 public void setViolations(List<Violation> violations) {
54 this.violations = violations;
57 public String getAction() {
61 public void setAction(String action) {
66 public boolean equals(Object o) {
70 if (o == null || getClass() != o.getClass()) {
73 Validation that = (Validation) o;
74 return Objects.equals(validationId, that.validationId) && Objects.equals(action, that.action)
75 && Objects.equals(violations, that.violations);
79 public int hashCode() {
80 return Objects.hash(validationId, action, violations);
84 public String toString() {
85 return "Validation{" + "validationId='" + validationId + '\'' + ", action='" + action + '\'' + ", violations="