/** * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.facebook.buck.distributed.thrift; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-05-05") public class BuildSlaveInfo implements org.apache.thrift.TBase<BuildSlaveInfo, BuildSlaveInfo._Fields>, java.io.Serializable, Cloneable, Comparable<BuildSlaveInfo> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BuildSlaveInfo"); private static final org.apache.thrift.protocol.TField RUN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("runId", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField COMMAND_FIELD_DESC = new org.apache.thrift.protocol.TField("command", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField STD_OUT_CURRENT_BATCH_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("stdOutCurrentBatchNumber", org.apache.thrift.protocol.TType.I32, (short)4); private static final org.apache.thrift.protocol.TField STD_OUT_CURRENT_BATCH_LINE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("stdOutCurrentBatchLineCount", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField STD_ERR_CURRENT_BATCH_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("stdErrCurrentBatchNumber", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField STD_ERR_CURRENT_BATCH_LINE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("stdErrCurrentBatchLineCount", org.apache.thrift.protocol.TType.I32, (short)7); private static final org.apache.thrift.protocol.TField LOG_DIR_ZIP_WRITTEN_FIELD_DESC = new org.apache.thrift.protocol.TField("logDirZipWritten", org.apache.thrift.protocol.TType.BOOL, (short)8); private static final org.apache.thrift.protocol.TField EXIT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("exitCode", org.apache.thrift.protocol.TType.I32, (short)9); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new BuildSlaveInfoStandardSchemeFactory()); schemes.put(TupleScheme.class, new BuildSlaveInfoTupleSchemeFactory()); } public RunId runId; // optional public String hostname; // optional public String command; // optional public int stdOutCurrentBatchNumber; // optional public int stdOutCurrentBatchLineCount; // optional public int stdErrCurrentBatchNumber; // optional public int stdErrCurrentBatchLineCount; // optional public boolean logDirZipWritten; // optional public int exitCode; // 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 { RUN_ID((short)1, "runId"), HOSTNAME((short)2, "hostname"), COMMAND((short)3, "command"), STD_OUT_CURRENT_BATCH_NUMBER((short)4, "stdOutCurrentBatchNumber"), STD_OUT_CURRENT_BATCH_LINE_COUNT((short)5, "stdOutCurrentBatchLineCount"), STD_ERR_CURRENT_BATCH_NUMBER((short)6, "stdErrCurrentBatchNumber"), STD_ERR_CURRENT_BATCH_LINE_COUNT((short)7, "stdErrCurrentBatchLineCount"), LOG_DIR_ZIP_WRITTEN((short)8, "logDirZipWritten"), EXIT_CODE((short)9, "exitCode"); 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: // RUN_ID return RUN_ID; case 2: // HOSTNAME return HOSTNAME; case 3: // COMMAND return COMMAND; case 4: // STD_OUT_CURRENT_BATCH_NUMBER return STD_OUT_CURRENT_BATCH_NUMBER; case 5: // STD_OUT_CURRENT_BATCH_LINE_COUNT return STD_OUT_CURRENT_BATCH_LINE_COUNT; case 6: // STD_ERR_CURRENT_BATCH_NUMBER return STD_ERR_CURRENT_BATCH_NUMBER; case 7: // STD_ERR_CURRENT_BATCH_LINE_COUNT return STD_ERR_CURRENT_BATCH_LINE_COUNT; case 8: // LOG_DIR_ZIP_WRITTEN return LOG_DIR_ZIP_WRITTEN; case 9: // EXIT_CODE return EXIT_CODE; 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 __STDOUTCURRENTBATCHNUMBER_ISSET_ID = 0; private static final int __STDOUTCURRENTBATCHLINECOUNT_ISSET_ID = 1; private static final int __STDERRCURRENTBATCHNUMBER_ISSET_ID = 2; private static final int __STDERRCURRENTBATCHLINECOUNT_ISSET_ID = 3; private static final int __LOGDIRZIPWRITTEN_ISSET_ID = 4; private static final int __EXITCODE_ISSET_ID = 5; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.RUN_ID,_Fields.HOSTNAME,_Fields.COMMAND,_Fields.STD_OUT_CURRENT_BATCH_NUMBER,_Fields.STD_OUT_CURRENT_BATCH_LINE_COUNT,_Fields.STD_ERR_CURRENT_BATCH_NUMBER,_Fields.STD_ERR_CURRENT_BATCH_LINE_COUNT,_Fields.LOG_DIR_ZIP_WRITTEN,_Fields.EXIT_CODE}; 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.RUN_ID, new org.apache.thrift.meta_data.FieldMetaData("runId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RunId.class))); tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.COMMAND, new org.apache.thrift.meta_data.FieldMetaData("command", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.STD_OUT_CURRENT_BATCH_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("stdOutCurrentBatchNumber", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.STD_OUT_CURRENT_BATCH_LINE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("stdOutCurrentBatchLineCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.STD_ERR_CURRENT_BATCH_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("stdErrCurrentBatchNumber", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.STD_ERR_CURRENT_BATCH_LINE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("stdErrCurrentBatchLineCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.LOG_DIR_ZIP_WRITTEN, new org.apache.thrift.meta_data.FieldMetaData("logDirZipWritten", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.EXIT_CODE, new org.apache.thrift.meta_data.FieldMetaData("exitCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BuildSlaveInfo.class, metaDataMap); } public BuildSlaveInfo() { } /** * Performs a deep copy on <i>other</i>. */ public BuildSlaveInfo(BuildSlaveInfo other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetRunId()) { this.runId = new RunId(other.runId); } if (other.isSetHostname()) { this.hostname = other.hostname; } if (other.isSetCommand()) { this.command = other.command; } this.stdOutCurrentBatchNumber = other.stdOutCurrentBatchNumber; this.stdOutCurrentBatchLineCount = other.stdOutCurrentBatchLineCount; this.stdErrCurrentBatchNumber = other.stdErrCurrentBatchNumber; this.stdErrCurrentBatchLineCount = other.stdErrCurrentBatchLineCount; this.logDirZipWritten = other.logDirZipWritten; this.exitCode = other.exitCode; } public BuildSlaveInfo deepCopy() { return new BuildSlaveInfo(this); } @Override public void clear() { this.runId = null; this.hostname = null; this.command = null; setStdOutCurrentBatchNumberIsSet(false); this.stdOutCurrentBatchNumber = 0; setStdOutCurrentBatchLineCountIsSet(false); this.stdOutCurrentBatchLineCount = 0; setStdErrCurrentBatchNumberIsSet(false); this.stdErrCurrentBatchNumber = 0; setStdErrCurrentBatchLineCountIsSet(false); this.stdErrCurrentBatchLineCount = 0; setLogDirZipWrittenIsSet(false); this.logDirZipWritten = false; setExitCodeIsSet(false); this.exitCode = 0; } public RunId getRunId() { return this.runId; } public BuildSlaveInfo setRunId(RunId runId) { this.runId = runId; return this; } public void unsetRunId() { this.runId = null; } /** Returns true if field runId is set (has been assigned a value) and false otherwise */ public boolean isSetRunId() { return this.runId != null; } public void setRunIdIsSet(boolean value) { if (!value) { this.runId = null; } } public String getHostname() { return this.hostname; } public BuildSlaveInfo setHostname(String hostname) { this.hostname = hostname; return this; } public void unsetHostname() { this.hostname = null; } /** Returns true if field hostname is set (has been assigned a value) and false otherwise */ public boolean isSetHostname() { return this.hostname != null; } public void setHostnameIsSet(boolean value) { if (!value) { this.hostname = null; } } public String getCommand() { return this.command; } public BuildSlaveInfo setCommand(String command) { this.command = command; return this; } public void unsetCommand() { this.command = null; } /** Returns true if field command is set (has been assigned a value) and false otherwise */ public boolean isSetCommand() { return this.command != null; } public void setCommandIsSet(boolean value) { if (!value) { this.command = null; } } public int getStdOutCurrentBatchNumber() { return this.stdOutCurrentBatchNumber; } public BuildSlaveInfo setStdOutCurrentBatchNumber(int stdOutCurrentBatchNumber) { this.stdOutCurrentBatchNumber = stdOutCurrentBatchNumber; setStdOutCurrentBatchNumberIsSet(true); return this; } public void unsetStdOutCurrentBatchNumber() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STDOUTCURRENTBATCHNUMBER_ISSET_ID); } /** Returns true if field stdOutCurrentBatchNumber is set (has been assigned a value) and false otherwise */ public boolean isSetStdOutCurrentBatchNumber() { return EncodingUtils.testBit(__isset_bitfield, __STDOUTCURRENTBATCHNUMBER_ISSET_ID); } public void setStdOutCurrentBatchNumberIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STDOUTCURRENTBATCHNUMBER_ISSET_ID, value); } public int getStdOutCurrentBatchLineCount() { return this.stdOutCurrentBatchLineCount; } public BuildSlaveInfo setStdOutCurrentBatchLineCount(int stdOutCurrentBatchLineCount) { this.stdOutCurrentBatchLineCount = stdOutCurrentBatchLineCount; setStdOutCurrentBatchLineCountIsSet(true); return this; } public void unsetStdOutCurrentBatchLineCount() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STDOUTCURRENTBATCHLINECOUNT_ISSET_ID); } /** Returns true if field stdOutCurrentBatchLineCount is set (has been assigned a value) and false otherwise */ public boolean isSetStdOutCurrentBatchLineCount() { return EncodingUtils.testBit(__isset_bitfield, __STDOUTCURRENTBATCHLINECOUNT_ISSET_ID); } public void setStdOutCurrentBatchLineCountIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STDOUTCURRENTBATCHLINECOUNT_ISSET_ID, value); } public int getStdErrCurrentBatchNumber() { return this.stdErrCurrentBatchNumber; } public BuildSlaveInfo setStdErrCurrentBatchNumber(int stdErrCurrentBatchNumber) { this.stdErrCurrentBatchNumber = stdErrCurrentBatchNumber; setStdErrCurrentBatchNumberIsSet(true); return this; } public void unsetStdErrCurrentBatchNumber() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STDERRCURRENTBATCHNUMBER_ISSET_ID); } /** Returns true if field stdErrCurrentBatchNumber is set (has been assigned a value) and false otherwise */ public boolean isSetStdErrCurrentBatchNumber() { return EncodingUtils.testBit(__isset_bitfield, __STDERRCURRENTBATCHNUMBER_ISSET_ID); } public void setStdErrCurrentBatchNumberIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STDERRCURRENTBATCHNUMBER_ISSET_ID, value); } public int getStdErrCurrentBatchLineCount() { return this.stdErrCurrentBatchLineCount; } public BuildSlaveInfo setStdErrCurrentBatchLineCount(int stdErrCurrentBatchLineCount) { this.stdErrCurrentBatchLineCount = stdErrCurrentBatchLineCount; setStdErrCurrentBatchLineCountIsSet(true); return this; } public void unsetStdErrCurrentBatchLineCount() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STDERRCURRENTBATCHLINECOUNT_ISSET_ID); } /** Returns true if field stdErrCurrentBatchLineCount is set (has been assigned a value) and false otherwise */ public boolean isSetStdErrCurrentBatchLineCount() { return EncodingUtils.testBit(__isset_bitfield, __STDERRCURRENTBATCHLINECOUNT_ISSET_ID); } public void setStdErrCurrentBatchLineCountIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STDERRCURRENTBATCHLINECOUNT_ISSET_ID, value); } public boolean isLogDirZipWritten() { return this.logDirZipWritten; } public BuildSlaveInfo setLogDirZipWritten(boolean logDirZipWritten) { this.logDirZipWritten = logDirZipWritten; setLogDirZipWrittenIsSet(true); return this; } public void unsetLogDirZipWritten() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOGDIRZIPWRITTEN_ISSET_ID); } /** Returns true if field logDirZipWritten is set (has been assigned a value) and false otherwise */ public boolean isSetLogDirZipWritten() { return EncodingUtils.testBit(__isset_bitfield, __LOGDIRZIPWRITTEN_ISSET_ID); } public void setLogDirZipWrittenIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOGDIRZIPWRITTEN_ISSET_ID, value); } public int getExitCode() { return this.exitCode; } public BuildSlaveInfo setExitCode(int exitCode) { this.exitCode = exitCode; setExitCodeIsSet(true); return this; } public void unsetExitCode() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXITCODE_ISSET_ID); } /** Returns true if field exitCode is set (has been assigned a value) and false otherwise */ public boolean isSetExitCode() { return EncodingUtils.testBit(__isset_bitfield, __EXITCODE_ISSET_ID); } public void setExitCodeIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXITCODE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case RUN_ID: if (value == null) { unsetRunId(); } else { setRunId((RunId)value); } break; case HOSTNAME: if (value == null) { unsetHostname(); } else { setHostname((String)value); } break; case COMMAND: if (value == null) { unsetCommand(); } else { setCommand((String)value); } break; case STD_OUT_CURRENT_BATCH_NUMBER: if (value == null) { unsetStdOutCurrentBatchNumber(); } else { setStdOutCurrentBatchNumber((Integer)value); } break; case STD_OUT_CURRENT_BATCH_LINE_COUNT: if (value == null) { unsetStdOutCurrentBatchLineCount(); } else { setStdOutCurrentBatchLineCount((Integer)value); } break; case STD_ERR_CURRENT_BATCH_NUMBER: if (value == null) { unsetStdErrCurrentBatchNumber(); } else { setStdErrCurrentBatchNumber((Integer)value); } break; case STD_ERR_CURRENT_BATCH_LINE_COUNT: if (value == null) { unsetStdErrCurrentBatchLineCount(); } else { setStdErrCurrentBatchLineCount((Integer)value); } break; case LOG_DIR_ZIP_WRITTEN: if (value == null) { unsetLogDirZipWritten(); } else { setLogDirZipWritten((Boolean)value); } break; case EXIT_CODE: if (value == null) { unsetExitCode(); } else { setExitCode((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case RUN_ID: return getRunId(); case HOSTNAME: return getHostname(); case COMMAND: return getCommand(); case STD_OUT_CURRENT_BATCH_NUMBER: return getStdOutCurrentBatchNumber(); case STD_OUT_CURRENT_BATCH_LINE_COUNT: return getStdOutCurrentBatchLineCount(); case STD_ERR_CURRENT_BATCH_NUMBER: return getStdErrCurrentBatchNumber(); case STD_ERR_CURRENT_BATCH_LINE_COUNT: return getStdErrCurrentBatchLineCount(); case LOG_DIR_ZIP_WRITTEN: return isLogDirZipWritten(); case EXIT_CODE: return getExitCode(); } 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 RUN_ID: return isSetRunId(); case HOSTNAME: return isSetHostname(); case COMMAND: return isSetCommand(); case STD_OUT_CURRENT_BATCH_NUMBER: return isSetStdOutCurrentBatchNumber(); case STD_OUT_CURRENT_BATCH_LINE_COUNT: return isSetStdOutCurrentBatchLineCount(); case STD_ERR_CURRENT_BATCH_NUMBER: return isSetStdErrCurrentBatchNumber(); case STD_ERR_CURRENT_BATCH_LINE_COUNT: return isSetStdErrCurrentBatchLineCount(); case LOG_DIR_ZIP_WRITTEN: return isSetLogDirZipWritten(); case EXIT_CODE: return isSetExitCode(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof BuildSlaveInfo) return this.equals((BuildSlaveInfo)that); return false; } public boolean equals(BuildSlaveInfo that) { if (that == null) return false; boolean this_present_runId = true && this.isSetRunId(); boolean that_present_runId = true && that.isSetRunId(); if (this_present_runId || that_present_runId) { if (!(this_present_runId && that_present_runId)) return false; if (!this.runId.equals(that.runId)) return false; } boolean this_present_hostname = true && this.isSetHostname(); boolean that_present_hostname = true && that.isSetHostname(); if (this_present_hostname || that_present_hostname) { if (!(this_present_hostname && that_present_hostname)) return false; if (!this.hostname.equals(that.hostname)) return false; } boolean this_present_command = true && this.isSetCommand(); boolean that_present_command = true && that.isSetCommand(); if (this_present_command || that_present_command) { if (!(this_present_command && that_present_command)) return false; if (!this.command.equals(that.command)) return false; } boolean this_present_stdOutCurrentBatchNumber = true && this.isSetStdOutCurrentBatchNumber(); boolean that_present_stdOutCurrentBatchNumber = true && that.isSetStdOutCurrentBatchNumber(); if (this_present_stdOutCurrentBatchNumber || that_present_stdOutCurrentBatchNumber) { if (!(this_present_stdOutCurrentBatchNumber && that_present_stdOutCurrentBatchNumber)) return false; if (this.stdOutCurrentBatchNumber != that.stdOutCurrentBatchNumber) return false; } boolean this_present_stdOutCurrentBatchLineCount = true && this.isSetStdOutCurrentBatchLineCount(); boolean that_present_stdOutCurrentBatchLineCount = true && that.isSetStdOutCurrentBatchLineCount(); if (this_present_stdOutCurrentBatchLineCount || that_present_stdOutCurrentBatchLineCount) { if (!(this_present_stdOutCurrentBatchLineCount && that_present_stdOutCurrentBatchLineCount)) return false; if (this.stdOutCurrentBatchLineCount != that.stdOutCurrentBatchLineCount) return false; } boolean this_present_stdErrCurrentBatchNumber = true && this.isSetStdErrCurrentBatchNumber(); boolean that_present_stdErrCurrentBatchNumber = true && that.isSetStdErrCurrentBatchNumber(); if (this_present_stdErrCurrentBatchNumber || that_present_stdErrCurrentBatchNumber) { if (!(this_present_stdErrCurrentBatchNumber && that_present_stdErrCurrentBatchNumber)) return false; if (this.stdErrCurrentBatchNumber != that.stdErrCurrentBatchNumber) return false; } boolean this_present_stdErrCurrentBatchLineCount = true && this.isSetStdErrCurrentBatchLineCount(); boolean that_present_stdErrCurrentBatchLineCount = true && that.isSetStdErrCurrentBatchLineCount(); if (this_present_stdErrCurrentBatchLineCount || that_present_stdErrCurrentBatchLineCount) { if (!(this_present_stdErrCurrentBatchLineCount && that_present_stdErrCurrentBatchLineCount)) return false; if (this.stdErrCurrentBatchLineCount != that.stdErrCurrentBatchLineCount) return false; } boolean this_present_logDirZipWritten = true && this.isSetLogDirZipWritten(); boolean that_present_logDirZipWritten = true && that.isSetLogDirZipWritten(); if (this_present_logDirZipWritten || that_present_logDirZipWritten) { if (!(this_present_logDirZipWritten && that_present_logDirZipWritten)) return false; if (this.logDirZipWritten != that.logDirZipWritten) return false; } boolean this_present_exitCode = true && this.isSetExitCode(); boolean that_present_exitCode = true && that.isSetExitCode(); if (this_present_exitCode || that_present_exitCode) { if (!(this_present_exitCode && that_present_exitCode)) return false; if (this.exitCode != that.exitCode) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_runId = true && (isSetRunId()); list.add(present_runId); if (present_runId) list.add(runId); boolean present_hostname = true && (isSetHostname()); list.add(present_hostname); if (present_hostname) list.add(hostname); boolean present_command = true && (isSetCommand()); list.add(present_command); if (present_command) list.add(command); boolean present_stdOutCurrentBatchNumber = true && (isSetStdOutCurrentBatchNumber()); list.add(present_stdOutCurrentBatchNumber); if (present_stdOutCurrentBatchNumber) list.add(stdOutCurrentBatchNumber); boolean present_stdOutCurrentBatchLineCount = true && (isSetStdOutCurrentBatchLineCount()); list.add(present_stdOutCurrentBatchLineCount); if (present_stdOutCurrentBatchLineCount) list.add(stdOutCurrentBatchLineCount); boolean present_stdErrCurrentBatchNumber = true && (isSetStdErrCurrentBatchNumber()); list.add(present_stdErrCurrentBatchNumber); if (present_stdErrCurrentBatchNumber) list.add(stdErrCurrentBatchNumber); boolean present_stdErrCurrentBatchLineCount = true && (isSetStdErrCurrentBatchLineCount()); list.add(present_stdErrCurrentBatchLineCount); if (present_stdErrCurrentBatchLineCount) list.add(stdErrCurrentBatchLineCount); boolean present_logDirZipWritten = true && (isSetLogDirZipWritten()); list.add(present_logDirZipWritten); if (present_logDirZipWritten) list.add(logDirZipWritten); boolean present_exitCode = true && (isSetExitCode()); list.add(present_exitCode); if (present_exitCode) list.add(exitCode); return list.hashCode(); } @Override public int compareTo(BuildSlaveInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetRunId()).compareTo(other.isSetRunId()); if (lastComparison != 0) { return lastComparison; } if (isSetRunId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runId, other.runId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname()); if (lastComparison != 0) { return lastComparison; } if (isSetHostname()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCommand()).compareTo(other.isSetCommand()); if (lastComparison != 0) { return lastComparison; } if (isSetCommand()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.command, other.command); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStdOutCurrentBatchNumber()).compareTo(other.isSetStdOutCurrentBatchNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetStdOutCurrentBatchNumber()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stdOutCurrentBatchNumber, other.stdOutCurrentBatchNumber); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStdOutCurrentBatchLineCount()).compareTo(other.isSetStdOutCurrentBatchLineCount()); if (lastComparison != 0) { return lastComparison; } if (isSetStdOutCurrentBatchLineCount()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stdOutCurrentBatchLineCount, other.stdOutCurrentBatchLineCount); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStdErrCurrentBatchNumber()).compareTo(other.isSetStdErrCurrentBatchNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetStdErrCurrentBatchNumber()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stdErrCurrentBatchNumber, other.stdErrCurrentBatchNumber); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStdErrCurrentBatchLineCount()).compareTo(other.isSetStdErrCurrentBatchLineCount()); if (lastComparison != 0) { return lastComparison; } if (isSetStdErrCurrentBatchLineCount()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stdErrCurrentBatchLineCount, other.stdErrCurrentBatchLineCount); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetLogDirZipWritten()).compareTo(other.isSetLogDirZipWritten()); if (lastComparison != 0) { return lastComparison; } if (isSetLogDirZipWritten()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logDirZipWritten, other.logDirZipWritten); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetExitCode()).compareTo(other.isSetExitCode()); if (lastComparison != 0) { return lastComparison; } if (isSetExitCode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exitCode, other.exitCode); 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("BuildSlaveInfo("); boolean first = true; if (isSetRunId()) { sb.append("runId:"); if (this.runId == null) { sb.append("null"); } else { sb.append(this.runId); } first = false; } if (isSetHostname()) { if (!first) sb.append(", "); sb.append("hostname:"); if (this.hostname == null) { sb.append("null"); } else { sb.append(this.hostname); } first = false; } if (isSetCommand()) { if (!first) sb.append(", "); sb.append("command:"); if (this.command == null) { sb.append("null"); } else { sb.append(this.command); } first = false; } if (isSetStdOutCurrentBatchNumber()) { if (!first) sb.append(", "); sb.append("stdOutCurrentBatchNumber:"); sb.append(this.stdOutCurrentBatchNumber); first = false; } if (isSetStdOutCurrentBatchLineCount()) { if (!first) sb.append(", "); sb.append("stdOutCurrentBatchLineCount:"); sb.append(this.stdOutCurrentBatchLineCount); first = false; } if (isSetStdErrCurrentBatchNumber()) { if (!first) sb.append(", "); sb.append("stdErrCurrentBatchNumber:"); sb.append(this.stdErrCurrentBatchNumber); first = false; } if (isSetStdErrCurrentBatchLineCount()) { if (!first) sb.append(", "); sb.append("stdErrCurrentBatchLineCount:"); sb.append(this.stdErrCurrentBatchLineCount); first = false; } if (isSetLogDirZipWritten()) { if (!first) sb.append(", "); sb.append("logDirZipWritten:"); sb.append(this.logDirZipWritten); first = false; } if (isSetExitCode()) { if (!first) sb.append(", "); sb.append("exitCode:"); sb.append(this.exitCode); first = false; } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (runId != null) { runId.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 BuildSlaveInfoStandardSchemeFactory implements SchemeFactory { public BuildSlaveInfoStandardScheme getScheme() { return new BuildSlaveInfoStandardScheme(); } } private static class BuildSlaveInfoStandardScheme extends StandardScheme<BuildSlaveInfo> { public void read(org.apache.thrift.protocol.TProtocol iprot, BuildSlaveInfo 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: // RUN_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.runId = new RunId(); struct.runId.read(iprot); struct.setRunIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // HOSTNAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.hostname = iprot.readString(); struct.setHostnameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // COMMAND if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.command = iprot.readString(); struct.setCommandIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // STD_OUT_CURRENT_BATCH_NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.stdOutCurrentBatchNumber = iprot.readI32(); struct.setStdOutCurrentBatchNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // STD_OUT_CURRENT_BATCH_LINE_COUNT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.stdOutCurrentBatchLineCount = iprot.readI32(); struct.setStdOutCurrentBatchLineCountIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // STD_ERR_CURRENT_BATCH_NUMBER if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.stdErrCurrentBatchNumber = iprot.readI32(); struct.setStdErrCurrentBatchNumberIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // STD_ERR_CURRENT_BATCH_LINE_COUNT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.stdErrCurrentBatchLineCount = iprot.readI32(); struct.setStdErrCurrentBatchLineCountIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // LOG_DIR_ZIP_WRITTEN if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.logDirZipWritten = iprot.readBool(); struct.setLogDirZipWrittenIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // EXIT_CODE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.exitCode = iprot.readI32(); struct.setExitCodeIsSet(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, BuildSlaveInfo struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.runId != null) { if (struct.isSetRunId()) { oprot.writeFieldBegin(RUN_ID_FIELD_DESC); struct.runId.write(oprot); oprot.writeFieldEnd(); } } if (struct.hostname != null) { if (struct.isSetHostname()) { oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); oprot.writeString(struct.hostname); oprot.writeFieldEnd(); } } if (struct.command != null) { if (struct.isSetCommand()) { oprot.writeFieldBegin(COMMAND_FIELD_DESC); oprot.writeString(struct.command); oprot.writeFieldEnd(); } } if (struct.isSetStdOutCurrentBatchNumber()) { oprot.writeFieldBegin(STD_OUT_CURRENT_BATCH_NUMBER_FIELD_DESC); oprot.writeI32(struct.stdOutCurrentBatchNumber); oprot.writeFieldEnd(); } if (struct.isSetStdOutCurrentBatchLineCount()) { oprot.writeFieldBegin(STD_OUT_CURRENT_BATCH_LINE_COUNT_FIELD_DESC); oprot.writeI32(struct.stdOutCurrentBatchLineCount); oprot.writeFieldEnd(); } if (struct.isSetStdErrCurrentBatchNumber()) { oprot.writeFieldBegin(STD_ERR_CURRENT_BATCH_NUMBER_FIELD_DESC); oprot.writeI32(struct.stdErrCurrentBatchNumber); oprot.writeFieldEnd(); } if (struct.isSetStdErrCurrentBatchLineCount()) { oprot.writeFieldBegin(STD_ERR_CURRENT_BATCH_LINE_COUNT_FIELD_DESC); oprot.writeI32(struct.stdErrCurrentBatchLineCount); oprot.writeFieldEnd(); } if (struct.isSetLogDirZipWritten()) { oprot.writeFieldBegin(LOG_DIR_ZIP_WRITTEN_FIELD_DESC); oprot.writeBool(struct.logDirZipWritten); oprot.writeFieldEnd(); } if (struct.isSetExitCode()) { oprot.writeFieldBegin(EXIT_CODE_FIELD_DESC); oprot.writeI32(struct.exitCode); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class BuildSlaveInfoTupleSchemeFactory implements SchemeFactory { public BuildSlaveInfoTupleScheme getScheme() { return new BuildSlaveInfoTupleScheme(); } } private static class BuildSlaveInfoTupleScheme extends TupleScheme<BuildSlaveInfo> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, BuildSlaveInfo struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRunId()) { optionals.set(0); } if (struct.isSetHostname()) { optionals.set(1); } if (struct.isSetCommand()) { optionals.set(2); } if (struct.isSetStdOutCurrentBatchNumber()) { optionals.set(3); } if (struct.isSetStdOutCurrentBatchLineCount()) { optionals.set(4); } if (struct.isSetStdErrCurrentBatchNumber()) { optionals.set(5); } if (struct.isSetStdErrCurrentBatchLineCount()) { optionals.set(6); } if (struct.isSetLogDirZipWritten()) { optionals.set(7); } if (struct.isSetExitCode()) { optionals.set(8); } oprot.writeBitSet(optionals, 9); if (struct.isSetRunId()) { struct.runId.write(oprot); } if (struct.isSetHostname()) { oprot.writeString(struct.hostname); } if (struct.isSetCommand()) { oprot.writeString(struct.command); } if (struct.isSetStdOutCurrentBatchNumber()) { oprot.writeI32(struct.stdOutCurrentBatchNumber); } if (struct.isSetStdOutCurrentBatchLineCount()) { oprot.writeI32(struct.stdOutCurrentBatchLineCount); } if (struct.isSetStdErrCurrentBatchNumber()) { oprot.writeI32(struct.stdErrCurrentBatchNumber); } if (struct.isSetStdErrCurrentBatchLineCount()) { oprot.writeI32(struct.stdErrCurrentBatchLineCount); } if (struct.isSetLogDirZipWritten()) { oprot.writeBool(struct.logDirZipWritten); } if (struct.isSetExitCode()) { oprot.writeI32(struct.exitCode); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, BuildSlaveInfo struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { struct.runId = new RunId(); struct.runId.read(iprot); struct.setRunIdIsSet(true); } if (incoming.get(1)) { struct.hostname = iprot.readString(); struct.setHostnameIsSet(true); } if (incoming.get(2)) { struct.command = iprot.readString(); struct.setCommandIsSet(true); } if (incoming.get(3)) { struct.stdOutCurrentBatchNumber = iprot.readI32(); struct.setStdOutCurrentBatchNumberIsSet(true); } if (incoming.get(4)) { struct.stdOutCurrentBatchLineCount = iprot.readI32(); struct.setStdOutCurrentBatchLineCountIsSet(true); } if (incoming.get(5)) { struct.stdErrCurrentBatchNumber = iprot.readI32(); struct.setStdErrCurrentBatchNumberIsSet(true); } if (incoming.get(6)) { struct.stdErrCurrentBatchLineCount = iprot.readI32(); struct.setStdErrCurrentBatchLineCountIsSet(true); } if (incoming.get(7)) { struct.logDirZipWritten = iprot.readBool(); struct.setLogDirZipWrittenIsSet(true); } if (incoming.get(8)) { struct.exitCode = iprot.readI32(); struct.setExitCodeIsSet(true); } } } }