package com.airlock.iam.common.domain.model.request;

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

public final class ContextPath {
   @NonNull
   private final String path;

   @SuppressFBWarnings(justification = "generated code")
   public ContextPath(@NonNull String path) {
      if (path == null) {
         throw new NullPointerException("path is marked non-null but is null");
      }

      this.path = path;
   }

   @NonNull
   @SuppressFBWarnings(justification = "generated code")
   public String getPath() {
      return this.path;
   }

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

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "ContextPath(path=" + this.getPath() + ")";
   }
}
