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

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonTypeName;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.LinkedHashMap;
import java.util.Map;

@JsonTypeName("location.interpretation")
@Schema(ref = "#/components/schemas/LocationInterpretationDataOverride")
public class LocationInterpretationData {
   public static final String LOCATION_INTERPRETATION_TYPE = "location.interpretation";
   @JsonAnySetter
   private final Map<String, Object> interpretations = new LinkedHashMap<>();

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

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "LocationInterpretationData(interpretations=" + this.getInterpretations() + ")";
   }
}
