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.lock")
public class PlainTechClientLockData {
   public static final String PLAIN_TECH_CLIENT_LOCK_TYPE = "tech-client.lock";
   @NotNull
   @Schema(description = "A short explanation why the technical client is locked.")
   private String reason;
   @NotNull
   @Schema(description = "Date and time when the technical client was locked.")
   private Instant lockDate;

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof PlainTechClientLockData other)) {
         return false;
      } else if (!other.canEqual(this)) {
         return false;
      } else {
         Object this$reason = this.reason;
         Object other$reason = other.reason;
         if (this$reason == null ? other$reason == null : this$reason.equals(other$reason)) {
            Object this$lockDate = this.lockDate;
            Object other$lockDate = other.lockDate;
            return this$lockDate == null ? other$lockDate == null : this$lockDate.equals(other$lockDate);
         } else {
            return false;
         }
      }
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "PlainTechClientLockData(reason=" + this.getReason() + ", lockDate=" + this.getLockDate() + ")";
   }
}
