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

org.graylog.plugins.sidecar.rest.requests.AutoValue_RegistrationRequest Maven / Gradle / Ivy

There is a newer version: 5.2.7
Show newest version


package org.graylog.plugins.sidecar.rest.requests;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.graylog.plugins.sidecar.rest.models.NodeDetails;

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

  private final @NotNull @Size(min = 1) String nodeName;

  private final NodeDetails nodeDetails;

  AutoValue_RegistrationRequest(
      @NotNull @Size(min = 1) String nodeName,
      NodeDetails nodeDetails) {
    if (nodeName == null) {
      throw new NullPointerException("Null nodeName");
    }
    this.nodeName = nodeName;
    if (nodeDetails == null) {
      throw new NullPointerException("Null nodeDetails");
    }
    this.nodeDetails = nodeDetails;
  }

  @JsonProperty(value = "node_name")
  @Override
  public @NotNull @Size(min = 1) String nodeName() {
    return nodeName;
  }

  @JsonProperty(value = "node_details")
  @Override
  public NodeDetails nodeDetails() {
    return nodeDetails;
  }

  @Override
  public String toString() {
    return "RegistrationRequest{"
         + "nodeName=" + nodeName + ", "
         + "nodeDetails=" + nodeDetails
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RegistrationRequest) {
      RegistrationRequest that = (RegistrationRequest) o;
      return (this.nodeName.equals(that.nodeName()))
           && (this.nodeDetails.equals(that.nodeDetails()));
    }
    return false;
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy