/** * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.cs.amplab.carat.thrift; import android.annotation.SuppressLint; import java.util.ArrayList; import java.util.BitSet; import java.util.Collections; import java.util.EnumMap; import java.util.EnumSet; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Generated; import org.apache.thrift.EncodingUtils; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; @SuppressLint("NewApi") @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2014-12-19") public class Sample implements org.apache.thrift.TBase<Sample, Sample._Fields>, java.io.Serializable, Cloneable, Comparable<Sample> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Sample"); private static final org.apache.thrift.protocol.TField UU_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("uuId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.DOUBLE, (short)2); private static final org.apache.thrift.protocol.TField PI_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("piList", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField BATTERY_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("batteryState", org.apache.thrift.protocol.TType.STRING, (short)4); private static final org.apache.thrift.protocol.TField BATTERY_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("batteryLevel", org.apache.thrift.protocol.TType.DOUBLE, (short)5); private static final org.apache.thrift.protocol.TField MEMORY_WIRED_FIELD_DESC = new org.apache.thrift.protocol.TField("memoryWired", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField MEMORY_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("memoryActive", org.apache.thrift.protocol.TType.I32, (short)7); private static final org.apache.thrift.protocol.TField MEMORY_INACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("memoryInactive", org.apache.thrift.protocol.TType.I32, (short)8); private static final org.apache.thrift.protocol.TField MEMORY_FREE_FIELD_DESC = new org.apache.thrift.protocol.TField("memoryFree", org.apache.thrift.protocol.TType.I32, (short)9); private static final org.apache.thrift.protocol.TField MEMORY_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("memoryUser", org.apache.thrift.protocol.TType.I32, (short)10); private static final org.apache.thrift.protocol.TField TRIGGERED_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("triggeredBy", org.apache.thrift.protocol.TType.STRING, (short)11); private static final org.apache.thrift.protocol.TField NETWORK_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("networkStatus", org.apache.thrift.protocol.TType.STRING, (short)12); private static final org.apache.thrift.protocol.TField DISTANCE_TRAVELED_FIELD_DESC = new org.apache.thrift.protocol.TField("distanceTraveled", org.apache.thrift.protocol.TType.DOUBLE, (short)13); private static final org.apache.thrift.protocol.TField SCREEN_BRIGHTNESS_FIELD_DESC = new org.apache.thrift.protocol.TField("screenBrightness", org.apache.thrift.protocol.TType.I32, (short)14); private static final org.apache.thrift.protocol.TField NETWORK_DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("networkDetails", org.apache.thrift.protocol.TType.STRUCT, (short)15); private static final org.apache.thrift.protocol.TField BATTERY_DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("batteryDetails", org.apache.thrift.protocol.TType.STRUCT, (short)16); private static final org.apache.thrift.protocol.TField CPU_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("cpuStatus", org.apache.thrift.protocol.TType.STRUCT, (short)17); private static final org.apache.thrift.protocol.TField LOCATION_PROVIDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("locationProviders", org.apache.thrift.protocol.TType.LIST, (short)18); private static final org.apache.thrift.protocol.TField CALL_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("callInfo", org.apache.thrift.protocol.TType.STRUCT, (short)19); private static final org.apache.thrift.protocol.TField SCREEN_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("screenOn", org.apache.thrift.protocol.TType.I32, (short)20); private static final org.apache.thrift.protocol.TField TIME_ZONE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeZone", org.apache.thrift.protocol.TType.STRING, (short)21); private static final org.apache.thrift.protocol.TField UNKNOWN_SOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("unknownSources", org.apache.thrift.protocol.TType.I32, (short)22); private static final org.apache.thrift.protocol.TField DEVELOPER_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("developerMode", org.apache.thrift.protocol.TType.I32, (short)23); private static final org.apache.thrift.protocol.TField EXTRA_FIELD_DESC = new org.apache.thrift.protocol.TField("extra", org.apache.thrift.protocol.TType.LIST, (short)24); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new SampleStandardSchemeFactory()); schemes.put(TupleScheme.class, new SampleTupleSchemeFactory()); } public String uuId; // required public double timestamp; // optional public List<ProcessInfo> piList; // optional public String batteryState; // optional public double batteryLevel; // optional public int memoryWired; // optional public int memoryActive; // optional public int memoryInactive; // optional public int memoryFree; // optional public int memoryUser; // optional public String triggeredBy; // optional public String networkStatus; // optional public double distanceTraveled; // optional public int screenBrightness; // optional public NetworkDetails networkDetails; // optional public BatteryDetails batteryDetails; // optional public CpuStatus cpuStatus; // optional public List<String> locationProviders; // optional public CallInfo callInfo; // optional public int screenOn; // optional public String timeZone; // optional public int unknownSources; // optional public int developerMode; // optional public List<Feature> extra; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { UU_ID((short)1, "uuId"), TIMESTAMP((short)2, "timestamp"), PI_LIST((short)3, "piList"), BATTERY_STATE((short)4, "batteryState"), BATTERY_LEVEL((short)5, "batteryLevel"), MEMORY_WIRED((short)6, "memoryWired"), MEMORY_ACTIVE((short)7, "memoryActive"), MEMORY_INACTIVE((short)8, "memoryInactive"), MEMORY_FREE((short)9, "memoryFree"), MEMORY_USER((short)10, "memoryUser"), TRIGGERED_BY((short)11, "triggeredBy"), NETWORK_STATUS((short)12, "networkStatus"), DISTANCE_TRAVELED((short)13, "distanceTraveled"), SCREEN_BRIGHTNESS((short)14, "screenBrightness"), NETWORK_DETAILS((short)15, "networkDetails"), BATTERY_DETAILS((short)16, "batteryDetails"), CPU_STATUS((short)17, "cpuStatus"), LOCATION_PROVIDERS((short)18, "locationProviders"), CALL_INFO((short)19, "callInfo"), SCREEN_ON((short)20, "screenOn"), TIME_ZONE((short)21, "timeZone"), UNKNOWN_SOURCES((short)22, "unknownSources"), DEVELOPER_MODE((short)23, "developerMode"), EXTRA((short)24, "extra"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // UU_ID return UU_ID; case 2: // TIMESTAMP return TIMESTAMP; case 3: // PI_LIST return PI_LIST; case 4: // BATTERY_STATE return BATTERY_STATE; case 5: // BATTERY_LEVEL return BATTERY_LEVEL; case 6: // MEMORY_WIRED return MEMORY_WIRED; case 7: // MEMORY_ACTIVE return MEMORY_ACTIVE; case 8: // MEMORY_INACTIVE return MEMORY_INACTIVE; case 9: // MEMORY_FREE return MEMORY_FREE; case 10: // MEMORY_USER return MEMORY_USER; case 11: // TRIGGERED_BY return TRIGGERED_BY; case 12: // NETWORK_STATUS return NETWORK_STATUS; case 13: // DISTANCE_TRAVELED return DISTANCE_TRAVELED; case 14: // SCREEN_BRIGHTNESS return SCREEN_BRIGHTNESS; case 15: // NETWORK_DETAILS return NETWORK_DETAILS; case 16: // BATTERY_DETAILS return BATTERY_DETAILS; case 17: // CPU_STATUS return CPU_STATUS; case 18: // LOCATION_PROVIDERS return LOCATION_PROVIDERS; case 19: // CALL_INFO return CALL_INFO; case 20: // SCREEN_ON return SCREEN_ON; case 21: // TIME_ZONE return TIME_ZONE; case 22: // UNKNOWN_SOURCES return UNKNOWN_SOURCES; case 23: // DEVELOPER_MODE return DEVELOPER_MODE; case 24: // EXTRA return EXTRA; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __TIMESTAMP_ISSET_ID = 0; private static final int __BATTERYLEVEL_ISSET_ID = 1; private static final int __MEMORYWIRED_ISSET_ID = 2; private static final int __MEMORYACTIVE_ISSET_ID = 3; private static final int __MEMORYINACTIVE_ISSET_ID = 4; private static final int __MEMORYFREE_ISSET_ID = 5; private static final int __MEMORYUSER_ISSET_ID = 6; private static final int __DISTANCETRAVELED_ISSET_ID = 7; private static final int __SCREENBRIGHTNESS_ISSET_ID = 8; private static final int __SCREENON_ISSET_ID = 9; private static final int __UNKNOWNSOURCES_ISSET_ID = 10; private static final int __DEVELOPERMODE_ISSET_ID = 11; private short __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.PI_LIST,_Fields.BATTERY_STATE,_Fields.BATTERY_LEVEL,_Fields.MEMORY_WIRED,_Fields.MEMORY_ACTIVE,_Fields.MEMORY_INACTIVE,_Fields.MEMORY_FREE,_Fields.MEMORY_USER,_Fields.TRIGGERED_BY,_Fields.NETWORK_STATUS,_Fields.DISTANCE_TRAVELED,_Fields.SCREEN_BRIGHTNESS,_Fields.NETWORK_DETAILS,_Fields.BATTERY_DETAILS,_Fields.CPU_STATUS,_Fields.LOCATION_PROVIDERS,_Fields.CALL_INFO,_Fields.SCREEN_ON,_Fields.TIME_ZONE,_Fields.UNKNOWN_SOURCES,_Fields.DEVELOPER_MODE,_Fields.EXTRA}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.UU_ID, new org.apache.thrift.meta_data.FieldMetaData("uuId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.PI_LIST, new org.apache.thrift.meta_data.FieldMetaData("piList", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST , "ProcessInfoList"))); tmpMap.put(_Fields.BATTERY_STATE, new org.apache.thrift.meta_data.FieldMetaData("batteryState", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.BATTERY_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("batteryLevel", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.MEMORY_WIRED, new org.apache.thrift.meta_data.FieldMetaData("memoryWired", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.MEMORY_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("memoryActive", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.MEMORY_INACTIVE, new org.apache.thrift.meta_data.FieldMetaData("memoryInactive", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.MEMORY_FREE, new org.apache.thrift.meta_data.FieldMetaData("memoryFree", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.MEMORY_USER, new org.apache.thrift.meta_data.FieldMetaData("memoryUser", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TRIGGERED_BY, new org.apache.thrift.meta_data.FieldMetaData("triggeredBy", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NETWORK_STATUS, new org.apache.thrift.meta_data.FieldMetaData("networkStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DISTANCE_TRAVELED, new org.apache.thrift.meta_data.FieldMetaData("distanceTraveled", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.SCREEN_BRIGHTNESS, new org.apache.thrift.meta_data.FieldMetaData("screenBrightness", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.NETWORK_DETAILS, new org.apache.thrift.meta_data.FieldMetaData("networkDetails", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NetworkDetails.class))); tmpMap.put(_Fields.BATTERY_DETAILS, new org.apache.thrift.meta_data.FieldMetaData("batteryDetails", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BatteryDetails.class))); tmpMap.put(_Fields.CPU_STATUS, new org.apache.thrift.meta_data.FieldMetaData("cpuStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CpuStatus.class))); tmpMap.put(_Fields.LOCATION_PROVIDERS, new org.apache.thrift.meta_data.FieldMetaData("locationProviders", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.CALL_INFO, new org.apache.thrift.meta_data.FieldMetaData("callInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CallInfo.class))); tmpMap.put(_Fields.SCREEN_ON, new org.apache.thrift.meta_data.FieldMetaData("screenOn", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TIME_ZONE, new org.apache.thrift.meta_data.FieldMetaData("timeZone", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.UNKNOWN_SOURCES, new org.apache.thrift.meta_data.FieldMetaData("unknownSources", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.DEVELOPER_MODE, new org.apache.thrift.meta_data.FieldMetaData("developerMode", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.EXTRA, new org.apache.thrift.meta_data.FieldMetaData("extra", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Feature.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Sample.class, metaDataMap); } public Sample() { } public Sample( String uuId) { this(); this.uuId = uuId; } /** * Performs a deep copy on <i>other</i>. */ public Sample(Sample other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetUuId()) { this.uuId = other.uuId; } this.timestamp = other.timestamp; if (other.isSetPiList()) { this.piList = other.piList; } if (other.isSetBatteryState()) { this.batteryState = other.batteryState; } this.batteryLevel = other.batteryLevel; this.memoryWired = other.memoryWired; this.memoryActive = other.memoryActive; this.memoryInactive = other.memoryInactive; this.memoryFree = other.memoryFree; this.memoryUser = other.memoryUser; if (other.isSetTriggeredBy()) { this.triggeredBy = other.triggeredBy; } if (other.isSetNetworkStatus()) { this.networkStatus = other.networkStatus; } this.distanceTraveled = other.distanceTraveled; this.screenBrightness = other.screenBrightness; if (other.isSetNetworkDetails()) { this.networkDetails = new NetworkDetails(other.networkDetails); } if (other.isSetBatteryDetails()) { this.batteryDetails = new BatteryDetails(other.batteryDetails); } if (other.isSetCpuStatus()) { this.cpuStatus = new CpuStatus(other.cpuStatus); } if (other.isSetLocationProviders()) { List<String> __this__locationProviders = new ArrayList<String>(other.locationProviders); this.locationProviders = __this__locationProviders; } if (other.isSetCallInfo()) { this.callInfo = new CallInfo(other.callInfo); } this.screenOn = other.screenOn; if (other.isSetTimeZone()) { this.timeZone = other.timeZone; } this.unknownSources = other.unknownSources; this.developerMode = other.developerMode; if (other.isSetExtra()) { List<Feature> __this__extra = new ArrayList<Feature>(other.extra.size()); for (Feature other_element : other.extra) { __this__extra.add(new Feature(other_element)); } this.extra = __this__extra; } } public Sample deepCopy() { return new Sample(this); } @Override public void clear() { this.uuId = null; setTimestampIsSet(false); this.timestamp = 0.0; this.piList = null; this.batteryState = null; setBatteryLevelIsSet(false); this.batteryLevel = 0.0; setMemoryWiredIsSet(false); this.memoryWired = 0; setMemoryActiveIsSet(false); this.memoryActive = 0; setMemoryInactiveIsSet(false); this.memoryInactive = 0; setMemoryFreeIsSet(false); this.memoryFree = 0; setMemoryUserIsSet(false); this.memoryUser = 0; this.triggeredBy = null; this.networkStatus = null; setDistanceTraveledIsSet(false); this.distanceTraveled = 0.0; setScreenBrightnessIsSet(false); this.screenBrightness = 0; this.networkDetails = null; this.batteryDetails = null; this.cpuStatus = null; this.locationProviders = null; this.callInfo = null; setScreenOnIsSet(false); this.screenOn = 0; this.timeZone = null; setUnknownSourcesIsSet(false); this.unknownSources = 0; setDeveloperModeIsSet(false); this.developerMode = 0; this.extra = null; } public String getUuId() { return this.uuId; } public Sample setUuId(String uuId) { this.uuId = uuId; return this; } public void unsetUuId() { this.uuId = null; } /** Returns true if field uuId is set (has been assigned a value) and false otherwise */ public boolean isSetUuId() { return this.uuId != null; } public void setUuIdIsSet(boolean value) { if (!value) { this.uuId = null; } } public double getTimestamp() { return this.timestamp; } public Sample setTimestamp(double timestamp) { this.timestamp = timestamp; setTimestampIsSet(true); return this; } public void unsetTimestamp() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ public boolean isSetTimestamp() { return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID); } public void setTimestampIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value); } public int getPiListSize() { return (this.piList == null) ? 0 : this.piList.size(); } public java.util.Iterator<ProcessInfo> getPiListIterator() { return (this.piList == null) ? null : this.piList.iterator(); } public void addToPiList(ProcessInfo elem) { if (this.piList == null) { this.piList = new ArrayList<ProcessInfo>(); } this.piList.add(elem); } public List<ProcessInfo> getPiList() { return this.piList; } public Sample setPiList(List<ProcessInfo> piList) { this.piList = piList; return this; } public void unsetPiList() { this.piList = null; } /** Returns true if field piList is set (has been assigned a value) and false otherwise */ public boolean isSetPiList() { return this.piList != null; } public void setPiListIsSet(boolean value) { if (!value) { this.piList = null; } } public String getBatteryState() { return this.batteryState; } public Sample setBatteryState(String batteryState) { this.batteryState = batteryState; return this; } public void unsetBatteryState() { this.batteryState = null; } /** Returns true if field batteryState is set (has been assigned a value) and false otherwise */ public boolean isSetBatteryState() { return this.batteryState != null; } public void setBatteryStateIsSet(boolean value) { if (!value) { this.batteryState = null; } } public double getBatteryLevel() { return this.batteryLevel; } public Sample setBatteryLevel(double batteryLevel) { this.batteryLevel = batteryLevel; setBatteryLevelIsSet(true); return this; } public void unsetBatteryLevel() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BATTERYLEVEL_ISSET_ID); } /** Returns true if field batteryLevel is set (has been assigned a value) and false otherwise */ public boolean isSetBatteryLevel() { return EncodingUtils.testBit(__isset_bitfield, __BATTERYLEVEL_ISSET_ID); } public void setBatteryLevelIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BATTERYLEVEL_ISSET_ID, value); } public int getMemoryWired() { return this.memoryWired; } public Sample setMemoryWired(int memoryWired) { this.memoryWired = memoryWired; setMemoryWiredIsSet(true); return this; } public void unsetMemoryWired() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMORYWIRED_ISSET_ID); } /** Returns true if field memoryWired is set (has been assigned a value) and false otherwise */ public boolean isSetMemoryWired() { return EncodingUtils.testBit(__isset_bitfield, __MEMORYWIRED_ISSET_ID); } public void setMemoryWiredIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMORYWIRED_ISSET_ID, value); } public int getMemoryActive() { return this.memoryActive; } public Sample setMemoryActive(int memoryActive) { this.memoryActive = memoryActive; setMemoryActiveIsSet(true); return this; } public void unsetMemoryActive() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMORYACTIVE_ISSET_ID); } /** Returns true if field memoryActive is set (has been assigned a value) and false otherwise */ public boolean isSetMemoryActive() { return EncodingUtils.testBit(__isset_bitfield, __MEMORYACTIVE_ISSET_ID); } public void setMemoryActiveIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMORYACTIVE_ISSET_ID, value); } public int getMemoryInactive() { return this.memoryInactive; } public Sample setMemoryInactive(int memoryInactive) { this.memoryInactive = memoryInactive; setMemoryInactiveIsSet(true); return this; } public void unsetMemoryInactive() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMORYINACTIVE_ISSET_ID); } /** Returns true if field memoryInactive is set (has been assigned a value) and false otherwise */ public boolean isSetMemoryInactive() { return EncodingUtils.testBit(__isset_bitfield, __MEMORYINACTIVE_ISSET_ID); } public void setMemoryInactiveIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMORYINACTIVE_ISSET_ID, value); } public int getMemoryFree() { return this.memoryFree; } public Sample setMemoryFree(int memoryFree) { this.memoryFree = memoryFree; setMemoryFreeIsSet(true); return this; } public void unsetMemoryFree() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMORYFREE_ISSET_ID); } /** Returns true if field memoryFree is set (has been assigned a value) and false otherwise */ public boolean isSetMemoryFree() { return EncodingUtils.testBit(__isset_bitfield, __MEMORYFREE_ISSET_ID); } public void setMemoryFreeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMORYFREE_ISSET_ID, value); } public int getMemoryUser() { return this.memoryUser; } public Sample setMemoryUser(int memoryUser) { this.memoryUser = memoryUser; setMemoryUserIsSet(true); return this; } public void unsetMemoryUser() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMORYUSER_ISSET_ID); } /** Returns true if field memoryUser is set (has been assigned a value) and false otherwise */ public boolean isSetMemoryUser() { return EncodingUtils.testBit(__isset_bitfield, __MEMORYUSER_ISSET_ID); } public void setMemoryUserIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMORYUSER_ISSET_ID, value); } public String getTriggeredBy() { return this.triggeredBy; } public Sample setTriggeredBy(String triggeredBy) { this.triggeredBy = triggeredBy; return this; } public void unsetTriggeredBy() { this.triggeredBy = null; } /** Returns true if field triggeredBy is set (has been assigned a value) and false otherwise */ public boolean isSetTriggeredBy() { return this.triggeredBy != null; } public void setTriggeredByIsSet(boolean value) { if (!value) { this.triggeredBy = null; } } public String getNetworkStatus() { return this.networkStatus; } public Sample setNetworkStatus(String networkStatus) { this.networkStatus = networkStatus; return this; } public void unsetNetworkStatus() { this.networkStatus = null; } /** Returns true if field networkStatus is set (has been assigned a value) and false otherwise */ public boolean isSetNetworkStatus() { return this.networkStatus != null; } public void setNetworkStatusIsSet(boolean value) { if (!value) { this.networkStatus = null; } } public double getDistanceTraveled() { return this.distanceTraveled; } public Sample setDistanceTraveled(double distanceTraveled) { this.distanceTraveled = distanceTraveled; setDistanceTraveledIsSet(true); return this; } public void unsetDistanceTraveled() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DISTANCETRAVELED_ISSET_ID); } /** Returns true if field distanceTraveled is set (has been assigned a value) and false otherwise */ public boolean isSetDistanceTraveled() { return EncodingUtils.testBit(__isset_bitfield, __DISTANCETRAVELED_ISSET_ID); } public void setDistanceTraveledIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DISTANCETRAVELED_ISSET_ID, value); } public int getScreenBrightness() { return this.screenBrightness; } public Sample setScreenBrightness(int screenBrightness) { this.screenBrightness = screenBrightness; setScreenBrightnessIsSet(true); return this; } public void unsetScreenBrightness() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCREENBRIGHTNESS_ISSET_ID); } /** Returns true if field screenBrightness is set (has been assigned a value) and false otherwise */ public boolean isSetScreenBrightness() { return EncodingUtils.testBit(__isset_bitfield, __SCREENBRIGHTNESS_ISSET_ID); } public void setScreenBrightnessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCREENBRIGHTNESS_ISSET_ID, value); } public NetworkDetails getNetworkDetails() { return this.networkDetails; } public Sample setNetworkDetails(NetworkDetails networkDetails) { this.networkDetails = networkDetails; return this; } public void unsetNetworkDetails() { this.networkDetails = null; } /** Returns true if field networkDetails is set (has been assigned a value) and false otherwise */ public boolean isSetNetworkDetails() { return this.networkDetails != null; } public void setNetworkDetailsIsSet(boolean value) { if (!value) { this.networkDetails = null; } } public BatteryDetails getBatteryDetails() { return this.batteryDetails; } public Sample setBatteryDetails(BatteryDetails batteryDetails) { this.batteryDetails = batteryDetails; return this; } public void unsetBatteryDetails() { this.batteryDetails = null; } /** Returns true if field batteryDetails is set (has been assigned a value) and false otherwise */ public boolean isSetBatteryDetails() { return this.batteryDetails != null; } public void setBatteryDetailsIsSet(boolean value) { if (!value) { this.batteryDetails = null; } } public CpuStatus getCpuStatus() { return this.cpuStatus; } public Sample setCpuStatus(CpuStatus cpuStatus) { this.cpuStatus = cpuStatus; return this; } public void unsetCpuStatus() { this.cpuStatus = null; } /** Returns true if field cpuStatus is set (has been assigned a value) and false otherwise */ public boolean isSetCpuStatus() { return this.cpuStatus != null; } public void setCpuStatusIsSet(boolean value) { if (!value) { this.cpuStatus = null; } } public int getLocationProvidersSize() { return (this.locationProviders == null) ? 0 : this.locationProviders.size(); } public java.util.Iterator<String> getLocationProvidersIterator() { return (this.locationProviders == null) ? null : this.locationProviders.iterator(); } public void addToLocationProviders(String elem) { if (this.locationProviders == null) { this.locationProviders = new ArrayList<String>(); } this.locationProviders.add(elem); } public List<String> getLocationProviders() { return this.locationProviders; } public Sample setLocationProviders(List<String> locationProviders) { this.locationProviders = locationProviders; return this; } public void unsetLocationProviders() { this.locationProviders = null; } /** Returns true if field locationProviders is set (has been assigned a value) and false otherwise */ public boolean isSetLocationProviders() { return this.locationProviders != null; } public void setLocationProvidersIsSet(boolean value) { if (!value) { this.locationProviders = null; } } public CallInfo getCallInfo() { return this.callInfo; } public Sample setCallInfo(CallInfo callInfo) { this.callInfo = callInfo; return this; } public void unsetCallInfo() { this.callInfo = null; } /** Returns true if field callInfo is set (has been assigned a value) and false otherwise */ public boolean isSetCallInfo() { return this.callInfo != null; } public void setCallInfoIsSet(boolean value) { if (!value) { this.callInfo = null; } } public int getScreenOn() { return this.screenOn; } public Sample setScreenOn(int screenOn) { this.screenOn = screenOn; setScreenOnIsSet(true); return this; } public void unsetScreenOn() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCREENON_ISSET_ID); } /** Returns true if field screenOn is set (has been assigned a value) and false otherwise */ public boolean isSetScreenOn() { return EncodingUtils.testBit(__isset_bitfield, __SCREENON_ISSET_ID); } public void setScreenOnIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCREENON_ISSET_ID, value); } public String getTimeZone() { return this.timeZone; } public Sample setTimeZone(String timeZone) { this.timeZone = timeZone; return this; } public void unsetTimeZone() { this.timeZone = null; } /** Returns true if field timeZone is set (has been assigned a value) and false otherwise */ public boolean isSetTimeZone() { return this.timeZone != null; } public void setTimeZoneIsSet(boolean value) { if (!value) { this.timeZone = null; } } public int getUnknownSources() { return this.unknownSources; } public Sample setUnknownSources(int unknownSources) { this.unknownSources = unknownSources; setUnknownSourcesIsSet(true); return this; } public void unsetUnknownSources() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UNKNOWNSOURCES_ISSET_ID); } /** Returns true if field unknownSources is set (has been assigned a value) and false otherwise */ public boolean isSetUnknownSources() { return EncodingUtils.testBit(__isset_bitfield, __UNKNOWNSOURCES_ISSET_ID); } public void setUnknownSourcesIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UNKNOWNSOURCES_ISSET_ID, value); } public int getDeveloperMode() { return this.developerMode; } public Sample setDeveloperMode(int developerMode) { this.developerMode = developerMode; setDeveloperModeIsSet(true); return this; } public void unsetDeveloperMode() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEVELOPERMODE_ISSET_ID); } /** Returns true if field developerMode is set (has been assigned a value) and false otherwise */ public boolean isSetDeveloperMode() { return EncodingUtils.testBit(__isset_bitfield, __DEVELOPERMODE_ISSET_ID); } public void setDeveloperModeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEVELOPERMODE_ISSET_ID, value); } public int getExtraSize() { return (this.extra == null) ? 0 : this.extra.size(); } public java.util.Iterator<Feature> getExtraIterator() { return (this.extra == null) ? null : this.extra.iterator(); } public void addToExtra(Feature elem) { if (this.extra == null) { this.extra = new ArrayList<Feature>(); } this.extra.add(elem); } public List<Feature> getExtra() { return this.extra; } public Sample setExtra(List<Feature> extra) { this.extra = extra; return this; } public void unsetExtra() { this.extra = null; } /** Returns true if field extra is set (has been assigned a value) and false otherwise */ public boolean isSetExtra() { return this.extra != null; } public void setExtraIsSet(boolean value) { if (!value) { this.extra = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case UU_ID: if (value == null) { unsetUuId(); } else { setUuId((String)value); } break; case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Double)value); } break; case PI_LIST: if (value == null) { unsetPiList(); } else { setPiList((List<ProcessInfo>)value); } break; case BATTERY_STATE: if (value == null) { unsetBatteryState(); } else { setBatteryState((String)value); } break; case BATTERY_LEVEL: if (value == null) { unsetBatteryLevel(); } else { setBatteryLevel((Double)value); } break; case MEMORY_WIRED: if (value == null) { unsetMemoryWired(); } else { setMemoryWired((Integer)value); } break; case MEMORY_ACTIVE: if (value == null) { unsetMemoryActive(); } else { setMemoryActive((Integer)value); } break; case MEMORY_INACTIVE: if (value == null) { unsetMemoryInactive(); } else { setMemoryInactive((Integer)value); } break; case MEMORY_FREE: if (value == null) { unsetMemoryFree(); } else { setMemoryFree((Integer)value); } break; case MEMORY_USER: if (value == null) { unsetMemoryUser(); } else { setMemoryUser((Integer)value); } break; case TRIGGERED_BY: if (value == null) { unsetTriggeredBy(); } else { setTriggeredBy((String)value); } break; case NETWORK_STATUS: if (value == null) { unsetNetworkStatus(); } else { setNetworkStatus((String)value); } break; case DISTANCE_TRAVELED: if (value == null) { unsetDistanceTraveled(); } else { setDistanceTraveled((Double)value); } break; case SCREEN_BRIGHTNESS: if (value == null) { unsetScreenBrightness(); } else { setScreenBrightness((Integer)value); } break; case NETWORK_DETAILS: if (value == null) { unsetNetworkDetails(); } else { setNetworkDetails((NetworkDetails)value); } break; case BATTERY_DETAILS: if (value == null) { unsetBatteryDetails(); } else { setBatteryDetails((BatteryDetails)value); } break; case CPU_STATUS: if (value == null) { unsetCpuStatus(); } else { setCpuStatus((CpuStatus)value); } break; case LOCATION_PROVIDERS: if (value == null) { unsetLocationProviders(); } else { setLocationProviders((List<String>)value); } break; case CALL_INFO: if (value == null) { unsetCallInfo(); } else { setCallInfo((CallInfo)value); } break; case SCREEN_ON: if (value == null) { unsetScreenOn(); } else { setScreenOn((Integer)value); } break; case TIME_ZONE: if (value == null) { unsetTimeZone(); } else { setTimeZone((String)value); } break; case UNKNOWN_SOURCES: if (value == null) { unsetUnknownSources(); } else { setUnknownSources((Integer)value); } break; case DEVELOPER_MODE: if (value == null) { unsetDeveloperMode(); } else { setDeveloperMode((Integer)value); } break; case EXTRA: if (value == null) { unsetExtra(); } else { setExtra((List<Feature>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case UU_ID: return getUuId(); case TIMESTAMP: return Double.valueOf(getTimestamp()); case PI_LIST: return getPiList(); case BATTERY_STATE: return getBatteryState(); case BATTERY_LEVEL: return Double.valueOf(getBatteryLevel()); case MEMORY_WIRED: return Integer.valueOf(getMemoryWired()); case MEMORY_ACTIVE: return Integer.valueOf(getMemoryActive()); case MEMORY_INACTIVE: return Integer.valueOf(getMemoryInactive()); case MEMORY_FREE: return Integer.valueOf(getMemoryFree()); case MEMORY_USER: return Integer.valueOf(getMemoryUser()); case TRIGGERED_BY: return getTriggeredBy(); case NETWORK_STATUS: return getNetworkStatus(); case DISTANCE_TRAVELED: return Double.valueOf(getDistanceTraveled()); case SCREEN_BRIGHTNESS: return Integer.valueOf(getScreenBrightness()); case NETWORK_DETAILS: return getNetworkDetails(); case BATTERY_DETAILS: return getBatteryDetails(); case CPU_STATUS: return getCpuStatus(); case LOCATION_PROVIDERS: return getLocationProviders(); case CALL_INFO: return getCallInfo(); case SCREEN_ON: return Integer.valueOf(getScreenOn()); case TIME_ZONE: return getTimeZone(); case UNKNOWN_SOURCES: return Integer.valueOf(getUnknownSources()); case DEVELOPER_MODE: return Integer.valueOf(getDeveloperMode()); case EXTRA: return getExtra(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case UU_ID: return isSetUuId(); case TIMESTAMP: return isSetTimestamp(); case PI_LIST: return isSetPiList(); case BATTERY_STATE: return isSetBatteryState(); case BATTERY_LEVEL: return isSetBatteryLevel(); case MEMORY_WIRED: return isSetMemoryWired(); case MEMORY_ACTIVE: return isSetMemoryActive(); case MEMORY_INACTIVE: return isSetMemoryInactive(); case MEMORY_FREE: return isSetMemoryFree(); case MEMORY_USER: return isSetMemoryUser(); case TRIGGERED_BY: return isSetTriggeredBy(); case NETWORK_STATUS: return isSetNetworkStatus(); case DISTANCE_TRAVELED: return isSetDistanceTraveled(); case SCREEN_BRIGHTNESS: return isSetScreenBrightness(); case NETWORK_DETAILS: return isSetNetworkDetails(); case BATTERY_DETAILS: return isSetBatteryDetails(); case CPU_STATUS: return isSetCpuStatus(); case LOCATION_PROVIDERS: return isSetLocationProviders(); case CALL_INFO: return isSetCallInfo(); case SCREEN_ON: return isSetScreenOn(); case TIME_ZONE: return isSetTimeZone(); case UNKNOWN_SOURCES: return isSetUnknownSources(); case DEVELOPER_MODE: return isSetDeveloperMode(); case EXTRA: return isSetExtra(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Sample) return this.equals((Sample)that); return false; } public boolean equals(Sample that) { if (that == null) return false; boolean this_present_uuId = true && this.isSetUuId(); boolean that_present_uuId = true && that.isSetUuId(); if (this_present_uuId || that_present_uuId) { if (!(this_present_uuId && that_present_uuId)) return false; if (!this.uuId.equals(that.uuId)) return false; } boolean this_present_timestamp = true && this.isSetTimestamp(); boolean that_present_timestamp = true && that.isSetTimestamp(); if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_piList = true && this.isSetPiList(); boolean that_present_piList = true && that.isSetPiList(); if (this_present_piList || that_present_piList) { if (!(this_present_piList && that_present_piList)) return false; if (!this.piList.equals(that.piList)) return false; } boolean this_present_batteryState = true && this.isSetBatteryState(); boolean that_present_batteryState = true && that.isSetBatteryState(); if (this_present_batteryState || that_present_batteryState) { if (!(this_present_batteryState && that_present_batteryState)) return false; if (!this.batteryState.equals(that.batteryState)) return false; } boolean this_present_batteryLevel = true && this.isSetBatteryLevel(); boolean that_present_batteryLevel = true && that.isSetBatteryLevel(); if (this_present_batteryLevel || that_present_batteryLevel) { if (!(this_present_batteryLevel && that_present_batteryLevel)) return false; if (this.batteryLevel != that.batteryLevel) return false; } boolean this_present_memoryWired = true && this.isSetMemoryWired(); boolean that_present_memoryWired = true && that.isSetMemoryWired(); if (this_present_memoryWired || that_present_memoryWired) { if (!(this_present_memoryWired && that_present_memoryWired)) return false; if (this.memoryWired != that.memoryWired) return false; } boolean this_present_memoryActive = true && this.isSetMemoryActive(); boolean that_present_memoryActive = true && that.isSetMemoryActive(); if (this_present_memoryActive || that_present_memoryActive) { if (!(this_present_memoryActive && that_present_memoryActive)) return false; if (this.memoryActive != that.memoryActive) return false; } boolean this_present_memoryInactive = true && this.isSetMemoryInactive(); boolean that_present_memoryInactive = true && that.isSetMemoryInactive(); if (this_present_memoryInactive || that_present_memoryInactive) { if (!(this_present_memoryInactive && that_present_memoryInactive)) return false; if (this.memoryInactive != that.memoryInactive) return false; } boolean this_present_memoryFree = true && this.isSetMemoryFree(); boolean that_present_memoryFree = true && that.isSetMemoryFree(); if (this_present_memoryFree || that_present_memoryFree) { if (!(this_present_memoryFree && that_present_memoryFree)) return false; if (this.memoryFree != that.memoryFree) return false; } boolean this_present_memoryUser = true && this.isSetMemoryUser(); boolean that_present_memoryUser = true && that.isSetMemoryUser(); if (this_present_memoryUser || that_present_memoryUser) { if (!(this_present_memoryUser && that_present_memoryUser)) return false; if (this.memoryUser != that.memoryUser) return false; } boolean this_present_triggeredBy = true && this.isSetTriggeredBy(); boolean that_present_triggeredBy = true && that.isSetTriggeredBy(); if (this_present_triggeredBy || that_present_triggeredBy) { if (!(this_present_triggeredBy && that_present_triggeredBy)) return false; if (!this.triggeredBy.equals(that.triggeredBy)) return false; } boolean this_present_networkStatus = true && this.isSetNetworkStatus(); boolean that_present_networkStatus = true && that.isSetNetworkStatus(); if (this_present_networkStatus || that_present_networkStatus) { if (!(this_present_networkStatus && that_present_networkStatus)) return false; if (!this.networkStatus.equals(that.networkStatus)) return false; } boolean this_present_distanceTraveled = true && this.isSetDistanceTraveled(); boolean that_present_distanceTraveled = true && that.isSetDistanceTraveled(); if (this_present_distanceTraveled || that_present_distanceTraveled) { if (!(this_present_distanceTraveled && that_present_distanceTraveled)) return false; if (this.distanceTraveled != that.distanceTraveled) return false; } boolean this_present_screenBrightness = true && this.isSetScreenBrightness(); boolean that_present_screenBrightness = true && that.isSetScreenBrightness(); if (this_present_screenBrightness || that_present_screenBrightness) { if (!(this_present_screenBrightness && that_present_screenBrightness)) return false; if (this.screenBrightness != that.screenBrightness) return false; } boolean this_present_networkDetails = true && this.isSetNetworkDetails(); boolean that_present_networkDetails = true && that.isSetNetworkDetails(); if (this_present_networkDetails || that_present_networkDetails) { if (!(this_present_networkDetails && that_present_networkDetails)) return false; if (!this.networkDetails.equals(that.networkDetails)) return false; } boolean this_present_batteryDetails = true && this.isSetBatteryDetails(); boolean that_present_batteryDetails = true && that.isSetBatteryDetails(); if (this_present_batteryDetails || that_present_batteryDetails) { if (!(this_present_batteryDetails && that_present_batteryDetails)) return false; if (!this.batteryDetails.equals(that.batteryDetails)) return false; } boolean this_present_cpuStatus = true && this.isSetCpuStatus(); boolean that_present_cpuStatus = true && that.isSetCpuStatus(); if (this_present_cpuStatus || that_present_cpuStatus) { if (!(this_present_cpuStatus && that_present_cpuStatus)) return false; if (!this.cpuStatus.equals(that.cpuStatus)) return false; } boolean this_present_locationProviders = true && this.isSetLocationProviders(); boolean that_present_locationProviders = true && that.isSetLocationProviders(); if (this_present_locationProviders || that_present_locationProviders) { if (!(this_present_locationProviders && that_present_locationProviders)) return false; if (!this.locationProviders.equals(that.locationProviders)) return false; } boolean this_present_callInfo = true && this.isSetCallInfo(); boolean that_present_callInfo = true && that.isSetCallInfo(); if (this_present_callInfo || that_present_callInfo) { if (!(this_present_callInfo && that_present_callInfo)) return false; if (!this.callInfo.equals(that.callInfo)) return false; } boolean this_present_screenOn = true && this.isSetScreenOn(); boolean that_present_screenOn = true && that.isSetScreenOn(); if (this_present_screenOn || that_present_screenOn) { if (!(this_present_screenOn && that_present_screenOn)) return false; if (this.screenOn != that.screenOn) return false; } boolean this_present_timeZone = true && this.isSetTimeZone(); boolean that_present_timeZone = true && that.isSetTimeZone(); if (this_present_timeZone || that_present_timeZone) { if (!(this_present_timeZone && that_present_timeZone)) return false; if (!this.timeZone.equals(that.timeZone)) return false; } boolean this_present_unknownSources = true && this.isSetUnknownSources(); boolean that_present_unknownSources = true && that.isSetUnknownSources(); if (this_present_unknownSources || that_present_unknownSources) { if (!(this_present_unknownSources && that_present_unknownSources)) return false; if (this.unknownSources != that.unknownSources) return false; } boolean this_present_developerMode = true && this.isSetDeveloperMode(); boolean that_present_developerMode = true && that.isSetDeveloperMode(); if (this_present_developerMode || that_present_developerMode) { if (!(this_present_developerMode && that_present_developerMode)) return false; if (this.developerMode != that.developerMode) return false; } boolean this_present_extra = true && this.isSetExtra(); boolean that_present_extra = true && that.isSetExtra(); if (this_present_extra || that_present_extra) { if (!(this_present_extra && that_present_extra)) return false; if (!this.extra.equals(that.extra)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_uuId = true && (isSetUuId()); list.add(present_uuId); if (present_uuId) list.add(uuId); boolean present_timestamp = true && (isSetTimestamp()); list.add(present_timestamp); if (present_timestamp) list.add(timestamp); boolean present_piList = true && (isSetPiList()); list.add(present_piList); if (present_piList) list.add(piList); boolean present_batteryState = true && (isSetBatteryState()); list.add(present_batteryState); if (present_batteryState) list.add(batteryState); boolean present_batteryLevel = true && (isSetBatteryLevel()); list.add(present_batteryLevel); if (present_batteryLevel) list.add(batteryLevel); boolean present_memoryWired = true && (isSetMemoryWired()); list.add(present_memoryWired); if (present_memoryWired) list.add(memoryWired); boolean present_memoryActive = true && (isSetMemoryActive()); list.add(present_memoryActive); if (present_memoryActive) list.add(memoryActive); boolean present_memoryInactive = true && (isSetMemoryInactive()); list.add(present_memoryInactive); if (present_memoryInactive) list.add(memoryInactive); boolean present_memoryFree = true && (isSetMemoryFree()); list.add(present_memoryFree); if (present_memoryFree) list.add(memoryFree); boolean present_memoryUser = true && (isSetMemoryUser()); list.add(present_memoryUser); if (present_memoryUser) list.add(memoryUser); boolean present_triggeredBy = true && (isSetTriggeredBy()); list.add(present_triggeredBy); if (present_triggeredBy) list.add(triggeredBy); boolean present_networkStatus = true && (isSetNetworkStatus()); list.add(present_networkStatus); if (present_networkStatus) list.add(networkStatus); boolean present_distanceTraveled = true && (isSetDistanceTraveled()); list.add(present_distanceTraveled); if (present_distanceTraveled) list.add(distanceTraveled); boolean present_screenBrightness = true && (isSetScreenBrightness()); list.add(present_screenBrightness); if (present_screenBrightness) list.add(screenBrightness); boolean present_networkDetails = true && (isSetNetworkDetails()); list.add(present_networkDetails); if (present_networkDetails) list.add(networkDetails); boolean present_batteryDetails = true && (isSetBatteryDetails()); list.add(present_batteryDetails); if (present_batteryDetails) list.add(batteryDetails); boolean present_cpuStatus = true && (isSetCpuStatus()); list.add(present_cpuStatus); if (present_cpuStatus) list.add(cpuStatus); boolean present_locationProviders = true && (isSetLocationProviders()); list.add(present_locationProviders); if (present_locationProviders) list.add(locationProviders); boolean present_callInfo = true && (isSetCallInfo()); list.add(present_callInfo); if (present_callInfo) list.add(callInfo); boolean present_screenOn = true && (isSetScreenOn()); list.add(present_screenOn); if (present_screenOn) list.add(screenOn); boolean present_timeZone = true && (isSetTimeZone()); list.add(present_timeZone); if (present_timeZone) list.add(timeZone); boolean present_unknownSources = true && (isSetUnknownSources()); list.add(present_unknownSources); if (present_unknownSources) list.add(unknownSources); boolean present_developerMode = true && (isSetDeveloperMode()); list.add(present_developerMode); if (present_developerMode) list.add(developerMode); boolean present_extra = true && (isSetExtra()); list.add(present_extra); if (present_extra) list.add(extra); return list.hashCode(); } @Override public int compareTo(Sample other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUuId()).compareTo(other.isSetUuId()); if (lastComparison != 0) { return lastComparison; } if (isSetUuId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuId, other.uuId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } if (isSetTimestamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPiList()).compareTo(other.isSetPiList()); if (lastComparison != 0) { return lastComparison; } if (isSetPiList()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.piList, other.piList); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBatteryState()).compareTo(other.isSetBatteryState()); if (lastComparison != 0) { return lastComparison; } if (isSetBatteryState()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batteryState, other.batteryState); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBatteryLevel()).compareTo(other.isSetBatteryLevel()); if (lastComparison != 0) { return lastComparison; } if (isSetBatteryLevel()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batteryLevel, other.batteryLevel); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMemoryWired()).compareTo(other.isSetMemoryWired()); if (lastComparison != 0) { return lastComparison; } if (isSetMemoryWired()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memoryWired, other.memoryWired); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMemoryActive()).compareTo(other.isSetMemoryActive()); if (lastComparison != 0) { return lastComparison; } if (isSetMemoryActive()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memoryActive, other.memoryActive); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMemoryInactive()).compareTo(other.isSetMemoryInactive()); if (lastComparison != 0) { return lastComparison; } if (isSetMemoryInactive()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memoryInactive, other.memoryInactive); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMemoryFree()).compareTo(other.isSetMemoryFree()); if (lastComparison != 0) { return lastComparison; } if (isSetMemoryFree()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memoryFree, other.memoryFree); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMemoryUser()).compareTo(other.isSetMemoryUser()); if (lastComparison != 0) { return lastComparison; } if (isSetMemoryUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memoryUser, other.memoryUser); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTriggeredBy()).compareTo(other.isSetTriggeredBy()); if (lastComparison != 0) { return lastComparison; } if (isSetTriggeredBy()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.triggeredBy, other.triggeredBy); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNetworkStatus()).compareTo(other.isSetNetworkStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetNetworkStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.networkStatus, other.networkStatus); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDistanceTraveled()).compareTo(other.isSetDistanceTraveled()); if (lastComparison != 0) { return lastComparison; } if (isSetDistanceTraveled()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.distanceTraveled, other.distanceTraveled); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetScreenBrightness()).compareTo(other.isSetScreenBrightness()); if (lastComparison != 0) { return lastComparison; } if (isSetScreenBrightness()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.screenBrightness, other.screenBrightness); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNetworkDetails()).compareTo(other.isSetNetworkDetails()); if (lastComparison != 0) { return lastComparison; } if (isSetNetworkDetails()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.networkDetails, other.networkDetails); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBatteryDetails()).compareTo(other.isSetBatteryDetails()); if (lastComparison != 0) { return lastComparison; } if (isSetBatteryDetails()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batteryDetails, other.batteryDetails); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCpuStatus()).compareTo(other.isSetCpuStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetCpuStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpuStatus, other.cpuStatus); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLocationProviders()).compareTo(other.isSetLocationProviders()); if (lastComparison != 0) { return lastComparison; } if (isSetLocationProviders()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.locationProviders, other.locationProviders); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCallInfo()).compareTo(other.isSetCallInfo()); if (lastComparison != 0) { return lastComparison; } if (isSetCallInfo()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.callInfo, other.callInfo); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetScreenOn()).compareTo(other.isSetScreenOn()); if (lastComparison != 0) { return lastComparison; } if (isSetScreenOn()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.screenOn, other.screenOn); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTimeZone()).compareTo(other.isSetTimeZone()); if (lastComparison != 0) { return lastComparison; } if (isSetTimeZone()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeZone, other.timeZone); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUnknownSources()).compareTo(other.isSetUnknownSources()); if (lastComparison != 0) { return lastComparison; } if (isSetUnknownSources()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unknownSources, other.unknownSources); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeveloperMode()).compareTo(other.isSetDeveloperMode()); if (lastComparison != 0) { return lastComparison; } if (isSetDeveloperMode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.developerMode, other.developerMode); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetExtra()).compareTo(other.isSetExtra()); if (lastComparison != 0) { return lastComparison; } if (isSetExtra()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extra, other.extra); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("Sample("); boolean first = true; sb.append("uuId:"); if (this.uuId == null) { sb.append("null"); } else { sb.append(this.uuId); } first = false; if (isSetTimestamp()) { if (!first) sb.append(", "); sb.append("timestamp:"); sb.append(this.timestamp); first = false; } if (isSetPiList()) { if (!first) sb.append(", "); sb.append("piList:"); if (this.piList == null) { sb.append("null"); } else { sb.append(this.piList); } first = false; } if (isSetBatteryState()) { if (!first) sb.append(", "); sb.append("batteryState:"); if (this.batteryState == null) { sb.append("null"); } else { sb.append(this.batteryState); } first = false; } if (isSetBatteryLevel()) { if (!first) sb.append(", "); sb.append("batteryLevel:"); sb.append(this.batteryLevel); first = false; } if (isSetMemoryWired()) { if (!first) sb.append(", "); sb.append("memoryWired:"); sb.append(this.memoryWired); first = false; } if (isSetMemoryActive()) { if (!first) sb.append(", "); sb.append("memoryActive:"); sb.append(this.memoryActive); first = false; } if (isSetMemoryInactive()) { if (!first) sb.append(", "); sb.append("memoryInactive:"); sb.append(this.memoryInactive); first = false; } if (isSetMemoryFree()) { if (!first) sb.append(", "); sb.append("memoryFree:"); sb.append(this.memoryFree); first = false; } if (isSetMemoryUser()) { if (!first) sb.append(", "); sb.append("memoryUser:"); sb.append(this.memoryUser); first = false; } if (isSetTriggeredBy()) { if (!first) sb.append(", "); sb.append("triggeredBy:"); if (this.triggeredBy == null) { sb.append("null"); } else { sb.append(this.triggeredBy); } first = false; } if (isSetNetworkStatus()) { if (!first) sb.append(", "); sb.append("networkStatus:"); if (this.networkStatus == null) { sb.append("null"); } else { sb.append(this.networkStatus); } first = false; } if (isSetDistanceTraveled()) { if (!first) sb.append(", "); sb.append("distanceTraveled:"); sb.append(this.distanceTraveled); first = false; } if (isSetScreenBrightness()) { if (!first) sb.append(", "); sb.append("screenBrightness:"); sb.append(this.screenBrightness); first = false; } if (isSetNetworkDetails()) { if (!first) sb.append(", "); sb.append("networkDetails:"); if (this.networkDetails == null) { sb.append("null"); } else { sb.append(this.networkDetails); } first = false; } if (isSetBatteryDetails()) { if (!first) sb.append(", "); sb.append("batteryDetails:"); if (this.batteryDetails == null) { sb.append("null"); } else { sb.append(this.batteryDetails); } first = false; } if (isSetCpuStatus()) { if (!first) sb.append(", "); sb.append("cpuStatus:"); if (this.cpuStatus == null) { sb.append("null"); } else { sb.append(this.cpuStatus); } first = false; } if (isSetLocationProviders()) { if (!first) sb.append(", "); sb.append("locationProviders:"); if (this.locationProviders == null) { sb.append("null"); } else { sb.append(this.locationProviders); } first = false; } if (isSetCallInfo()) { if (!first) sb.append(", "); sb.append("callInfo:"); if (this.callInfo == null) { sb.append("null"); } else { sb.append(this.callInfo); } first = false; } if (isSetScreenOn()) { if (!first) sb.append(", "); sb.append("screenOn:"); sb.append(this.screenOn); first = false; } if (isSetTimeZone()) { if (!first) sb.append(", "); sb.append("timeZone:"); if (this.timeZone == null) { sb.append("null"); } else { sb.append(this.timeZone); } first = false; } if (isSetUnknownSources()) { if (!first) sb.append(", "); sb.append("unknownSources:"); sb.append(this.unknownSources); first = false; } if (isSetDeveloperMode()) { if (!first) sb.append(", "); sb.append("developerMode:"); sb.append(this.developerMode); first = false; } if (isSetExtra()) { if (!first) sb.append(", "); sb.append("extra:"); if (this.extra == null) { sb.append("null"); } else { sb.append(this.extra); } first = false; } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (uuId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'uuId' was not present! Struct: " + toString()); } // check for sub-struct validity if (networkDetails != null) { networkDetails.validate(); } if (batteryDetails != null) { batteryDetails.validate(); } if (cpuStatus != null) { cpuStatus.validate(); } if (callInfo != null) { callInfo.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class SampleStandardSchemeFactory implements SchemeFactory { public SampleStandardScheme getScheme() { return new SampleStandardScheme(); } } private static class SampleStandardScheme extends StandardScheme<Sample> { public void read(org.apache.thrift.protocol.TProtocol iprot, Sample struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // UU_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.uuId = iprot.readString(); struct.setUuIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TIMESTAMP if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.timestamp = iprot.readDouble(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PI_LIST if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); struct.piList = new ArrayList<ProcessInfo>(_list8.size); ProcessInfo _elem9; for (int _i10 = 0; _i10 < _list8.size; ++_i10) { _elem9 = new ProcessInfo(); _elem9.read(iprot); struct.piList.add(_elem9); } iprot.readListEnd(); } struct.setPiListIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // BATTERY_STATE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.batteryState = iprot.readString(); struct.setBatteryStateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // BATTERY_LEVEL if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.batteryLevel = iprot.readDouble(); struct.setBatteryLevelIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // MEMORY_WIRED if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.memoryWired = iprot.readI32(); struct.setMemoryWiredIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // MEMORY_ACTIVE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.memoryActive = iprot.readI32(); struct.setMemoryActiveIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // MEMORY_INACTIVE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.memoryInactive = iprot.readI32(); struct.setMemoryInactiveIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // MEMORY_FREE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.memoryFree = iprot.readI32(); struct.setMemoryFreeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // MEMORY_USER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.memoryUser = iprot.readI32(); struct.setMemoryUserIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // TRIGGERED_BY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.triggeredBy = iprot.readString(); struct.setTriggeredByIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 12: // NETWORK_STATUS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.networkStatus = iprot.readString(); struct.setNetworkStatusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 13: // DISTANCE_TRAVELED if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.distanceTraveled = iprot.readDouble(); struct.setDistanceTraveledIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 14: // SCREEN_BRIGHTNESS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.screenBrightness = iprot.readI32(); struct.setScreenBrightnessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 15: // NETWORK_DETAILS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.networkDetails = new NetworkDetails(); struct.networkDetails.read(iprot); struct.setNetworkDetailsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 16: // BATTERY_DETAILS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.batteryDetails = new BatteryDetails(); struct.batteryDetails.read(iprot); struct.setBatteryDetailsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 17: // CPU_STATUS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.cpuStatus = new CpuStatus(); struct.cpuStatus.read(iprot); struct.setCpuStatusIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 18: // LOCATION_PROVIDERS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(); struct.locationProviders = new ArrayList<String>(_list11.size); String _elem12; for (int _i13 = 0; _i13 < _list11.size; ++_i13) { _elem12 = iprot.readString(); struct.locationProviders.add(_elem12); } iprot.readListEnd(); } struct.setLocationProvidersIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 19: // CALL_INFO if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.callInfo = new CallInfo(); struct.callInfo.read(iprot); struct.setCallInfoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 20: // SCREEN_ON if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.screenOn = iprot.readI32(); struct.setScreenOnIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 21: // TIME_ZONE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.timeZone = iprot.readString(); struct.setTimeZoneIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 22: // UNKNOWN_SOURCES if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.unknownSources = iprot.readI32(); struct.setUnknownSourcesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 23: // DEVELOPER_MODE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.developerMode = iprot.readI32(); struct.setDeveloperModeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 24: // EXTRA if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list14 = iprot.readListBegin(); struct.extra = new ArrayList<Feature>(_list14.size); Feature _elem15; for (int _i16 = 0; _i16 < _list14.size; ++_i16) { _elem15 = new Feature(); _elem15.read(iprot); struct.extra.add(_elem15); } iprot.readListEnd(); } struct.setExtraIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, Sample struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.uuId != null) { oprot.writeFieldBegin(UU_ID_FIELD_DESC); oprot.writeString(struct.uuId); oprot.writeFieldEnd(); } if (struct.isSetTimestamp()) { oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeDouble(struct.timestamp); oprot.writeFieldEnd(); } if (struct.piList != null) { if (struct.isSetPiList()) { oprot.writeFieldBegin(PI_LIST_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.piList.size())); for (ProcessInfo _iter17 : struct.piList) { _iter17.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } if (struct.batteryState != null) { if (struct.isSetBatteryState()) { oprot.writeFieldBegin(BATTERY_STATE_FIELD_DESC); oprot.writeString(struct.batteryState); oprot.writeFieldEnd(); } } if (struct.isSetBatteryLevel()) { oprot.writeFieldBegin(BATTERY_LEVEL_FIELD_DESC); oprot.writeDouble(struct.batteryLevel); oprot.writeFieldEnd(); } if (struct.isSetMemoryWired()) { oprot.writeFieldBegin(MEMORY_WIRED_FIELD_DESC); oprot.writeI32(struct.memoryWired); oprot.writeFieldEnd(); } if (struct.isSetMemoryActive()) { oprot.writeFieldBegin(MEMORY_ACTIVE_FIELD_DESC); oprot.writeI32(struct.memoryActive); oprot.writeFieldEnd(); } if (struct.isSetMemoryInactive()) { oprot.writeFieldBegin(MEMORY_INACTIVE_FIELD_DESC); oprot.writeI32(struct.memoryInactive); oprot.writeFieldEnd(); } if (struct.isSetMemoryFree()) { oprot.writeFieldBegin(MEMORY_FREE_FIELD_DESC); oprot.writeI32(struct.memoryFree); oprot.writeFieldEnd(); } if (struct.isSetMemoryUser()) { oprot.writeFieldBegin(MEMORY_USER_FIELD_DESC); oprot.writeI32(struct.memoryUser); oprot.writeFieldEnd(); } if (struct.triggeredBy != null) { if (struct.isSetTriggeredBy()) { oprot.writeFieldBegin(TRIGGERED_BY_FIELD_DESC); oprot.writeString(struct.triggeredBy); oprot.writeFieldEnd(); } } if (struct.networkStatus != null) { if (struct.isSetNetworkStatus()) { oprot.writeFieldBegin(NETWORK_STATUS_FIELD_DESC); oprot.writeString(struct.networkStatus); oprot.writeFieldEnd(); } } if (struct.isSetDistanceTraveled()) { oprot.writeFieldBegin(DISTANCE_TRAVELED_FIELD_DESC); oprot.writeDouble(struct.distanceTraveled); oprot.writeFieldEnd(); } if (struct.isSetScreenBrightness()) { oprot.writeFieldBegin(SCREEN_BRIGHTNESS_FIELD_DESC); oprot.writeI32(struct.screenBrightness); oprot.writeFieldEnd(); } if (struct.networkDetails != null) { if (struct.isSetNetworkDetails()) { oprot.writeFieldBegin(NETWORK_DETAILS_FIELD_DESC); struct.networkDetails.write(oprot); oprot.writeFieldEnd(); } } if (struct.batteryDetails != null) { if (struct.isSetBatteryDetails()) { oprot.writeFieldBegin(BATTERY_DETAILS_FIELD_DESC); struct.batteryDetails.write(oprot); oprot.writeFieldEnd(); } } if (struct.cpuStatus != null) { if (struct.isSetCpuStatus()) { oprot.writeFieldBegin(CPU_STATUS_FIELD_DESC); struct.cpuStatus.write(oprot); oprot.writeFieldEnd(); } } if (struct.locationProviders != null) { if (struct.isSetLocationProviders()) { oprot.writeFieldBegin(LOCATION_PROVIDERS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.locationProviders.size())); for (String _iter18 : struct.locationProviders) { oprot.writeString(_iter18); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } if (struct.callInfo != null) { if (struct.isSetCallInfo()) { oprot.writeFieldBegin(CALL_INFO_FIELD_DESC); struct.callInfo.write(oprot); oprot.writeFieldEnd(); } } if (struct.isSetScreenOn()) { oprot.writeFieldBegin(SCREEN_ON_FIELD_DESC); oprot.writeI32(struct.screenOn); oprot.writeFieldEnd(); } if (struct.timeZone != null) { if (struct.isSetTimeZone()) { oprot.writeFieldBegin(TIME_ZONE_FIELD_DESC); oprot.writeString(struct.timeZone); oprot.writeFieldEnd(); } } if (struct.isSetUnknownSources()) { oprot.writeFieldBegin(UNKNOWN_SOURCES_FIELD_DESC); oprot.writeI32(struct.unknownSources); oprot.writeFieldEnd(); } if (struct.isSetDeveloperMode()) { oprot.writeFieldBegin(DEVELOPER_MODE_FIELD_DESC); oprot.writeI32(struct.developerMode); oprot.writeFieldEnd(); } if (struct.extra != null) { if (struct.isSetExtra()) { oprot.writeFieldBegin(EXTRA_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.extra.size())); for (Feature _iter19 : struct.extra) { _iter19.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class SampleTupleSchemeFactory implements SchemeFactory { public SampleTupleScheme getScheme() { return new SampleTupleScheme(); } } private static class SampleTupleScheme extends TupleScheme<Sample> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, Sample struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.uuId); BitSet optionals = new BitSet(); if (struct.isSetTimestamp()) { optionals.set(0); } if (struct.isSetPiList()) { optionals.set(1); } if (struct.isSetBatteryState()) { optionals.set(2); } if (struct.isSetBatteryLevel()) { optionals.set(3); } if (struct.isSetMemoryWired()) { optionals.set(4); } if (struct.isSetMemoryActive()) { optionals.set(5); } if (struct.isSetMemoryInactive()) { optionals.set(6); } if (struct.isSetMemoryFree()) { optionals.set(7); } if (struct.isSetMemoryUser()) { optionals.set(8); } if (struct.isSetTriggeredBy()) { optionals.set(9); } if (struct.isSetNetworkStatus()) { optionals.set(10); } if (struct.isSetDistanceTraveled()) { optionals.set(11); } if (struct.isSetScreenBrightness()) { optionals.set(12); } if (struct.isSetNetworkDetails()) { optionals.set(13); } if (struct.isSetBatteryDetails()) { optionals.set(14); } if (struct.isSetCpuStatus()) { optionals.set(15); } if (struct.isSetLocationProviders()) { optionals.set(16); } if (struct.isSetCallInfo()) { optionals.set(17); } if (struct.isSetScreenOn()) { optionals.set(18); } if (struct.isSetTimeZone()) { optionals.set(19); } if (struct.isSetUnknownSources()) { optionals.set(20); } if (struct.isSetDeveloperMode()) { optionals.set(21); } if (struct.isSetExtra()) { optionals.set(22); } oprot.writeBitSet(optionals, 23); if (struct.isSetTimestamp()) { oprot.writeDouble(struct.timestamp); } if (struct.isSetPiList()) { { oprot.writeI32(struct.piList.size()); for (ProcessInfo _iter20 : struct.piList) { _iter20.write(oprot); } } } if (struct.isSetBatteryState()) { oprot.writeString(struct.batteryState); } if (struct.isSetBatteryLevel()) { oprot.writeDouble(struct.batteryLevel); } if (struct.isSetMemoryWired()) { oprot.writeI32(struct.memoryWired); } if (struct.isSetMemoryActive()) { oprot.writeI32(struct.memoryActive); } if (struct.isSetMemoryInactive()) { oprot.writeI32(struct.memoryInactive); } if (struct.isSetMemoryFree()) { oprot.writeI32(struct.memoryFree); } if (struct.isSetMemoryUser()) { oprot.writeI32(struct.memoryUser); } if (struct.isSetTriggeredBy()) { oprot.writeString(struct.triggeredBy); } if (struct.isSetNetworkStatus()) { oprot.writeString(struct.networkStatus); } if (struct.isSetDistanceTraveled()) { oprot.writeDouble(struct.distanceTraveled); } if (struct.isSetScreenBrightness()) { oprot.writeI32(struct.screenBrightness); } if (struct.isSetNetworkDetails()) { struct.networkDetails.write(oprot); } if (struct.isSetBatteryDetails()) { struct.batteryDetails.write(oprot); } if (struct.isSetCpuStatus()) { struct.cpuStatus.write(oprot); } if (struct.isSetLocationProviders()) { { oprot.writeI32(struct.locationProviders.size()); for (String _iter21 : struct.locationProviders) { oprot.writeString(_iter21); } } } if (struct.isSetCallInfo()) { struct.callInfo.write(oprot); } if (struct.isSetScreenOn()) { oprot.writeI32(struct.screenOn); } if (struct.isSetTimeZone()) { oprot.writeString(struct.timeZone); } if (struct.isSetUnknownSources()) { oprot.writeI32(struct.unknownSources); } if (struct.isSetDeveloperMode()) { oprot.writeI32(struct.developerMode); } if (struct.isSetExtra()) { { oprot.writeI32(struct.extra.size()); for (Feature _iter22 : struct.extra) { _iter22.write(oprot); } } } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, Sample struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.uuId = iprot.readString(); struct.setUuIdIsSet(true); BitSet incoming = iprot.readBitSet(23); if (incoming.get(0)) { struct.timestamp = iprot.readDouble(); struct.setTimestampIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.piList = new ArrayList<ProcessInfo>(_list23.size); ProcessInfo _elem24; for (int _i25 = 0; _i25 < _list23.size; ++_i25) { _elem24 = new ProcessInfo(); _elem24.read(iprot); struct.piList.add(_elem24); } } struct.setPiListIsSet(true); } if (incoming.get(2)) { struct.batteryState = iprot.readString(); struct.setBatteryStateIsSet(true); } if (incoming.get(3)) { struct.batteryLevel = iprot.readDouble(); struct.setBatteryLevelIsSet(true); } if (incoming.get(4)) { struct.memoryWired = iprot.readI32(); struct.setMemoryWiredIsSet(true); } if (incoming.get(5)) { struct.memoryActive = iprot.readI32(); struct.setMemoryActiveIsSet(true); } if (incoming.get(6)) { struct.memoryInactive = iprot.readI32(); struct.setMemoryInactiveIsSet(true); } if (incoming.get(7)) { struct.memoryFree = iprot.readI32(); struct.setMemoryFreeIsSet(true); } if (incoming.get(8)) { struct.memoryUser = iprot.readI32(); struct.setMemoryUserIsSet(true); } if (incoming.get(9)) { struct.triggeredBy = iprot.readString(); struct.setTriggeredByIsSet(true); } if (incoming.get(10)) { struct.networkStatus = iprot.readString(); struct.setNetworkStatusIsSet(true); } if (incoming.get(11)) { struct.distanceTraveled = iprot.readDouble(); struct.setDistanceTraveledIsSet(true); } if (incoming.get(12)) { struct.screenBrightness = iprot.readI32(); struct.setScreenBrightnessIsSet(true); } if (incoming.get(13)) { struct.networkDetails = new NetworkDetails(); struct.networkDetails.read(iprot); struct.setNetworkDetailsIsSet(true); } if (incoming.get(14)) { struct.batteryDetails = new BatteryDetails(); struct.batteryDetails.read(iprot); struct.setBatteryDetailsIsSet(true); } if (incoming.get(15)) { struct.cpuStatus = new CpuStatus(); struct.cpuStatus.read(iprot); struct.setCpuStatusIsSet(true); } if (incoming.get(16)) { { org.apache.thrift.protocol.TList _list26 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.locationProviders = new ArrayList<String>(_list26.size); String _elem27; for (int _i28 = 0; _i28 < _list26.size; ++_i28) { _elem27 = iprot.readString(); struct.locationProviders.add(_elem27); } } struct.setLocationProvidersIsSet(true); } if (incoming.get(17)) { struct.callInfo = new CallInfo(); struct.callInfo.read(iprot); struct.setCallInfoIsSet(true); } if (incoming.get(18)) { struct.screenOn = iprot.readI32(); struct.setScreenOnIsSet(true); } if (incoming.get(19)) { struct.timeZone = iprot.readString(); struct.setTimeZoneIsSet(true); } if (incoming.get(20)) { struct.unknownSources = iprot.readI32(); struct.setUnknownSourcesIsSet(true); } if (incoming.get(21)) { struct.developerMode = iprot.readI32(); struct.setDeveloperModeIsSet(true); } if (incoming.get(22)) { { org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.extra = new ArrayList<Feature>(_list29.size); Feature _elem30; for (int _i31 = 0; _i31 < _list29.size; ++_i31) { _elem30 = new Feature(); _elem30.read(iprot); struct.extra.add(_elem30); } } struct.setExtraIsSet(true); } } } }