TGetOlapTableMetaResult.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 TGetOlapTableMetaResult implements org.apache.thrift.TBase<TGetOlapTableMetaResult, TGetOlapTableMetaResult._Fields>, java.io.Serializable, Cloneable, Comparable<TGetOlapTableMetaResult> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOlapTableMetaResult");

  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
  private static final org.apache.thrift.protocol.TField TABLE_META_FIELD_DESC = new org.apache.thrift.protocol.TField("table_meta", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField UPDATED_PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("updated_partitions", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField REMOVED_PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("removed_partitions", org.apache.thrift.protocol.TType.LIST, (short)4);

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

  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status; // required
  public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer table_meta; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> updated_partitions; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> removed_partitions; // 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 {
    STATUS((short)1, "status"),
    TABLE_META((short)2, "table_meta"),
    UPDATED_PARTITIONS((short)3, "updated_partitions"),
    REMOVED_PARTITIONS((short)4, "removed_partitions");

    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: // STATUS
          return STATUS;
        case 2: // TABLE_META
          return TABLE_META;
        case 3: // UPDATED_PARTITIONS
          return UPDATED_PARTITIONS;
        case 4: // REMOVED_PARTITIONS
          return REMOVED_PARTITIONS;
        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 _Fields optionals[] = {_Fields.UPDATED_PARTITIONS,_Fields.REMOVED_PARTITIONS};
  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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TStatus.class)));
    tmpMap.put(_Fields.TABLE_META, new org.apache.thrift.meta_data.FieldMetaData("table_meta", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
    tmpMap.put(_Fields.UPDATED_PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("updated_partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true))));
    tmpMap.put(_Fields.REMOVED_PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("removed_partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetOlapTableMetaResult.class, metaDataMap);
  }

  public TGetOlapTableMetaResult() {
  }

  public TGetOlapTableMetaResult(
    org.apache.doris.thrift.TStatus status,
    java.nio.ByteBuffer table_meta)
  {
    this();
    this.status = status;
    this.table_meta = org.apache.thrift.TBaseHelper.copyBinary(table_meta);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TGetOlapTableMetaResult(TGetOlapTableMetaResult other) {
    if (other.isSetStatus()) {
      this.status = new org.apache.doris.thrift.TStatus(other.status);
    }
    if (other.isSetTableMeta()) {
      this.table_meta = org.apache.thrift.TBaseHelper.copyBinary(other.table_meta);
    }
    if (other.isSetUpdatedPartitions()) {
      java.util.List<java.nio.ByteBuffer> __this__updated_partitions = new java.util.ArrayList<java.nio.ByteBuffer>(other.updated_partitions);
      this.updated_partitions = __this__updated_partitions;
    }
    if (other.isSetRemovedPartitions()) {
      java.util.List<java.lang.Long> __this__removed_partitions = new java.util.ArrayList<java.lang.Long>(other.removed_partitions);
      this.removed_partitions = __this__removed_partitions;
    }
  }

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

  @Override
  public void clear() {
    this.status = null;
    this.table_meta = null;
    this.updated_partitions = null;
    this.removed_partitions = null;
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TStatus getStatus() {
    return this.status;
  }

  public TGetOlapTableMetaResult setStatus(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status) {
    this.status = status;
    return this;
  }

  public void unsetStatus() {
    this.status = null;
  }

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

  public void setStatusIsSet(boolean value) {
    if (!value) {
      this.status = null;
    }
  }

  public byte[] getTableMeta() {
    setTableMeta(org.apache.thrift.TBaseHelper.rightSize(table_meta));
    return table_meta == null ? null : table_meta.array();
  }

  public java.nio.ByteBuffer bufferForTableMeta() {
    return org.apache.thrift.TBaseHelper.copyBinary(table_meta);
  }

  public TGetOlapTableMetaResult setTableMeta(byte[] table_meta) {
    this.table_meta = table_meta == null ? (java.nio.ByteBuffer)null   : java.nio.ByteBuffer.wrap(table_meta.clone());
    return this;
  }

  public TGetOlapTableMetaResult setTableMeta(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer table_meta) {
    this.table_meta = org.apache.thrift.TBaseHelper.copyBinary(table_meta);
    return this;
  }

  public void unsetTableMeta() {
    this.table_meta = null;
  }

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

  public void setTableMetaIsSet(boolean value) {
    if (!value) {
      this.table_meta = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.nio.ByteBuffer> getUpdatedPartitionsIterator() {
    return (this.updated_partitions == null) ? null : this.updated_partitions.iterator();
  }

  public void addToUpdatedPartitions(java.nio.ByteBuffer elem) {
    if (this.updated_partitions == null) {
      this.updated_partitions = new java.util.ArrayList<java.nio.ByteBuffer>();
    }
    this.updated_partitions.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.nio.ByteBuffer> getUpdatedPartitions() {
    return this.updated_partitions;
  }

  public TGetOlapTableMetaResult setUpdatedPartitions(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> updated_partitions) {
    this.updated_partitions = updated_partitions;
    return this;
  }

  public void unsetUpdatedPartitions() {
    this.updated_partitions = null;
  }

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

  public void setUpdatedPartitionsIsSet(boolean value) {
    if (!value) {
      this.updated_partitions = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.Long> getRemovedPartitionsIterator() {
    return (this.removed_partitions == null) ? null : this.removed_partitions.iterator();
  }

  public void addToRemovedPartitions(long elem) {
    if (this.removed_partitions == null) {
      this.removed_partitions = new java.util.ArrayList<java.lang.Long>();
    }
    this.removed_partitions.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Long> getRemovedPartitions() {
    return this.removed_partitions;
  }

  public TGetOlapTableMetaResult setRemovedPartitions(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> removed_partitions) {
    this.removed_partitions = removed_partitions;
    return this;
  }

  public void unsetRemovedPartitions() {
    this.removed_partitions = null;
  }

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

  public void setRemovedPartitionsIsSet(boolean value) {
    if (!value) {
      this.removed_partitions = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case STATUS:
      if (value == null) {
        unsetStatus();
      } else {
        setStatus((org.apache.doris.thrift.TStatus)value);
      }
      break;

    case TABLE_META:
      if (value == null) {
        unsetTableMeta();
      } else {
        if (value instanceof byte[]) {
          setTableMeta((byte[])value);
        } else {
          setTableMeta((java.nio.ByteBuffer)value);
        }
      }
      break;

    case UPDATED_PARTITIONS:
      if (value == null) {
        unsetUpdatedPartitions();
      } else {
        setUpdatedPartitions((java.util.List<java.nio.ByteBuffer>)value);
      }
      break;

    case REMOVED_PARTITIONS:
      if (value == null) {
        unsetRemovedPartitions();
      } else {
        setRemovedPartitions((java.util.List<java.lang.Long>)value);
      }
      break;

    }
  }

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

    case TABLE_META:
      return getTableMeta();

    case UPDATED_PARTITIONS:
      return getUpdatedPartitions();

    case REMOVED_PARTITIONS:
      return getRemovedPartitions();

    }
    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 STATUS:
      return isSetStatus();
    case TABLE_META:
      return isSetTableMeta();
    case UPDATED_PARTITIONS:
      return isSetUpdatedPartitions();
    case REMOVED_PARTITIONS:
      return isSetRemovedPartitions();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_status = true && this.isSetStatus();
    boolean that_present_status = true && that.isSetStatus();
    if (this_present_status || that_present_status) {
      if (!(this_present_status && that_present_status))
        return false;
      if (!this.status.equals(that.status))
        return false;
    }

    boolean this_present_table_meta = true && this.isSetTableMeta();
    boolean that_present_table_meta = true && that.isSetTableMeta();
    if (this_present_table_meta || that_present_table_meta) {
      if (!(this_present_table_meta && that_present_table_meta))
        return false;
      if (!this.table_meta.equals(that.table_meta))
        return false;
    }

    boolean this_present_updated_partitions = true && this.isSetUpdatedPartitions();
    boolean that_present_updated_partitions = true && that.isSetUpdatedPartitions();
    if (this_present_updated_partitions || that_present_updated_partitions) {
      if (!(this_present_updated_partitions && that_present_updated_partitions))
        return false;
      if (!this.updated_partitions.equals(that.updated_partitions))
        return false;
    }

    boolean this_present_removed_partitions = true && this.isSetRemovedPartitions();
    boolean that_present_removed_partitions = true && that.isSetRemovedPartitions();
    if (this_present_removed_partitions || that_present_removed_partitions) {
      if (!(this_present_removed_partitions && that_present_removed_partitions))
        return false;
      if (!this.removed_partitions.equals(that.removed_partitions))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
    if (isSetStatus())
      hashCode = hashCode * 8191 + status.hashCode();

    hashCode = hashCode * 8191 + ((isSetTableMeta()) ? 131071 : 524287);
    if (isSetTableMeta())
      hashCode = hashCode * 8191 + table_meta.hashCode();

    hashCode = hashCode * 8191 + ((isSetUpdatedPartitions()) ? 131071 : 524287);
    if (isSetUpdatedPartitions())
      hashCode = hashCode * 8191 + updated_partitions.hashCode();

    hashCode = hashCode * 8191 + ((isSetRemovedPartitions()) ? 131071 : 524287);
    if (isSetRemovedPartitions())
      hashCode = hashCode * 8191 + removed_partitions.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableMeta(), other.isSetTableMeta());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableMeta()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_meta, other.table_meta);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUpdatedPartitions(), other.isSetUpdatedPartitions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUpdatedPartitions()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updated_partitions, other.updated_partitions);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRemovedPartitions(), other.isSetRemovedPartitions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRemovedPartitions()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.removed_partitions, other.removed_partitions);
      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("TGetOlapTableMetaResult(");
    boolean first = true;

    sb.append("status:");
    if (this.status == null) {
      sb.append("null");
    } else {
      sb.append(this.status);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("table_meta:");
    if (this.table_meta == null) {
      sb.append("null");
    } else {
      org.apache.thrift.TBaseHelper.toString(this.table_meta, sb);
    }
    first = false;
    if (isSetUpdatedPartitions()) {
      if (!first) sb.append(", ");
      sb.append("updated_partitions:");
      if (this.updated_partitions == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.updated_partitions, sb);
      }
      first = false;
    }
    if (isSetRemovedPartitions()) {
      if (!first) sb.append(", ");
      sb.append("removed_partitions:");
      if (this.removed_partitions == null) {
        sb.append("null");
      } else {
        sb.append(this.removed_partitions);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (status == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString());
    }
    if (table_meta == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'table_meta' was not present! Struct: " + toString());
    }
    // check for sub-struct validity
    if (status != null) {
      status.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, java.lang.ClassNotFoundException {
    try {
      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 TGetOlapTableMetaResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TGetOlapTableMetaResultStandardScheme getScheme() {
      return new TGetOlapTableMetaResultStandardScheme();
    }
  }

  private static class TGetOlapTableMetaResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGetOlapTableMetaResult> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOlapTableMetaResult 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: // STATUS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.status = new org.apache.doris.thrift.TStatus();
              struct.status.read(iprot);
              struct.setStatusIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TABLE_META
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.table_meta = iprot.readBinary();
              struct.setTableMetaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // UPDATED_PARTITIONS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list976 = iprot.readListBegin();
                struct.updated_partitions = new java.util.ArrayList<java.nio.ByteBuffer>(_list976.size);
                @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem977;
                for (int _i978 = 0; _i978 < _list976.size; ++_i978)
                {
                  _elem977 = iprot.readBinary();
                  struct.updated_partitions.add(_elem977);
                }
                iprot.readListEnd();
              }
              struct.setUpdatedPartitionsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // REMOVED_PARTITIONS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list979 = iprot.readListBegin();
                struct.removed_partitions = new java.util.ArrayList<java.lang.Long>(_list979.size);
                long _elem980;
                for (int _i981 = 0; _i981 < _list979.size; ++_i981)
                {
                  _elem980 = iprot.readI64();
                  struct.removed_partitions.add(_elem980);
                }
                iprot.readListEnd();
              }
              struct.setRemovedPartitionsIsSet(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, TGetOlapTableMetaResult struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.status != null) {
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
        struct.status.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.table_meta != null) {
        oprot.writeFieldBegin(TABLE_META_FIELD_DESC);
        oprot.writeBinary(struct.table_meta);
        oprot.writeFieldEnd();
      }
      if (struct.updated_partitions != null) {
        if (struct.isSetUpdatedPartitions()) {
          oprot.writeFieldBegin(UPDATED_PARTITIONS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.updated_partitions.size()));
            for (java.nio.ByteBuffer _iter982 : struct.updated_partitions)
            {
              oprot.writeBinary(_iter982);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.removed_partitions != null) {
        if (struct.isSetRemovedPartitions()) {
          oprot.writeFieldBegin(REMOVED_PARTITIONS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.removed_partitions.size()));
            for (long _iter983 : struct.removed_partitions)
            {
              oprot.writeI64(_iter983);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TGetOlapTableMetaResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGetOlapTableMetaResult> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TGetOlapTableMetaResult struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.status.write(oprot);
      oprot.writeBinary(struct.table_meta);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetUpdatedPartitions()) {
        optionals.set(0);
      }
      if (struct.isSetRemovedPartitions()) {
        optionals.set(1);
      }
      oprot.writeBitSet(optionals, 2);
      if (struct.isSetUpdatedPartitions()) {
        {
          oprot.writeI32(struct.updated_partitions.size());
          for (java.nio.ByteBuffer _iter984 : struct.updated_partitions)
          {
            oprot.writeBinary(_iter984);
          }
        }
      }
      if (struct.isSetRemovedPartitions()) {
        {
          oprot.writeI32(struct.removed_partitions.size());
          for (long _iter985 : struct.removed_partitions)
          {
            oprot.writeI64(_iter985);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TGetOlapTableMetaResult struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.status = new org.apache.doris.thrift.TStatus();
      struct.status.read(iprot);
      struct.setStatusIsSet(true);
      struct.table_meta = iprot.readBinary();
      struct.setTableMetaIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(2);
      if (incoming.get(0)) {
        {
          org.apache.thrift.protocol.TList _list986 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.updated_partitions = new java.util.ArrayList<java.nio.ByteBuffer>(_list986.size);
          @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem987;
          for (int _i988 = 0; _i988 < _list986.size; ++_i988)
          {
            _elem987 = iprot.readBinary();
            struct.updated_partitions.add(_elem987);
          }
        }
        struct.setUpdatedPartitionsIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TList _list989 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
          struct.removed_partitions = new java.util.ArrayList<java.lang.Long>(_list989.size);
          long _elem990;
          for (int _i991 = 0; _i991 < _list989.size; ++_i991)
          {
            _elem990 = iprot.readI64();
            struct.removed_partitions.add(_elem990);
          }
        }
        struct.setRemovedPartitionsIsSet(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();
  }
}