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

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

@Schema(ref = "#/components/schemas/UserDataItemValidationAuthDataOverride")
public final class UserDataItemValidationAuthData {
   @NotNull
   @Schema(description = "The type of validation.")
   private final String type;
   @Schema(description = "Validation-specific parameters.")
   private final Map<String, Object> parameters;

   @JsonAnyGetter
   public Map<String, Object> getParameters() {
      return this.parameters;
   }

   @SuppressFBWarnings(justification = "generated code")
   public UserDataItemValidationAuthData(String type, Map<String, Object> parameters) {
      this.type = type;
      this.parameters = parameters;
   }

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "UserDataItemValidationAuthData(type=" + this.getType() + ", parameters=" + this.getParameters() + ")";
   }
}
