public void write(org.apache.thrift.protocol.TProtocol oprot, UnaryPredicate struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.predicateName != null) {
        oprot.writeFieldBegin(PREDICATE_NAME_FIELD_DESC);
        oprot.writeString(struct.predicateName);
        oprot.writeFieldEnd();
      }
      if (struct.values != null) {
        oprot.writeFieldBegin(VALUES_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.STRUCT, struct.values.size()));
          for (PredicateValue _iter3 : struct.values) {
            _iter3.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, UnaryPredicate struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   oprot.writeString(struct.predicateName);
   {
     oprot.writeI32(struct.values.size());
     for (PredicateValue _iter4 : struct.values) {
       _iter4.write(oprot);
     }
   }
 }
    public void read(org.apache.thrift.protocol.TProtocol iprot, UnaryPredicate 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: // PREDICATE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.predicateName = iprot.readString();
              struct.setPredicateNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // VALUES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.values = new ArrayList<PredicateValue>(_list0.size);
                for (int _i1 = 0; _i1 < _list0.size; ++_i1) {
                  PredicateValue _elem2;
                  _elem2 = new PredicateValue();
                  _elem2.read(iprot);
                  struct.values.add(_elem2);
                }
                iprot.readListEnd();
              }
              struct.setValuesIsSet(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();
    }
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, UnaryPredicate struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.predicateName = iprot.readString();
   struct.setPredicateNameIsSet(true);
   {
     org.apache.thrift.protocol.TList _list5 =
         new org.apache.thrift.protocol.TList(
             org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
     struct.values = new ArrayList<PredicateValue>(_list5.size);
     for (int _i6 = 0; _i6 < _list5.size; ++_i6) {
       PredicateValue _elem7;
       _elem7 = new PredicateValue();
       _elem7.read(iprot);
       struct.values.add(_elem7);
     }
   }
   struct.setValuesIsSet(true);
 }