package com.airlock.iam.oauth2.domain.model.validation;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public final class CheckOriginResult {
   private final boolean allowed;

   @SuppressFBWarnings(justification = "generated code")
   public CheckOriginResult(boolean allowed) {
      this.allowed = allowed;
   }

   @SuppressFBWarnings(justification = "generated code")
   public boolean isAllowed() {
      return this.allowed;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      return result * 59 + (this.allowed ? 79 : 97);
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "CheckOriginResult(allowed=" + this.isAllowed() + ")";
   }
}
