package com.airlock.iam.saml2.domain.model.idp;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.commons.lang3.Validate;

public final class Saml2RequestParameter {
   private final String request;

   private Saml2RequestParameter(String request) {
      Validate.notBlank(request);
      this.request = request;
   }

   public static Saml2RequestParameter samlRequest(String request) {
      return new Saml2RequestParameter(request);
   }

   public String value() {
      return this.request;
   }

   @Override
   public String toString() {
      return this.request;
   }

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

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