public UndeleteSubRecord getUndeleteSubRecord() {
    if (subRecord.getType().equals(SubRecord.Type.UNDELETE)) {
      return (UndeleteSubRecord) subRecord;
    }
    return null;
  }
@return the undelete record if type is {@link SubRecord.Type#UNDELETE}. {@code null} otherwise.
ambry-messageformat/src/main/java/com/github/ambry/messageformat/UpdateRecord.java