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

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

public final class Saml2ResponseParameter {
   private final String response;

   private Saml2ResponseParameter(String response) {
      Validate.notBlank(response);
      this.response = response;
   }

   public static Saml2ResponseParameter samlResponse(String response) {
      return new Saml2ResponseParameter(response);
   }

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

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

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

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