2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 package org.onap.dcaegen2.ves.domain;
22 import java.util.HashMap;
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;
34 @JsonInclude(JsonInclude.Include.NON_NULL)
47 public class CpuUsageArray {
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;
70 private Map<String, Object> additionalProperties = new HashMap<String, Object>();
72 @JsonProperty("cpuIdentifier")
73 public String getCpuIdentifier() {
77 @JsonProperty("cpuIdentifier")
78 public void setCpuIdentifier(String cpuIdentifier) {
79 this.cpuIdentifier = cpuIdentifier;
82 @JsonProperty("percentUsage")
83 public Double getPercentUsage() {
87 @JsonProperty("percentUsage")
88 public void setPercentUsage(Double percentUsage) {
89 this.percentUsage = percentUsage;
92 @JsonProperty("cpuIdle")
93 public Double getCpuIdle() {
97 @JsonProperty("cpuIdle")
98 public void setCpuIdle(Double cpuIdle) {
99 this.cpuIdle = cpuIdle;
102 @JsonProperty("cpuUsageInterrupt")
103 public Double getCpuUsageInterrupt() {
104 return cpuUsageInterrupt;
107 @JsonProperty("cpuUsageInterrupt")
108 public void setCpuUsageInterrupt(Double cpuUsageInterrupt) {
109 this.cpuUsageInterrupt = cpuUsageInterrupt;
112 @JsonProperty("cpuUsageNice")
113 public Double getCpuUsageNice() {
117 @JsonProperty("cpuUsageNice")
118 public void setCpuUsageNice(Double cpuUsageNice) {
119 this.cpuUsageNice = cpuUsageNice;
122 @JsonProperty("cpuUsageSoftIrq")
123 public Double getCpuUsageSoftIrq() {
124 return cpuUsageSoftIrq;
127 @JsonProperty("cpuUsageSoftIrq")
128 public void setCpuUsageSoftIrq(Double cpuUsageSoftIrq) {
129 this.cpuUsageSoftIrq = cpuUsageSoftIrq;
132 @JsonProperty("cpuUsageSteal")
133 public Double getCpuUsageSteal() {
134 return cpuUsageSteal;
137 @JsonProperty("cpuUsageSteal")
138 public void setCpuUsageSteal(Double cpuUsageSteal) {
139 this.cpuUsageSteal = cpuUsageSteal;
142 @JsonProperty("cpuUsageSystem")
143 public Double getCpuUsageSystem() {
144 return cpuUsageSystem;
147 @JsonProperty("cpuUsageSystem")
148 public void setCpuUsageSystem(Double cpuUsageSystem) {
149 this.cpuUsageSystem = cpuUsageSystem;
152 @JsonProperty("cpuUsageUser")
153 public Double getCpuUsageUser() {
157 @JsonProperty("cpuUsageUser")
158 public void setCpuUsageUser(Double cpuUsageUser) {
159 this.cpuUsageUser = cpuUsageUser;
162 @JsonProperty("cpuWait")
163 public Double getCpuWait() {
167 @JsonProperty("cpuWait")
168 public void setCpuWait(Double cpuWait) {
169 this.cpuWait = cpuWait;
173 public Map<String, Object> getAdditionalProperties() {
174 return this.additionalProperties;
178 public void setAdditionalProperty(String name, Object value) {
179 this.additionalProperties.put(name, value);
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();
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();
193 public boolean equals(Object other) {
197 if ((other instanceof CpuUsageArray) == false) {
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();