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

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public class OAuth2AuthorizationRequest {
   @NotNull
   @Schema(
      description = "The original query string containing all OAuth 2.0/OIDC parameters; without leading question mark.",
      minLength = 1,
      maxLength = 100000
   )
   @Size(min = 1, max = 100000)
   private String queryString;

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

   @SuppressFBWarnings(justification = "generated code")
   public void setQueryString(String queryString) {
      this.queryString = queryString;
   }

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

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "OAuth2AuthorizationRequest(queryString=" + this.getQueryString() + ")";
   }
}
