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.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public final class MtanTokenRegistrationAuthRequest {
   @NotNull
   @Schema(description = "The mTAN number to be registered.", minLength = 1, maxLength = 50)
   @Size(min = 1, max = 50)
   private String number;
   @Nullable
   @Schema(
      description = "The mTAN label to be edited. Depending on the configuration, this might be required, optional or expected to be absent.",
      minLength = 1,
      maxLength = 200
   )
   @Size(min = 1, max = 200)
   private String label;

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

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

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "MtanTokenRegistrationAuthRequest(number=" + this.getNumber() + ", label=" + this.getLabel() + ")";
   }
}
