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 TAG_VERTICES:
        if (field.type == TType.MAP) {
          {
            TMap _map52 = iprot.readMapBegin();
            this.tag_vertices = new Map<Int8List, int>();
            for (int _i53 = 0; _i53 < _map52.length; ++_i53) {
              Int8List _key54;
              int _val55;
              _key54 = iprot.readBinary();
              _val55 = iprot.readI64();
              this.tag_vertices?[_key54] = _val55;
            }
            iprot.readMapEnd();
          }
        } else {
          TProtocolUtil.skip(iprot, field.type);
        }
        break;
      case EDGES:
        if (field.type == TType.MAP) {
          {
            TMap _map56 = iprot.readMapBegin();
            this.edges = new Map<Int8List, int>();
            for (int _i57 = 0; _i57 < _map56.length; ++_i57) {
              Int8List _key58;
              int _val59;
              _key58 = iprot.readBinary();
              _val59 = iprot.readI64();
              this.edges?[_key58] = _val59;
            }
            iprot.readMapEnd();
          }
        } else {
          TProtocolUtil.skip(iprot, field.type);
        }
        break;
      case SPACE_VERTICES:
        if (field.type == TType.I64) {
          this.space_vertices = iprot.readI64();
          this.__isset_space_vertices = true;
        } else {
          TProtocolUtil.skip(iprot, field.type);
        }
        break;
      case SPACE_EDGES:
        if (field.type == TType.I64) {
          this.space_edges = iprot.readI64();
          this.__isset_space_edges = true;
        } else {
          TProtocolUtil.skip(iprot, field.type);
        }
        break;
      case POSITIVE_PART_CORRELATIVITY:
        if (field.type == TType.MAP) {
          {
            TMap _map60 = iprot.readMapBegin();
            this.positive_part_correlativity =
                new Map<int, List<Correlativity>>();
            for (int _i61 = 0; _i61 < _map60.length; ++_i61) {
              int _key62;
              List<Correlativity> _val63;
              _key62 = iprot.readI32();
              {
                TList _list64 = iprot.readListBegin();
                _val63 = <Correlativity>[];
                for (int _i65 = 0; _i65 < _list64.length; ++_i65) {
                  Correlativity _elem66;
                  _elem66 = new Correlativity();
                  _elem66.read(iprot);
                  _val63.add(_elem66);
                }
                iprot.readListEnd();
              }
              this.positive_part_correlativity?[_key62] = _val63;
            }
            iprot.readMapEnd();
          }
        } else {
          TProtocolUtil.skip(iprot, field.type);
        }
        break;
      case NEGATIVE_PART_CORRELATIVITY:
        if (field.type == TType.MAP) {
          {
            TMap _map67 = iprot.readMapBegin();
            this.negative_part_correlativity =
                new Map<int, List<Correlativity>>();
            for (int _i68 = 0; _i68 < _map67.length; ++_i68) {
              int _key69;
              List<Correlativity> _val70;
              _key69 = iprot.readI32();
              {
                TList _list71 = iprot.readListBegin();
                _val70 = <Correlativity>[];
                for (int _i72 = 0; _i72 < _list71.length; ++_i72) {
                  Correlativity _elem73;
                  _elem73 = new Correlativity();
                  _elem73.read(iprot);
                  _val70.add(_elem73);
                }
                iprot.readListEnd();
              }
              this.negative_part_correlativity?[_key69] = _val70;
            }
            iprot.readMapEnd();
          }
        } else {
          TProtocolUtil.skip(iprot, field.type);
        }
        break;
      case STATUS:
        if (field.type == TType.I32) {
          this.status = iprot.readI32();
          this.__isset_status = true;
        } 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();
}