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

org.graylog2.contentpacks.model.entities.$AutoValue_ViewStateEntity Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.graylog.plugins.views.search.views.DisplayModeSettings;
import org.graylog.plugins.views.search.views.FormattingSettings;
import org.graylog.plugins.views.search.views.Titles;
import org.graylog.plugins.views.search.views.WidgetPositionDTO;

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

  @Nullable
  private final Optional> fields;

  @Nullable
  private final Optional staticMessageListId;

  private final Titles titles;

  private final Set widgets;

  private final Map> widgetMapping;

  private final Map widgetPositions;

  @Nullable
  private final FormattingSettings formatting;

  private final DisplayModeSettings displayModeSettings;

  $AutoValue_ViewStateEntity(
      @Nullable Optional> fields,
      @Nullable Optional staticMessageListId,
      Titles titles,
      Set widgets,
      Map> widgetMapping,
      Map widgetPositions,
      @Nullable FormattingSettings formatting,
      DisplayModeSettings displayModeSettings) {
    this.fields = fields;
    this.staticMessageListId = staticMessageListId;
    if (titles == null) {
      throw new NullPointerException("Null titles");
    }
    this.titles = titles;
    if (widgets == null) {
      throw new NullPointerException("Null widgets");
    }
    this.widgets = widgets;
    if (widgetMapping == null) {
      throw new NullPointerException("Null widgetMapping");
    }
    this.widgetMapping = widgetMapping;
    if (widgetPositions == null) {
      throw new NullPointerException("Null widgetPositions");
    }
    this.widgetPositions = widgetPositions;
    this.formatting = formatting;
    if (displayModeSettings == null) {
      throw new NullPointerException("Null displayModeSettings");
    }
    this.displayModeSettings = displayModeSettings;
  }

  @JsonProperty("selected_fields")
  @Nullable
  @Override
  public Optional> fields() {
    return fields;
  }

  @JsonProperty("static_message_list_id")
  @Nullable
  @Override
  public Optional staticMessageListId() {
    return staticMessageListId;
  }

  @JsonProperty("titles")
  @Override
  public Titles titles() {
    return titles;
  }

  @JsonProperty("widgets")
  @Override
  public Set widgets() {
    return widgets;
  }

  @JsonProperty("widget_mapping")
  @Override
  public Map> widgetMapping() {
    return widgetMapping;
  }

  @JsonProperty("positions")
  @Override
  public Map widgetPositions() {
    return widgetPositions;
  }

  @JsonProperty("formatting")
  @Nullable
  @Override
  public FormattingSettings formatting() {
    return formatting;
  }

  @JsonProperty("display_mode_settings")
  @Override
  public DisplayModeSettings displayModeSettings() {
    return displayModeSettings;
  }

  @Override
  public String toString() {
    return "ViewStateEntity{"
        + "fields=" + fields + ", "
        + "staticMessageListId=" + staticMessageListId + ", "
        + "titles=" + titles + ", "
        + "widgets=" + widgets + ", "
        + "widgetMapping=" + widgetMapping + ", "
        + "widgetPositions=" + widgetPositions + ", "
        + "formatting=" + formatting + ", "
        + "displayModeSettings=" + displayModeSettings
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ViewStateEntity) {
      ViewStateEntity that = (ViewStateEntity) o;
      return (this.fields == null ? that.fields() == null : this.fields.equals(that.fields()))
          && (this.staticMessageListId == null ? that.staticMessageListId() == null : this.staticMessageListId.equals(that.staticMessageListId()))
          && this.titles.equals(that.titles())
          && this.widgets.equals(that.widgets())
          && this.widgetMapping.equals(that.widgetMapping())
          && this.widgetPositions.equals(that.widgetPositions())
          && (this.formatting == null ? that.formatting() == null : this.formatting.equals(that.formatting()))
          && this.displayModeSettings.equals(that.displayModeSettings());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (fields == null) ? 0 : fields.hashCode();
    h$ *= 1000003;
    h$ ^= (staticMessageListId == null) ? 0 : staticMessageListId.hashCode();
    h$ *= 1000003;
    h$ ^= titles.hashCode();
    h$ *= 1000003;
    h$ ^= widgets.hashCode();
    h$ *= 1000003;
    h$ ^= widgetMapping.hashCode();
    h$ *= 1000003;
    h$ ^= widgetPositions.hashCode();
    h$ *= 1000003;
    h$ ^= (formatting == null) ? 0 : formatting.hashCode();
    h$ *= 1000003;
    h$ ^= displayModeSettings.hashCode();
    return h$;
  }

  static class Builder extends ViewStateEntity.Builder {
    private Optional> fields;
    private Optional staticMessageListId;
    private Titles titles;
    private Set widgets;
    private Map> widgetMapping;
    private Map widgetPositions;
    private FormattingSettings formatting;
    private DisplayModeSettings displayModeSettings;
    Builder() {
    }
    @Override
    public ViewStateEntity.Builder fields(Set fields) {
      this.fields = (fields == null ? null : Optional.of(fields));
      return this;
    }
    @Override
    public ViewStateEntity.Builder staticMessageListId(String staticMessageListId) {
      this.staticMessageListId = (staticMessageListId == null ? null : Optional.of(staticMessageListId));
      return this;
    }
    @Override
    public ViewStateEntity.Builder titles(Titles titles) {
      if (titles == null) {
        throw new NullPointerException("Null titles");
      }
      this.titles = titles;
      return this;
    }
    @Override
    public ViewStateEntity.Builder widgets(Set widgets) {
      if (widgets == null) {
        throw new NullPointerException("Null widgets");
      }
      this.widgets = widgets;
      return this;
    }
    @Override
    public ViewStateEntity.Builder widgetMapping(Map> widgetMapping) {
      if (widgetMapping == null) {
        throw new NullPointerException("Null widgetMapping");
      }
      this.widgetMapping = widgetMapping;
      return this;
    }
    @Override
    public ViewStateEntity.Builder widgetPositions(Map widgetPositions) {
      if (widgetPositions == null) {
        throw new NullPointerException("Null widgetPositions");
      }
      this.widgetPositions = widgetPositions;
      return this;
    }
    @Override
    public ViewStateEntity.Builder formatting(FormattingSettings formatting) {
      this.formatting = formatting;
      return this;
    }
    @Override
    public ViewStateEntity.Builder displayModeSettings(DisplayModeSettings displayModeSettings) {
      if (displayModeSettings == null) {
        throw new NullPointerException("Null displayModeSettings");
      }
      this.displayModeSettings = displayModeSettings;
      return this;
    }
    @Override
    public ViewStateEntity build() {
      if (this.titles == null
          || this.widgets == null
          || this.widgetMapping == null
          || this.widgetPositions == null
          || this.displayModeSettings == null) {
        StringBuilder missing = new StringBuilder();
        if (this.titles == null) {
          missing.append(" titles");
        }
        if (this.widgets == null) {
          missing.append(" widgets");
        }
        if (this.widgetMapping == null) {
          missing.append(" widgetMapping");
        }
        if (this.widgetPositions == null) {
          missing.append(" widgetPositions");
        }
        if (this.displayModeSettings == null) {
          missing.append(" displayModeSettings");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ViewStateEntity(
          this.fields,
          this.staticMessageListId,
          this.titles,
          this.widgets,
          this.widgetMapping,
          this.widgetPositions,
          this.formatting,
          this.displayModeSettings);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy