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

import com.fasterxml.jackson.annotation.JsonTypeName;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import jakarta.validation.constraints.NotNull;

@JsonTypeName("authentication.airlock-2fa.device")
public final class Airlock2FADeviceData {
   public static final String AIRLOCK_2FA_DEVICE_TYPE = "authentication.airlock-2fa.device";
   @NotNull
   private final String displayName;
   @NotNull
   private final Airlock2FADeviceData.DeviceTypeData deviceType;

   @SuppressFBWarnings(justification = "generated code")
   public Airlock2FADeviceData(String displayName, Airlock2FADeviceData.DeviceTypeData deviceType) {
      this.displayName = displayName;
      this.deviceType = deviceType;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   public Airlock2FADeviceData.DeviceTypeData getDeviceType() {
      return this.deviceType;
   }

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

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

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

   public enum DeviceTypeData {
      ANDROID,
      IOS,
      HARDWARE;
   }
}
