starts threads each for every supported collector
[dcaegen2/services/mapper.git] / UniversalVesAdapter / src / main / java / org / onap / dcaegen2 / ves / domain / CpuUsageArray.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.Map;
24 import com.fasterxml.jackson.annotation.JsonAnyGetter;
25 import com.fasterxml.jackson.annotation.JsonAnySetter;
26 import com.fasterxml.jackson.annotation.JsonIgnore;
27 import com.fasterxml.jackson.annotation.JsonInclude;
28 import com.fasterxml.jackson.annotation.JsonProperty;
29 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
30 import org.apache.commons.lang.builder.EqualsBuilder;
31 import org.apache.commons.lang.builder.HashCodeBuilder;
32 import org.apache.commons.lang.builder.ToStringBuilder;
33
34 @JsonInclude(JsonInclude.Include.NON_NULL)
35 @JsonPropertyOrder({
36     "cpuIdentifier",
37     "percentUsage",
38     "cpuIdle",
39     "cpuUsageInterrupt",
40     "cpuUsageNice",
41     "cpuUsageSoftIrq",
42     "cpuUsageSteal",
43     "cpuUsageSystem",
44     "cpuUsageUser",
45     "cpuWait"
46 })
47 public class CpuUsageArray {
48
49     @JsonProperty("cpuIdentifier")
50     private String cpuIdentifier;
51     @JsonProperty("percentUsage")
52     private Double percentUsage;
53     @JsonProperty("cpuIdle")
54     private Double cpuIdle;
55     @JsonProperty("cpuUsageInterrupt")
56     private Double cpuUsageInterrupt;
57     @JsonProperty("cpuUsageNice")
58     private Double cpuUsageNice;
59     @JsonProperty("cpuUsageSoftIrq")
60     private Double cpuUsageSoftIrq;
61     @JsonProperty("cpuUsageSteal")
62     private Double cpuUsageSteal;
63     @JsonProperty("cpuUsageSystem")
64     private Double cpuUsageSystem;
65     @JsonProperty("cpuUsageUser")
66     private Double cpuUsageUser;
67     @JsonProperty("cpuWait")
68     private Double cpuWait;
69     @JsonIgnore
70     private Map<String, Object> additionalProperties = new HashMap<String, Object>();
71
72     @JsonProperty("cpuIdentifier")
73     public String getCpuIdentifier() {
74         return cpuIdentifier;
75     }
76
77     @JsonProperty("cpuIdentifier")
78     public void setCpuIdentifier(String cpuIdentifier) {
79         this.cpuIdentifier = cpuIdentifier;
80     }
81
82     @JsonProperty("percentUsage")
83     public Double getPercentUsage() {
84         return percentUsage;
85     }
86
87     @JsonProperty("percentUsage")
88     public void setPercentUsage(Double percentUsage) {
89         this.percentUsage = percentUsage;
90     }
91
92     @JsonProperty("cpuIdle")
93     public Double getCpuIdle() {
94         return cpuIdle;
95     }
96
97     @JsonProperty("cpuIdle")
98     public void setCpuIdle(Double cpuIdle) {
99         this.cpuIdle = cpuIdle;
100     }
101
102     @JsonProperty("cpuUsageInterrupt")
103     public Double getCpuUsageInterrupt() {
104         return cpuUsageInterrupt;
105     }
106
107     @JsonProperty("cpuUsageInterrupt")
108     public void setCpuUsageInterrupt(Double cpuUsageInterrupt) {
109         this.cpuUsageInterrupt = cpuUsageInterrupt;
110     }
111
112     @JsonProperty("cpuUsageNice")
113     public Double getCpuUsageNice() {
114         return cpuUsageNice;
115     }
116
117     @JsonProperty("cpuUsageNice")
118     public void setCpuUsageNice(Double cpuUsageNice) {
119         this.cpuUsageNice = cpuUsageNice;
120     }
121
122     @JsonProperty("cpuUsageSoftIrq")
123     public Double getCpuUsageSoftIrq() {
124         return cpuUsageSoftIrq;
125     }
126
127     @JsonProperty("cpuUsageSoftIrq")
128     public void setCpuUsageSoftIrq(Double cpuUsageSoftIrq) {
129         this.cpuUsageSoftIrq = cpuUsageSoftIrq;
130     }
131
132     @JsonProperty("cpuUsageSteal")
133     public Double getCpuUsageSteal() {
134         return cpuUsageSteal;
135     }
136
137     @JsonProperty("cpuUsageSteal")
138     public void setCpuUsageSteal(Double cpuUsageSteal) {
139         this.cpuUsageSteal = cpuUsageSteal;
140     }
141
142     @JsonProperty("cpuUsageSystem")
143     public Double getCpuUsageSystem() {
144         return cpuUsageSystem;
145     }
146
147     @JsonProperty("cpuUsageSystem")
148     public void setCpuUsageSystem(Double cpuUsageSystem) {
149         this.cpuUsageSystem = cpuUsageSystem;
150     }
151
152     @JsonProperty("cpuUsageUser")
153     public Double getCpuUsageUser() {
154         return cpuUsageUser;
155     }
156
157     @JsonProperty("cpuUsageUser")
158     public void setCpuUsageUser(Double cpuUsageUser) {
159         this.cpuUsageUser = cpuUsageUser;
160     }
161
162     @JsonProperty("cpuWait")
163     public Double getCpuWait() {
164         return cpuWait;
165     }
166
167     @JsonProperty("cpuWait")
168     public void setCpuWait(Double cpuWait) {
169         this.cpuWait = cpuWait;
170     }
171
172     @JsonAnyGetter
173     public Map<String, Object> getAdditionalProperties() {
174         return this.additionalProperties;
175     }
176
177     @JsonAnySetter
178     public void setAdditionalProperty(String name, Object value) {
179         this.additionalProperties.put(name, value);
180     }
181
182     @Override
183     public String toString() {
184         return new ToStringBuilder(this).append("cpuIdentifier", cpuIdentifier).append("percentUsage", percentUsage).append("cpuIdle", cpuIdle).append("cpuUsageInterrupt", cpuUsageInterrupt).append("cpuUsageNice", cpuUsageNice).append("cpuUsageSoftIrq", cpuUsageSoftIrq).append("cpuUsageSteal", cpuUsageSteal).append("cpuUsageSystem", cpuUsageSystem).append("cpuUsageUser", cpuUsageUser).append("cpuWait", cpuWait).append("additionalProperties", additionalProperties).toString();
185     }
186
187     @Override
188     public int hashCode() {
189         return new HashCodeBuilder().append(cpuUsageNice).append(cpuUsageSteal).append(cpuUsageInterrupt).append(cpuUsageSoftIrq).append(cpuIdentifier).append(additionalProperties).append(cpuWait).append(cpuUsageSystem).append(cpuUsageUser).append(cpuIdle).append(percentUsage).toHashCode();
190     }
191
192     @Override
193     public boolean equals(Object other) {
194         if (other == this) {
195             return true;
196         }
197         if ((other instanceof CpuUsageArray) == false) {
198             return false;
199         }
200         CpuUsageArray rhs = ((CpuUsageArray) other);
201         return new EqualsBuilder().append(cpuUsageNice, rhs.cpuUsageNice).append(cpuUsageSteal, rhs.cpuUsageSteal).append(cpuUsageInterrupt, rhs.cpuUsageInterrupt).append(cpuUsageSoftIrq, rhs.cpuUsageSoftIrq).append(cpuIdentifier, rhs.cpuIdentifier).append(additionalProperties, rhs.additionalProperties).append(cpuWait, rhs.cpuWait).append(cpuUsageSystem, rhs.cpuUsageSystem).append(cpuUsageUser, rhs.cpuUsageUser).append(cpuIdle, rhs.cpuIdle).append(percentUsage, rhs.percentUsage).isEquals();
202     }
203
204 }