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

org.graylog2.contentpacks.model.entities.AutoValue_AbsoluteRangeEntity Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.contentpacks.model.entities;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;
import org.graylog2.contentpacks.model.entities.references.ValueReference;

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

  private final ModelTypeEntity type;

  private final ValueReference from;

  private final ValueReference to;

  private AutoValue_AbsoluteRangeEntity(
      ModelTypeEntity type,
      ValueReference from,
      ValueReference to) {
    this.type = type;
    this.from = from;
    this.to = to;
  }

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

  @JsonProperty("from")
  @Override
  public ValueReference from() {
    return from;
  }

  @JsonProperty("to")
  @Override
  public ValueReference to() {
    return to;
  }

  @Override
  public String toString() {
    return "AbsoluteRangeEntity{"
        + "type=" + type + ", "
        + "from=" + from + ", "
        + "to=" + to
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AbsoluteRangeEntity) {
      AbsoluteRangeEntity that = (AbsoluteRangeEntity) o;
      return this.type.equals(that.type())
          && this.from.equals(that.from())
          && this.to.equals(that.to());
    }
    return false;
  }

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

  static final class Builder extends AbsoluteRangeEntity.Builder {
    private ModelTypeEntity type;
    private ValueReference from;
    private ValueReference to;
    Builder() {
    }
    @Override
    public AbsoluteRangeEntity.Builder type(ModelTypeEntity type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    AbsoluteRangeEntity.Builder from(ValueReference from) {
      if (from == null) {
        throw new NullPointerException("Null from");
      }
      this.from = from;
      return this;
    }
    @Override
    AbsoluteRangeEntity.Builder to(ValueReference to) {
      if (to == null) {
        throw new NullPointerException("Null to");
      }
      this.to = to;
      return this;
    }
    @Override
    AbsoluteRangeEntity autoBuild() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.from == null) {
        missing += " from";
      }
      if (this.to == null) {
        missing += " to";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_AbsoluteRangeEntity(
          this.type,
          this.from,
          this.to);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy