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

org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.opencb.biodata.models.variant.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class PharmacogenomicsClinicalAnnotation extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"PharmacogenomicsClinicalAnnotation\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"variantId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"geneNames\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"name\":\"phenotypes\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"name\":\"phenotypeTypes\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"name\":\"confidence\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"score\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"url\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"summary\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"pubmed\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"name\":\"alleles\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"PharmacogenomicsAlleles\",\"fields\":[{\"name\":\"allele\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"annotation\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]}]}}]}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
   private java.lang.String variantId;
   private java.util.List geneNames;
   private java.util.List phenotypes;
   private java.util.List phenotypeTypes;
   private java.lang.String confidence;
   private java.lang.String score;
   private java.lang.String url;
   private java.lang.String summary;
   private java.util.List pubmed;
   private java.util.List alleles;

  /**
   * Default constructor.  Note that this does not initialize fields
   * to their default values from the schema.  If that is desired then
   * one should use newBuilder(). 
   */
  public PharmacogenomicsClinicalAnnotation() {}

  /**
   * All-args constructor.
   */
  public PharmacogenomicsClinicalAnnotation(java.lang.String variantId, java.util.List geneNames, java.util.List phenotypes, java.util.List phenotypeTypes, java.lang.String confidence, java.lang.String score, java.lang.String url, java.lang.String summary, java.util.List pubmed, java.util.List alleles) {
    this.variantId = variantId;
    this.geneNames = geneNames;
    this.phenotypes = phenotypes;
    this.phenotypeTypes = phenotypeTypes;
    this.confidence = confidence;
    this.score = score;
    this.url = url;
    this.summary = summary;
    this.pubmed = pubmed;
    this.alleles = alleles;
  }

  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
  // Used by DatumWriter.  Applications should not call. 
  public java.lang.Object get(int field$) {
    switch (field$) {
    case 0: return variantId;
    case 1: return geneNames;
    case 2: return phenotypes;
    case 3: return phenotypeTypes;
    case 4: return confidence;
    case 5: return score;
    case 6: return url;
    case 7: return summary;
    case 8: return pubmed;
    case 9: return alleles;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }
  // Used by DatumReader.  Applications should not call. 
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value$) {
    switch (field$) {
    case 0: variantId = (java.lang.String)value$; break;
    case 1: geneNames = (java.util.List)value$; break;
    case 2: phenotypes = (java.util.List)value$; break;
    case 3: phenotypeTypes = (java.util.List)value$; break;
    case 4: confidence = (java.lang.String)value$; break;
    case 5: score = (java.lang.String)value$; break;
    case 6: url = (java.lang.String)value$; break;
    case 7: summary = (java.lang.String)value$; break;
    case 8: pubmed = (java.util.List)value$; break;
    case 9: alleles = (java.util.List)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'variantId' field.
   */
  public java.lang.String getVariantId() {
    return variantId;
  }

  /**
   * Sets the value of the 'variantId' field.
   * @param value the value to set.
   */
  public void setVariantId(java.lang.String value) {
    this.variantId = value;
  }

  /**
   * Gets the value of the 'geneNames' field.
   */
  public java.util.List getGeneNames() {
    return geneNames;
  }

  /**
   * Sets the value of the 'geneNames' field.
   * @param value the value to set.
   */
  public void setGeneNames(java.util.List value) {
    this.geneNames = value;
  }

  /**
   * Gets the value of the 'phenotypes' field.
   */
  public java.util.List getPhenotypes() {
    return phenotypes;
  }

  /**
   * Sets the value of the 'phenotypes' field.
   * @param value the value to set.
   */
  public void setPhenotypes(java.util.List value) {
    this.phenotypes = value;
  }

  /**
   * Gets the value of the 'phenotypeTypes' field.
   */
  public java.util.List getPhenotypeTypes() {
    return phenotypeTypes;
  }

  /**
   * Sets the value of the 'phenotypeTypes' field.
   * @param value the value to set.
   */
  public void setPhenotypeTypes(java.util.List value) {
    this.phenotypeTypes = value;
  }

  /**
   * Gets the value of the 'confidence' field.
   */
  public java.lang.String getConfidence() {
    return confidence;
  }

  /**
   * Sets the value of the 'confidence' field.
   * @param value the value to set.
   */
  public void setConfidence(java.lang.String value) {
    this.confidence = value;
  }

  /**
   * Gets the value of the 'score' field.
   */
  public java.lang.String getScore() {
    return score;
  }

  /**
   * Sets the value of the 'score' field.
   * @param value the value to set.
   */
  public void setScore(java.lang.String value) {
    this.score = value;
  }

  /**
   * Gets the value of the 'url' field.
   */
  public java.lang.String getUrl() {
    return url;
  }

  /**
   * Sets the value of the 'url' field.
   * @param value the value to set.
   */
  public void setUrl(java.lang.String value) {
    this.url = value;
  }

  /**
   * Gets the value of the 'summary' field.
   */
  public java.lang.String getSummary() {
    return summary;
  }

  /**
   * Sets the value of the 'summary' field.
   * @param value the value to set.
   */
  public void setSummary(java.lang.String value) {
    this.summary = value;
  }

  /**
   * Gets the value of the 'pubmed' field.
   */
  public java.util.List getPubmed() {
    return pubmed;
  }

  /**
   * Sets the value of the 'pubmed' field.
   * @param value the value to set.
   */
  public void setPubmed(java.util.List value) {
    this.pubmed = value;
  }

  /**
   * Gets the value of the 'alleles' field.
   */
  public java.util.List getAlleles() {
    return alleles;
  }

  /**
   * Sets the value of the 'alleles' field.
   * @param value the value to set.
   */
  public void setAlleles(java.util.List value) {
    this.alleles = value;
  }

  /** Creates a new PharmacogenomicsClinicalAnnotation RecordBuilder */
  public static org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder newBuilder() {
    return new org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder();
  }
  
  /** Creates a new PharmacogenomicsClinicalAnnotation RecordBuilder by copying an existing Builder */
  public static org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder newBuilder(org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder other) {
    return new org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder(other);
  }
  
  /** Creates a new PharmacogenomicsClinicalAnnotation RecordBuilder by copying an existing PharmacogenomicsClinicalAnnotation instance */
  public static org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder newBuilder(org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation other) {
    return new org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder(other);
  }
  
  /**
   * RecordBuilder for PharmacogenomicsClinicalAnnotation instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private java.lang.String variantId;
    private java.util.List geneNames;
    private java.util.List phenotypes;
    private java.util.List phenotypeTypes;
    private java.lang.String confidence;
    private java.lang.String score;
    private java.lang.String url;
    private java.lang.String summary;
    private java.util.List pubmed;
    private java.util.List alleles;

    /** Creates a new Builder */
    private Builder() {
      super(org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.variantId)) {
        this.variantId = data().deepCopy(fields()[0].schema(), other.variantId);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.geneNames)) {
        this.geneNames = data().deepCopy(fields()[1].schema(), other.geneNames);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.phenotypes)) {
        this.phenotypes = data().deepCopy(fields()[2].schema(), other.phenotypes);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.phenotypeTypes)) {
        this.phenotypeTypes = data().deepCopy(fields()[3].schema(), other.phenotypeTypes);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.confidence)) {
        this.confidence = data().deepCopy(fields()[4].schema(), other.confidence);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.score)) {
        this.score = data().deepCopy(fields()[5].schema(), other.score);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.url)) {
        this.url = data().deepCopy(fields()[6].schema(), other.url);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.summary)) {
        this.summary = data().deepCopy(fields()[7].schema(), other.summary);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.pubmed)) {
        this.pubmed = data().deepCopy(fields()[8].schema(), other.pubmed);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.alleles)) {
        this.alleles = data().deepCopy(fields()[9].schema(), other.alleles);
        fieldSetFlags()[9] = true;
      }
    }
    
    /** Creates a Builder by copying an existing PharmacogenomicsClinicalAnnotation instance */
    private Builder(org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation other) {
            super(org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.SCHEMA$);
      if (isValidValue(fields()[0], other.variantId)) {
        this.variantId = data().deepCopy(fields()[0].schema(), other.variantId);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.geneNames)) {
        this.geneNames = data().deepCopy(fields()[1].schema(), other.geneNames);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.phenotypes)) {
        this.phenotypes = data().deepCopy(fields()[2].schema(), other.phenotypes);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.phenotypeTypes)) {
        this.phenotypeTypes = data().deepCopy(fields()[3].schema(), other.phenotypeTypes);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.confidence)) {
        this.confidence = data().deepCopy(fields()[4].schema(), other.confidence);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.score)) {
        this.score = data().deepCopy(fields()[5].schema(), other.score);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.url)) {
        this.url = data().deepCopy(fields()[6].schema(), other.url);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.summary)) {
        this.summary = data().deepCopy(fields()[7].schema(), other.summary);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.pubmed)) {
        this.pubmed = data().deepCopy(fields()[8].schema(), other.pubmed);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.alleles)) {
        this.alleles = data().deepCopy(fields()[9].schema(), other.alleles);
        fieldSetFlags()[9] = true;
      }
    }

    /** Gets the value of the 'variantId' field */
    public java.lang.String getVariantId() {
      return variantId;
    }
    
    /** Sets the value of the 'variantId' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setVariantId(java.lang.String value) {
      validate(fields()[0], value);
      this.variantId = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'variantId' field has been set */
    public boolean hasVariantId() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'variantId' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearVariantId() {
      variantId = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'geneNames' field */
    public java.util.List getGeneNames() {
      return geneNames;
    }
    
    /** Sets the value of the 'geneNames' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setGeneNames(java.util.List value) {
      validate(fields()[1], value);
      this.geneNames = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'geneNames' field has been set */
    public boolean hasGeneNames() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'geneNames' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearGeneNames() {
      geneNames = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'phenotypes' field */
    public java.util.List getPhenotypes() {
      return phenotypes;
    }
    
    /** Sets the value of the 'phenotypes' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setPhenotypes(java.util.List value) {
      validate(fields()[2], value);
      this.phenotypes = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'phenotypes' field has been set */
    public boolean hasPhenotypes() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'phenotypes' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearPhenotypes() {
      phenotypes = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'phenotypeTypes' field */
    public java.util.List getPhenotypeTypes() {
      return phenotypeTypes;
    }
    
    /** Sets the value of the 'phenotypeTypes' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setPhenotypeTypes(java.util.List value) {
      validate(fields()[3], value);
      this.phenotypeTypes = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'phenotypeTypes' field has been set */
    public boolean hasPhenotypeTypes() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'phenotypeTypes' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearPhenotypeTypes() {
      phenotypeTypes = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'confidence' field */
    public java.lang.String getConfidence() {
      return confidence;
    }
    
    /** Sets the value of the 'confidence' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setConfidence(java.lang.String value) {
      validate(fields()[4], value);
      this.confidence = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'confidence' field has been set */
    public boolean hasConfidence() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'confidence' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearConfidence() {
      confidence = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'score' field */
    public java.lang.String getScore() {
      return score;
    }
    
    /** Sets the value of the 'score' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setScore(java.lang.String value) {
      validate(fields()[5], value);
      this.score = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'score' field has been set */
    public boolean hasScore() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'score' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearScore() {
      score = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'url' field */
    public java.lang.String getUrl() {
      return url;
    }
    
    /** Sets the value of the 'url' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setUrl(java.lang.String value) {
      validate(fields()[6], value);
      this.url = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'url' field has been set */
    public boolean hasUrl() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'url' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearUrl() {
      url = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    /** Gets the value of the 'summary' field */
    public java.lang.String getSummary() {
      return summary;
    }
    
    /** Sets the value of the 'summary' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setSummary(java.lang.String value) {
      validate(fields()[7], value);
      this.summary = value;
      fieldSetFlags()[7] = true;
      return this; 
    }
    
    /** Checks whether the 'summary' field has been set */
    public boolean hasSummary() {
      return fieldSetFlags()[7];
    }
    
    /** Clears the value of the 'summary' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearSummary() {
      summary = null;
      fieldSetFlags()[7] = false;
      return this;
    }

    /** Gets the value of the 'pubmed' field */
    public java.util.List getPubmed() {
      return pubmed;
    }
    
    /** Sets the value of the 'pubmed' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setPubmed(java.util.List value) {
      validate(fields()[8], value);
      this.pubmed = value;
      fieldSetFlags()[8] = true;
      return this; 
    }
    
    /** Checks whether the 'pubmed' field has been set */
    public boolean hasPubmed() {
      return fieldSetFlags()[8];
    }
    
    /** Clears the value of the 'pubmed' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearPubmed() {
      pubmed = null;
      fieldSetFlags()[8] = false;
      return this;
    }

    /** Gets the value of the 'alleles' field */
    public java.util.List getAlleles() {
      return alleles;
    }
    
    /** Sets the value of the 'alleles' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder setAlleles(java.util.List value) {
      validate(fields()[9], value);
      this.alleles = value;
      fieldSetFlags()[9] = true;
      return this; 
    }
    
    /** Checks whether the 'alleles' field has been set */
    public boolean hasAlleles() {
      return fieldSetFlags()[9];
    }
    
    /** Clears the value of the 'alleles' field */
    public org.opencb.biodata.models.variant.avro.PharmacogenomicsClinicalAnnotation.Builder clearAlleles() {
      alleles = null;
      fieldSetFlags()[9] = false;
      return this;
    }

    @Override
    public PharmacogenomicsClinicalAnnotation build() {
      try {
        PharmacogenomicsClinicalAnnotation record = new PharmacogenomicsClinicalAnnotation();
        record.variantId = fieldSetFlags()[0] ? this.variantId : (java.lang.String) defaultValue(fields()[0]);
        record.geneNames = fieldSetFlags()[1] ? this.geneNames : (java.util.List) defaultValue(fields()[1]);
        record.phenotypes = fieldSetFlags()[2] ? this.phenotypes : (java.util.List) defaultValue(fields()[2]);
        record.phenotypeTypes = fieldSetFlags()[3] ? this.phenotypeTypes : (java.util.List) defaultValue(fields()[3]);
        record.confidence = fieldSetFlags()[4] ? this.confidence : (java.lang.String) defaultValue(fields()[4]);
        record.score = fieldSetFlags()[5] ? this.score : (java.lang.String) defaultValue(fields()[5]);
        record.url = fieldSetFlags()[6] ? this.url : (java.lang.String) defaultValue(fields()[6]);
        record.summary = fieldSetFlags()[7] ? this.summary : (java.lang.String) defaultValue(fields()[7]);
        record.pubmed = fieldSetFlags()[8] ? this.pubmed : (java.util.List) defaultValue(fields()[8]);
        record.alleles = fieldSetFlags()[9] ? this.alleles : (java.util.List) defaultValue(fields()[9]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy