All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.graylog.plugins.sidecar.rest.models.AutoValue_NodeLogFile Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.graylog.plugins.sidecar.rest.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import org.joda.time.DateTime;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_NodeLogFile extends NodeLogFile {

  private final String path;

  private final DateTime modTime;

  private final long size;

  private final boolean isDir;

  AutoValue_NodeLogFile(
      String path,
      DateTime modTime,
      long size,
      boolean isDir) {
    if (path == null) {
      throw new NullPointerException("Null path");
    }
    this.path = path;
    if (modTime == null) {
      throw new NullPointerException("Null modTime");
    }
    this.modTime = modTime;
    this.size = size;
    this.isDir = isDir;
  }

  @JsonProperty("path")
  @Override
  public String path() {
    return path;
  }

  @JsonProperty("mod_time")
  @Override
  public DateTime modTime() {
    return modTime;
  }

  @JsonProperty("size")
  @Override
  public long size() {
    return size;
  }

  @JsonProperty("is_dir")
  @Override
  public boolean isDir() {
    return isDir;
  }

  @Override
  public String toString() {
    return "NodeLogFile{"
        + "path=" + path + ", "
        + "modTime=" + modTime + ", "
        + "size=" + size + ", "
        + "isDir=" + isDir
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof NodeLogFile) {
      NodeLogFile that = (NodeLogFile) o;
      return this.path.equals(that.path())
          && this.modTime.equals(that.modTime())
          && this.size == that.size()
          && this.isDir == that.isDir();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= path.hashCode();
    h$ *= 1000003;
    h$ ^= modTime.hashCode();
    h$ *= 1000003;
    h$ ^= (int) ((size >>> 32) ^ size);
    h$ *= 1000003;
    h$ ^= isDir ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy