package com.airlock.iam.application.parameters.domain.model;

import com.airlock.iam.system.module.IamModule;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.nio.file.Path;
import java.util.List;
import java.util.Objects;
import java.util.Optional;

public abstract class WebAppParameters {
   private final String urlPath;
   private final List<Log4jConfig> log4jConfigs;
   private final String applicationListener;
   private final List<Path> classpath;
   private final List<Path> classpathExtension;

   WebAppParameters(String urlPath, List<Log4jConfig> log4jConfigs, String applicationListener, List<Path> classpath, List<Path> classpathExtension) {
      this.urlPath = urlPath;
      this.log4jConfigs = Objects.requireNonNull(log4jConfigs);
      this.applicationListener = applicationListener;
      this.classpath = Objects.requireNonNull(classpath);
      this.classpathExtension = Objects.requireNonNull(classpathExtension);
   }

   public final Optional<String> applicationListener() {
      return Optional.ofNullable(this.applicationListener);
   }

   public abstract IamModule module();

   public boolean isSpringApplication() {
      return false;
   }

   @SuppressFBWarnings(justification = "generated code")
   public String urlPath() {
      return this.urlPath;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<Log4jConfig> log4jConfigs() {
      return this.log4jConfigs;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<Path> classpath() {
      return this.classpath;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<Path> classpathExtension() {
      return this.classpathExtension;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof WebAppParameters other)) {
         return false;
      } else {
         if (!other.canEqual(this)) {
            return false;
         }

         Object this$urlPath = this.urlPath;
         Object other$urlPath = other.urlPath;
         if (this$urlPath == null ? other$urlPath == null : this$urlPath.equals(other$urlPath)) {
            Object this$log4jConfigs = this.log4jConfigs;
            Object other$log4jConfigs = other.log4jConfigs;
            if (this$log4jConfigs == null ? other$log4jConfigs == null : this$log4jConfigs.equals(other$log4jConfigs)) {
               Object this$applicationListener = this.applicationListener;
               Object other$applicationListener = other.applicationListener;
               if (this$applicationListener == null ? other$applicationListener == null : this$applicationListener.equals(other$applicationListener)) {
                  Object this$classpath = this.classpath;
                  Object other$classpath = other.classpath;
                  if (this$classpath == null ? other$classpath == null : this$classpath.equals(other$classpath)) {
                     Object this$classpathExtension = this.classpathExtension;
                     Object other$classpathExtension = other.classpathExtension;
                     return this$classpathExtension == null ? other$classpathExtension == null : this$classpathExtension.equals(other$classpathExtension);
                  } else {
                     return false;
                  }
               } else {
                  return false;
               }
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

   @SuppressFBWarnings(justification = "generated code")
   protected boolean canEqual(Object other) {
      return other instanceof WebAppParameters;
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $urlPath = this.urlPath;
      result = result * 59 + ($urlPath == null ? 43 : $urlPath.hashCode());
      Object $log4jConfigs = this.log4jConfigs;
      result = result * 59 + ($log4jConfigs == null ? 43 : $log4jConfigs.hashCode());
      Object $applicationListener = this.applicationListener;
      result = result * 59 + ($applicationListener == null ? 43 : $applicationListener.hashCode());
      Object $classpath = this.classpath;
      result = result * 59 + ($classpath == null ? 43 : $classpath.hashCode());
      Object $classpathExtension = this.classpathExtension;
      return result * 59 + ($classpathExtension == null ? 43 : $classpathExtension.hashCode());
   }
}
