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

import com.fasterxml.jackson.annotation.JsonTypeName;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

@JsonTypeName("transaction-approval.airlock-2fa.mobile-only.challenge")
public final class TransactionApprovalAirlock2FAMobileOnlyChallengeData {
   public static final String AIRLOCK_2FA_MOBILE_ONLY_CHALLENGE_TYPE = "transaction-approval.airlock-2fa.mobile-only.challenge";
   @NotNull
   @Schema(
      description = "URI that contains the challenge to be used by the authenticating mobile app to perform transaction approval. In scenarios where the authentication is performed by a dedicated authentication app, such as the Airlock 2FA app, the URI can also be used to perform the switch from the initiating app to the authentication app."
   )
   private final String authUri;

   @SuppressFBWarnings(justification = "generated code")
   public TransactionApprovalAirlock2FAMobileOnlyChallengeData(String authUri) {
      this.authUri = authUri;
   }

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "TransactionApprovalAirlock2FAMobileOnlyChallengeData(authUri=" + this.getAuthUri() + ")";
   }
}
