package com.airlock.iam.admin.infrastructure.transfer.response;

import com.fasterxml.jackson.annotation.JsonTypeName;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import java.util.Date;
import java.util.Map;

@JsonTypeName("maintenance-message")
public class MaintenanceMessageData {
   public static final String MAINTENANCE_MESSAGE_TYPE = "maintenance-message";
   @Schema(description = "The location (optional, depending on configuration).", nullable = true, type = "string")
   private String location;
   @NotNull
   @Schema(description = "Whether the message is active or not.")
   private Boolean active;
   @NotNull
   @Schema(description = "Whether the system is available when this message is displayed or not.")
   private Boolean systemAvailable;
   @NotNull
   @Schema(description = "The validity start date of this message.")
   private Date validFrom;
   @NotNull
   @Schema(description = "The validity end date of this message.")
   private Date validTo;
   @Schema(
      description = "The translations of this message. This represents a mapping from the ISO-639-1 (2 character) language code to the message (as HTML) in that language."
   )
   private Map<String, String> translations;

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

   @SuppressFBWarnings(justification = "generated code")
   public Boolean getActive() {
      return this.active;
   }

   @SuppressFBWarnings(justification = "generated code")
   public Boolean getSystemAvailable() {
      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")
   public Map<String, String> getTranslations() {
      return this.translations;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setLocation(String location) {
      this.location = location;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setActive(Boolean active) {
      this.active = active;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setSystemAvailable(Boolean systemAvailable) {
      this.systemAvailable = systemAvailable;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   public void setTranslations(Map<String, String> translations) {
      this.translations = translations;
   }

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

         Object this$active = this.active;
         Object other$active = other.active;
         if (this$active == null ? other$active == null : this$active.equals(other$active)) {
            Object this$systemAvailable = this.systemAvailable;
            Object other$systemAvailable = other.systemAvailable;
            if (this$systemAvailable == null ? other$systemAvailable == null : this$systemAvailable.equals(other$systemAvailable)) {
               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;
                     if (this$validTo == null ? other$validTo == null : this$validTo.equals(other$validTo)) {
                        Object this$translations = this.translations;
                        Object other$translations = other.translations;
                        return this$translations == null ? other$translations == null : this$translations.equals(other$translations);
                     } else {
                        return false;
                     }
                  } else {
                     return false;
                  }
               } else {
                  return false;
               }
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $active = this.active;
      result = result * 59 + ($active == null ? 43 : $active.hashCode());
      Object $systemAvailable = this.systemAvailable;
      result = result * 59 + ($systemAvailable == null ? 43 : $systemAvailable.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;
      result = result * 59 + ($validTo == null ? 43 : $validTo.hashCode());
      Object $translations = this.translations;
      return result * 59 + ($translations == null ? 43 : $translations.hashCode());
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "MaintenanceMessageData(location="
         + this.getLocation()
         + ", active="
         + this.getActive()
         + ", systemAvailable="
         + this.getSystemAvailable()
         + ", validFrom="
         + this.getValidFrom()
         + ", validTo="
         + this.getValidTo()
         + ", translations="
         + this.getTranslations()
         + ")";
   }
}
