com.eg.agent.android.ResourceInforamtion Maven / Gradle / Ivy
package com.eg.agent.android;
import com.eg.google.gson.JsonObject;
import com.eg.google.gson.JsonPrimitive;
public class ResourceInforamtion {
String batteryStatus;
String batteryConsumed;
String batterylevel;
String carrierName;
String networkStatus;
String networkWanType;
String dataUsage;
String orientation;
String memoryUsage;
String phoneAppMemory;
String PhoneDiskavailable;
String cputime,appcputime;
private String country,adminArea;
private String batteryChargingType;
String deviceform;
String Diskspace;
public String getDiskspace() {
return Diskspace;
}
public void setDiskspace(String diskspace) {
Diskspace = diskspace;
}
public String getDeviceform() {
return deviceform;
}
public void setDeviceform(String deviceform) {
this.deviceform = deviceform;
}
public String getBatteryChargingType() {
return batteryChargingType;
}
public void setBatteryChargingType(String batteryChargingType) {
this.batteryChargingType = batteryChargingType;
}
public void setCountry(String Country)
{
this.country=Country;
}
public String getCountry(){
return this.country;
}
public void setAdminArea(String adminArea)
{
this.adminArea=adminArea;
}
public String getAdminArea()
{
return this.adminArea;
}
public String getCputime() {
return cputime;
}
public void setCputime(String cputime) {
this.cputime = cputime;
}
public String getAppcputime() {
return appcputime;
}
public void setAppcputime(String appcputime) {
this.appcputime = appcputime;
}
public static ResourceInforamtion getInstance(){
return instance;
}
private static ResourceInforamtion instance=new ResourceInforamtion();
String batteryChaargingType;
public String getBatteryChaargingType() {
return batteryChaargingType;
}
public void setBatteryChaargingType(String batteryChaargingType) {
this.batteryChaargingType = batteryChaargingType;
}
public String getBatteryStatus() {
return batteryStatus;
}
public void setBatteryStatus(String batteryStatus) {
this.batteryStatus = batteryStatus;
}
public String getBatteryConsumed() {
return batteryConsumed;
}
public void setBatteryConsumed(String batteryConsumed) {
this.batteryConsumed = batteryConsumed;
}
public String getBatterylevel() {
return batterylevel;
}
public void setBatterylevel(String batterylevel) {
this.batterylevel = batterylevel;
}
public String getCarrierName() {
return carrierName;
}
public void setCarrierName(String carrierName) {
this.carrierName = carrierName;
}
public String getNetworkStatus() {
return networkStatus;
}
public void setNetworkStatus(String networkStatus) {
this.networkStatus = networkStatus;
}
public String getNetworkWanType() {
return networkWanType;
}
public void setNetworkWanType(String networkWanType) {
this.networkWanType = networkWanType;
}
public String getDataUsage() {
return dataUsage;
}
public void setDataUsage(String dataUsage) {
this.dataUsage = dataUsage;
}
public String getOrientation() {
return orientation;
}
public void setOrientation(String orientation) {
this.orientation = orientation;
}
public String getMemoryUsage() {
return memoryUsage;
}
public void setMemoryUsage(String memoryUsage) {
this.memoryUsage = memoryUsage;
}
public String getPhoneAppMemory() {
return phoneAppMemory;
}
public void setPhoneAppMemory(String phoneAppMemory) {
this.phoneAppMemory = phoneAppMemory;
}
public String getPhoneDiskavailable() {
return PhoneDiskavailable;
}
public void setPhoneDiskavailable(String phoneDiskavailable) {
PhoneDiskavailable = phoneDiskavailable;
}
public JsonObject asJsonObject() {
JsonObject data = new JsonObject();
data.add(PhoneDiskavailable,new JsonPrimitive(this.PhoneDiskavailable));
data.add(batteryChaargingType, new JsonPrimitive(this.batteryChaargingType));
data.add( batteryConsumed,new JsonPrimitive(this.batteryChaargingType));
data.add( batterylevel,new JsonPrimitive(this.batterylevel));
data.add( carrierName,new JsonPrimitive(this.carrierName));
data.add( networkStatus,new JsonPrimitive(this.networkStatus));
data.add (networkWanType,new JsonPrimitive(this.networkWanType));
data.add (dataUsage,new JsonPrimitive(this.dataUsage));
data.add (orientation,new JsonPrimitive(this.orientation));
data.add (memoryUsage,new JsonPrimitive(this.memoryUsage));
data.add (phoneAppMemory,new JsonPrimitive(this.phoneAppMemory));
data.add (PhoneDiskavailable,new JsonPrimitive(this.PhoneDiskavailable));
return data;
}
public static ResourceInforamtion newFromJson(JsonObject jsonObject)
{
ResourceInforamtion info = new ResourceInforamtion();
info.PhoneDiskavailable=jsonObject.get("PhoneDiskavailable").getAsString();
info.batteryChaargingType=jsonObject.get("batteryChaargingType").getAsString();
info. batteryConsumed=jsonObject.get("batteryConsumed").getAsString();
info. batterylevel=jsonObject.get("batterylevel").getAsString();
info.carrierName=jsonObject.get("carrierName").getAsString();
info. networkStatus=jsonObject.get("networkStatus").getAsString();
info.networkWanType=jsonObject.get("networkWanType").getAsString();
info.dataUsage=jsonObject.get("dataUsage").getAsString();
info.orientation=jsonObject.get("orientation").getAsString();
info.memoryUsage=jsonObject.get("memoryUsage").getAsString();
info.phoneAppMemory=jsonObject.get("phoneAppMemory").getAsString();
info.PhoneDiskavailable=jsonObject.get("PhoneDiskavailable").getAsString();
return info;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy