public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownScanner 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: // MSG if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.msg = iprot.readString(); struct.setMsgIsSet(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, UnknownScanner struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.msg = iprot.readString(); struct.setMsgIsSet(true); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, UnknownScanner struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMsg()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetMsg()) { oprot.writeString(struct.msg); } }
@Override public int compareTo(UnknownScanner other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg()); if (lastComparison != 0) { return lastComparison; } if (isSetMsg()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.msg, other.msg); if (lastComparison != 0) { return lastComparison; } } return 0; }
public boolean equals(UnknownScanner that) { if (that == null) return false; boolean this_present_msg = true && this.isSetMsg(); boolean that_present_msg = true && that.isSetMsg(); if (this_present_msg || that_present_msg) { if (!(this_present_msg && that_present_msg)) return false; if (!this.msg.equals(that.msg)) return false; } return true; }
public void write(org.apache.thrift.protocol.TProtocol oprot, UnknownScanner struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.msg != null) { oprot.writeFieldBegin(MSG_FIELD_DESC); oprot.writeString(struct.msg); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
/** Performs a deep copy on <i>other</i>. */ public UnknownScanner(UnknownScanner other) { if (other.isSetMsg()) { this.msg = other.msg; } }