Resolving warning reported in build - VES Mapper
[dcaegen2/services/mapper.git] / UniversalVesAdapter / src / main / java / org / onap / dcaegen2 / ves / domain / ves70 / VesEvent.java
1 /*\r
2 * ============LICENSE_START=======================================================\r
3 * ONAP : DCAE\r
4 * ================================================================================\r
5 * Copyright 2019 TechMahindra\r
6 *=================================================================================\r
7 * Licensed under the Apache License, Version 2.0 (the "License");\r
8 * you may not use this file except in compliance with the License.\r
9 * You may obtain a copy of the License at\r
10 *\r
11 *     http://www.apache.org/licenses/LICENSE-2.0\r
12 *\r
13 * Unless required by applicable law or agreed to in writing, software\r
14 * distributed under the License is distributed on an "AS IS" BASIS,\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16 * See the License for the specific language governing permissions and\r
17 * limitations under the License.\r
18 * ============LICENSE_END=========================================================\r
19 */\r
20 package org.onap.dcaegen2.ves.domain.ves70;\r
21 \r
22 import java.util.ArrayList;\r
23 import java.util.HashMap;\r
24 import java.util.List;\r
25 import java.util.Map;\r
26 import com.fasterxml.jackson.annotation.JsonAnyGetter;\r
27 import com.fasterxml.jackson.annotation.JsonAnySetter;\r
28 import com.fasterxml.jackson.annotation.JsonIgnore;\r
29 import com.fasterxml.jackson.annotation.JsonInclude;\r
30 import com.fasterxml.jackson.annotation.JsonProperty;\r
31 import com.fasterxml.jackson.annotation.JsonPropertyDescription;\r
32 import com.fasterxml.jackson.annotation.JsonPropertyOrder;\r
33 import org.apache.commons.lang.builder.EqualsBuilder;\r
34 import org.apache.commons.lang.builder.HashCodeBuilder;\r
35 import org.apache.commons.lang.builder.ToStringBuilder;\r
36 \r
37 \r
38 /**\r
39  * VES Event Listener Common Event Format\r
40  * <p>\r
41  * \r
42  * \r
43  */\r
44 @JsonInclude(JsonInclude.Include.NON_NULL)\r
45 @JsonPropertyOrder({\r
46     "event"\r
47     \r
48 })\r
49 public class VesEvent {\r
50 \r
51     /**\r
52      * the root level of the common event format\r
53      * \r
54      */\r
55     @JsonProperty("event")\r
56     @JsonPropertyDescription("the root level of the common event format")\r
57     private Event event;\r
58     \r
59    \r
60     @JsonIgnore\r
61     private Map<String, Object> additionalProperties = new HashMap<String, Object>();\r
62 \r
63     /**\r
64      * the root level of the common event format\r
65      * \r
66      */\r
67     @JsonProperty("event")\r
68     public Event getEvent() {\r
69         return event;\r
70     }\r
71 \r
72     /**\r
73      * the root level of the common event format\r
74      * \r
75      */\r
76     @JsonProperty("event")\r
77     public void setEvent(Event event) {\r
78         this.event = event;\r
79     }\r
80 \r
81    \r
82 \r
83   \r
84     @Override\r
85     public String toString() {\r
86         return ToStringBuilder.reflectionToString(this);\r
87     }\r
88 \r
89     @JsonAnyGetter\r
90     public Map<String, Object> getAdditionalProperties() {\r
91         return this.additionalProperties;\r
92     }\r
93 \r
94     @JsonAnySetter\r
95     public void setAdditionalProperty(String name, Object value) {\r
96         this.additionalProperties.put(name, value);\r
97     }\r
98 \r
99     @Override\r
100     public int hashCode() {\r
101         return new HashCodeBuilder().append(event).append(additionalProperties).toHashCode();\r
102     }\r
103 \r
104     @Override\r
105     public boolean equals(Object other) {\r
106         if (other == this) {\r
107             return true;\r
108         }\r
109         if ((other instanceof VesEvent) == false) {\r
110             return false;\r
111         }\r
112         VesEvent rhs = ((VesEvent) other);\r
113         return new EqualsBuilder().append(event, rhs.event).append(additionalProperties, rhs.additionalProperties).isEquals();\r
114     }\r
115 \r
116 }\r