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

org.graylog.events.processor.AutoValue_EventProcessorExecutionJob_Data Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.events.processor;

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

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EventProcessorExecutionJob_Data extends EventProcessorExecutionJob.Data {

  private final String type;

  private final DateTime timerangeFrom;

  private final DateTime timerangeTo;

  private AutoValue_EventProcessorExecutionJob_Data(
      String type,
      DateTime timerangeFrom,
      DateTime timerangeTo) {
    this.type = type;
    this.timerangeFrom = timerangeFrom;
    this.timerangeTo = timerangeTo;
  }

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

  @JsonProperty("timerange_from")
  @Override
  public DateTime timerangeFrom() {
    return timerangeFrom;
  }

  @JsonProperty("timerange_to")
  @Override
  public DateTime timerangeTo() {
    return timerangeTo;
  }

  @Override
  public String toString() {
    return "Data{"
        + "type=" + type + ", "
        + "timerangeFrom=" + timerangeFrom + ", "
        + "timerangeTo=" + timerangeTo
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EventProcessorExecutionJob.Data) {
      EventProcessorExecutionJob.Data that = (EventProcessorExecutionJob.Data) o;
      return this.type.equals(that.type())
          && this.timerangeFrom.equals(that.timerangeFrom())
          && this.timerangeTo.equals(that.timerangeTo());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= type.hashCode();
    h$ *= 1000003;
    h$ ^= timerangeFrom.hashCode();
    h$ *= 1000003;
    h$ ^= timerangeTo.hashCode();
    return h$;
  }

  @Override
  public EventProcessorExecutionJob.Data.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends EventProcessorExecutionJob.Data.Builder {
    private String type;
    private DateTime timerangeFrom;
    private DateTime timerangeTo;
    Builder() {
    }
    private Builder(EventProcessorExecutionJob.Data source) {
      this.type = source.type();
      this.timerangeFrom = source.timerangeFrom();
      this.timerangeTo = source.timerangeTo();
    }
    @Override
    public EventProcessorExecutionJob.Data.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public EventProcessorExecutionJob.Data.Builder timerangeFrom(DateTime timerangeFrom) {
      if (timerangeFrom == null) {
        throw new NullPointerException("Null timerangeFrom");
      }
      this.timerangeFrom = timerangeFrom;
      return this;
    }
    @Override
    public EventProcessorExecutionJob.Data.Builder timerangeTo(DateTime timerangeTo) {
      if (timerangeTo == null) {
        throw new NullPointerException("Null timerangeTo");
      }
      this.timerangeTo = timerangeTo;
      return this;
    }
    @Override
    EventProcessorExecutionJob.Data autoBuild() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.timerangeFrom == null) {
        missing += " timerangeFrom";
      }
      if (this.timerangeTo == null) {
        missing += " timerangeTo";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_EventProcessorExecutionJob_Data(
          this.type,
          this.timerangeFrom,
          this.timerangeTo);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy