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 class AuthenticationAirlock2FADeviceEditRequest {
   @NotNull
   @Schema(
      description = "The new display name of the device. <p>A valid display name is a (non-whitespace) string with maximum 50 characters, where a character can be <ul> <li>a white space</li> <li>any case-sensitive Unicode letter (Unicode L character class)</li> <li>any number</li> <li>or any characters = - + / . ( )</li> </ul> In a transition phase, display names that conform to the definition below are also accepted, but characters that do not match the more strict definition above, will be sanitized. <ul> <li>a white space</li> <li>any case-sensitive Unicode letter (Unicode L character class)</li> <li>any Unicode punctuation (Unicode P character class)</li> <li>any number</li> <li>or any characters = @ # $ +</li> </ul> </p>",
      minLength = 1,
      maxLength = 50
   )
   @Size(min = 1, max = 50)
   private String displayName;

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof AuthenticationAirlock2FADeviceEditRequest other)) {
         return false;
      } else {
         if (!other.canEqual(this)) {
            return false;
         }

         Object this$displayName = this.displayName;
         Object other$displayName = other.displayName;
         return this$displayName == null ? other$displayName == null : this$displayName.equals(other$displayName);
      }
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "AuthenticationAirlock2FADeviceEditRequest(displayName=" + this.getDisplayName() + ")";
   }
}
