// 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;
package io.arivera.oss.embedded.rabbitmq;



/**
 * A list of the official repositories where RabbitMQ publishes their artifacts.
 *
 * @see EmbeddedRabbitMqConfig.Builder#downloadFrom(ArtifactRepository)
 */
public enum OfficialArtifactRepository implements ArtifactRepository {

  /**
   * @deprecated in favor of {@link #GITHUB} since starting with v3.7.0, this repository is no longer updated.
   *        More info: <a href="http://www.rabbitmq.com/blog/2018/02/05/whats-new-in-rabbitmq-3-7/">Package Distribution Changes</a>.
   */
  @Deprecated
  RABBITMQ("http://www.rabbitmq.com/releases/rabbitmq-server/%sv%s/rabbitmq-server-%s-%s.%s") {
    @Override
// 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;

package io.arivera.oss.embedded.rabbitmq;



/**
 * A list of the official repositories where RabbitMQ publishes their artifacts.
 *
 * @see EmbeddedRabbitMqConfig.Builder#downloadFrom(ArtifactRepository)
 */
public enum OfficialArtifactRepository implements ArtifactRepository {

  /**
   * @deprecated in favor of {@link #GITHUB} since starting with v3.7.0, this repository is no longer updated.
   *        More info: <a href="http://www.rabbitmq.com/blog/2018/02/05/whats-new-in-rabbitmq-3-7/">Package Distribution Changes</a>.
   */
  @Deprecated
  RABBITMQ("http://www.rabbitmq.com/releases/rabbitmq-server/%sv%s/rabbitmq-server-%s-%s.%s") {
    @Override
    public URL getUrl(Version version, OperatingSystem operatingSystem) {