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

org.graylog.plugins.sidecar.rest.models.AutoValue_ConfigurationSummary Maven / Gradle / Ivy

There is a newer version: 5.2.7
Show newest version
package org.graylog.plugins.sidecar.rest.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import org.mongojack.Id;
import org.mongojack.ObjectId;

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

  private final String id;

  private final String name;

  private final String collectorId;

  private final String color;

  AutoValue_ConfigurationSummary(
      String id,
      String name,
      String collectorId,
      String color) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (collectorId == null) {
      throw new NullPointerException("Null collectorId");
    }
    this.collectorId = collectorId;
    if (color == null) {
      throw new NullPointerException("Null color");
    }
    this.color = color;
  }

  @JsonProperty("id")
  @Id
  @ObjectId
  @Override
  public String id() {
    return id;
  }

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

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

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

  @Override
  public String toString() {
    return "ConfigurationSummary{"
         + "id=" + id + ", "
         + "name=" + name + ", "
         + "collectorId=" + collectorId + ", "
         + "color=" + color
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ConfigurationSummary) {
      ConfigurationSummary that = (ConfigurationSummary) o;
      return this.id.equals(that.id())
          && this.name.equals(that.name())
          && this.collectorId.equals(that.collectorId())
          && this.color.equals(that.color());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= id.hashCode();
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= collectorId.hashCode();
    h$ *= 1000003;
    h$ ^= color.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy