public static void serialize(ByteBuffer outputBuffer, UpdateRecord updateRecord) {
      int startOffset = outputBuffer.position();
      outputBuffer.putShort(Update_Version_V3);
      outputBuffer.putShort(updateRecord.getAccountId());
      outputBuffer.putShort(updateRecord.getContainerId());
      outputBuffer.putLong(updateRecord.getUpdateTimeInMs());
      outputBuffer.putShort((short) updateRecord.getType().ordinal());
      switch (updateRecord.getType()) {
        case DELETE:
          Delete_Sub_Format_V1.serialize(outputBuffer, updateRecord.getDeleteSubRecord());
          break;
        case TTL_UPDATE:
          Ttl_Update_Sub_Format_V1.serialize(outputBuffer, updateRecord.getTtlUpdateSubRecord());
          break;
        case UNDELETE:
          Undelete_Sub_Format_V1.serialize(outputBuffer, updateRecord.getUndeleteSubRecord());
          break;
        default:
          throw new IllegalArgumentException("Unknown update record type: " + updateRecord.getType());
      }
      CRC32 crc = new CRC32();
      crc.update(outputBuffer.array(), startOffset, getRecordSize(updateRecord.getType()) - Crc_Size);
      outputBuffer.putLong(crc.getValue());
    }
Serializes {@code updateRecord} into {@code outputBuffer} in version 3.
@param outputBuffer the buffer to write the serialized bytes into.
@param updateRecord the {@link UpdateRecord} to serialize.
ambry-messageformat/src/main/java/com/github/ambry/messageformat/MessageFormatRecord.java