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

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

@Schema(ref = "#/components/schema/JwkDataOverride")
public class JwkData {
   private Map<String, Object> keyData = new HashMap<>();

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

   @JsonAnySetter
   public void addKeyData(String key, Object value) {
      this.keyData.put(key, value);
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setKeyData(Map<String, Object> keyData) {
      this.keyData = keyData;
   }

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "JwkData(keyData=" + this.getKeyData() + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   public JwkData() {
   }

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