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.challenge")
public final class TransactionApprovalAirlock2FAOfflineChallengeData {
   public static final String TRANSACTION_APPROVAL_AIRLOCK_2FA_CHALLENGE_TYPE = "transaction-approval.airlock-2fa.challenge";
   @NotNull
   @Schema(description = "Challenge image in format \"image/png\" encoded into a base64 string.")
   private final String challengeImage;

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "TransactionApprovalAirlock2FAOfflineChallengeData(challengeImage=" + this.getChallengeImage() + ")";
   }
}
