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

org.graylog2.contentpacks.model.entities.AutoValue_RelativeRangeEntity 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_RelativeRangeEntity extends RelativeRangeEntity {

  private final ModelTypeEntity type;

  private final ValueReference range;

  private AutoValue_RelativeRangeEntity(
      ModelTypeEntity type,
      ValueReference range) {
    this.type = type;
    this.range = range;
  }

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

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

  @Override
  public String toString() {
    return "RelativeRangeEntity{"
        + "type=" + type + ", "
        + "range=" + range
        + "}";
  }

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy