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

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

public final class AccountLinkId {
   private final int id;

   public static AccountLinkId accountLinkId(int id) {
      return new AccountLinkId(id);
   }

   @SuppressFBWarnings(justification = "generated code")
   public int id() {
      return this.id;
   }

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

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

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

   @SuppressFBWarnings(justification = "generated code")
   private AccountLinkId(int id) {
      this.id = id;
   }
}
