@Override public void write(org.apache.thrift.protocol.TProtocol prot, AnnouncementResponse struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetAnnouncements()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetAnnouncements()) { { oprot.writeI32(struct.announcements.size()); for (Announcement _iter76 : struct.announcements) { _iter76.write(oprot); } } } }
/** Performs a deep copy on <i>other</i>. */ public AnnouncementResponse(AnnouncementResponse other) { if (other.isSetAnnouncements()) { List<Announcement> __this__announcements = new ArrayList<Announcement>(other.announcements.size()); for (Announcement other_element : other.announcements) { __this__announcements.add(new Announcement(other_element)); } this.announcements = __this__announcements; } }
public boolean equals(AnnouncementResponse that) { if (that == null) return false; boolean this_present_announcements = true && this.isSetAnnouncements(); boolean that_present_announcements = true && that.isSetAnnouncements(); if (this_present_announcements || that_present_announcements) { if (!(this_present_announcements && that_present_announcements)) return false; if (!this.announcements.equals(that.announcements)) return false; } return true; }
@Override public int compareTo(AnnouncementResponse other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetAnnouncements()).compareTo(other.isSetAnnouncements()); if (lastComparison != 0) { return lastComparison; } if (isSetAnnouncements()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.announcements, other.announcements); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void write(org.apache.thrift.protocol.TProtocol oprot, AnnouncementResponse struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.announcements != null) { if (struct.isSetAnnouncements()) { oprot.writeFieldBegin(ANNOUNCEMENTS_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, struct.announcements.size())); for (Announcement _iter75 : struct.announcements) { _iter75.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }