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

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;

@JsonTypeName("user.lock")
public class UserLockData {
   public static final String USER_LOCK_TYPE = "user.lock";
   @NotNull
   @Schema(description = "A short explanation why the user is locked.")
   private String reason;
   @NotNull
   @Schema(description = "Date and time when the user was locked.")
   private Date lockDate;

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof UserLockData 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 UserLockData;
   }

   @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 "UserLockData(reason=" + this.getReason() + ", lockDate=" + this.getLockDate() + ")";
   }
}
