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

ai.grakn.engine.controller.response.AutoValue_Role 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 ai.grakn.concept.Label;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Set;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String baseType;
  private final ConceptId id;
  private final Link selfLink;
  private final Label label;
  private final Boolean implicit;
  private final EmbeddedSchemaConcept sup;
  private final Link subs;
  private final Set relationships;
  private final Set roleplayers;

  AutoValue_Role(
      String baseType,
      ConceptId id,
      Link selfLink,
      Label label,
      Boolean implicit,
      @Nullable EmbeddedSchemaConcept sup,
      Link subs,
      Set relationships,
      Set roleplayers) {
    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 (label == null) {
      throw new NullPointerException("Null label");
    }
    this.label = label;
    if (implicit == null) {
      throw new NullPointerException("Null implicit");
    }
    this.implicit = implicit;
    this.sup = sup;
    if (subs == null) {
      throw new NullPointerException("Null subs");
    }
    this.subs = subs;
    if (relationships == null) {
      throw new NullPointerException("Null relationships");
    }
    this.relationships = relationships;
    if (roleplayers == null) {
      throw new NullPointerException("Null roleplayers");
    }
    this.roleplayers = roleplayers;
  }

  @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 Label label() {
    return label;
  }

  @JsonProperty
  @Override
  public Boolean implicit() {
    return implicit;
  }

  @Nullable
  @JsonProperty(value = "super")
  @Override
  public EmbeddedSchemaConcept sup() {
    return sup;
  }

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

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

  @JsonProperty
  @Override
  public Set roleplayers() {
    return roleplayers;
  }

  @Override
  public String toString() {
    return "Role{"
        + "baseType=" + baseType + ", "
        + "id=" + id + ", "
        + "selfLink=" + selfLink + ", "
        + "label=" + label + ", "
        + "implicit=" + implicit + ", "
        + "sup=" + sup + ", "
        + "subs=" + subs + ", "
        + "relationships=" + relationships + ", "
        + "roleplayers=" + roleplayers
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Role) {
      Role that = (Role) o;
      return (this.baseType.equals(that.baseType()))
           && (this.id.equals(that.id()))
           && (this.selfLink.equals(that.selfLink()))
           && (this.label.equals(that.label()))
           && (this.implicit.equals(that.implicit()))
           && ((this.sup == null) ? (that.sup() == null) : this.sup.equals(that.sup()))
           && (this.subs.equals(that.subs()))
           && (this.relationships.equals(that.relationships()))
           && (this.roleplayers.equals(that.roleplayers()));
    }
    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.label.hashCode();
    h *= 1000003;
    h ^= this.implicit.hashCode();
    h *= 1000003;
    h ^= (sup == null) ? 0 : this.sup.hashCode();
    h *= 1000003;
    h ^= this.subs.hashCode();
    h *= 1000003;
    h ^= this.relationships.hashCode();
    h *= 1000003;
    h ^= this.roleplayers.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy