if (recordIdLength == 0 && args == null) {
return new Link();
}
LinkBuilder builder = Link.newBuilder();
if (recordIdLength > 0) {
RecordId id = idGenerator.fromBytes(recordIdBytes);
builder.recordId(id);
}
if (args != null && args.length() > 0) {
argsFromString(args, builder, args /* does not matter, should never be invalid */);
}
return builder.create();
}