/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package com.flaptor.indextank.rpc; 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.thrift.*; import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; @SuppressWarnings("all") public class LogRecord implements TBase<LogRecord, LogRecord._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("LogRecord"); private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1); private static final TField TIMESTAMP_MS_FIELD_DESC = new TField("timestamp_ms", TType.I64, (short)2); private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)3); private static final TField DOCID_FIELD_DESC = new TField("docid", TType.STRING, (short)4); private static final TField DELETED_FIELD_DESC = new TField("deleted", TType.BOOL, (short)5); private static final TField FIELDS_FIELD_DESC = new TField("fields", TType.MAP, (short)6); private static final TField VARIABLES_FIELD_DESC = new TField("variables", TType.MAP, (short)7); private static final TField CATEGORIES_FIELD_DESC = new TField("categories", TType.MAP, (short)8); private long id; private long timestamp_ms; private String index_code; private String docid; private boolean deleted; private Map<String,String> fields; private Map<Integer,Double> variables; private Map<String,String> categories; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { ID((short)1, "id"), TIMESTAMP_MS((short)2, "timestamp_ms"), INDEX_CODE((short)3, "index_code"), DOCID((short)4, "docid"), DELETED((short)5, "deleted"), FIELDS((short)6, "fields"), VARIABLES((short)7, "variables"), CATEGORIES((short)8, "categories"); 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: // ID return ID; case 2: // TIMESTAMP_MS return TIMESTAMP_MS; case 3: // INDEX_CODE return INDEX_CODE; case 4: // DOCID return DOCID; case 5: // DELETED return DELETED; case 6: // FIELDS return FIELDS; case 7: // VARIABLES return VARIABLES; case 8: // CATEGORIES return CATEGORIES; 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 __ID_ISSET_ID = 0; private static final int __TIMESTAMP_MS_ISSET_ID = 1; private static final int __DELETED_ISSET_ID = 2; private BitSet __isset_bit_vector = new BitSet(3); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.I64))); tmpMap.put(_Fields.TIMESTAMP_MS, new FieldMetaData("timestamp_ms", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.I64))); tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.STRING))); tmpMap.put(_Fields.DOCID, new FieldMetaData("docid", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); tmpMap.put(_Fields.DELETED, new FieldMetaData("deleted", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); tmpMap.put(_Fields.FIELDS, new FieldMetaData("fields", TFieldRequirementType.OPTIONAL, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); tmpMap.put(_Fields.VARIABLES, new FieldMetaData("variables", TFieldRequirementType.OPTIONAL, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.I32), new FieldValueMetaData(TType.DOUBLE)))); tmpMap.put(_Fields.CATEGORIES, new FieldMetaData("categories", TFieldRequirementType.OPTIONAL, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(LogRecord.class, metaDataMap); } public LogRecord() { } public LogRecord( String docid, boolean deleted) { this(); this.docid = docid; this.deleted = deleted; set_deleted_isSet(true); } /** * Performs a deep copy on <i>other</i>. */ public LogRecord(LogRecord other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.id = other.id; this.timestamp_ms = other.timestamp_ms; if (other.is_set_index_code()) { this.index_code = other.index_code; } if (other.is_set_docid()) { this.docid = other.docid; } this.deleted = other.deleted; if (other.is_set_fields()) { Map<String,String> __this__fields = new HashMap<String,String>(); for (Map.Entry<String, String> other_element : other.fields.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__fields_copy_key = other_element_key; String __this__fields_copy_value = other_element_value; __this__fields.put(__this__fields_copy_key, __this__fields_copy_value); } this.fields = __this__fields; } if (other.is_set_variables()) { Map<Integer,Double> __this__variables = new HashMap<Integer,Double>(); for (Map.Entry<Integer, Double> other_element : other.variables.entrySet()) { Integer other_element_key = other_element.getKey(); Double other_element_value = other_element.getValue(); Integer __this__variables_copy_key = other_element_key; Double __this__variables_copy_value = other_element_value; __this__variables.put(__this__variables_copy_key, __this__variables_copy_value); } this.variables = __this__variables; } if (other.is_set_categories()) { Map<String,String> __this__categories = new HashMap<String,String>(); for (Map.Entry<String, String> other_element : other.categories.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__categories_copy_key = other_element_key; String __this__categories_copy_value = other_element_value; __this__categories.put(__this__categories_copy_key, __this__categories_copy_value); } this.categories = __this__categories; } } public LogRecord deepCopy() { return new LogRecord(this); } @Override public void clear() { set_id_isSet(false); this.id = 0; set_timestamp_ms_isSet(false); this.timestamp_ms = 0; this.index_code = null; this.docid = null; set_deleted_isSet(false); this.deleted = false; this.fields = null; this.variables = null; this.categories = null; } public long get_id() { return this.id; } public LogRecord set_id(long id) { this.id = id; set_id_isSet(true); return this; } public void unset_id() { __isset_bit_vector.clear(__ID_ISSET_ID); } /** Returns true if field id is set (has been asigned a value) and false otherwise */ public boolean is_set_id() { return __isset_bit_vector.get(__ID_ISSET_ID); } public void set_id_isSet(boolean value) { __isset_bit_vector.set(__ID_ISSET_ID, value); } public long get_timestamp_ms() { return this.timestamp_ms; } public LogRecord set_timestamp_ms(long timestamp_ms) { this.timestamp_ms = timestamp_ms; set_timestamp_ms_isSet(true); return this; } public void unset_timestamp_ms() { __isset_bit_vector.clear(__TIMESTAMP_MS_ISSET_ID); } /** Returns true if field timestamp_ms is set (has been asigned a value) and false otherwise */ public boolean is_set_timestamp_ms() { return __isset_bit_vector.get(__TIMESTAMP_MS_ISSET_ID); } public void set_timestamp_ms_isSet(boolean value) { __isset_bit_vector.set(__TIMESTAMP_MS_ISSET_ID, value); } public String get_index_code() { return this.index_code; } public LogRecord set_index_code(String index_code) { this.index_code = index_code; return this; } public void unset_index_code() { this.index_code = null; } /** Returns true if field index_code is set (has been asigned a value) and false otherwise */ public boolean is_set_index_code() { return this.index_code != null; } public void set_index_code_isSet(boolean value) { if (!value) { this.index_code = null; } } public String get_docid() { return this.docid; } public LogRecord set_docid(String docid) { this.docid = docid; return this; } public void unset_docid() { this.docid = null; } /** Returns true if field docid is set (has been asigned a value) and false otherwise */ public boolean is_set_docid() { return this.docid != null; } public void set_docid_isSet(boolean value) { if (!value) { this.docid = null; } } public boolean is_deleted() { return this.deleted; } public LogRecord set_deleted(boolean deleted) { this.deleted = deleted; set_deleted_isSet(true); return this; } public void unset_deleted() { __isset_bit_vector.clear(__DELETED_ISSET_ID); } /** Returns true if field deleted is set (has been asigned a value) and false otherwise */ public boolean is_set_deleted() { return __isset_bit_vector.get(__DELETED_ISSET_ID); } public void set_deleted_isSet(boolean value) { __isset_bit_vector.set(__DELETED_ISSET_ID, value); } public int get_fields_size() { return (this.fields == null) ? 0 : this.fields.size(); } public void put_to_fields(String key, String val) { if (this.fields == null) { this.fields = new HashMap<String,String>(); } this.fields.put(key, val); } public Map<String,String> get_fields() { return this.fields; } public LogRecord set_fields(Map<String,String> fields) { this.fields = fields; return this; } public void unset_fields() { this.fields = null; } /** Returns true if field fields is set (has been asigned a value) and false otherwise */ public boolean is_set_fields() { return this.fields != null; } public void set_fields_isSet(boolean value) { if (!value) { this.fields = null; } } public int get_variables_size() { return (this.variables == null) ? 0 : this.variables.size(); } public void put_to_variables(int key, double val) { if (this.variables == null) { this.variables = new HashMap<Integer,Double>(); } this.variables.put(key, val); } public Map<Integer,Double> get_variables() { return this.variables; } public LogRecord set_variables(Map<Integer,Double> variables) { this.variables = variables; return this; } public void unset_variables() { this.variables = null; } /** Returns true if field variables is set (has been asigned a value) and false otherwise */ public boolean is_set_variables() { return this.variables != null; } public void set_variables_isSet(boolean value) { if (!value) { this.variables = null; } } public int get_categories_size() { return (this.categories == null) ? 0 : this.categories.size(); } public void put_to_categories(String key, String val) { if (this.categories == null) { this.categories = new HashMap<String,String>(); } this.categories.put(key, val); } public Map<String,String> get_categories() { return this.categories; } public LogRecord set_categories(Map<String,String> categories) { this.categories = categories; return this; } public void unset_categories() { this.categories = null; } /** Returns true if field categories is set (has been asigned a value) and false otherwise */ public boolean is_set_categories() { return this.categories != null; } public void set_categories_isSet(boolean value) { if (!value) { this.categories = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case ID: if (value == null) { unset_id(); } else { set_id((Long)value); } break; case TIMESTAMP_MS: if (value == null) { unset_timestamp_ms(); } else { set_timestamp_ms((Long)value); } break; case INDEX_CODE: if (value == null) { unset_index_code(); } else { set_index_code((String)value); } break; case DOCID: if (value == null) { unset_docid(); } else { set_docid((String)value); } break; case DELETED: if (value == null) { unset_deleted(); } else { set_deleted((Boolean)value); } break; case FIELDS: if (value == null) { unset_fields(); } else { set_fields((Map<String,String>)value); } break; case VARIABLES: if (value == null) { unset_variables(); } else { set_variables((Map<Integer,Double>)value); } break; case CATEGORIES: if (value == null) { unset_categories(); } else { set_categories((Map<String,String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case ID: return new Long(get_id()); case TIMESTAMP_MS: return new Long(get_timestamp_ms()); case INDEX_CODE: return get_index_code(); case DOCID: return get_docid(); case DELETED: return new Boolean(is_deleted()); case FIELDS: return get_fields(); case VARIABLES: return get_variables(); case CATEGORIES: return get_categories(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case ID: return is_set_id(); case TIMESTAMP_MS: return is_set_timestamp_ms(); case INDEX_CODE: return is_set_index_code(); case DOCID: return is_set_docid(); case DELETED: return is_set_deleted(); case FIELDS: return is_set_fields(); case VARIABLES: return is_set_variables(); case CATEGORIES: return is_set_categories(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof LogRecord) return this.equals((LogRecord)that); return false; } public boolean equals(LogRecord that) { if (that == null) return false; boolean this_present_id = true && this.is_set_id(); boolean that_present_id = true && that.is_set_id(); if (this_present_id || that_present_id) { if (!(this_present_id && that_present_id)) return false; if (this.id != that.id) return false; } boolean this_present_timestamp_ms = true && this.is_set_timestamp_ms(); boolean that_present_timestamp_ms = true && that.is_set_timestamp_ms(); if (this_present_timestamp_ms || that_present_timestamp_ms) { if (!(this_present_timestamp_ms && that_present_timestamp_ms)) return false; if (this.timestamp_ms != that.timestamp_ms) return false; } boolean this_present_index_code = true && this.is_set_index_code(); boolean that_present_index_code = true && that.is_set_index_code(); if (this_present_index_code || that_present_index_code) { if (!(this_present_index_code && that_present_index_code)) return false; if (!this.index_code.equals(that.index_code)) return false; } boolean this_present_docid = true && this.is_set_docid(); boolean that_present_docid = true && that.is_set_docid(); if (this_present_docid || that_present_docid) { if (!(this_present_docid && that_present_docid)) return false; if (!this.docid.equals(that.docid)) return false; } boolean this_present_deleted = true; boolean that_present_deleted = true; if (this_present_deleted || that_present_deleted) { if (!(this_present_deleted && that_present_deleted)) return false; if (this.deleted != that.deleted) return false; } boolean this_present_fields = true && this.is_set_fields(); boolean that_present_fields = true && that.is_set_fields(); if (this_present_fields || that_present_fields) { if (!(this_present_fields && that_present_fields)) return false; if (!this.fields.equals(that.fields)) return false; } boolean this_present_variables = true && this.is_set_variables(); boolean that_present_variables = true && that.is_set_variables(); if (this_present_variables || that_present_variables) { if (!(this_present_variables && that_present_variables)) return false; if (!this.variables.equals(that.variables)) return false; } boolean this_present_categories = true && this.is_set_categories(); boolean that_present_categories = true && that.is_set_categories(); if (this_present_categories || that_present_categories) { if (!(this_present_categories && that_present_categories)) return false; if (!this.categories.equals(that.categories)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(LogRecord other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; LogRecord typedOther = (LogRecord)other; lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id()); if (lastComparison != 0) { return lastComparison; } if (is_set_id()) { lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_timestamp_ms()).compareTo(typedOther.is_set_timestamp_ms()); if (lastComparison != 0) { return lastComparison; } if (is_set_timestamp_ms()) { lastComparison = TBaseHelper.compareTo(this.timestamp_ms, typedOther.timestamp_ms); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code()); if (lastComparison != 0) { return lastComparison; } if (is_set_index_code()) { lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_docid()).compareTo(typedOther.is_set_docid()); if (lastComparison != 0) { return lastComparison; } if (is_set_docid()) { lastComparison = TBaseHelper.compareTo(this.docid, typedOther.docid); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_deleted()).compareTo(typedOther.is_set_deleted()); if (lastComparison != 0) { return lastComparison; } if (is_set_deleted()) { lastComparison = TBaseHelper.compareTo(this.deleted, typedOther.deleted); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_fields()).compareTo(typedOther.is_set_fields()); if (lastComparison != 0) { return lastComparison; } if (is_set_fields()) { lastComparison = TBaseHelper.compareTo(this.fields, typedOther.fields); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_variables()).compareTo(typedOther.is_set_variables()); if (lastComparison != 0) { return lastComparison; } if (is_set_variables()) { lastComparison = TBaseHelper.compareTo(this.variables, typedOther.variables); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_categories()).compareTo(typedOther.is_set_categories()); if (lastComparison != 0) { return lastComparison; } if (is_set_categories()) { lastComparison = TBaseHelper.compareTo(this.categories, typedOther.categories); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 1: // ID if (field.type == TType.I64) { this.id = iprot.readI64(); set_id_isSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 2: // TIMESTAMP_MS if (field.type == TType.I64) { this.timestamp_ms = iprot.readI64(); set_timestamp_ms_isSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 3: // INDEX_CODE if (field.type == TType.STRING) { this.index_code = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 4: // DOCID if (field.type == TType.STRING) { this.docid = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 5: // DELETED if (field.type == TType.BOOL) { this.deleted = iprot.readBool(); set_deleted_isSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 6: // FIELDS if (field.type == TType.MAP) { { TMap _map59 = iprot.readMapBegin(); this.fields = new HashMap<String,String>(2*_map59.size); for (int _i60 = 0; _i60 < _map59.size; ++_i60) { String _key61; String _val62; _key61 = iprot.readString(); _val62 = iprot.readString(); this.fields.put(_key61, _val62); } iprot.readMapEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case 7: // VARIABLES if (field.type == TType.MAP) { { TMap _map63 = iprot.readMapBegin(); this.variables = new HashMap<Integer,Double>(2*_map63.size); for (int _i64 = 0; _i64 < _map63.size; ++_i64) { int _key65; double _val66; _key65 = iprot.readI32(); _val66 = iprot.readDouble(); this.variables.put(_key65, _val66); } iprot.readMapEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; case 8: // CATEGORIES if (field.type == TType.MAP) { { TMap _map67 = iprot.readMapBegin(); this.categories = new HashMap<String,String>(2*_map67.size); for (int _i68 = 0; _i68 < _map67.size; ++_i68) { String _key69; String _val70; _key69 = iprot.readString(); _val70 = iprot.readString(); this.categories.put(_key69, _val70); } iprot.readMapEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (is_set_id()) { oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI64(this.id); oprot.writeFieldEnd(); } if (is_set_timestamp_ms()) { oprot.writeFieldBegin(TIMESTAMP_MS_FIELD_DESC); oprot.writeI64(this.timestamp_ms); oprot.writeFieldEnd(); } if (this.index_code != null) { if (is_set_index_code()) { oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC); oprot.writeString(this.index_code); oprot.writeFieldEnd(); } } if (this.docid != null) { oprot.writeFieldBegin(DOCID_FIELD_DESC); oprot.writeString(this.docid); oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETED_FIELD_DESC); oprot.writeBool(this.deleted); oprot.writeFieldEnd(); if (this.fields != null) { if (is_set_fields()) { oprot.writeFieldBegin(FIELDS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.fields.size())); for (Map.Entry<String, String> _iter71 : this.fields.entrySet()) { oprot.writeString(_iter71.getKey()); oprot.writeString(_iter71.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } if (this.variables != null) { if (is_set_variables()) { oprot.writeFieldBegin(VARIABLES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.I32, TType.DOUBLE, this.variables.size())); for (Map.Entry<Integer, Double> _iter72 : this.variables.entrySet()) { oprot.writeI32(_iter72.getKey()); oprot.writeDouble(_iter72.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } if (this.categories != null) { if (is_set_categories()) { oprot.writeFieldBegin(CATEGORIES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.categories.size())); for (Map.Entry<String, String> _iter73 : this.categories.entrySet()) { oprot.writeString(_iter73.getKey()); oprot.writeString(_iter73.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("LogRecord("); boolean first = true; if (is_set_id()) { sb.append("id:"); sb.append(this.id); first = false; } if (is_set_timestamp_ms()) { if (!first) sb.append(", "); sb.append("timestamp_ms:"); sb.append(this.timestamp_ms); first = false; } if (is_set_index_code()) { if (!first) sb.append(", "); sb.append("index_code:"); if (this.index_code == null) { sb.append("null"); } else { sb.append(this.index_code); } first = false; } if (!first) sb.append(", "); sb.append("docid:"); if (this.docid == null) { sb.append("null"); } else { sb.append(this.docid); } first = false; if (!first) sb.append(", "); sb.append("deleted:"); sb.append(this.deleted); first = false; if (is_set_fields()) { if (!first) sb.append(", "); sb.append("fields:"); if (this.fields == null) { sb.append("null"); } else { sb.append(this.fields); } first = false; } if (is_set_variables()) { if (!first) sb.append(", "); sb.append("variables:"); if (this.variables == null) { sb.append("null"); } else { sb.append(this.variables); } first = false; } if (is_set_categories()) { if (!first) sb.append(", "); sb.append("categories:"); if (this.categories == null) { sb.append("null"); } else { sb.append(this.categories); } first = false; } sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } }