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

org.gel.models.report.avro.Diagnostic Maven / Gradle / Ivy

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class Diagnostic 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\":\"Diagnostic\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"referenceUrl\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"URL where reference information for this prognosis can be found\"},{\"name\":\"sources\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"Sources if known\"},{\"name\":\"references\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"References\"},{\"name\":\"biomarkers\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"Biomarkers\"},{\"name\":\"conditions\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"Associated conditions\"},{\"name\":\"diagnosis\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Diagnosis\"},{\"name\":\"diagnosisStatus\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Diagnosis status\"},{\"name\":\"otherCondition\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Other condition\"},{\"name\":\"variantActionable\",\"type\":\"boolean\",\"doc\":\"If true, the association was made at the variant level, if not the association was made at Genomic Entity level\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** URL where reference information for this prognosis can be found */
   private java.lang.String referenceUrl;
  /** Sources if known */
   private java.util.List sources;
  /** References */
   private java.util.List references;
  /** Biomarkers */
   private java.util.List biomarkers;
  /** Associated conditions */
   private java.util.List conditions;
  /** Diagnosis */
   private java.lang.String diagnosis;
  /** Diagnosis status */
   private java.lang.String diagnosisStatus;
  /** Other condition */
   private java.lang.String otherCondition;
  /** If true, the association was made at the variant level, if not the association was made at Genomic Entity level */
   private boolean variantActionable;

  /**
   * 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 Diagnostic() {}

  /**
   * All-args constructor.
   */
  public Diagnostic(java.lang.String referenceUrl, java.util.List sources, java.util.List references, java.util.List biomarkers, java.util.List conditions, java.lang.String diagnosis, java.lang.String diagnosisStatus, java.lang.String otherCondition, java.lang.Boolean variantActionable) {
    this.referenceUrl = referenceUrl;
    this.sources = sources;
    this.references = references;
    this.biomarkers = biomarkers;
    this.conditions = conditions;
    this.diagnosis = diagnosis;
    this.diagnosisStatus = diagnosisStatus;
    this.otherCondition = otherCondition;
    this.variantActionable = variantActionable;
  }

  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 referenceUrl;
    case 1: return sources;
    case 2: return references;
    case 3: return biomarkers;
    case 4: return conditions;
    case 5: return diagnosis;
    case 6: return diagnosisStatus;
    case 7: return otherCondition;
    case 8: return variantActionable;
    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: referenceUrl = (java.lang.String)value$; break;
    case 1: sources = (java.util.List)value$; break;
    case 2: references = (java.util.List)value$; break;
    case 3: biomarkers = (java.util.List)value$; break;
    case 4: conditions = (java.util.List)value$; break;
    case 5: diagnosis = (java.lang.String)value$; break;
    case 6: diagnosisStatus = (java.lang.String)value$; break;
    case 7: otherCondition = (java.lang.String)value$; break;
    case 8: variantActionable = (java.lang.Boolean)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'referenceUrl' field.
   * URL where reference information for this prognosis can be found   */
  public java.lang.String getReferenceUrl() {
    return referenceUrl;
  }

  /**
   * Sets the value of the 'referenceUrl' field.
   * URL where reference information for this prognosis can be found   * @param value the value to set.
   */
  public void setReferenceUrl(java.lang.String value) {
    this.referenceUrl = value;
  }

  /**
   * Gets the value of the 'sources' field.
   * Sources if known   */
  public java.util.List getSources() {
    return sources;
  }

  /**
   * Sets the value of the 'sources' field.
   * Sources if known   * @param value the value to set.
   */
  public void setSources(java.util.List value) {
    this.sources = value;
  }

  /**
   * Gets the value of the 'references' field.
   * References   */
  public java.util.List getReferences() {
    return references;
  }

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

  /**
   * Gets the value of the 'biomarkers' field.
   * Biomarkers   */
  public java.util.List getBiomarkers() {
    return biomarkers;
  }

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

  /**
   * Gets the value of the 'conditions' field.
   * Associated conditions   */
  public java.util.List getConditions() {
    return conditions;
  }

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

  /**
   * Gets the value of the 'diagnosis' field.
   * Diagnosis   */
  public java.lang.String getDiagnosis() {
    return diagnosis;
  }

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

  /**
   * Gets the value of the 'diagnosisStatus' field.
   * Diagnosis status   */
  public java.lang.String getDiagnosisStatus() {
    return diagnosisStatus;
  }

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

  /**
   * Gets the value of the 'otherCondition' field.
   * Other condition   */
  public java.lang.String getOtherCondition() {
    return otherCondition;
  }

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

  /**
   * Gets the value of the 'variantActionable' field.
   * If true, the association was made at the variant level, if not the association was made at Genomic Entity level   */
  public java.lang.Boolean getVariantActionable() {
    return variantActionable;
  }

  /**
   * Sets the value of the 'variantActionable' field.
   * If true, the association was made at the variant level, if not the association was made at Genomic Entity level   * @param value the value to set.
   */
  public void setVariantActionable(java.lang.Boolean value) {
    this.variantActionable = value;
  }

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

    private java.lang.String referenceUrl;
    private java.util.List sources;
    private java.util.List references;
    private java.util.List biomarkers;
    private java.util.List conditions;
    private java.lang.String diagnosis;
    private java.lang.String diagnosisStatus;
    private java.lang.String otherCondition;
    private boolean variantActionable;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.Diagnostic.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.Diagnostic.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.referenceUrl)) {
        this.referenceUrl = data().deepCopy(fields()[0].schema(), other.referenceUrl);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.sources)) {
        this.sources = data().deepCopy(fields()[1].schema(), other.sources);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.references)) {
        this.references = data().deepCopy(fields()[2].schema(), other.references);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.biomarkers)) {
        this.biomarkers = data().deepCopy(fields()[3].schema(), other.biomarkers);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.conditions)) {
        this.conditions = data().deepCopy(fields()[4].schema(), other.conditions);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.diagnosis)) {
        this.diagnosis = data().deepCopy(fields()[5].schema(), other.diagnosis);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.diagnosisStatus)) {
        this.diagnosisStatus = data().deepCopy(fields()[6].schema(), other.diagnosisStatus);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.otherCondition)) {
        this.otherCondition = data().deepCopy(fields()[7].schema(), other.otherCondition);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.variantActionable)) {
        this.variantActionable = data().deepCopy(fields()[8].schema(), other.variantActionable);
        fieldSetFlags()[8] = true;
      }
    }
    
    /** Creates a Builder by copying an existing Diagnostic instance */
    private Builder(org.gel.models.report.avro.Diagnostic other) {
            super(org.gel.models.report.avro.Diagnostic.SCHEMA$);
      if (isValidValue(fields()[0], other.referenceUrl)) {
        this.referenceUrl = data().deepCopy(fields()[0].schema(), other.referenceUrl);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.sources)) {
        this.sources = data().deepCopy(fields()[1].schema(), other.sources);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.references)) {
        this.references = data().deepCopy(fields()[2].schema(), other.references);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.biomarkers)) {
        this.biomarkers = data().deepCopy(fields()[3].schema(), other.biomarkers);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.conditions)) {
        this.conditions = data().deepCopy(fields()[4].schema(), other.conditions);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.diagnosis)) {
        this.diagnosis = data().deepCopy(fields()[5].schema(), other.diagnosis);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.diagnosisStatus)) {
        this.diagnosisStatus = data().deepCopy(fields()[6].schema(), other.diagnosisStatus);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.otherCondition)) {
        this.otherCondition = data().deepCopy(fields()[7].schema(), other.otherCondition);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.variantActionable)) {
        this.variantActionable = data().deepCopy(fields()[8].schema(), other.variantActionable);
        fieldSetFlags()[8] = true;
      }
    }

    /** Gets the value of the 'referenceUrl' field */
    public java.lang.String getReferenceUrl() {
      return referenceUrl;
    }
    
    /** Sets the value of the 'referenceUrl' field */
    public org.gel.models.report.avro.Diagnostic.Builder setReferenceUrl(java.lang.String value) {
      validate(fields()[0], value);
      this.referenceUrl = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'referenceUrl' field has been set */
    public boolean hasReferenceUrl() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'referenceUrl' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearReferenceUrl() {
      referenceUrl = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'sources' field */
    public java.util.List getSources() {
      return sources;
    }
    
    /** Sets the value of the 'sources' field */
    public org.gel.models.report.avro.Diagnostic.Builder setSources(java.util.List value) {
      validate(fields()[1], value);
      this.sources = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'sources' field has been set */
    public boolean hasSources() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'sources' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearSources() {
      sources = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'references' field */
    public java.util.List getReferences() {
      return references;
    }
    
    /** Sets the value of the 'references' field */
    public org.gel.models.report.avro.Diagnostic.Builder setReferences(java.util.List value) {
      validate(fields()[2], value);
      this.references = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'references' field has been set */
    public boolean hasReferences() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'references' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearReferences() {
      references = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'biomarkers' field */
    public java.util.List getBiomarkers() {
      return biomarkers;
    }
    
    /** Sets the value of the 'biomarkers' field */
    public org.gel.models.report.avro.Diagnostic.Builder setBiomarkers(java.util.List value) {
      validate(fields()[3], value);
      this.biomarkers = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'biomarkers' field has been set */
    public boolean hasBiomarkers() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'biomarkers' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearBiomarkers() {
      biomarkers = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'conditions' field */
    public java.util.List getConditions() {
      return conditions;
    }
    
    /** Sets the value of the 'conditions' field */
    public org.gel.models.report.avro.Diagnostic.Builder setConditions(java.util.List value) {
      validate(fields()[4], value);
      this.conditions = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'conditions' field has been set */
    public boolean hasConditions() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'conditions' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearConditions() {
      conditions = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'diagnosis' field */
    public java.lang.String getDiagnosis() {
      return diagnosis;
    }
    
    /** Sets the value of the 'diagnosis' field */
    public org.gel.models.report.avro.Diagnostic.Builder setDiagnosis(java.lang.String value) {
      validate(fields()[5], value);
      this.diagnosis = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'diagnosis' field has been set */
    public boolean hasDiagnosis() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'diagnosis' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearDiagnosis() {
      diagnosis = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'diagnosisStatus' field */
    public java.lang.String getDiagnosisStatus() {
      return diagnosisStatus;
    }
    
    /** Sets the value of the 'diagnosisStatus' field */
    public org.gel.models.report.avro.Diagnostic.Builder setDiagnosisStatus(java.lang.String value) {
      validate(fields()[6], value);
      this.diagnosisStatus = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'diagnosisStatus' field has been set */
    public boolean hasDiagnosisStatus() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'diagnosisStatus' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearDiagnosisStatus() {
      diagnosisStatus = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    /** Gets the value of the 'otherCondition' field */
    public java.lang.String getOtherCondition() {
      return otherCondition;
    }
    
    /** Sets the value of the 'otherCondition' field */
    public org.gel.models.report.avro.Diagnostic.Builder setOtherCondition(java.lang.String value) {
      validate(fields()[7], value);
      this.otherCondition = value;
      fieldSetFlags()[7] = true;
      return this; 
    }
    
    /** Checks whether the 'otherCondition' field has been set */
    public boolean hasOtherCondition() {
      return fieldSetFlags()[7];
    }
    
    /** Clears the value of the 'otherCondition' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearOtherCondition() {
      otherCondition = null;
      fieldSetFlags()[7] = false;
      return this;
    }

    /** Gets the value of the 'variantActionable' field */
    public java.lang.Boolean getVariantActionable() {
      return variantActionable;
    }
    
    /** Sets the value of the 'variantActionable' field */
    public org.gel.models.report.avro.Diagnostic.Builder setVariantActionable(boolean value) {
      validate(fields()[8], value);
      this.variantActionable = value;
      fieldSetFlags()[8] = true;
      return this; 
    }
    
    /** Checks whether the 'variantActionable' field has been set */
    public boolean hasVariantActionable() {
      return fieldSetFlags()[8];
    }
    
    /** Clears the value of the 'variantActionable' field */
    public org.gel.models.report.avro.Diagnostic.Builder clearVariantActionable() {
      fieldSetFlags()[8] = false;
      return this;
    }

    @Override
    public Diagnostic build() {
      try {
        Diagnostic record = new Diagnostic();
        record.referenceUrl = fieldSetFlags()[0] ? this.referenceUrl : (java.lang.String) defaultValue(fields()[0]);
        record.sources = fieldSetFlags()[1] ? this.sources : (java.util.List) defaultValue(fields()[1]);
        record.references = fieldSetFlags()[2] ? this.references : (java.util.List) defaultValue(fields()[2]);
        record.biomarkers = fieldSetFlags()[3] ? this.biomarkers : (java.util.List) defaultValue(fields()[3]);
        record.conditions = fieldSetFlags()[4] ? this.conditions : (java.util.List) defaultValue(fields()[4]);
        record.diagnosis = fieldSetFlags()[5] ? this.diagnosis : (java.lang.String) defaultValue(fields()[5]);
        record.diagnosisStatus = fieldSetFlags()[6] ? this.diagnosisStatus : (java.lang.String) defaultValue(fields()[6]);
        record.otherCondition = fieldSetFlags()[7] ? this.otherCondition : (java.lang.String) defaultValue(fields()[7]);
        record.variantActionable = fieldSetFlags()[8] ? this.variantActionable : (java.lang.Boolean) defaultValue(fields()[8]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy