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

org.graylog2.rest.models.system.lookup.$AutoValue_LookupTableApi Maven / Gradle / Ivy

There is a newer version: 5.2.7
Show newest version


package org.graylog2.rest.models.system.lookup;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import javax.validation.constraints.NotEmpty;
import org.graylog2.lookup.LookupDefaultValue;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_LookupTableApi extends LookupTableApi {

  private final String id;

  private final @NotEmpty String title;

  private final String description;

  private final @NotEmpty String name;

  private final @NotEmpty String cacheId;

  private final @NotEmpty String dataAdapterId;

  private final String contentPack;

  private final String defaultSingleValue;

  private final LookupDefaultValue.Type defaultSingleValueType;

  private final String defaultMultiValue;

  private final LookupDefaultValue.Type defaultMultiValueType;

  $AutoValue_LookupTableApi(
      @Nullable String id,
      @NotEmpty String title,
      String description,
      @NotEmpty String name,
      @NotEmpty String cacheId,
      @NotEmpty String dataAdapterId,
      @Nullable String contentPack,
      String defaultSingleValue,
      LookupDefaultValue.Type defaultSingleValueType,
      String defaultMultiValue,
      LookupDefaultValue.Type defaultMultiValueType) {
    this.id = id;
    if (title == null) {
      throw new NullPointerException("Null title");
    }
    this.title = title;
    if (description == null) {
      throw new NullPointerException("Null description");
    }
    this.description = description;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (cacheId == null) {
      throw new NullPointerException("Null cacheId");
    }
    this.cacheId = cacheId;
    if (dataAdapterId == null) {
      throw new NullPointerException("Null dataAdapterId");
    }
    this.dataAdapterId = dataAdapterId;
    this.contentPack = contentPack;
    if (defaultSingleValue == null) {
      throw new NullPointerException("Null defaultSingleValue");
    }
    this.defaultSingleValue = defaultSingleValue;
    if (defaultSingleValueType == null) {
      throw new NullPointerException("Null defaultSingleValueType");
    }
    this.defaultSingleValueType = defaultSingleValueType;
    if (defaultMultiValue == null) {
      throw new NullPointerException("Null defaultMultiValue");
    }
    this.defaultMultiValue = defaultMultiValue;
    if (defaultMultiValueType == null) {
      throw new NullPointerException("Null defaultMultiValueType");
    }
    this.defaultMultiValueType = defaultMultiValueType;
  }

  @Nullable
  @JsonProperty(value = "id")
  @Override
  public String id() {
    return id;
  }

  @JsonProperty(value = "title")
  @Override
  public @NotEmpty String title() {
    return title;
  }

  @JsonProperty(value = "description")
  @Override
  public String description() {
    return description;
  }

  @JsonProperty(value = "name")
  @Override
  public @NotEmpty String name() {
    return name;
  }

  @JsonProperty(value = "cache_id")
  @Override
  public @NotEmpty String cacheId() {
    return cacheId;
  }

  @JsonProperty(value = "data_adapter_id")
  @Override
  public @NotEmpty String dataAdapterId() {
    return dataAdapterId;
  }

  @JsonProperty(value = "content_pack")
  @Nullable
  @Override
  public String contentPack() {
    return contentPack;
  }

  @JsonProperty(value = "default_single_value")
  @Override
  public String defaultSingleValue() {
    return defaultSingleValue;
  }

  @JsonProperty(value = "default_single_value_type")
  @Override
  public LookupDefaultValue.Type defaultSingleValueType() {
    return defaultSingleValueType;
  }

  @JsonProperty(value = "default_multi_value")
  @Override
  public String defaultMultiValue() {
    return defaultMultiValue;
  }

  @JsonProperty(value = "default_multi_value_type")
  @Override
  public LookupDefaultValue.Type defaultMultiValueType() {
    return defaultMultiValueType;
  }

  @Override
  public String toString() {
    return "LookupTableApi{"
         + "id=" + id + ", "
         + "title=" + title + ", "
         + "description=" + description + ", "
         + "name=" + name + ", "
         + "cacheId=" + cacheId + ", "
         + "dataAdapterId=" + dataAdapterId + ", "
         + "contentPack=" + contentPack + ", "
         + "defaultSingleValue=" + defaultSingleValue + ", "
         + "defaultSingleValueType=" + defaultSingleValueType + ", "
         + "defaultMultiValue=" + defaultMultiValue + ", "
         + "defaultMultiValueType=" + defaultMultiValueType
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof LookupTableApi) {
      LookupTableApi that = (LookupTableApi) o;
      return ((this.id == null) ? (that.id() == null) : this.id.equals(that.id()))
           && (this.title.equals(that.title()))
           && (this.description.equals(that.description()))
           && (this.name.equals(that.name()))
           && (this.cacheId.equals(that.cacheId()))
           && (this.dataAdapterId.equals(that.dataAdapterId()))
           && ((this.contentPack == null) ? (that.contentPack() == null) : this.contentPack.equals(that.contentPack()))
           && (this.defaultSingleValue.equals(that.defaultSingleValue()))
           && (this.defaultSingleValueType.equals(that.defaultSingleValueType()))
           && (this.defaultMultiValue.equals(that.defaultMultiValue()))
           && (this.defaultMultiValueType.equals(that.defaultMultiValueType()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (id == null) ? 0 : id.hashCode();
    h$ *= 1000003;
    h$ ^= title.hashCode();
    h$ *= 1000003;
    h$ ^= description.hashCode();
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= cacheId.hashCode();
    h$ *= 1000003;
    h$ ^= dataAdapterId.hashCode();
    h$ *= 1000003;
    h$ ^= (contentPack == null) ? 0 : contentPack.hashCode();
    h$ *= 1000003;
    h$ ^= defaultSingleValue.hashCode();
    h$ *= 1000003;
    h$ ^= defaultSingleValueType.hashCode();
    h$ *= 1000003;
    h$ ^= defaultMultiValue.hashCode();
    h$ *= 1000003;
    h$ ^= defaultMultiValueType.hashCode();
    return h$;
  }

  static final class Builder extends LookupTableApi.Builder {
    private String id;
    private @NotEmpty String title;
    private String description;
    private @NotEmpty String name;
    private @NotEmpty String cacheId;
    private @NotEmpty String dataAdapterId;
    private String contentPack;
    private String defaultSingleValue;
    private LookupDefaultValue.Type defaultSingleValueType;
    private String defaultMultiValue;
    private LookupDefaultValue.Type defaultMultiValueType;
    Builder() {
    }
    @Override
    public LookupTableApi.Builder id(@Nullable String id) {
      this.id = id;
      return this;
    }
    @Override
    public LookupTableApi.Builder title(String title) {
      if (title == null) {
        throw new NullPointerException("Null title");
      }
      this.title = title;
      return this;
    }
    @Override
    public LookupTableApi.Builder description(String description) {
      if (description == null) {
        throw new NullPointerException("Null description");
      }
      this.description = description;
      return this;
    }
    @Override
    public LookupTableApi.Builder name(String name) {
      if (name == null) {
        throw new NullPointerException("Null name");
      }
      this.name = name;
      return this;
    }
    @Override
    public LookupTableApi.Builder cacheId(String cacheId) {
      if (cacheId == null) {
        throw new NullPointerException("Null cacheId");
      }
      this.cacheId = cacheId;
      return this;
    }
    @Override
    public LookupTableApi.Builder dataAdapterId(String dataAdapterId) {
      if (dataAdapterId == null) {
        throw new NullPointerException("Null dataAdapterId");
      }
      this.dataAdapterId = dataAdapterId;
      return this;
    }
    @Override
    public LookupTableApi.Builder contentPack(@Nullable String contentPack) {
      this.contentPack = contentPack;
      return this;
    }
    @Override
    public LookupTableApi.Builder defaultSingleValue(String defaultSingleValue) {
      if (defaultSingleValue == null) {
        throw new NullPointerException("Null defaultSingleValue");
      }
      this.defaultSingleValue = defaultSingleValue;
      return this;
    }
    @Override
    public LookupTableApi.Builder defaultSingleValueType(LookupDefaultValue.Type defaultSingleValueType) {
      if (defaultSingleValueType == null) {
        throw new NullPointerException("Null defaultSingleValueType");
      }
      this.defaultSingleValueType = defaultSingleValueType;
      return this;
    }
    @Override
    public LookupTableApi.Builder defaultMultiValue(String defaultMultiValue) {
      if (defaultMultiValue == null) {
        throw new NullPointerException("Null defaultMultiValue");
      }
      this.defaultMultiValue = defaultMultiValue;
      return this;
    }
    @Override
    public LookupTableApi.Builder defaultMultiValueType(LookupDefaultValue.Type defaultMultiValueType) {
      if (defaultMultiValueType == null) {
        throw new NullPointerException("Null defaultMultiValueType");
      }
      this.defaultMultiValueType = defaultMultiValueType;
      return this;
    }
    @Override
    public LookupTableApi build() {
      String missing = "";
      if (this.title == null) {
        missing += " title";
      }
      if (this.description == null) {
        missing += " description";
      }
      if (this.name == null) {
        missing += " name";
      }
      if (this.cacheId == null) {
        missing += " cacheId";
      }
      if (this.dataAdapterId == null) {
        missing += " dataAdapterId";
      }
      if (this.defaultSingleValue == null) {
        missing += " defaultSingleValue";
      }
      if (this.defaultSingleValueType == null) {
        missing += " defaultSingleValueType";
      }
      if (this.defaultMultiValue == null) {
        missing += " defaultMultiValue";
      }
      if (this.defaultMultiValueType == null) {
        missing += " defaultMultiValueType";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_LookupTableApi(
          this.id,
          this.title,
          this.description,
          this.name,
          this.cacheId,
          this.dataAdapterId,
          this.contentPack,
          this.defaultSingleValue,
          this.defaultSingleValueType,
          this.defaultMultiValue,
          this.defaultMultiValueType);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy