Added UniversalVesAdapter in the Mapper
[dcaegen2/services/mapper.git] / UniversalVesAdapter / src / main / java / org / onap / dcaegen2 / ves / domain / FaultFields.java
1 /*
2 * ============LICENSE_START=======================================================
3 * ONAP : DCAE
4 * ================================================================================
5 * Copyright 2018 TechMahindra
6 *=================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *     http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20 package org.onap.dcaegen2.ves.domain;
21
22 import java.util.HashMap;
23 import java.util.List;
24 import java.util.Map;
25 import com.fasterxml.jackson.annotation.JsonAnyGetter;
26 import com.fasterxml.jackson.annotation.JsonAnySetter;
27 import com.fasterxml.jackson.annotation.JsonIgnore;
28 import com.fasterxml.jackson.annotation.JsonInclude;
29 import com.fasterxml.jackson.annotation.JsonProperty;
30 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
31 import org.apache.commons.lang.builder.EqualsBuilder;
32 import org.apache.commons.lang.builder.HashCodeBuilder;
33 import org.apache.commons.lang.builder.ToStringBuilder;
34
35 @JsonInclude(JsonInclude.Include.NON_NULL)
36 @JsonPropertyOrder({
37     "alarmCondition",
38     "eventSeverity",
39     "eventSourceType",
40     "faultFieldsVersion",
41     "specificProblem",
42     "vfStatus",
43     "alarmAdditionalInformation",
44     "alarmInterfaceA",
45     "eventCategory"
46 })
47 public class FaultFields {
48
49     @JsonProperty("alarmCondition")
50     private String alarmCondition;
51     @JsonProperty("eventSeverity")
52     private String eventSeverity;
53     @JsonProperty("eventSourceType")
54     private String eventSourceType;
55     @JsonProperty("faultFieldsVersion")
56     private Double faultFieldsVersion;
57     @JsonProperty("specificProblem")
58     private String specificProblem;
59     @JsonProperty("vfStatus")
60     private String vfStatus;
61     @JsonProperty("alarmAdditionalInformation")
62     private List<AlarmAdditionalInformation> alarmAdditionalInformation = null;
63     @JsonProperty("alarmInterfaceA")
64     private String alarmInterfaceA;
65     @JsonProperty("eventCategory")
66     private String eventCategory;
67     @JsonIgnore
68     private Map<String, Object> additionalProperties = new HashMap<String, Object>();
69
70     @JsonProperty("alarmCondition")
71     public String getAlarmCondition() {
72         return alarmCondition;
73     }
74
75     @JsonProperty("alarmCondition")
76     public void setAlarmCondition(String alarmCondition) {
77         this.alarmCondition = alarmCondition;
78     }
79
80     @JsonProperty("eventSeverity")
81     public String getEventSeverity() {
82         return eventSeverity;
83     }
84
85     @JsonProperty("eventSeverity")
86     public void setEventSeverity(String eventSeverity) {
87         this.eventSeverity = eventSeverity;
88     }
89
90     @JsonProperty("eventSourceType")
91     public String getEventSourceType() {
92         return eventSourceType;
93     }
94
95     @JsonProperty("eventSourceType")
96     public void setEventSourceType(String eventSourceType) {
97         this.eventSourceType = eventSourceType;
98     }
99
100     @JsonProperty("faultFieldsVersion")
101     public Double getFaultFieldsVersion() {
102         return faultFieldsVersion;
103     }
104
105     @JsonProperty("faultFieldsVersion")
106     public void setFaultFieldsVersion(Double faultFieldsVersion) {
107         this.faultFieldsVersion = faultFieldsVersion;
108     }
109
110     @JsonProperty("specificProblem")
111     public String getSpecificProblem() {
112         return specificProblem;
113     }
114
115     @JsonProperty("specificProblem")
116     public void setSpecificProblem(String specificProblem) {
117         this.specificProblem = specificProblem;
118     }
119
120     @JsonProperty("vfStatus")
121     public String getVfStatus() {
122         return vfStatus;
123     }
124
125     @JsonProperty("vfStatus")
126     public void setVfStatus(String vfStatus) {
127         this.vfStatus = vfStatus;
128     }
129
130     @JsonProperty("alarmAdditionalInformation")
131     public List<AlarmAdditionalInformation> getAlarmAdditionalInformation() {
132         return alarmAdditionalInformation;
133     }
134
135     @JsonProperty("alarmAdditionalInformation")
136     public void setAlarmAdditionalInformation(List<AlarmAdditionalInformation> alarmAdditionalInformation) {
137         this.alarmAdditionalInformation = alarmAdditionalInformation;
138     }
139
140     @JsonProperty("alarmInterfaceA")
141     public String getAlarmInterfaceA() {
142         return alarmInterfaceA;
143     }
144
145     @JsonProperty("alarmInterfaceA")
146     public void setAlarmInterfaceA(String alarmInterfaceA) {
147         this.alarmInterfaceA = alarmInterfaceA;
148     }
149
150     @JsonProperty("eventCategory")
151     public String getEventCategory() {
152         return eventCategory;
153     }
154
155     @JsonProperty("eventCategory")
156     public void setEventCategory(String eventCategory) {
157         this.eventCategory = eventCategory;
158     }
159
160     @JsonAnyGetter
161     public Map<String, Object> getAdditionalProperties() {
162         return this.additionalProperties;
163     }
164
165     @JsonAnySetter
166     public void setAdditionalProperty(String name, Object value) {
167         this.additionalProperties.put(name, value);
168     }
169
170     @Override
171     public String toString() {
172         return new ToStringBuilder(this).append("alarmCondition", alarmCondition).append("eventSeverity", eventSeverity).append("eventSourceType", eventSourceType).append("faultFieldsVersion", faultFieldsVersion).append("specificProblem", specificProblem).append("vfStatus", vfStatus).append("alarmAdditionalInformation", alarmAdditionalInformation).append("alarmInterfaceA", alarmInterfaceA).append("eventCategory", eventCategory).append("additionalProperties", additionalProperties).toString();
173     }
174
175     @Override
176     public int hashCode() {
177         return new HashCodeBuilder().append(eventSourceType).append(alarmAdditionalInformation).append(specificProblem).append(additionalProperties).append(alarmInterfaceA).append(alarmCondition).append(eventSeverity).append(faultFieldsVersion).append(eventCategory).append(vfStatus).toHashCode();
178     }
179
180     @Override
181     public boolean equals(Object other) {
182         if (other == this) {
183             return true;
184         }
185         if ((other instanceof FaultFields) == false) {
186             return false;
187         }
188         FaultFields rhs = ((FaultFields) other);
189         return new EqualsBuilder().append(eventSourceType, rhs.eventSourceType).append(alarmAdditionalInformation, rhs.alarmAdditionalInformation).append(specificProblem, rhs.specificProblem).append(additionalProperties, rhs.additionalProperties).append(alarmInterfaceA, rhs.alarmInterfaceA).append(alarmCondition, rhs.alarmCondition).append(eventSeverity, rhs.eventSeverity).append(faultFieldsVersion, rhs.faultFieldsVersion).append(eventCategory, rhs.eventCategory).append(vfStatus, rhs.vfStatus).isEquals();
190     }
191
192 }