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

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

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

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

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

  private final String id;

  private final String name;

  private final String description;

  private final String content;

  AutoValue_ConfigurationVariable(
      @Nullable String id,
      String name,
      @Nullable String description,
      String content) {
    this.id = id;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    this.description = description;
    if (content == null) {
      throw new NullPointerException("Null content");
    }
    this.content = content;
  }

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

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

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

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

  @Override
  public String toString() {
    return "ConfigurationVariable{"
        + "id=" + id + ", "
        + "name=" + name + ", "
        + "description=" + description + ", "
        + "content=" + content
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ConfigurationVariable) {
      ConfigurationVariable that = (ConfigurationVariable) o;
      return (this.id == null ? that.id() == null : this.id.equals(that.id()))
          && this.name.equals(that.name())
          && (this.description == null ? that.description() == null : this.description.equals(that.description()))
          && this.content.equals(that.content());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (id == null) ? 0 : id.hashCode();
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= (description == null) ? 0 : description.hashCode();
    h$ *= 1000003;
    h$ ^= content.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy