Merge "Increase test coverage for services/mapper"
[dcaegen2/services/mapper.git] / UniversalVesAdapter / src / main / java / org / onap / dcaegen2 / ves / domain / ves7_0 / MemoryUsageArray.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  * memory usage of an identified virtual machine\r
33  * \r
34  */\r
35 @JsonInclude(JsonInclude.Include.NON_NULL)\r
36 @JsonPropertyOrder({\r
37     "memoryBuffered",\r
38     "memoryCached",\r
39     "memoryConfigured",\r
40     "memoryDemand",\r
41     "memoryFree",\r
42     "memoryLatencyAvg",\r
43     "memorySharedAvg",\r
44     "memorySlabRecl",\r
45     "memorySlabUnrecl",\r
46     "memorySwapInAvg",\r
47     "memorySwapInRateAvg",\r
48     "memorySwapOutAvg",\r
49     "memorySwapOutRateAvg",\r
50     "memorySwapUsedAvg",\r
51     "memoryUsed",\r
52     "percentMemoryUsage",\r
53     "vmIdentifier"\r
54 })\r
55 public class MemoryUsageArray {\r
56 \r
57     /**\r
58      * kibibytes of temporary storage for raw disk blocks\r
59      * \r
60      */\r
61     @JsonProperty("memoryBuffered")\r
62     @JsonPropertyDescription("kibibytes of temporary storage for raw disk blocks")\r
63     private Double memoryBuffered;\r
64     /**\r
65      * kibibytes of memory used for cache\r
66      * \r
67      */\r
68     @JsonProperty("memoryCached")\r
69     @JsonPropertyDescription("kibibytes of memory used for cache")\r
70     private Double memoryCached;\r
71     /**\r
72      * kibibytes of memory configured in the virtual machine on which the xNFC reporting the event is running\r
73      * \r
74      */\r
75     @JsonProperty("memoryConfigured")\r
76     @JsonPropertyDescription("kibibytes of memory configured in the virtual machine on which the xNFC reporting the event is running")\r
77     private Double memoryConfigured;\r
78     /**\r
79      * host demand in kibibytes\r
80      * \r
81      */\r
82     @JsonProperty("memoryDemand")\r
83     @JsonPropertyDescription("host demand in kibibytes")\r
84     private Double memoryDemand;\r
85     /**\r
86      * kibibytes of physical RAM left unused by the system\r
87      * (Required)\r
88      * \r
89      */\r
90     @JsonProperty("memoryFree")\r
91     @JsonPropertyDescription("kibibytes of physical RAM left unused by the system")\r
92     private Double memoryFree;\r
93     /**\r
94      * Percentage of time the VM is waiting to access swapped or compressed memory\r
95      * \r
96      */\r
97     @JsonProperty("memoryLatencyAvg")\r
98     @JsonPropertyDescription("Percentage of time the VM is waiting to access swapped or compressed memory")\r
99     private Double memoryLatencyAvg;\r
100     /**\r
101      * shared memory in kilobytes\r
102      * \r
103      */\r
104     @JsonProperty("memorySharedAvg")\r
105     @JsonPropertyDescription("shared memory in kilobytes")\r
106     private Double memorySharedAvg;\r
107     /**\r
108      * the part of the slab that can be reclaimed such as caches measured in kibibytes\r
109      * \r
110      */\r
111     @JsonProperty("memorySlabRecl")\r
112     @JsonPropertyDescription("the part of the slab that can be reclaimed such as caches measured in kibibytes")\r
113     private Double memorySlabRecl;\r
114     /**\r
115      * the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes\r
116      * \r
117      */\r
118     @JsonProperty("memorySlabUnrecl")\r
119     @JsonPropertyDescription("the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes")\r
120     private Double memorySlabUnrecl;\r
121     /**\r
122      * Amount of memory swapped-in from host cache in kibibytes\r
123      * \r
124      */\r
125     @JsonProperty("memorySwapInAvg")\r
126     @JsonPropertyDescription("Amount of memory swapped-in from host cache in kibibytes")\r
127     private Double memorySwapInAvg;\r
128     /**\r
129      * rate at which memory is swapped from disk into active memory during the interval in kilobytes per second\r
130      * \r
131      */\r
132     @JsonProperty("memorySwapInRateAvg")\r
133     @JsonPropertyDescription("rate at which memory is swapped from disk into active memory during the interval in kilobytes per second")\r
134     private Double memorySwapInRateAvg;\r
135     /**\r
136      * Amount of memory swapped-out to host cache in kibibytes\r
137      * \r
138      */\r
139     @JsonProperty("memorySwapOutAvg")\r
140     @JsonPropertyDescription("Amount of memory swapped-out to host cache in kibibytes")\r
141     private Double memorySwapOutAvg;\r
142     /**\r
143      * rate at which memory is being swapped from active memory to disk during the current interval in kilobytes per second\r
144      * \r
145      */\r
146     @JsonProperty("memorySwapOutRateAvg")\r
147     @JsonPropertyDescription("rate at which memory is being swapped from active memory to disk during the current interval in kilobytes per second")\r
148     private Double memorySwapOutRateAvg;\r
149     /**\r
150      * space used for caching swapped pages in the host cache in kibibytes\r
151      * \r
152      */\r
153     @JsonProperty("memorySwapUsedAvg")\r
154     @JsonPropertyDescription("space used for caching swapped pages in the host cache in kibibytes")\r
155     private Double memorySwapUsedAvg;\r
156     /**\r
157      * total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes\r
158      * (Required)\r
159      * \r
160      */\r
161     @JsonProperty("memoryUsed")\r
162     @JsonPropertyDescription("total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes")\r
163     private Double memoryUsed;\r
164     /**\r
165      * Percentage of memory usage; value = (memoryUsed / (memoryUsed + memoryFree) x 100 if denomintor is nonzero, or 0, if otherwise\r
166      * \r
167      */\r
168     @JsonProperty("percentMemoryUsage")\r
169     @JsonPropertyDescription("Percentage of memory usage; value = (memoryUsed / (memoryUsed + memoryFree) x 100 if denomintor is nonzero, or 0, if otherwise")\r
170     private Double percentMemoryUsage;\r
171     /**\r
172      * virtual machine identifier associated with the memory metrics\r
173      * (Required)\r
174      * \r
175      */\r
176     @JsonProperty("vmIdentifier")\r
177     @JsonPropertyDescription("virtual machine identifier associated with the memory metrics")\r
178     private String vmIdentifier;\r
179 \r
180     /**\r
181      * kibibytes of temporary storage for raw disk blocks\r
182      * \r
183      */\r
184     @JsonProperty("memoryBuffered")\r
185     public Double getMemoryBuffered() {\r
186         return memoryBuffered;\r
187     }\r
188 \r
189     /**\r
190      * kibibytes of temporary storage for raw disk blocks\r
191      * \r
192      */\r
193     @JsonProperty("memoryBuffered")\r
194     public void setMemoryBuffered(Double memoryBuffered) {\r
195         this.memoryBuffered = memoryBuffered;\r
196     }\r
197 \r
198     /**\r
199      * kibibytes of memory used for cache\r
200      * \r
201      */\r
202     @JsonProperty("memoryCached")\r
203     public Double getMemoryCached() {\r
204         return memoryCached;\r
205     }\r
206 \r
207     /**\r
208      * kibibytes of memory used for cache\r
209      * \r
210      */\r
211     @JsonProperty("memoryCached")\r
212     public void setMemoryCached(Double memoryCached) {\r
213         this.memoryCached = memoryCached;\r
214     }\r
215 \r
216     /**\r
217      * kibibytes of memory configured in the virtual machine on which the xNFC reporting the event is running\r
218      * \r
219      */\r
220     @JsonProperty("memoryConfigured")\r
221     public Double getMemoryConfigured() {\r
222         return memoryConfigured;\r
223     }\r
224 \r
225     /**\r
226      * kibibytes of memory configured in the virtual machine on which the xNFC reporting the event is running\r
227      * \r
228      */\r
229     @JsonProperty("memoryConfigured")\r
230     public void setMemoryConfigured(Double memoryConfigured) {\r
231         this.memoryConfigured = memoryConfigured;\r
232     }\r
233 \r
234     /**\r
235      * host demand in kibibytes\r
236      * \r
237      */\r
238     @JsonProperty("memoryDemand")\r
239     public Double getMemoryDemand() {\r
240         return memoryDemand;\r
241     }\r
242 \r
243     /**\r
244      * host demand in kibibytes\r
245      * \r
246      */\r
247     @JsonProperty("memoryDemand")\r
248     public void setMemoryDemand(Double memoryDemand) {\r
249         this.memoryDemand = memoryDemand;\r
250     }\r
251 \r
252     /**\r
253      * kibibytes of physical RAM left unused by the system\r
254      * (Required)\r
255      * \r
256      */\r
257     @JsonProperty("memoryFree")\r
258     public Double getMemoryFree() {\r
259         return memoryFree;\r
260     }\r
261 \r
262     /**\r
263      * kibibytes of physical RAM left unused by the system\r
264      * (Required)\r
265      * \r
266      */\r
267     @JsonProperty("memoryFree")\r
268     public void setMemoryFree(Double memoryFree) {\r
269         this.memoryFree = memoryFree;\r
270     }\r
271 \r
272     /**\r
273      * Percentage of time the VM is waiting to access swapped or compressed memory\r
274      * \r
275      */\r
276     @JsonProperty("memoryLatencyAvg")\r
277     public Double getMemoryLatencyAvg() {\r
278         return memoryLatencyAvg;\r
279     }\r
280 \r
281     /**\r
282      * Percentage of time the VM is waiting to access swapped or compressed memory\r
283      * \r
284      */\r
285     @JsonProperty("memoryLatencyAvg")\r
286     public void setMemoryLatencyAvg(Double memoryLatencyAvg) {\r
287         this.memoryLatencyAvg = memoryLatencyAvg;\r
288     }\r
289 \r
290     /**\r
291      * shared memory in kilobytes\r
292      * \r
293      */\r
294     @JsonProperty("memorySharedAvg")\r
295     public Double getMemorySharedAvg() {\r
296         return memorySharedAvg;\r
297     }\r
298 \r
299     /**\r
300      * shared memory in kilobytes\r
301      * \r
302      */\r
303     @JsonProperty("memorySharedAvg")\r
304     public void setMemorySharedAvg(Double memorySharedAvg) {\r
305         this.memorySharedAvg = memorySharedAvg;\r
306     }\r
307 \r
308     /**\r
309      * the part of the slab that can be reclaimed such as caches measured in kibibytes\r
310      * \r
311      */\r
312     @JsonProperty("memorySlabRecl")\r
313     public Double getMemorySlabRecl() {\r
314         return memorySlabRecl;\r
315     }\r
316 \r
317     /**\r
318      * the part of the slab that can be reclaimed such as caches measured in kibibytes\r
319      * \r
320      */\r
321     @JsonProperty("memorySlabRecl")\r
322     public void setMemorySlabRecl(Double memorySlabRecl) {\r
323         this.memorySlabRecl = memorySlabRecl;\r
324     }\r
325 \r
326     /**\r
327      * the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes\r
328      * \r
329      */\r
330     @JsonProperty("memorySlabUnrecl")\r
331     public Double getMemorySlabUnrecl() {\r
332         return memorySlabUnrecl;\r
333     }\r
334 \r
335     /**\r
336      * the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes\r
337      * \r
338      */\r
339     @JsonProperty("memorySlabUnrecl")\r
340     public void setMemorySlabUnrecl(Double memorySlabUnrecl) {\r
341         this.memorySlabUnrecl = memorySlabUnrecl;\r
342     }\r
343 \r
344     /**\r
345      * Amount of memory swapped-in from host cache in kibibytes\r
346      * \r
347      */\r
348     @JsonProperty("memorySwapInAvg")\r
349     public Double getMemorySwapInAvg() {\r
350         return memorySwapInAvg;\r
351     }\r
352 \r
353     /**\r
354      * Amount of memory swapped-in from host cache in kibibytes\r
355      * \r
356      */\r
357     @JsonProperty("memorySwapInAvg")\r
358     public void setMemorySwapInAvg(Double memorySwapInAvg) {\r
359         this.memorySwapInAvg = memorySwapInAvg;\r
360     }\r
361 \r
362     /**\r
363      * rate at which memory is swapped from disk into active memory during the interval in kilobytes per second\r
364      * \r
365      */\r
366     @JsonProperty("memorySwapInRateAvg")\r
367     public Double getMemorySwapInRateAvg() {\r
368         return memorySwapInRateAvg;\r
369     }\r
370 \r
371     /**\r
372      * rate at which memory is swapped from disk into active memory during the interval in kilobytes per second\r
373      * \r
374      */\r
375     @JsonProperty("memorySwapInRateAvg")\r
376     public void setMemorySwapInRateAvg(Double memorySwapInRateAvg) {\r
377         this.memorySwapInRateAvg = memorySwapInRateAvg;\r
378     }\r
379 \r
380     /**\r
381      * Amount of memory swapped-out to host cache in kibibytes\r
382      * \r
383      */\r
384     @JsonProperty("memorySwapOutAvg")\r
385     public Double getMemorySwapOutAvg() {\r
386         return memorySwapOutAvg;\r
387     }\r
388 \r
389     /**\r
390      * Amount of memory swapped-out to host cache in kibibytes\r
391      * \r
392      */\r
393     @JsonProperty("memorySwapOutAvg")\r
394     public void setMemorySwapOutAvg(Double memorySwapOutAvg) {\r
395         this.memorySwapOutAvg = memorySwapOutAvg;\r
396     }\r
397 \r
398     /**\r
399      * rate at which memory is being swapped from active memory to disk during the current interval in kilobytes per second\r
400      * \r
401      */\r
402     @JsonProperty("memorySwapOutRateAvg")\r
403     public Double getMemorySwapOutRateAvg() {\r
404         return memorySwapOutRateAvg;\r
405     }\r
406 \r
407     /**\r
408      * rate at which memory is being swapped from active memory to disk during the current interval in kilobytes per second\r
409      * \r
410      */\r
411     @JsonProperty("memorySwapOutRateAvg")\r
412     public void setMemorySwapOutRateAvg(Double memorySwapOutRateAvg) {\r
413         this.memorySwapOutRateAvg = memorySwapOutRateAvg;\r
414     }\r
415 \r
416     /**\r
417      * space used for caching swapped pages in the host cache in kibibytes\r
418      * \r
419      */\r
420     @JsonProperty("memorySwapUsedAvg")\r
421     public Double getMemorySwapUsedAvg() {\r
422         return memorySwapUsedAvg;\r
423     }\r
424 \r
425     /**\r
426      * space used for caching swapped pages in the host cache in kibibytes\r
427      * \r
428      */\r
429     @JsonProperty("memorySwapUsedAvg")\r
430     public void setMemorySwapUsedAvg(Double memorySwapUsedAvg) {\r
431         this.memorySwapUsedAvg = memorySwapUsedAvg;\r
432     }\r
433 \r
434     /**\r
435      * total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes\r
436      * (Required)\r
437      * \r
438      */\r
439     @JsonProperty("memoryUsed")\r
440     public Double getMemoryUsed() {\r
441         return memoryUsed;\r
442     }\r
443 \r
444     /**\r
445      * total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes\r
446      * (Required)\r
447      * \r
448      */\r
449     @JsonProperty("memoryUsed")\r
450     public void setMemoryUsed(Double memoryUsed) {\r
451         this.memoryUsed = memoryUsed;\r
452     }\r
453 \r
454     /**\r
455      * Percentage of memory usage; value = (memoryUsed / (memoryUsed + memoryFree) x 100 if denomintor is nonzero, or 0, if otherwise\r
456      * \r
457      */\r
458     @JsonProperty("percentMemoryUsage")\r
459     public Double getPercentMemoryUsage() {\r
460         return percentMemoryUsage;\r
461     }\r
462 \r
463     /**\r
464      * Percentage of memory usage; value = (memoryUsed / (memoryUsed + memoryFree) x 100 if denomintor is nonzero, or 0, if otherwise\r
465      * \r
466      */\r
467     @JsonProperty("percentMemoryUsage")\r
468     public void setPercentMemoryUsage(Double percentMemoryUsage) {\r
469         this.percentMemoryUsage = percentMemoryUsage;\r
470     }\r
471 \r
472     /**\r
473      * virtual machine identifier associated with the memory metrics\r
474      * (Required)\r
475      * \r
476      */\r
477     @JsonProperty("vmIdentifier")\r
478     public String getVmIdentifier() {\r
479         return vmIdentifier;\r
480     }\r
481 \r
482     /**\r
483      * virtual machine identifier associated with the memory metrics\r
484      * (Required)\r
485      * \r
486      */\r
487     @JsonProperty("vmIdentifier")\r
488     public void setVmIdentifier(String vmIdentifier) {\r
489         this.vmIdentifier = vmIdentifier;\r
490     }\r
491 \r
492     @Override\r
493     public String toString() {\r
494         return ToStringBuilder.reflectionToString(this);\r
495     }\r
496 \r
497     @Override\r
498     public int hashCode() {\r
499         return new HashCodeBuilder().append(memoryBuffered).append(memoryCached).append(memoryConfigured).append(memoryDemand).append(memoryFree).append(memoryLatencyAvg).append(memorySharedAvg).append(memorySlabRecl).append(memorySlabUnrecl).append(memorySwapInAvg).append(memorySwapInRateAvg).append(memorySwapOutAvg).append(memorySwapOutRateAvg).append(memorySwapUsedAvg).append(memoryUsed).append(percentMemoryUsage).append(vmIdentifier).toHashCode();\r
500     }\r
501 \r
502     @Override\r
503     public boolean equals(Object other) {\r
504         if (other == this) {\r
505             return true;\r
506         }\r
507         if ((other instanceof MemoryUsageArray) == false) {\r
508             return false;\r
509         }\r
510         MemoryUsageArray rhs = ((MemoryUsageArray) other);\r
511         return new EqualsBuilder().append(memoryBuffered, rhs.memoryBuffered).append(memoryCached, rhs.memoryCached).append(memoryConfigured, rhs.memoryConfigured).append(memoryDemand, rhs.memoryDemand).append(memoryFree, rhs.memoryFree).append(memoryLatencyAvg, rhs.memoryLatencyAvg).append(memorySharedAvg, rhs.memorySharedAvg).append(memorySlabRecl, rhs.memorySlabRecl).append(memorySlabUnrecl, rhs.memorySlabUnrecl).append(memorySwapInAvg, rhs.memorySwapInAvg).append(memorySwapInRateAvg, rhs.memorySwapInRateAvg).append(memorySwapOutAvg, rhs.memorySwapOutAvg).append(memorySwapOutRateAvg, rhs.memorySwapOutRateAvg).append(memorySwapUsedAvg, rhs.memorySwapUsedAvg).append(memoryUsed, rhs.memoryUsed).append(percentMemoryUsage, rhs.percentMemoryUsage).append(vmIdentifier, rhs.vmIdentifier).isEquals();\r
512     }\r
513 \r
514 }\r