package com.airlock.iam.application.webserver.infrastructure.deploy;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.File;

public final class SpaCustomizationZipFileAttributes {
   private final long length;
   private final long modified;

   public static SpaCustomizationZipFileAttributes fromFile(File file) {
      return new SpaCustomizationZipFileAttributes(file.length(), file.lastModified());
   }

   @SuppressFBWarnings(justification = "generated code")
   public long getLength() {
      return this.length;
   }

   @SuppressFBWarnings(justification = "generated code")
   public long getModified() {
      return this.modified;
   }

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

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      long $length = this.length;
      result = result * 59 + (int)($length >>> 32 ^ $length);
      long $modified = this.modified;
      return result * 59 + (int)($modified >>> 32 ^ $modified);
   }

   @SuppressFBWarnings(justification = "generated code")
   @Override
   public String toString() {
      return "SpaCustomizationZipFileAttributes(length=" + this.getLength() + ", modified=" + this.getModified() + ")";
   }

   @SuppressFBWarnings(justification = "generated code")
   private SpaCustomizationZipFileAttributes(long length, long modified) {
      this.length = length;
      this.modified = modified;
   }
}
