code: public static @NotNull Resource getSyntheticLinkResource(@NotNull ResourceResolver resourceResolver, @NotNull String mediaRef) {
      Map<String, Object> map = new HashMap<>();
      map.put(LinkNameConstants.PN_LINK_TYPE, ID);
      map.put(LinkNameConstants.PN_LINK_MEDIA_REF, mediaRef);
      return new SyntheticLinkResource(resourceResolver, map);
    }
docs: Get synthetic link resource for this link type.
  @param resourceResolver Resource resolver
  @param mediaRef Media asset reference
  @return Synthetic link resource