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

ai.grakn.engine.controller.response.AutoValue_Attribute Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version

package ai.grakn.engine.controller.response;

import ai.grakn.concept.ConceptId;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String baseType;
  private final ConceptId id;
  private final Link selfLink;
  private final EmbeddedSchemaConcept type;
  private final Link attributes;
  private final Link keys;
  private final Link relationships;
  private final boolean inferred;
  private final String explanation;
  private final String dataType;
  private final String value;

  AutoValue_Attribute(
      String baseType,
      ConceptId id,
      Link selfLink,
      EmbeddedSchemaConcept type,
      Link attributes,
      Link keys,
      Link relationships,
      boolean inferred,
      @Nullable String explanation,
      String dataType,
      String value) {
    if (baseType == null) {
      throw new NullPointerException("Null baseType");
    }
    this.baseType = baseType;
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    if (selfLink == null) {
      throw new NullPointerException("Null selfLink");
    }
    this.selfLink = selfLink;
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
    if (attributes == null) {
      throw new NullPointerException("Null attributes");
    }
    this.attributes = attributes;
    if (keys == null) {
      throw new NullPointerException("Null keys");
    }
    this.keys = keys;
    if (relationships == null) {
      throw new NullPointerException("Null relationships");
    }
    this.relationships = relationships;
    this.inferred = inferred;
    this.explanation = explanation;
    if (dataType == null) {
      throw new NullPointerException("Null dataType");
    }
    this.dataType = dataType;
    if (value == null) {
      throw new NullPointerException("Null value");
    }
    this.value = value;
  }

  @JsonProperty(value = "base-type")
  @Override
  public String baseType() {
    return baseType;
  }

  @JsonProperty(value = "id")
  @Override
  public ConceptId id() {
    return id;
  }

  @JsonProperty(value = "@id")
  @Override
  public Link selfLink() {
    return selfLink;
  }

  @JsonProperty
  @Override
  public EmbeddedSchemaConcept type() {
    return type;
  }

  @JsonProperty
  @Override
  public Link attributes() {
    return attributes;
  }

  @JsonProperty
  @Override
  public Link keys() {
    return keys;
  }

  @JsonProperty
  @Override
  public Link relationships() {
    return relationships;
  }

  @JsonProperty
  @Override
  public boolean inferred() {
    return inferred;
  }

  @Nullable
  @JsonProperty(value = "explanation-query")
  @Override
  public String explanation() {
    return explanation;
  }

  @JsonProperty(value = "data-type")
  @Override
  public String dataType() {
    return dataType;
  }

  @JsonProperty
  @Override
  public String value() {
    return value;
  }

  @Override
  public String toString() {
    return "Attribute{"
        + "baseType=" + baseType + ", "
        + "id=" + id + ", "
        + "selfLink=" + selfLink + ", "
        + "type=" + type + ", "
        + "attributes=" + attributes + ", "
        + "keys=" + keys + ", "
        + "relationships=" + relationships + ", "
        + "inferred=" + inferred + ", "
        + "explanation=" + explanation + ", "
        + "dataType=" + dataType + ", "
        + "value=" + value
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Attribute) {
      Attribute that = (Attribute) o;
      return (this.baseType.equals(that.baseType()))
           && (this.id.equals(that.id()))
           && (this.selfLink.equals(that.selfLink()))
           && (this.type.equals(that.type()))
           && (this.attributes.equals(that.attributes()))
           && (this.keys.equals(that.keys()))
           && (this.relationships.equals(that.relationships()))
           && (this.inferred == that.inferred())
           && ((this.explanation == null) ? (that.explanation() == null) : this.explanation.equals(that.explanation()))
           && (this.dataType.equals(that.dataType()))
           && (this.value.equals(that.value()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.baseType.hashCode();
    h *= 1000003;
    h ^= this.id.hashCode();
    h *= 1000003;
    h ^= this.selfLink.hashCode();
    h *= 1000003;
    h ^= this.type.hashCode();
    h *= 1000003;
    h ^= this.attributes.hashCode();
    h *= 1000003;
    h ^= this.keys.hashCode();
    h *= 1000003;
    h ^= this.relationships.hashCode();
    h *= 1000003;
    h ^= this.inferred ? 1231 : 1237;
    h *= 1000003;
    h ^= (explanation == null) ? 0 : this.explanation.hashCode();
    h *= 1000003;
    h ^= this.dataType.hashCode();
    h *= 1000003;
    h ^= this.value.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy