@Override public int compareTo(PushResult other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode()); if (lastComparison != 0) { return lastComparison; } if (isSetCode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, other.code); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); if (lastComparison != 0) { return lastComparison; } if (isSetDesc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, PushResult struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.code = iprot.readI32(); struct.setCodeIsSet(true); struct.desc = iprot.readString(); struct.setDescIsSet(true); }
/** Performs a deep copy on <i>other</i>. */ public PushResult(PushResult other) { __isset_bitfield = other.__isset_bitfield; this.code = other.code; if (other.isSetDesc()) { this.desc = other.desc; } }
public void write(org.apache.thrift.protocol.TProtocol oprot, PushResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(CODE_FIELD_DESC); oprot.writeI32(struct.code); oprot.writeFieldEnd(); if (struct.desc != null) { oprot.writeFieldBegin(DESC_FIELD_DESC); oprot.writeString(struct.desc); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public boolean equals(PushResult that) { if (that == null) return false; boolean this_present_code = true; boolean that_present_code = true; if (this_present_code || that_present_code) { if (!(this_present_code && that_present_code)) return false; if (this.code != that.code) return false; } boolean this_present_desc = true && this.isSetDesc(); boolean that_present_desc = true && that.isSetDesc(); if (this_present_desc || that_present_desc) { if (!(this_present_desc && that_present_desc)) return false; if (!this.desc.equals(that.desc)) return false; } return true; }
public void read(org.apache.thrift.protocol.TProtocol iprot, PushResult 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: // CODE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.code = iprot.readI32(); struct.setCodeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DESC if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.desc = iprot.readString(); struct.setDescIsSet(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 if (!struct.isSetCode()) { throw new org.apache.thrift.protocol.TProtocolException( "Required field 'code' was not found in serialized data! Struct: " + toString()); } struct.validate(); }