TSearchFieldBinding.java

/**
 * Autogenerated by Thrift Compiler (0.16.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.doris.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TSearchFieldBinding implements org.apache.thrift.TBase<TSearchFieldBinding, TSearchFieldBinding._Fields>, java.io.Serializable, Cloneable, Comparable<TSearchFieldBinding> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSearchFieldBinding");

  private static final org.apache.thrift.protocol.TField FIELD_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("field_name", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField SLOT_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("slot_index", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField PARENT_FIELD_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_field_name", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField SUBCOLUMN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("subcolumn_path", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField IS_VARIANT_SUBCOLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("is_variant_subcolumn", org.apache.thrift.protocol.TType.BOOL, (short)5);
  private static final org.apache.thrift.protocol.TField INDEX_PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("index_properties", org.apache.thrift.protocol.TType.MAP, (short)6);

  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSearchFieldBindingStandardSchemeFactory();
  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSearchFieldBindingTupleSchemeFactory();

  public @org.apache.thrift.annotation.Nullable java.lang.String field_name; // required
  public int slot_index; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String parent_field_name; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String subcolumn_path; // optional
  public boolean is_variant_subcolumn; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> index_properties; // 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 {
    FIELD_NAME((short)1, "field_name"),
    SLOT_INDEX((short)2, "slot_index"),
    PARENT_FIELD_NAME((short)3, "parent_field_name"),
    SUBCOLUMN_PATH((short)4, "subcolumn_path"),
    IS_VARIANT_SUBCOLUMN((short)5, "is_variant_subcolumn"),
    INDEX_PROPERTIES((short)6, "index_properties");

    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

    static {
      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // FIELD_NAME
          return FIELD_NAME;
        case 2: // SLOT_INDEX
          return SLOT_INDEX;
        case 3: // PARENT_FIELD_NAME
          return PARENT_FIELD_NAME;
        case 4: // SUBCOLUMN_PATH
          return SUBCOLUMN_PATH;
        case 5: // IS_VARIANT_SUBCOLUMN
          return IS_VARIANT_SUBCOLUMN;
        case 6: // INDEX_PROPERTIES
          return INDEX_PROPERTIES;
        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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByName(java.lang.String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final java.lang.String _fieldName;

    _Fields(short thriftId, java.lang.String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __SLOT_INDEX_ISSET_ID = 0;
  private static final int __IS_VARIANT_SUBCOLUMN_ISSET_ID = 1;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.PARENT_FIELD_NAME,_Fields.SUBCOLUMN_PATH,_Fields.IS_VARIANT_SUBCOLUMN,_Fields.INDEX_PROPERTIES};
  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.FIELD_NAME, new org.apache.thrift.meta_data.FieldMetaData("field_name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SLOT_INDEX, new org.apache.thrift.meta_data.FieldMetaData("slot_index", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.PARENT_FIELD_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_field_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SUBCOLUMN_PATH, new org.apache.thrift.meta_data.FieldMetaData("subcolumn_path", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IS_VARIANT_SUBCOLUMN, new org.apache.thrift.meta_data.FieldMetaData("is_variant_subcolumn", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.INDEX_PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("index_properties", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSearchFieldBinding.class, metaDataMap);
  }

  public TSearchFieldBinding() {
  }

  public TSearchFieldBinding(
    java.lang.String field_name,
    int slot_index)
  {
    this();
    this.field_name = field_name;
    this.slot_index = slot_index;
    setSlotIndexIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TSearchFieldBinding(TSearchFieldBinding other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetFieldName()) {
      this.field_name = other.field_name;
    }
    this.slot_index = other.slot_index;
    if (other.isSetParentFieldName()) {
      this.parent_field_name = other.parent_field_name;
    }
    if (other.isSetSubcolumnPath()) {
      this.subcolumn_path = other.subcolumn_path;
    }
    this.is_variant_subcolumn = other.is_variant_subcolumn;
    if (other.isSetIndexProperties()) {
      java.util.Map<java.lang.String,java.lang.String> __this__index_properties = new java.util.HashMap<java.lang.String,java.lang.String>(other.index_properties);
      this.index_properties = __this__index_properties;
    }
  }

  public TSearchFieldBinding deepCopy() {
    return new TSearchFieldBinding(this);
  }

  @Override
  public void clear() {
    this.field_name = null;
    setSlotIndexIsSet(false);
    this.slot_index = 0;
    this.parent_field_name = null;
    this.subcolumn_path = null;
    setIsVariantSubcolumnIsSet(false);
    this.is_variant_subcolumn = false;
    this.index_properties = null;
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getFieldName() {
    return this.field_name;
  }

  public TSearchFieldBinding setFieldName(@org.apache.thrift.annotation.Nullable java.lang.String field_name) {
    this.field_name = field_name;
    return this;
  }

  public void unsetFieldName() {
    this.field_name = null;
  }

  /** Returns true if field field_name is set (has been assigned a value) and false otherwise */
  public boolean isSetFieldName() {
    return this.field_name != null;
  }

  public void setFieldNameIsSet(boolean value) {
    if (!value) {
      this.field_name = null;
    }
  }

  public int getSlotIndex() {
    return this.slot_index;
  }

  public TSearchFieldBinding setSlotIndex(int slot_index) {
    this.slot_index = slot_index;
    setSlotIndexIsSet(true);
    return this;
  }

  public void unsetSlotIndex() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SLOT_INDEX_ISSET_ID);
  }

  /** Returns true if field slot_index is set (has been assigned a value) and false otherwise */
  public boolean isSetSlotIndex() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SLOT_INDEX_ISSET_ID);
  }

  public void setSlotIndexIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SLOT_INDEX_ISSET_ID, value);
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getParentFieldName() {
    return this.parent_field_name;
  }

  public TSearchFieldBinding setParentFieldName(@org.apache.thrift.annotation.Nullable java.lang.String parent_field_name) {
    this.parent_field_name = parent_field_name;
    return this;
  }

  public void unsetParentFieldName() {
    this.parent_field_name = null;
  }

  /** Returns true if field parent_field_name is set (has been assigned a value) and false otherwise */
  public boolean isSetParentFieldName() {
    return this.parent_field_name != null;
  }

  public void setParentFieldNameIsSet(boolean value) {
    if (!value) {
      this.parent_field_name = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getSubcolumnPath() {
    return this.subcolumn_path;
  }

  public TSearchFieldBinding setSubcolumnPath(@org.apache.thrift.annotation.Nullable java.lang.String subcolumn_path) {
    this.subcolumn_path = subcolumn_path;
    return this;
  }

  public void unsetSubcolumnPath() {
    this.subcolumn_path = null;
  }

  /** Returns true if field subcolumn_path is set (has been assigned a value) and false otherwise */
  public boolean isSetSubcolumnPath() {
    return this.subcolumn_path != null;
  }

  public void setSubcolumnPathIsSet(boolean value) {
    if (!value) {
      this.subcolumn_path = null;
    }
  }

  public boolean isIsVariantSubcolumn() {
    return this.is_variant_subcolumn;
  }

  public TSearchFieldBinding setIsVariantSubcolumn(boolean is_variant_subcolumn) {
    this.is_variant_subcolumn = is_variant_subcolumn;
    setIsVariantSubcolumnIsSet(true);
    return this;
  }

  public void unsetIsVariantSubcolumn() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_VARIANT_SUBCOLUMN_ISSET_ID);
  }

  /** Returns true if field is_variant_subcolumn is set (has been assigned a value) and false otherwise */
  public boolean isSetIsVariantSubcolumn() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_VARIANT_SUBCOLUMN_ISSET_ID);
  }

  public void setIsVariantSubcolumnIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_VARIANT_SUBCOLUMN_ISSET_ID, value);
  }

  public int getIndexPropertiesSize() {
    return (this.index_properties == null) ? 0 : this.index_properties.size();
  }

  public void putToIndexProperties(java.lang.String key, java.lang.String val) {
    if (this.index_properties == null) {
      this.index_properties = new java.util.HashMap<java.lang.String,java.lang.String>();
    }
    this.index_properties.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.String,java.lang.String> getIndexProperties() {
    return this.index_properties;
  }

  public TSearchFieldBinding setIndexProperties(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> index_properties) {
    this.index_properties = index_properties;
    return this;
  }

  public void unsetIndexProperties() {
    this.index_properties = null;
  }

  /** Returns true if field index_properties is set (has been assigned a value) and false otherwise */
  public boolean isSetIndexProperties() {
    return this.index_properties != null;
  }

  public void setIndexPropertiesIsSet(boolean value) {
    if (!value) {
      this.index_properties = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case FIELD_NAME:
      if (value == null) {
        unsetFieldName();
      } else {
        setFieldName((java.lang.String)value);
      }
      break;

    case SLOT_INDEX:
      if (value == null) {
        unsetSlotIndex();
      } else {
        setSlotIndex((java.lang.Integer)value);
      }
      break;

    case PARENT_FIELD_NAME:
      if (value == null) {
        unsetParentFieldName();
      } else {
        setParentFieldName((java.lang.String)value);
      }
      break;

    case SUBCOLUMN_PATH:
      if (value == null) {
        unsetSubcolumnPath();
      } else {
        setSubcolumnPath((java.lang.String)value);
      }
      break;

    case IS_VARIANT_SUBCOLUMN:
      if (value == null) {
        unsetIsVariantSubcolumn();
      } else {
        setIsVariantSubcolumn((java.lang.Boolean)value);
      }
      break;

    case INDEX_PROPERTIES:
      if (value == null) {
        unsetIndexProperties();
      } else {
        setIndexProperties((java.util.Map<java.lang.String,java.lang.String>)value);
      }
      break;

    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case FIELD_NAME:
      return getFieldName();

    case SLOT_INDEX:
      return getSlotIndex();

    case PARENT_FIELD_NAME:
      return getParentFieldName();

    case SUBCOLUMN_PATH:
      return getSubcolumnPath();

    case IS_VARIANT_SUBCOLUMN:
      return isIsVariantSubcolumn();

    case INDEX_PROPERTIES:
      return getIndexProperties();

    }
    throw new java.lang.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 java.lang.IllegalArgumentException();
    }

    switch (field) {
    case FIELD_NAME:
      return isSetFieldName();
    case SLOT_INDEX:
      return isSetSlotIndex();
    case PARENT_FIELD_NAME:
      return isSetParentFieldName();
    case SUBCOLUMN_PATH:
      return isSetSubcolumnPath();
    case IS_VARIANT_SUBCOLUMN:
      return isSetIsVariantSubcolumn();
    case INDEX_PROPERTIES:
      return isSetIndexProperties();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that instanceof TSearchFieldBinding)
      return this.equals((TSearchFieldBinding)that);
    return false;
  }

  public boolean equals(TSearchFieldBinding that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_field_name = true && this.isSetFieldName();
    boolean that_present_field_name = true && that.isSetFieldName();
    if (this_present_field_name || that_present_field_name) {
      if (!(this_present_field_name && that_present_field_name))
        return false;
      if (!this.field_name.equals(that.field_name))
        return false;
    }

    boolean this_present_slot_index = true;
    boolean that_present_slot_index = true;
    if (this_present_slot_index || that_present_slot_index) {
      if (!(this_present_slot_index && that_present_slot_index))
        return false;
      if (this.slot_index != that.slot_index)
        return false;
    }

    boolean this_present_parent_field_name = true && this.isSetParentFieldName();
    boolean that_present_parent_field_name = true && that.isSetParentFieldName();
    if (this_present_parent_field_name || that_present_parent_field_name) {
      if (!(this_present_parent_field_name && that_present_parent_field_name))
        return false;
      if (!this.parent_field_name.equals(that.parent_field_name))
        return false;
    }

    boolean this_present_subcolumn_path = true && this.isSetSubcolumnPath();
    boolean that_present_subcolumn_path = true && that.isSetSubcolumnPath();
    if (this_present_subcolumn_path || that_present_subcolumn_path) {
      if (!(this_present_subcolumn_path && that_present_subcolumn_path))
        return false;
      if (!this.subcolumn_path.equals(that.subcolumn_path))
        return false;
    }

    boolean this_present_is_variant_subcolumn = true && this.isSetIsVariantSubcolumn();
    boolean that_present_is_variant_subcolumn = true && that.isSetIsVariantSubcolumn();
    if (this_present_is_variant_subcolumn || that_present_is_variant_subcolumn) {
      if (!(this_present_is_variant_subcolumn && that_present_is_variant_subcolumn))
        return false;
      if (this.is_variant_subcolumn != that.is_variant_subcolumn)
        return false;
    }

    boolean this_present_index_properties = true && this.isSetIndexProperties();
    boolean that_present_index_properties = true && that.isSetIndexProperties();
    if (this_present_index_properties || that_present_index_properties) {
      if (!(this_present_index_properties && that_present_index_properties))
        return false;
      if (!this.index_properties.equals(that.index_properties))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + ((isSetFieldName()) ? 131071 : 524287);
    if (isSetFieldName())
      hashCode = hashCode * 8191 + field_name.hashCode();

    hashCode = hashCode * 8191 + slot_index;

    hashCode = hashCode * 8191 + ((isSetParentFieldName()) ? 131071 : 524287);
    if (isSetParentFieldName())
      hashCode = hashCode * 8191 + parent_field_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetSubcolumnPath()) ? 131071 : 524287);
    if (isSetSubcolumnPath())
      hashCode = hashCode * 8191 + subcolumn_path.hashCode();

    hashCode = hashCode * 8191 + ((isSetIsVariantSubcolumn()) ? 131071 : 524287);
    if (isSetIsVariantSubcolumn())
      hashCode = hashCode * 8191 + ((is_variant_subcolumn) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetIndexProperties()) ? 131071 : 524287);
    if (isSetIndexProperties())
      hashCode = hashCode * 8191 + index_properties.hashCode();

    return hashCode;
  }

  @Override
  public int compareTo(TSearchFieldBinding other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetFieldName(), other.isSetFieldName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFieldName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field_name, other.field_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSlotIndex(), other.isSetSlotIndex());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSlotIndex()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slot_index, other.slot_index);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetParentFieldName(), other.isSetParentFieldName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParentFieldName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_field_name, other.parent_field_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSubcolumnPath(), other.isSetSubcolumnPath());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSubcolumnPath()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.subcolumn_path, other.subcolumn_path);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsVariantSubcolumn(), other.isSetIsVariantSubcolumn());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsVariantSubcolumn()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_variant_subcolumn, other.is_variant_subcolumn);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIndexProperties(), other.isSetIndexProperties());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIndexProperties()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_properties, other.index_properties);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @org.apache.thrift.annotation.Nullable
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    scheme(oprot).write(oprot, this);
  }

  @Override
  public java.lang.String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder("TSearchFieldBinding(");
    boolean first = true;

    sb.append("field_name:");
    if (this.field_name == null) {
      sb.append("null");
    } else {
      sb.append(this.field_name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("slot_index:");
    sb.append(this.slot_index);
    first = false;
    if (isSetParentFieldName()) {
      if (!first) sb.append(", ");
      sb.append("parent_field_name:");
      if (this.parent_field_name == null) {
        sb.append("null");
      } else {
        sb.append(this.parent_field_name);
      }
      first = false;
    }
    if (isSetSubcolumnPath()) {
      if (!first) sb.append(", ");
      sb.append("subcolumn_path:");
      if (this.subcolumn_path == null) {
        sb.append("null");
      } else {
        sb.append(this.subcolumn_path);
      }
      first = false;
    }
    if (isSetIsVariantSubcolumn()) {
      if (!first) sb.append(", ");
      sb.append("is_variant_subcolumn:");
      sb.append(this.is_variant_subcolumn);
      first = false;
    }
    if (isSetIndexProperties()) {
      if (!first) sb.append(", ");
      sb.append("index_properties:");
      if (this.index_properties == null) {
        sb.append("null");
      } else {
        sb.append(this.index_properties);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (field_name == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'field_name' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'slot_index' because it's a primitive and you chose the non-beans generator.
    // check for sub-struct validity
  }

  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, java.lang.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 TSearchFieldBindingStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TSearchFieldBindingStandardScheme getScheme() {
      return new TSearchFieldBindingStandardScheme();
    }
  }

  private static class TSearchFieldBindingStandardScheme extends org.apache.thrift.scheme.StandardScheme<TSearchFieldBinding> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TSearchFieldBinding 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: // FIELD_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.field_name = iprot.readString();
              struct.setFieldNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SLOT_INDEX
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.slot_index = iprot.readI32();
              struct.setSlotIndexIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // PARENT_FIELD_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.parent_field_name = iprot.readString();
              struct.setParentFieldNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // SUBCOLUMN_PATH
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.subcolumn_path = iprot.readString();
              struct.setSubcolumnPathIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // IS_VARIANT_SUBCOLUMN
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_variant_subcolumn = iprot.readBool();
              struct.setIsVariantSubcolumnIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // INDEX_PROPERTIES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map34 = iprot.readMapBegin();
                struct.index_properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map34.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _key35;
                @org.apache.thrift.annotation.Nullable java.lang.String _val36;
                for (int _i37 = 0; _i37 < _map34.size; ++_i37)
                {
                  _key35 = iprot.readString();
                  _val36 = iprot.readString();
                  struct.index_properties.put(_key35, _val36);
                }
                iprot.readMapEnd();
              }
              struct.setIndexPropertiesIsSet(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
      if (!struct.isSetSlotIndex()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'slot_index' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, TSearchFieldBinding struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.field_name != null) {
        oprot.writeFieldBegin(FIELD_NAME_FIELD_DESC);
        oprot.writeString(struct.field_name);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(SLOT_INDEX_FIELD_DESC);
      oprot.writeI32(struct.slot_index);
      oprot.writeFieldEnd();
      if (struct.parent_field_name != null) {
        if (struct.isSetParentFieldName()) {
          oprot.writeFieldBegin(PARENT_FIELD_NAME_FIELD_DESC);
          oprot.writeString(struct.parent_field_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.subcolumn_path != null) {
        if (struct.isSetSubcolumnPath()) {
          oprot.writeFieldBegin(SUBCOLUMN_PATH_FIELD_DESC);
          oprot.writeString(struct.subcolumn_path);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetIsVariantSubcolumn()) {
        oprot.writeFieldBegin(IS_VARIANT_SUBCOLUMN_FIELD_DESC);
        oprot.writeBool(struct.is_variant_subcolumn);
        oprot.writeFieldEnd();
      }
      if (struct.index_properties != null) {
        if (struct.isSetIndexProperties()) {
          oprot.writeFieldBegin(INDEX_PROPERTIES_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.index_properties.size()));
            for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter38 : struct.index_properties.entrySet())
            {
              oprot.writeString(_iter38.getKey());
              oprot.writeString(_iter38.getValue());
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class TSearchFieldBindingTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TSearchFieldBindingTupleScheme getScheme() {
      return new TSearchFieldBindingTupleScheme();
    }
  }

  private static class TSearchFieldBindingTupleScheme extends org.apache.thrift.scheme.TupleScheme<TSearchFieldBinding> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TSearchFieldBinding struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeString(struct.field_name);
      oprot.writeI32(struct.slot_index);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetParentFieldName()) {
        optionals.set(0);
      }
      if (struct.isSetSubcolumnPath()) {
        optionals.set(1);
      }
      if (struct.isSetIsVariantSubcolumn()) {
        optionals.set(2);
      }
      if (struct.isSetIndexProperties()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetParentFieldName()) {
        oprot.writeString(struct.parent_field_name);
      }
      if (struct.isSetSubcolumnPath()) {
        oprot.writeString(struct.subcolumn_path);
      }
      if (struct.isSetIsVariantSubcolumn()) {
        oprot.writeBool(struct.is_variant_subcolumn);
      }
      if (struct.isSetIndexProperties()) {
        {
          oprot.writeI32(struct.index_properties.size());
          for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter39 : struct.index_properties.entrySet())
          {
            oprot.writeString(_iter39.getKey());
            oprot.writeString(_iter39.getValue());
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TSearchFieldBinding struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.field_name = iprot.readString();
      struct.setFieldNameIsSet(true);
      struct.slot_index = iprot.readI32();
      struct.setSlotIndexIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.parent_field_name = iprot.readString();
        struct.setParentFieldNameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.subcolumn_path = iprot.readString();
        struct.setSubcolumnPathIsSet(true);
      }
      if (incoming.get(2)) {
        struct.is_variant_subcolumn = iprot.readBool();
        struct.setIsVariantSubcolumnIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.thrift.protocol.TMap _map40 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); 
          struct.index_properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map40.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _key41;
          @org.apache.thrift.annotation.Nullable java.lang.String _val42;
          for (int _i43 = 0; _i43 < _map40.size; ++_i43)
          {
            _key41 = iprot.readString();
            _val42 = iprot.readString();
            struct.index_properties.put(_key41, _val42);
          }
        }
        struct.setIndexPropertiesIsSet(true);
      }
    }
  }

  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
  }
}