package com.airlock.iam.login.domain.model.maintenancemessage;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Date;
import java.util.Optional;

public final class CurrentMaintenanceMessage {
   private final String id;
   private final Optional<String> language;
   private final Optional<String> text;
   private final Optional<String> location;
   private final boolean systemAvailable;
   private final Date validFrom;
   private final Date validTo;

   @SuppressFBWarnings(justification = "generated code")
   CurrentMaintenanceMessage(
      String id, Optional<String> language, Optional<String> text, Optional<String> location, boolean systemAvailable, Date validFrom, Date validTo
   ) {
      this.id = id;
      this.language = language;
      this.text = text;
      this.location = location;
      this.systemAvailable = systemAvailable;
      this.validFrom = validFrom;
      this.validTo = validTo;
   }

   @SuppressFBWarnings(justification = "generated code")
   public static CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder builder() {
      return new CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder();
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public Optional<String> getLanguage() {
      return this.language;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Optional<String> getText() {
      return this.text;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Optional<String> getLocation() {
      return this.location;
   }

   @SuppressFBWarnings(justification = "generated code")
   public boolean isSystemAvailable() {
      return this.systemAvailable;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Date getValidFrom() {
      return this.validFrom;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Date getValidTo() {
      return this.validTo;
   }

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

         Object this$id = this.id;
         Object other$id = other.id;
         if (this$id == null ? other$id == null : this$id.equals(other$id)) {
            Object this$language = this.language;
            Object other$language = other.language;
            if (this$language == null ? other$language == null : this$language.equals(other$language)) {
               Object this$text = this.text;
               Object other$text = other.text;
               if (this$text == null ? other$text == null : this$text.equals(other$text)) {
                  Object this$location = this.location;
                  Object other$location = other.location;
                  if (this$location == null ? other$location == null : this$location.equals(other$location)) {
                     Object this$validFrom = this.validFrom;
                     Object other$validFrom = other.validFrom;
                     if (this$validFrom == null ? other$validFrom == null : this$validFrom.equals(other$validFrom)) {
                        Object this$validTo = this.validTo;
                        Object other$validTo = other.validTo;
                        return this$validTo == null ? other$validTo == null : this$validTo.equals(other$validTo);
                     } else {
                        return false;
                     }
                  } else {
                     return false;
                  }
               } else {
                  return false;
               }
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      result = result * 59 + (this.systemAvailable ? 79 : 97);
      Object $id = this.id;
      result = result * 59 + ($id == null ? 43 : $id.hashCode());
      Object $language = this.language;
      result = result * 59 + ($language == null ? 43 : $language.hashCode());
      Object $text = this.text;
      result = result * 59 + ($text == null ? 43 : $text.hashCode());
      Object $location = this.location;
      result = result * 59 + ($location == null ? 43 : $location.hashCode());
      Object $validFrom = this.validFrom;
      result = result * 59 + ($validFrom == null ? 43 : $validFrom.hashCode());
      Object $validTo = this.validTo;
      return result * 59 + ($validTo == null ? 43 : $validTo.hashCode());
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "CurrentMaintenanceMessage(id="
         + this.getId()
         + ", language="
         + this.getLanguage()
         + ", text="
         + this.getText()
         + ", location="
         + this.getLocation()
         + ", systemAvailable="
         + this.isSystemAvailable()
         + ", validFrom="
         + this.getValidFrom()
         + ", validTo="
         + this.getValidTo()
         + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class CurrentMaintenanceMessageBuilder {
      @SuppressFBWarnings(justification = "generated code")
      private String id;
      @SuppressFBWarnings(justification = "generated code")
      private Optional<String> language;
      @SuppressFBWarnings(justification = "generated code")
      private Optional<String> text;
      @SuppressFBWarnings(justification = "generated code")
      private Optional<String> location;
      @SuppressFBWarnings(justification = "generated code")
      private boolean systemAvailable;
      @SuppressFBWarnings(justification = "generated code")
      private Date validFrom;
      @SuppressFBWarnings(justification = "generated code")
      private Date validTo;

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

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

      @SuppressFBWarnings(justification = "generated code")
      public CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder language(Optional<String> language) {
         this.language = language;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder text(Optional<String> text) {
         this.text = text;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder location(Optional<String> location) {
         this.location = location;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder systemAvailable(boolean systemAvailable) {
         this.systemAvailable = systemAvailable;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder validFrom(Date validFrom) {
         this.validFrom = validFrom;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder validTo(Date validTo) {
         this.validTo = validTo;
         return this;
      }

      @SuppressFBWarnings(justification = "generated code")
      public CurrentMaintenanceMessage build() {
         return new CurrentMaintenanceMessage(this.id, this.language, this.text, this.location, this.systemAvailable, this.validFrom, this.validTo);
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "CurrentMaintenanceMessage.CurrentMaintenanceMessageBuilder(id="
            + this.id
            + ", language="
            + this.language
            + ", text="
            + this.text
            + ", location="
            + this.location
            + ", systemAvailable="
            + this.systemAvailable
            + ", validFrom="
            + this.validFrom
            + ", validTo="
            + this.validTo
            + ")";
      }
   }
}
