Merge "Increase test coverage for services/mapper"
[dcaegen2/services/mapper.git] / UniversalVesAdapter / src / main / java / org / onap / dcaegen2 / ves / domain / ves7_0 / AdditionalMeasurement.java
1 /*\r
2 * ============LICENSE_START=======================================================\r
3 * ONAP : DCAE\r
4 * ================================================================================\r
5 * Copyright 2018 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.ves7_0;\r
21 \r
22 import com.fasterxml.jackson.annotation.JsonInclude;\r
23 import com.fasterxml.jackson.annotation.JsonProperty;\r
24 import com.fasterxml.jackson.annotation.JsonPropertyDescription;\r
25 import com.fasterxml.jackson.annotation.JsonPropertyOrder;\r
26 import org.apache.commons.lang.builder.EqualsBuilder;\r
27 import org.apache.commons.lang.builder.HashCodeBuilder;\r
28 import org.apache.commons.lang.builder.ToStringBuilder;\r
29 \r
30 \r
31 /**\r
32  * a hashMap which is associated with and described by a name\r
33  * \r
34  */\r
35 @JsonInclude(JsonInclude.Include.NON_NULL)\r
36 @JsonPropertyOrder({\r
37     "name",\r
38     "hashMap"\r
39 })\r
40 public class AdditionalMeasurement {\r
41 \r
42     /**\r
43      * \r
44      * (Required)\r
45      * \r
46      */\r
47     @JsonProperty("name")\r
48     private String name;\r
49     /**\r
50      * an associative array which is an array of key:value pairs\r
51      * (Required)\r
52      * \r
53      */\r
54     @JsonProperty("hashMap")\r
55     @JsonPropertyDescription("an associative array which is an array of key:value pairs")\r
56     private AlarmAdditionalInformation hashMap;\r
57 \r
58     /**\r
59      * \r
60      * (Required)\r
61      * \r
62      */\r
63     @JsonProperty("name")\r
64     public String getName() {\r
65         return name;\r
66     }\r
67 \r
68     /**\r
69      * \r
70      * (Required)\r
71      * \r
72      */\r
73     @JsonProperty("name")\r
74     public void setName(String name) {\r
75         this.name = name;\r
76     }\r
77 \r
78     /**\r
79      * an associative array which is an array of key:value pairs\r
80      * (Required)\r
81      * \r
82      */\r
83     @JsonProperty("hashMap")\r
84     public AlarmAdditionalInformation getHashMap() {\r
85         return hashMap;\r
86     }\r
87 \r
88     /**\r
89      * an associative array which is an array of key:value pairs\r
90      * (Required)\r
91      * \r
92      */\r
93     @JsonProperty("hashMap")\r
94     public void setHashMap(AlarmAdditionalInformation hashMap) {\r
95         this.hashMap = hashMap;\r
96     }\r
97 \r
98     @Override\r
99     public String toString() {\r
100         return ToStringBuilder.reflectionToString(this);\r
101     }\r
102 \r
103     @Override\r
104     public int hashCode() {\r
105         return new HashCodeBuilder().append(name).append(hashMap).toHashCode();\r
106     }\r
107 \r
108     @Override\r
109     public boolean equals(Object other) {\r
110         if (other == this) {\r
111             return true;\r
112         }\r
113         if ((other instanceof AdditionalMeasurement) == false) {\r
114             return false;\r
115         }\r
116         AdditionalMeasurement rhs = ((AdditionalMeasurement) other);\r
117         return new EqualsBuilder().append(name, rhs.name).append(hashMap, rhs.hashMap).isEquals();\r
118     }\r
119 \r
120 }\r