fb8c075388ee2838557d07efc2a45ac50eb05f26
[dcaegen2/services/mapper.git] / UniversalVesAdapter / src / main / java / org / onap / dcaegen2 / ves / domain / ves7_0 / MachineCheckExceptionArray.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  * metrics on vm machine check exceptions\r
33  * \r
34  */\r
35 @JsonInclude(JsonInclude.Include.NON_NULL)\r
36 @JsonPropertyOrder({\r
37     "correctedMemoryErrors",\r
38     "correctedMemoryErrorsIn1Hr",\r
39     "uncorrectedMemoryErrors",\r
40     "uncorrectedMemoryErrorsIn1Hr",\r
41     "vmIdentifier"\r
42 })\r
43 public class MachineCheckExceptionArray {\r
44 \r
45     /**\r
46      * total hardware errors that were corrected by the hardware (e.g. data corruption corrected via  ECC) over the measurementInterval\r
47      * \r
48      */\r
49     @JsonProperty("correctedMemoryErrors")\r
50     @JsonPropertyDescription("total hardware errors that were corrected by the hardware (e.g. data corruption corrected via  ECC) over the measurementInterval")\r
51     private Double correctedMemoryErrors;\r
52     /**\r
53      * total hardware errors that were corrected by the hardware over the last one hour\r
54      * \r
55      */\r
56     @JsonProperty("correctedMemoryErrorsIn1Hr")\r
57     @JsonPropertyDescription("total hardware errors that were corrected by the hardware over the last one hour")\r
58     private Double correctedMemoryErrorsIn1Hr;\r
59     /**\r
60      * total uncorrected hardware errors that were detected by the hardware (e.g., causing data corruption) over the measurementInterval\r
61      * \r
62      */\r
63     @JsonProperty("uncorrectedMemoryErrors")\r
64     @JsonPropertyDescription("total uncorrected hardware errors that were detected by the hardware (e.g., causing data corruption) over the measurementInterval")\r
65     private Double uncorrectedMemoryErrors;\r
66     /**\r
67      * total uncorrected hardware errors that were detected by the hardware over the last one hour\r
68      * \r
69      */\r
70     @JsonProperty("uncorrectedMemoryErrorsIn1Hr")\r
71     @JsonPropertyDescription("total uncorrected hardware errors that were detected by the hardware over the last one hour")\r
72     private Double uncorrectedMemoryErrorsIn1Hr;\r
73     /**\r
74      * virtual machine identifier associated with the machine check exception\r
75      * (Required)\r
76      * \r
77      */\r
78     @JsonProperty("vmIdentifier")\r
79     @JsonPropertyDescription("virtual machine identifier associated with the machine check exception")\r
80     private String vmIdentifier;\r
81 \r
82     /**\r
83      * total hardware errors that were corrected by the hardware (e.g. data corruption corrected via  ECC) over the measurementInterval\r
84      * \r
85      */\r
86     @JsonProperty("correctedMemoryErrors")\r
87     public Double getCorrectedMemoryErrors() {\r
88         return correctedMemoryErrors;\r
89     }\r
90 \r
91     /**\r
92      * total hardware errors that were corrected by the hardware (e.g. data corruption corrected via  ECC) over the measurementInterval\r
93      * \r
94      */\r
95     @JsonProperty("correctedMemoryErrors")\r
96     public void setCorrectedMemoryErrors(Double correctedMemoryErrors) {\r
97         this.correctedMemoryErrors = correctedMemoryErrors;\r
98     }\r
99 \r
100     /**\r
101      * total hardware errors that were corrected by the hardware over the last one hour\r
102      * \r
103      */\r
104     @JsonProperty("correctedMemoryErrorsIn1Hr")\r
105     public Double getCorrectedMemoryErrorsIn1Hr() {\r
106         return correctedMemoryErrorsIn1Hr;\r
107     }\r
108 \r
109     /**\r
110      * total hardware errors that were corrected by the hardware over the last one hour\r
111      * \r
112      */\r
113     @JsonProperty("correctedMemoryErrorsIn1Hr")\r
114     public void setCorrectedMemoryErrorsIn1Hr(Double correctedMemoryErrorsIn1Hr) {\r
115         this.correctedMemoryErrorsIn1Hr = correctedMemoryErrorsIn1Hr;\r
116     }\r
117 \r
118     /**\r
119      * total uncorrected hardware errors that were detected by the hardware (e.g., causing data corruption) over the measurementInterval\r
120      * \r
121      */\r
122     @JsonProperty("uncorrectedMemoryErrors")\r
123     public Double getUncorrectedMemoryErrors() {\r
124         return uncorrectedMemoryErrors;\r
125     }\r
126 \r
127     /**\r
128      * total uncorrected hardware errors that were detected by the hardware (e.g., causing data corruption) over the measurementInterval\r
129      * \r
130      */\r
131     @JsonProperty("uncorrectedMemoryErrors")\r
132     public void setUncorrectedMemoryErrors(Double uncorrectedMemoryErrors) {\r
133         this.uncorrectedMemoryErrors = uncorrectedMemoryErrors;\r
134     }\r
135 \r
136     /**\r
137      * total uncorrected hardware errors that were detected by the hardware over the last one hour\r
138      * \r
139      */\r
140     @JsonProperty("uncorrectedMemoryErrorsIn1Hr")\r
141     public Double getUncorrectedMemoryErrorsIn1Hr() {\r
142         return uncorrectedMemoryErrorsIn1Hr;\r
143     }\r
144 \r
145     /**\r
146      * total uncorrected hardware errors that were detected by the hardware over the last one hour\r
147      * \r
148      */\r
149     @JsonProperty("uncorrectedMemoryErrorsIn1Hr")\r
150     public void setUncorrectedMemoryErrorsIn1Hr(Double uncorrectedMemoryErrorsIn1Hr) {\r
151         this.uncorrectedMemoryErrorsIn1Hr = uncorrectedMemoryErrorsIn1Hr;\r
152     }\r
153 \r
154     /**\r
155      * virtual machine identifier associated with the machine check exception\r
156      * (Required)\r
157      * \r
158      */\r
159     @JsonProperty("vmIdentifier")\r
160     public String getVmIdentifier() {\r
161         return vmIdentifier;\r
162     }\r
163 \r
164     /**\r
165      * virtual machine identifier associated with the machine check exception\r
166      * (Required)\r
167      * \r
168      */\r
169     @JsonProperty("vmIdentifier")\r
170     public void setVmIdentifier(String vmIdentifier) {\r
171         this.vmIdentifier = vmIdentifier;\r
172     }\r
173 \r
174     @Override\r
175     public String toString() {\r
176         return ToStringBuilder.reflectionToString(this);\r
177     }\r
178 \r
179     @Override\r
180     public int hashCode() {\r
181         return new HashCodeBuilder().append(correctedMemoryErrors).append(correctedMemoryErrorsIn1Hr).append(uncorrectedMemoryErrors).append(uncorrectedMemoryErrorsIn1Hr).append(vmIdentifier).toHashCode();\r
182     }\r
183 \r
184     @Override\r
185     public boolean equals(Object other) {\r
186         if (other == this) {\r
187             return true;\r
188         }\r
189         if ((other instanceof MachineCheckExceptionArray) == false) {\r
190             return false;\r
191         }\r
192         MachineCheckExceptionArray rhs = ((MachineCheckExceptionArray) other);\r
193         return new EqualsBuilder().append(correctedMemoryErrors, rhs.correctedMemoryErrors).append(correctedMemoryErrorsIn1Hr, rhs.correctedMemoryErrorsIn1Hr).append(uncorrectedMemoryErrors, rhs.uncorrectedMemoryErrors).append(uncorrectedMemoryErrorsIn1Hr, rhs.uncorrectedMemoryErrorsIn1Hr).append(vmIdentifier, rhs.vmIdentifier).isEquals();\r
194     }\r
195 \r
196 }\r