All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.iotdb.service.rpc.thrift.TSFetchMetadataResp Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Thrift Compiler (0.14.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.iotdb.service.rpc.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.14.1)", date = "2024-09-12")
public class TSFetchMetadataResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSFetchMetadataResp");

  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 METADATA_IN_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("metadataInJson", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField COLUMNS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("columnsList", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.STRING, (short)4);

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

  public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus status; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String metadataInJson; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List columnsList; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String dataType; // 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"),
    METADATA_IN_JSON((short)2, "metadataInJson"),
    COLUMNS_LIST((short)3, "columnsList"),
    DATA_TYPE((short)4, "dataType");

    private static final java.util.Map byName = new java.util.HashMap();

    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: // METADATA_IN_JSON
          return METADATA_IN_JSON;
        case 3: // COLUMNS_LIST
          return COLUMNS_LIST;
        case 4: // DATA_TYPE
          return DATA_TYPE;
        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.METADATA_IN_JSON,_Fields.COLUMNS_LIST,_Fields.DATA_TYPE};
  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.iotdb.common.rpc.thrift.TSStatus.class)));
    tmpMap.put(_Fields.METADATA_IN_JSON, new org.apache.thrift.meta_data.FieldMetaData("metadataInJson", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.COLUMNS_LIST, new org.apache.thrift.meta_data.FieldMetaData("columnsList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        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(TSFetchMetadataResp.class, metaDataMap);
  }

  public TSFetchMetadataResp() {
  }

  public TSFetchMetadataResp(
    org.apache.iotdb.common.rpc.thrift.TSStatus status)
  {
    this();
    this.status = status;
  }

  /**
   * Performs a deep copy on other.
   */
  public TSFetchMetadataResp(TSFetchMetadataResp other) {
    if (other.isSetStatus()) {
      this.status = new org.apache.iotdb.common.rpc.thrift.TSStatus(other.status);
    }
    if (other.isSetMetadataInJson()) {
      this.metadataInJson = other.metadataInJson;
    }
    if (other.isSetColumnsList()) {
      java.util.List __this__columnsList = new java.util.ArrayList(other.columnsList);
      this.columnsList = __this__columnsList;
    }
    if (other.isSetDataType()) {
      this.dataType = other.dataType;
    }
  }

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

  @Override
  public void clear() {
    this.status = null;
    this.metadataInJson = null;
    this.columnsList = null;
    this.dataType = null;
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.iotdb.common.rpc.thrift.TSStatus getStatus() {
    return this.status;
  }

  public TSFetchMetadataResp setStatus(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TSStatus 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;
    }
  }

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

  public TSFetchMetadataResp setMetadataInJson(@org.apache.thrift.annotation.Nullable java.lang.String metadataInJson) {
    this.metadataInJson = metadataInJson;
    return this;
  }

  public void unsetMetadataInJson() {
    this.metadataInJson = null;
  }

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

  public void setMetadataInJsonIsSet(boolean value) {
    if (!value) {
      this.metadataInJson = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator getColumnsListIterator() {
    return (this.columnsList == null) ? null : this.columnsList.iterator();
  }

  public void addToColumnsList(java.lang.String elem) {
    if (this.columnsList == null) {
      this.columnsList = new java.util.ArrayList();
    }
    this.columnsList.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List getColumnsList() {
    return this.columnsList;
  }

  public TSFetchMetadataResp setColumnsList(@org.apache.thrift.annotation.Nullable java.util.List columnsList) {
    this.columnsList = columnsList;
    return this;
  }

  public void unsetColumnsList() {
    this.columnsList = null;
  }

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

  public void setColumnsListIsSet(boolean value) {
    if (!value) {
      this.columnsList = null;
    }
  }

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

  public TSFetchMetadataResp setDataType(@org.apache.thrift.annotation.Nullable java.lang.String dataType) {
    this.dataType = dataType;
    return this;
  }

  public void unsetDataType() {
    this.dataType = null;
  }

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

  public void setDataTypeIsSet(boolean value) {
    if (!value) {
      this.dataType = 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.iotdb.common.rpc.thrift.TSStatus)value);
      }
      break;

    case METADATA_IN_JSON:
      if (value == null) {
        unsetMetadataInJson();
      } else {
        setMetadataInJson((java.lang.String)value);
      }
      break;

    case COLUMNS_LIST:
      if (value == null) {
        unsetColumnsList();
      } else {
        setColumnsList((java.util.List)value);
      }
      break;

    case DATA_TYPE:
      if (value == null) {
        unsetDataType();
      } else {
        setDataType((java.lang.String)value);
      }
      break;

    }
  }

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

    case METADATA_IN_JSON:
      return getMetadataInJson();

    case COLUMNS_LIST:
      return getColumnsList();

    case DATA_TYPE:
      return getDataType();

    }
    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 METADATA_IN_JSON:
      return isSetMetadataInJson();
    case COLUMNS_LIST:
      return isSetColumnsList();
    case DATA_TYPE:
      return isSetDataType();
    }
    throw new java.lang.IllegalStateException();
  }

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

  public boolean equals(TSFetchMetadataResp 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_metadataInJson = true && this.isSetMetadataInJson();
    boolean that_present_metadataInJson = true && that.isSetMetadataInJson();
    if (this_present_metadataInJson || that_present_metadataInJson) {
      if (!(this_present_metadataInJson && that_present_metadataInJson))
        return false;
      if (!this.metadataInJson.equals(that.metadataInJson))
        return false;
    }

    boolean this_present_columnsList = true && this.isSetColumnsList();
    boolean that_present_columnsList = true && that.isSetColumnsList();
    if (this_present_columnsList || that_present_columnsList) {
      if (!(this_present_columnsList && that_present_columnsList))
        return false;
      if (!this.columnsList.equals(that.columnsList))
        return false;
    }

    boolean this_present_dataType = true && this.isSetDataType();
    boolean that_present_dataType = true && that.isSetDataType();
    if (this_present_dataType || that_present_dataType) {
      if (!(this_present_dataType && that_present_dataType))
        return false;
      if (!this.dataType.equals(that.dataType))
        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 + ((isSetMetadataInJson()) ? 131071 : 524287);
    if (isSetMetadataInJson())
      hashCode = hashCode * 8191 + metadataInJson.hashCode();

    hashCode = hashCode * 8191 + ((isSetColumnsList()) ? 131071 : 524287);
    if (isSetColumnsList())
      hashCode = hashCode * 8191 + columnsList.hashCode();

    hashCode = hashCode * 8191 + ((isSetDataType()) ? 131071 : 524287);
    if (isSetDataType())
      hashCode = hashCode * 8191 + dataType.hashCode();

    return hashCode;
  }

  @Override
  public int compareTo(TSFetchMetadataResp 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(isSetMetadataInJson(), other.isSetMetadataInJson());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMetadataInJson()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metadataInJson, other.metadataInJson);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumnsList(), other.isSetColumnsList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnsList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnsList, other.columnsList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDataType(), other.isSetDataType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDataType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType);
      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("TSFetchMetadataResp(");
    boolean first = true;

    sb.append("status:");
    if (this.status == null) {
      sb.append("null");
    } else {
      sb.append(this.status);
    }
    first = false;
    if (isSetMetadataInJson()) {
      if (!first) sb.append(", ");
      sb.append("metadataInJson:");
      if (this.metadataInJson == null) {
        sb.append("null");
      } else {
        sb.append(this.metadataInJson);
      }
      first = false;
    }
    if (isSetColumnsList()) {
      if (!first) sb.append(", ");
      sb.append("columnsList:");
      if (this.columnsList == null) {
        sb.append("null");
      } else {
        sb.append(this.columnsList);
      }
      first = false;
    }
    if (isSetDataType()) {
      if (!first) sb.append(", ");
      sb.append("dataType:");
      if (this.dataType == null) {
        sb.append("null");
      } else {
        sb.append(this.dataType);
      }
      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());
    }
    // 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 TSFetchMetadataRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TSFetchMetadataRespStandardScheme getScheme() {
      return new TSFetchMetadataRespStandardScheme();
    }
  }

  private static class TSFetchMetadataRespStandardScheme extends org.apache.thrift.scheme.StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TSFetchMetadataResp 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.iotdb.common.rpc.thrift.TSStatus();
              struct.status.read(iprot);
              struct.setStatusIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // METADATA_IN_JSON
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.metadataInJson = iprot.readString();
              struct.setMetadataInJsonIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // COLUMNS_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list134 = iprot.readListBegin();
                struct.columnsList = new java.util.ArrayList(_list134.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem135;
                for (int _i136 = 0; _i136 < _list134.size; ++_i136)
                {
                  _elem135 = iprot.readString();
                  struct.columnsList.add(_elem135);
                }
                iprot.readListEnd();
              }
              struct.setColumnsListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // DATA_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.dataType = iprot.readString();
              struct.setDataTypeIsSet(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, TSFetchMetadataResp 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.metadataInJson != null) {
        if (struct.isSetMetadataInJson()) {
          oprot.writeFieldBegin(METADATA_IN_JSON_FIELD_DESC);
          oprot.writeString(struct.metadataInJson);
          oprot.writeFieldEnd();
        }
      }
      if (struct.columnsList != null) {
        if (struct.isSetColumnsList()) {
          oprot.writeFieldBegin(COLUMNS_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columnsList.size()));
            for (java.lang.String _iter137 : struct.columnsList)
            {
              oprot.writeString(_iter137);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.dataType != null) {
        if (struct.isSetDataType()) {
          oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC);
          oprot.writeString(struct.dataType);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TSFetchMetadataRespTupleScheme extends org.apache.thrift.scheme.TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataResp struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.status.write(oprot);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetMetadataInJson()) {
        optionals.set(0);
      }
      if (struct.isSetColumnsList()) {
        optionals.set(1);
      }
      if (struct.isSetDataType()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetMetadataInJson()) {
        oprot.writeString(struct.metadataInJson);
      }
      if (struct.isSetColumnsList()) {
        {
          oprot.writeI32(struct.columnsList.size());
          for (java.lang.String _iter138 : struct.columnsList)
          {
            oprot.writeString(_iter138);
          }
        }
      }
      if (struct.isSetDataType()) {
        oprot.writeString(struct.dataType);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TSFetchMetadataResp struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.status = new org.apache.iotdb.common.rpc.thrift.TSStatus();
      struct.status.read(iprot);
      struct.setStatusIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.metadataInJson = iprot.readString();
        struct.setMetadataInJsonIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TList _list139 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.columnsList = new java.util.ArrayList(_list139.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem140;
          for (int _i141 = 0; _i141 < _list139.size; ++_i141)
          {
            _elem140 = iprot.readString();
            struct.columnsList.add(_elem140);
          }
        }
        struct.setColumnsListIsSet(true);
      }
      if (incoming.get(2)) {
        struct.dataType = iprot.readString();
        struct.setDataTypeIsSet(true);
      }
    }
  }

  private static  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();
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy