public static ImageReference of(
      @Nullable String registry, String repository, @Nullable String qualifier) {
    if (!Strings.isNullOrEmpty(qualifier) && isValidDigest(qualifier)) {
      return of(registry, repository, null, qualifier);
    }
    return of(registry, repository, qualifier, null);
  }
Constructs an {@link ImageReference} from the image reference components, consisting of an
optional registry, a repository, and an optional tag.

@param registry the image registry, or {@code null} to use the default registry (Docker Hub)
@param repository the image repository
@param qualifier the image tag or digest, or {@code null} to use the default tag ({@code
    latest}).
@return an {@link ImageReference} built from the given registry, repository, and tag
jib-core/src/main/java/com/google/cloud/tools/jib/api/ImageReference.java