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

org.graylog.plugins.netflow.v9.AutoValue_RawNetFlowV9Packet Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog.plugins.netflow.v9;

import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;

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

  private final NetFlowV9Header header;

  private final int dataLength;

  private final Map templates;

  @Nullable
  private final Map.Entry optionTemplate;

  private final Set usedTemplates;

  AutoValue_RawNetFlowV9Packet(
      NetFlowV9Header header,
      int dataLength,
      Map templates,
      @Nullable Map.Entry optionTemplate,
      Set usedTemplates) {
    if (header == null) {
      throw new NullPointerException("Null header");
    }
    this.header = header;
    this.dataLength = dataLength;
    if (templates == null) {
      throw new NullPointerException("Null templates");
    }
    this.templates = templates;
    this.optionTemplate = optionTemplate;
    if (usedTemplates == null) {
      throw new NullPointerException("Null usedTemplates");
    }
    this.usedTemplates = usedTemplates;
  }

  @Override
  public NetFlowV9Header header() {
    return header;
  }

  @Override
  public int dataLength() {
    return dataLength;
  }

  @Override
  public Map templates() {
    return templates;
  }

  @Nullable
  @Override
  public Map.Entry optionTemplate() {
    return optionTemplate;
  }

  @Override
  public Set usedTemplates() {
    return usedTemplates;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RawNetFlowV9Packet) {
      RawNetFlowV9Packet that = (RawNetFlowV9Packet) o;
      return this.header.equals(that.header())
          && this.dataLength == that.dataLength()
          && this.templates.equals(that.templates())
          && (this.optionTemplate == null ? that.optionTemplate() == null : this.optionTemplate.equals(that.optionTemplate()))
          && this.usedTemplates.equals(that.usedTemplates());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= header.hashCode();
    h$ *= 1000003;
    h$ ^= dataLength;
    h$ *= 1000003;
    h$ ^= templates.hashCode();
    h$ *= 1000003;
    h$ ^= (optionTemplate == null) ? 0 : optionTemplate.hashCode();
    h$ *= 1000003;
    h$ ^= usedTemplates.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy