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

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.time.Instant;

@JsonTypeName("tech-client")
public class PlainTechClientData {
   @NotNull
   @Schema(description = "Human-readable name of the technical client.")
   private String displayName;
   @Schema(description = "Description of the technical client.")
   private String description;
   @Schema(description = "Label of the technical client.")
   private String label;
   @NotNull
   @Schema(description = "The creation date of the technical client.")
   private Instant creationDate;
   @Schema(description = "The lock information of the technical client. Absent if the technical client is not locked.")
   private PlainTechClientLockData lock;

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   public Instant getCreationDate() {
      return this.creationDate;
   }

   @SuppressFBWarnings(justification = "generated code")
   public PlainTechClientLockData getLock() {
      return this.lock;
   }

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   public void setCreationDate(Instant creationDate) {
      this.creationDate = creationDate;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setLock(PlainTechClientLockData lock) {
      this.lock = lock;
   }

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

         Object this$displayName = this.displayName;
         Object other$displayName = other.displayName;
         if (this$displayName == null ? other$displayName == null : this$displayName.equals(other$displayName)) {
            Object this$description = this.description;
            Object other$description = other.description;
            if (this$description == null ? other$description == null : this$description.equals(other$description)) {
               Object this$label = this.label;
               Object other$label = other.label;
               if (this$label == null ? other$label == null : this$label.equals(other$label)) {
                  Object this$creationDate = this.creationDate;
                  Object other$creationDate = other.creationDate;
                  if (this$creationDate == null ? other$creationDate == null : this$creationDate.equals(other$creationDate)) {
                     Object this$lock = this.lock;
                     Object other$lock = other.lock;
                     return this$lock == null ? other$lock == null : this$lock.equals(other$lock);
                  } else {
                     return false;
                  }
               } else {
                  return false;
               }
            } else {
               return false;
            }
         } else {
            return false;
         }
      }
   }

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $displayName = this.displayName;
      result = result * 59 + ($displayName == null ? 43 : $displayName.hashCode());
      Object $description = this.description;
      result = result * 59 + ($description == null ? 43 : $description.hashCode());
      Object $label = this.label;
      result = result * 59 + ($label == null ? 43 : $label.hashCode());
      Object $creationDate = this.creationDate;
      result = result * 59 + ($creationDate == null ? 43 : $creationDate.hashCode());
      Object $lock = this.lock;
      return result * 59 + ($lock == null ? 43 : $lock.hashCode());
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "PlainTechClientData(displayName="
         + this.getDisplayName()
         + ", description="
         + this.getDescription()
         + ", label="
         + this.getLabel()
         + ", creationDate="
         + this.getCreationDate()
         + ", lock="
         + this.getLock()
         + ")";
   }
}
