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

org.graylog2.system.traffic.AutoValue_TrafficDto Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.system.traffic;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import javax.annotation.processing.Generated;
import org.joda.time.DateTime;
import org.mongojack.Id;
import org.mongojack.ObjectId;

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

  private final String id;

  private final DateTime bucket;

  private final Map input;

  private final Map output;

  private final Map decoded;

  private AutoValue_TrafficDto(
      String id,
      DateTime bucket,
      Map input,
      Map output,
      Map decoded) {
    this.id = id;
    this.bucket = bucket;
    this.input = input;
    this.output = output;
    this.decoded = decoded;
  }

  @Id
  @ObjectId
  @JsonProperty
  @Override
  public String id() {
    return id;
  }

  @JsonProperty
  @Override
  public DateTime bucket() {
    return bucket;
  }

  @JsonProperty
  @Override
  public Map input() {
    return input;
  }

  @JsonProperty
  @Override
  public Map output() {
    return output;
  }

  @JsonProperty
  @Override
  public Map decoded() {
    return decoded;
  }

  @Override
  public String toString() {
    return "TrafficDto{"
        + "id=" + id + ", "
        + "bucket=" + bucket + ", "
        + "input=" + input + ", "
        + "output=" + output + ", "
        + "decoded=" + decoded
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TrafficDto) {
      TrafficDto that = (TrafficDto) o;
      return this.id.equals(that.id())
          && this.bucket.equals(that.bucket())
          && this.input.equals(that.input())
          && this.output.equals(that.output())
          && this.decoded.equals(that.decoded());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= id.hashCode();
    h$ *= 1000003;
    h$ ^= bucket.hashCode();
    h$ *= 1000003;
    h$ ^= input.hashCode();
    h$ *= 1000003;
    h$ ^= output.hashCode();
    h$ *= 1000003;
    h$ ^= decoded.hashCode();
    return h$;
  }

  static final class Builder extends TrafficDto.Builder {
    private String id;
    private DateTime bucket;
    private Map input;
    private Map output;
    private Map decoded;
    Builder() {
    }
    @Override
    public TrafficDto.Builder id(String id) {
      if (id == null) {
        throw new NullPointerException("Null id");
      }
      this.id = id;
      return this;
    }
    @Override
    public TrafficDto.Builder bucket(DateTime bucket) {
      if (bucket == null) {
        throw new NullPointerException("Null bucket");
      }
      this.bucket = bucket;
      return this;
    }
    @Override
    public TrafficDto.Builder input(Map input) {
      if (input == null) {
        throw new NullPointerException("Null input");
      }
      this.input = input;
      return this;
    }
    @Override
    public TrafficDto.Builder output(Map output) {
      if (output == null) {
        throw new NullPointerException("Null output");
      }
      this.output = output;
      return this;
    }
    @Override
    public TrafficDto.Builder decoded(Map decoded) {
      if (decoded == null) {
        throw new NullPointerException("Null decoded");
      }
      this.decoded = decoded;
      return this;
    }
    @Override
    public TrafficDto build() {
      String missing = "";
      if (this.id == null) {
        missing += " id";
      }
      if (this.bucket == null) {
        missing += " bucket";
      }
      if (this.input == null) {
        missing += " input";
      }
      if (this.output == null) {
        missing += " output";
      }
      if (this.decoded == null) {
        missing += " decoded";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_TrafficDto(
          this.id,
          this.bucket,
          this.input,
          this.output,
          this.decoded);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy