public void read()

in library/src/main/java/com/theguardian/bridget/thrift/Discussion.java [2870:2913]


      public void read(org.apache.thrift.protocol.TProtocol iprot, reply_args 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: // SHORT_URL
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.shortUrl = iprot.readString();
                struct.setShortUrlIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // BODY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.body = iprot.readString();
                struct.setBodyIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // PARENT_COMMENT_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.parentCommentId = iprot.readString();
                struct.setParentCommentIdIsSet(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();
      }