com.hashicorp.nomad.apimodel.HostCpuStats Maven / Gradle / Ivy
package com.hashicorp.nomad.apimodel;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hashicorp.nomad.javasdk.ApiObject;
import com.hashicorp.nomad.javasdk.NomadJson;
import java.io.IOException;
import java.util.List;
/**
* This is a generated JavaBean representing a request or response structure.
*
* @see Nomad HTTP API documentation associated with the endpoint you are using.
*/
public final class HostCpuStats extends ApiObject {
private String cpu;
private double user;
private double system;
private double idle;
@JsonProperty("CPU")
public String getCpu() {
return cpu;
}
public HostCpuStats setCpu(String cpu) {
this.cpu = cpu;
return this;
}
@JsonProperty("User")
public double getUser() {
return user;
}
public HostCpuStats setUser(double user) {
this.user = user;
return this;
}
@JsonProperty("System")
public double getSystem() {
return system;
}
public HostCpuStats setSystem(double system) {
this.system = system;
return this;
}
@JsonProperty("Idle")
public double getIdle() {
return idle;
}
public HostCpuStats setIdle(double idle) {
this.idle = idle;
return this;
}
@Override
public String toString() {
return NomadJson.serialize(this);
}
public static HostCpuStats fromJson(String json) throws IOException {
return NomadJson.deserialize(json, HostCpuStats.class);
}
public static List fromJsonArray(String json) throws IOException {
return NomadJson.deserializeList(json, HostCpuStats.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy