package com.airlock.iam.publicselfservice.infrastructure.transfer;

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

@JsonTypeName("public-self-service.matrix.challenge")
public final class PublicSelfServiceMatrixChallengeData {
   public static final String MATRIX_CHALLENGE_TYPE = "public-self-service.matrix.challenge";
   @Nullable
   @Schema(description = "The ID of the list being used (if available).")
   private final String listId;
   @ArraySchema(arraySchema = @Schema(description = "The challenge(s) containing the matrix coordinates or indexes."))
   @NotNull
   private final List<String> challenges;

   @SuppressFBWarnings(justification = "generated code")
   public PublicSelfServiceMatrixChallengeData(@Nullable String listId, List<String> challenges) {
      this.listId = listId;
      this.challenges = challenges;
   }

   @Nullable
   @SuppressFBWarnings(justification = "generated code")
   public String getListId() {
      return this.listId;
   }

   @SuppressFBWarnings(justification = "generated code")
   public List<String> getChallenges() {
      return this.challenges;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "PublicSelfServiceMatrixChallengeData(listId=" + this.getListId() + ", challenges=" + this.getChallenges() + ")";
   }
}
