read method

void read(
  1. TProtocol iprot
)
override

Reads the TObject from the given input protocol.

Implementation

read(TProtocol iprot) {
  TField field;
  iprot.readStructBegin();
  while (true) {
    field = iprot.readFieldBegin();
    if (field.type == TType.STOP) {
      break;
    }
    switch (field.id) {
      case SPACE_ID:
        if (field.type == TType.I32) {
          this.space_id = iprot.readI32();
          this.__isset_space_id = true;
        } else {
          TProtocolUtil.skip(iprot, field.type);
        }
        break;
      case PARTS:
        if (field.type == TType.MAP) {
          {
            TMap _map280 = iprot.readMapBegin();
            this.parts = <int, List<Int8List>>{};
            for (int _i281 = 0; _i281 < _map280.length; ++_i281) {
              int _key282;
              List<Int8List> _val283;
              _key282 = iprot.readI32();
              {
                TList _list284 = iprot.readListBegin();
                _val283 = <Int8List>[];
                for (int _i285 = 0; _i285 < _list284.length; ++_i285) {
                  Int8List _elem286;
                  _elem286 = iprot.readBinary();
                  _val283.add(_elem286);
                }
                iprot.readListEnd();
              }
              this.parts?[_key282] = _val283;
            }
            iprot.readMapEnd();
          }
        } else {
          TProtocolUtil.skip(iprot, field.type);
        }
        break;
      default:
        TProtocolUtil.skip(iprot, field.type);
        break;
    }
    iprot.readFieldEnd();
  }
  iprot.readStructEnd();

  // check for required fields of primitive type, which can't be checked in the validate method
  validate();
}