private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write( new org.apache.thrift.protocol.TCompactProtocol( new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.chosenItems != null) { oprot.writeFieldBegin(CHOSEN_ITEMS_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, this.chosenItems.size())); for (ChosenMenuItem _iter27 : this.chosenItems) { _iter27.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldBegin(EXPECTED_PRICE_FIELD_DESC); oprot.writeDouble(this.expectedPrice); oprot.writeFieldEnd(); oprot.writeFieldBegin(USER_ID_FIELD_DESC); oprot.writeI64(this.userId); oprot.writeFieldEnd(); if (this.howWillPay != null) { oprot.writeFieldBegin(HOW_WILL_PAY_FIELD_DESC); oprot.writeI32(this.howWillPay.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PICK_UP_FIELD_DESC); oprot.writeBool(this.pickUp); oprot.writeFieldEnd(); if (this.address != null) { if (isSetAddress()) { oprot.writeFieldBegin(ADDRESS_FIELD_DESC); oprot.writeString(this.address); oprot.writeFieldEnd(); } } if (this.phoneNumber != null) { if (isSetPhoneNumber()) { oprot.writeFieldBegin(PHONE_NUMBER_FIELD_DESC); oprot.writeString(this.phoneNumber); oprot.writeFieldEnd(); } } oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(this.timestamp); oprot.writeFieldEnd(); if (isSetTableId()) { oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); oprot.writeI64(this.tableId); oprot.writeFieldEnd(); } if (this.phoneId != null) { oprot.writeFieldBegin(PHONE_ID_FIELD_DESC); oprot.writeString(this.phoneId); oprot.writeFieldEnd(); } oprot.writeFieldBegin(ORDER_ID_FIELD_DESC); oprot.writeI64(this.orderId); oprot.writeFieldEnd(); if (this.username != null) { oprot.writeFieldBegin(USERNAME_FIELD_DESC); oprot.writeString(this.username); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }