package com.airlock.iam.oauth2.infrastructure.transfer.documentation;

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

public class OAuth2JwksResponseData {
   @NotNull
   @Schema(description = "Set of JWKs as defined in <a href=\"https://tools.ietf.org/html/rfc7517\">RFC 7517</a>.")
   private List<OAuth2JwksResponseData.OAuth2JwkResponseData> keys;

   @SuppressFBWarnings(justification = "generated code")
   public List<OAuth2JwksResponseData.OAuth2JwkResponseData> getKeys() {
      return this.keys;
   }

   @SuppressFBWarnings(justification = "generated code")
   public void setKeys(List<OAuth2JwksResponseData.OAuth2JwkResponseData> keys) {
      this.keys = keys;
   }

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "OAuth2JwksResponseData(keys=" + this.getKeys() + ")";
   }

   @Schema(ref = "#/components/schemas/OAuth2JwkResponseDataOverride")
   public static class OAuth2JwkResponseData {
      private Map<String, Object> jwk;

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

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

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

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

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

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

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "OAuth2JwksResponseData.OAuth2JwkResponseData(jwk=" + this.getJwk() + ")";
      }
   }
}
