package com.airlock.iam.base.api.domain.model.user;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Objects;

public final class UserId {
   private final String value;

   public boolean hasValue(String id) {
      return this.value.equals(id);
   }

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

   public static UserId userId(String id) {
      Objects.requireNonNull(id);
      return new UserId(id);
   }

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   private UserId(String value) {
      this.value = value;
   }
}
