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

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

public final class PasswordAuthenticationAndChangeRequest {
   @NotNull
   @NotBlank
   private String username;
   @NotNull
   private String oldPassword;
   @NotNull
   private String newPassword;

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

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

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

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

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "PasswordAuthenticationAndChangeRequest(username="
         + this.getUsername()
         + ", oldPassword="
         + this.getOldPassword()
         + ", newPassword="
         + this.getNewPassword()
         + ")";
   }
}
