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

io.weaviate.client.v1.graphql.model.GraphQLResponse Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version
// Generated by delombok at Fri Nov 24 13:20:07 UTC 2023
package io.weaviate.client.v1.graphql.model;

public class GraphQLResponse {
  private Object data;
  private GraphQLError[] errors;

  @java.lang.SuppressWarnings("all")
  GraphQLResponse(final Object data, final GraphQLError[] errors) {
    this.data = data;
    this.errors = errors;
  }


  @java.lang.SuppressWarnings("all")
  public static class GraphQLResponseBuilder {
    @java.lang.SuppressWarnings("all")
    private Object data;
    @java.lang.SuppressWarnings("all")
    private GraphQLError[] errors;

    @java.lang.SuppressWarnings("all")
    GraphQLResponseBuilder() {
    }

    /**
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    public GraphQLResponse.GraphQLResponseBuilder data(final Object data) {
      this.data = data;
      return this;
    }

    /**
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    public GraphQLResponse.GraphQLResponseBuilder errors(final GraphQLError[] errors) {
      this.errors = errors;
      return this;
    }

    @java.lang.SuppressWarnings("all")
    public GraphQLResponse build() {
      return new GraphQLResponse(this.data, this.errors);
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public java.lang.String toString() {
      return "GraphQLResponse.GraphQLResponseBuilder(data=" + this.data + ", errors=" + java.util.Arrays.deepToString(this.errors) + ")";
    }
  }

  @java.lang.SuppressWarnings("all")
  public static GraphQLResponse.GraphQLResponseBuilder builder() {
    return new GraphQLResponse.GraphQLResponseBuilder();
  }

  @java.lang.SuppressWarnings("all")
  public Object getData() {
    return this.data;
  }

  @java.lang.SuppressWarnings("all")
  public GraphQLError[] getErrors() {
    return this.errors;
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  public java.lang.String toString() {
    return "GraphQLResponse(data=" + this.getData() + ", errors=" + java.util.Arrays.deepToString(this.getErrors()) + ")";
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  public boolean equals(final java.lang.Object o) {
    if (o == this) return true;
    if (!(o instanceof GraphQLResponse)) return false;
    final GraphQLResponse other = (GraphQLResponse) o;
    if (!other.canEqual((java.lang.Object) this)) return false;
    final java.lang.Object this$data = this.getData();
    final java.lang.Object other$data = other.getData();
    if (this$data == null ? other$data != null : !this$data.equals(other$data)) return false;
    if (!java.util.Arrays.deepEquals(this.getErrors(), other.getErrors())) return false;
    return true;
  }

  @java.lang.SuppressWarnings("all")
  protected boolean canEqual(final java.lang.Object other) {
    return other instanceof GraphQLResponse;
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  public int hashCode() {
    final int PRIME = 59;
    int result = 1;
    final java.lang.Object $data = this.getData();
    result = result * PRIME + ($data == null ? 43 : $data.hashCode());
    result = result * PRIME + java.util.Arrays.deepHashCode(this.getErrors());
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy