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

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.nio.file.Path;

public record WebServerLogParameters(
   boolean simpleFileOutputEnabled,
   boolean structuredFileOutputEnabled,
   boolean consoleOutputEnabled,
   LogFormat consoleFormat,
   String pattern,
   String consoleLogLevel,
   String fileLogLevel,
   Path directory,
   String prefix,
   String suffix,
   int maxDays
) {
   @SuppressFBWarnings(justification = "generated code")
   public static WebServerLogParameters.WebServerLogParametersBuilder builder() {
      return new WebServerLogParameters.WebServerLogParametersBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class WebServerLogParametersBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private boolean simpleFileOutputEnabled;
      @SuppressFBWarnings(justification = "generated code")
      private boolean structuredFileOutputEnabled;
      @SuppressFBWarnings(justification = "generated code")
      private boolean consoleOutputEnabled;
      @SuppressFBWarnings(justification = "generated code")
      private LogFormat consoleFormat;
      @SuppressFBWarnings(justification = "generated code")
      private String pattern;
      @SuppressFBWarnings(justification = "generated code")
      private String consoleLogLevel;
      @SuppressFBWarnings(justification = "generated code")
      private String fileLogLevel;
      @SuppressFBWarnings(justification = "generated code")
      private Path directory;
      @SuppressFBWarnings(justification = "generated code")
      private String prefix;
      @SuppressFBWarnings(justification = "generated code")
      private String suffix;
      @SuppressFBWarnings(justification = "generated code")
      private int maxDays;

      @SuppressFBWarnings(justification = "generated code")
      WebServerLogParametersBuilder() {
      }

      @SuppressFBWarnings(justification = "generated code")
      public WebServerLogParameters.WebServerLogParametersBuilder simpleFileOutputEnabled(boolean simpleFileOutputEnabled) {
         this.simpleFileOutputEnabled = simpleFileOutputEnabled;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public WebServerLogParameters.WebServerLogParametersBuilder structuredFileOutputEnabled(boolean structuredFileOutputEnabled) {
         this.structuredFileOutputEnabled = structuredFileOutputEnabled;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public WebServerLogParameters.WebServerLogParametersBuilder consoleOutputEnabled(boolean consoleOutputEnabled) {
         this.consoleOutputEnabled = consoleOutputEnabled;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public WebServerLogParameters.WebServerLogParametersBuilder consoleFormat(LogFormat consoleFormat) {
         this.consoleFormat = consoleFormat;
         return this;
      }

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

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

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

      @SuppressFBWarnings(justification = "generated code")
      public WebServerLogParameters.WebServerLogParametersBuilder directory(Path directory) {
         this.directory = directory;
         return this;
      }

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

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

      @SuppressFBWarnings(justification = "generated code")
      public WebServerLogParameters.WebServerLogParametersBuilder maxDays(int maxDays) {
         this.maxDays = maxDays;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public WebServerLogParameters build() {
         return new WebServerLogParameters(
            this.simpleFileOutputEnabled,
            this.structuredFileOutputEnabled,
            this.consoleOutputEnabled,
            this.consoleFormat,
            this.pattern,
            this.consoleLogLevel,
            this.fileLogLevel,
            this.directory,
            this.prefix,
            this.suffix,
            this.maxDays
         );
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "WebServerLogParameters.WebServerLogParametersBuilder(simpleFileOutputEnabled="
            + this.simpleFileOutputEnabled
            + ", structuredFileOutputEnabled="
            + this.structuredFileOutputEnabled
            + ", consoleOutputEnabled="
            + this.consoleOutputEnabled
            + ", consoleFormat="
            + this.consoleFormat
            + ", pattern="
            + this.pattern
            + ", consoleLogLevel="
            + this.consoleLogLevel
            + ", fileLogLevel="
            + this.fileLogLevel
            + ", directory="
            + this.directory
            + ", prefix="
            + this.prefix
            + ", suffix="
            + this.suffix
            + ", maxDays="
            + this.maxDays
            + ")";
      }
   }
}
