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=========================================================
22 package org.onap.aai.prevalidation;
24 import com.google.gson.annotations.SerializedName;
26 import java.util.List;
27 import java.util.Objects;
29 public class Validation {
31 @SerializedName("validationId")
32 private String validationId;
34 @SerializedName("action")
35 private String action;
37 @SerializedName("violations")
38 private List<Violation> violations;
40 public String getValidationId() {
44 public void setValidationId(String validationId) {
45 this.validationId = validationId;
48 public List<Violation> getViolations() {
52 public void setViolations(List<Violation> violations) {
53 this.violations = violations;
56 public String getAction() {
60 public void setAction(String action) {
65 public boolean equals(Object o) {
69 if (o == null || getClass() != o.getClass()) {
72 Validation that = (Validation) o;
73 return Objects.equals(validationId, that.validationId) &&
74 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{" +
86 "validationId='" + validationId + '\'' +
87 ", action='" + action + '\'' +
88 ", violations=" + violations +