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

org.graylog2.shared.rest.resources.AutoValue_ProxiedResource_CallResult Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.graylog2.shared.rest.resources;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ProxiedResource_CallResult extends ProxiedResource.CallResult {

  private final boolean isCallExecuted;

  private final String serverErrorMessage;

  private final ProxiedResource.NodeResponse response;

  AutoValue_ProxiedResource_CallResult(
      boolean isCallExecuted,
      @Nullable String serverErrorMessage,
      @Nullable ProxiedResource.NodeResponse response) {
    this.isCallExecuted = isCallExecuted;
    this.serverErrorMessage = serverErrorMessage;
    this.response = response;
  }

  @JsonProperty("call_executed")
  @Override
  public boolean isCallExecuted() {
    return isCallExecuted;
  }

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

  @JsonProperty("response")
  @Nullable
  @Override
  public ProxiedResource.NodeResponse response() {
    return response;
  }

  @Override
  public String toString() {
    return "CallResult{"
        + "isCallExecuted=" + isCallExecuted + ", "
        + "serverErrorMessage=" + serverErrorMessage + ", "
        + "response=" + response
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ProxiedResource.CallResult) {
      ProxiedResource.CallResult that = (ProxiedResource.CallResult) o;
      return this.isCallExecuted == that.isCallExecuted()
          && (this.serverErrorMessage == null ? that.serverErrorMessage() == null : this.serverErrorMessage.equals(that.serverErrorMessage()))
          && (this.response == null ? that.response() == null : this.response.equals(that.response()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= isCallExecuted ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= (serverErrorMessage == null) ? 0 : serverErrorMessage.hashCode();
    h$ *= 1000003;
    h$ ^= (response == null) ? 0 : response.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy