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;
import java.util.HashMap;
import java.util.Map;

public class SecretQuestionsProvisionRequest {
   @Size(min = 1)
   @NotNull
   @Schema(
      description = "Provisions secret questions. A key in the map corresponds to a secret questions resource key and the mapped value corresponds to the secret question's answer."
   )
   private Map<@Size(min = 1, max = 1000) String, @Size(min = 1, max = 10000) String> answers = new HashMap<>();

   @SuppressFBWarnings(justification = "generated code")
   public Map<@Size(min = 1, max = 1000) String, @Size(min = 1, max = 10000) String> getAnswers() {
      return this.answers;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setAnswers(Map<@Size(min = 1, max = 1000) String, @Size(min = 1, max = 10000) String> answers) {
      this.answers = answers;
   }

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "SecretQuestionsProvisionRequest(answers=" + this.getAnswers() + ")";
   }
}
