// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/ArchiveType.java
// public enum ArchiveType {
// 
//   TAR_GZ, TAR_XZ, ZIP;
// 
//   public String getExtension() {
//     return name().toLowerCase(Locale.US).replace("_", ".");
//   }
// 
//   public boolean matches(String filesname) {
//     return filesname.endsWith(getExtension());
//   }
// }
// 
// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/OperatingSystem.java
// public enum OperatingSystem {
// 
//   WINDOWS, MAC_OS, UNIX;
// 
//   /**
//    * Returns the right instance of the Operation System.
//    *
//    * @see SystemUtils#IS_OS_MAC
//    * @see SystemUtils#IS_OS_WINDOWS
//    */
//   public static OperatingSystem detect() {
//     if (SystemUtils.IS_OS_MAC) {
//       return MAC_OS;
//     } else if (SystemUtils.IS_OS_WINDOWS) {
//       return WINDOWS;
//     } else {
//       return UNIX;
//     }
//   }
// 
// }


import io.arivera.oss.embedded.rabbitmq.util.ArchiveType;
import io.arivera.oss.embedded.rabbitmq.util.OperatingSystem;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
    }

    @Override
    protected String getFolderVersion(Version version) {
      if (Version.VERSION_COMPARATOR.compare(version, PredefinedVersion.V3_7_0) < 0) {
        return version.getVersionAsString("_");
      }
      return super.getFolderVersion(version);
    }

  },
  BINTRAY("https://dl.bintray.com/rabbitmq/all/rabbitmq-server/%s%s/rabbitmq-server-%s-%s.%s"),
  ;

  private static Map<OperatingSystem, String> downloadPlatformName = new HashMap<>(3);
  static {
    downloadPlatformName.put(OperatingSystem.MAC_OS, "mac-standalone");
    downloadPlatformName.put(OperatingSystem.UNIX, "generic-unix");
    downloadPlatformName.put(OperatingSystem.WINDOWS, "windows");
  }

  private final String urlPattern;

  OfficialArtifactRepository(String urlPattern) {
    this.urlPattern = urlPattern;
  }

  @Override
  public URL getUrl(Version version, OperatingSystem operatingSystem) {
    String artifactPlatform = getArtifactPlatform(version, operatingSystem);
// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/ArchiveType.java
// public enum ArchiveType {
// 
//   TAR_GZ, TAR_XZ, ZIP;
// 
//   public String getExtension() {
//     return name().toLowerCase(Locale.US).replace("_", ".");
//   }
// 
//   public boolean matches(String filesname) {
//     return filesname.endsWith(getExtension());
//   }
// }
// 
// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/util/OperatingSystem.java
// public enum OperatingSystem {
// 
//   WINDOWS, MAC_OS, UNIX;
// 
//   /**
//    * Returns the right instance of the Operation System.
//    *
//    * @see SystemUtils#IS_OS_MAC
//    * @see SystemUtils#IS_OS_WINDOWS
//    */
//   public static OperatingSystem detect() {
//     if (SystemUtils.IS_OS_MAC) {
//       return MAC_OS;
//     } else if (SystemUtils.IS_OS_WINDOWS) {
//       return WINDOWS;
//     } else {
//       return UNIX;
//     }
//   }
// 
// }


// Path: src/main/java/io/arivera/oss/embedded/rabbitmq/OfficialArtifactRepository.java
import io.arivera.oss.embedded.rabbitmq.util.ArchiveType;
import io.arivera.oss.embedded.rabbitmq.util.OperatingSystem;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;

    }

    @Override
    protected String getFolderVersion(Version version) {
      if (Version.VERSION_COMPARATOR.compare(version, PredefinedVersion.V3_7_0) < 0) {
        return version.getVersionAsString("_");
      }
      return super.getFolderVersion(version);
    }

  },
  BINTRAY("https://dl.bintray.com/rabbitmq/all/rabbitmq-server/%s%s/rabbitmq-server-%s-%s.%s"),
  ;

  private static Map<OperatingSystem, String> downloadPlatformName = new HashMap<>(3);
  static {
    downloadPlatformName.put(OperatingSystem.MAC_OS, "mac-standalone");
    downloadPlatformName.put(OperatingSystem.UNIX, "generic-unix");
    downloadPlatformName.put(OperatingSystem.WINDOWS, "windows");
  }

  private final String urlPattern;

  OfficialArtifactRepository(String urlPattern) {
    this.urlPattern = urlPattern;
  }

  @Override
  public URL getUrl(Version version, OperatingSystem operatingSystem) {
    String artifactPlatform = getArtifactPlatform(version, operatingSystem);
    ArchiveType archiveType = version.getArchiveType(operatingSystem);