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

import com.airlock.iam.common.api.domain.model.user.PersistentUser;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.time.Instant;
import java.util.Optional;

public interface TemporaryLocking {
   Optional<TemporaryLocking.TemporaryLock> checkTemporaryLock(PersistentUser var1);

   final class TemporaryLock {
      private final Instant expiry;

      @SuppressFBWarnings(justification = "generated code")
      public TemporaryLock(Instant expiry) {
         this.expiry = expiry;
      }

      @SuppressFBWarnings(justification = "generated code")
      public Instant getExpiry() {
         return this.expiry;
      }

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

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

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "TemporaryLocking.TemporaryLock(expiry=" + this.getExpiry() + ")";
      }
   }
}
