package com.airlock.iam.authentication.infrastructure.transfer.request;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public final class PasswordCheckRequest {
   @NotNull
   @Schema(minLength = 1, maxLength = 100000)
   @Size(min = 1, max = 100000)
   private String password;

   public static PasswordCheckRequest with(String password) {
      PasswordCheckRequest request = new PasswordCheckRequest();
      request.setPassword(password);
      return request;
   }

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "PasswordCheckRequest(password=" + this.getPassword() + ")";
   }
}
