예제 #1
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, LSTopoHistoryList struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.topo_history != null) {
        oprot.writeFieldBegin(TOPO_HISTORY_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.STRUCT, struct.topo_history.size()));
          for (LSTopoHistory _iter683 : struct.topo_history) {
            _iter683.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
예제 #2
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, LSTopoHistoryList 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: // TOPO_HISTORY
         if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list680 = iprot.readListBegin();
             struct.topo_history = new ArrayList<LSTopoHistory>(_list680.size);
             LSTopoHistory _elem681;
             for (int _i682 = 0; _i682 < _list680.size; ++_i682) {
               _elem681 = new LSTopoHistory();
               _elem681.read(iprot);
               struct.topo_history.add(_elem681);
             }
             iprot.readListEnd();
           }
           struct.set_topo_history_isSet(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();
   struct.validate();
 }