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

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

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
/** The variant level questions */
@org.apache.avro.specific.AvroGenerated
public class VariantLevelQuestions 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\":\"VariantLevelQuestions\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"The variant level questions\",\"fields\":[{\"name\":\"variantCoordinates\",\"type\":{\"type\":\"record\",\"name\":\"VariantCoordinates\",\"doc\":\"The variant coordinates representing uniquely a small variant.\\n    No multi-allelic variant supported, alternate only represents one alternate allele.\",\"fields\":[{\"name\":\"chromosome\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Chromosome without \\\"chr\\\" prefix (e.g. X rather than chrX)\"},{\"name\":\"position\",\"type\":\"int\",\"doc\":\"Genomic position\"},{\"name\":\"reference\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The reference bases.\"},{\"name\":\"alternate\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The alternate bases\"},{\"name\":\"assembly\",\"type\":{\"type\":\"enum\",\"name\":\"Assembly\",\"doc\":\"The reference genome assembly\",\"symbols\":[\"GRCh38\",\"GRCh37\"]},\"doc\":\"The assembly to which this variant corresponds\"}]},\"doc\":\"Variant coordinates\"},{\"name\":\"confirmationDecision\",\"type\":{\"type\":\"enum\",\"name\":\"ConfirmationDecision\",\"symbols\":[\"yes\",\"no\",\"na\"]},\"doc\":\"Did you carry out technical confirmation of this variant via an alternative test?\"},{\"name\":\"confirmationOutcome\",\"type\":{\"type\":\"enum\",\"name\":\"ConfirmationOutcome\",\"symbols\":[\"yes\",\"no\",\"na\"]},\"doc\":\"Did the test confirm that the variant is present?\"},{\"name\":\"reportingQuestion\",\"type\":{\"type\":\"enum\",\"name\":\"ReportingQuestion\",\"symbols\":[\"yes\",\"no\",\"na\"]},\"doc\":\"Did you include the variant in your report to the clinician?\"},{\"name\":\"acmgClassification\",\"type\":{\"type\":\"enum\",\"name\":\"ACMGClassification\",\"symbols\":[\"pathogenic_variant\",\"likely_pathogenic_variant\",\"variant_of_unknown_clinical_significance\",\"likely_benign_variant\",\"benign_variant\",\"not_assessed\",\"na\"]},\"doc\":\"What ACMG pathogenicity score (1-5) did you assign to this variant?\"},{\"name\":\"publications\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Please provide PMIDs for papers which you have used to inform your assessment for this variant, separated by a `;` for multiple papers\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Variant coordinates */
   private org.gel.models.report.avro.VariantCoordinates variantCoordinates;
  /** Did you carry out technical confirmation of this variant via an alternative test? */
   private org.gel.models.report.avro.ConfirmationDecision confirmationDecision;
  /** Did the test confirm that the variant is present? */
   private org.gel.models.report.avro.ConfirmationOutcome confirmationOutcome;
  /** Did you include the variant in your report to the clinician? */
   private org.gel.models.report.avro.ReportingQuestion reportingQuestion;
  /** What ACMG pathogenicity score (1-5) did you assign to this variant? */
   private org.gel.models.report.avro.ACMGClassification acmgClassification;
  /** Please provide PMIDs for papers which you have used to inform your assessment for this variant, separated by a `;` for multiple papers */
   private java.lang.String publications;

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

  /**
   * All-args constructor.
   */
  public VariantLevelQuestions(org.gel.models.report.avro.VariantCoordinates variantCoordinates, org.gel.models.report.avro.ConfirmationDecision confirmationDecision, org.gel.models.report.avro.ConfirmationOutcome confirmationOutcome, org.gel.models.report.avro.ReportingQuestion reportingQuestion, org.gel.models.report.avro.ACMGClassification acmgClassification, java.lang.String publications) {
    this.variantCoordinates = variantCoordinates;
    this.confirmationDecision = confirmationDecision;
    this.confirmationOutcome = confirmationOutcome;
    this.reportingQuestion = reportingQuestion;
    this.acmgClassification = acmgClassification;
    this.publications = publications;
  }

  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 variantCoordinates;
    case 1: return confirmationDecision;
    case 2: return confirmationOutcome;
    case 3: return reportingQuestion;
    case 4: return acmgClassification;
    case 5: return publications;
    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: variantCoordinates = (org.gel.models.report.avro.VariantCoordinates)value$; break;
    case 1: confirmationDecision = (org.gel.models.report.avro.ConfirmationDecision)value$; break;
    case 2: confirmationOutcome = (org.gel.models.report.avro.ConfirmationOutcome)value$; break;
    case 3: reportingQuestion = (org.gel.models.report.avro.ReportingQuestion)value$; break;
    case 4: acmgClassification = (org.gel.models.report.avro.ACMGClassification)value$; break;
    case 5: publications = (java.lang.String)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'variantCoordinates' field.
   * Variant coordinates   */
  public org.gel.models.report.avro.VariantCoordinates getVariantCoordinates() {
    return variantCoordinates;
  }

  /**
   * Sets the value of the 'variantCoordinates' field.
   * Variant coordinates   * @param value the value to set.
   */
  public void setVariantCoordinates(org.gel.models.report.avro.VariantCoordinates value) {
    this.variantCoordinates = value;
  }

  /**
   * Gets the value of the 'confirmationDecision' field.
   * Did you carry out technical confirmation of this variant via an alternative test?   */
  public org.gel.models.report.avro.ConfirmationDecision getConfirmationDecision() {
    return confirmationDecision;
  }

  /**
   * Sets the value of the 'confirmationDecision' field.
   * Did you carry out technical confirmation of this variant via an alternative test?   * @param value the value to set.
   */
  public void setConfirmationDecision(org.gel.models.report.avro.ConfirmationDecision value) {
    this.confirmationDecision = value;
  }

  /**
   * Gets the value of the 'confirmationOutcome' field.
   * Did the test confirm that the variant is present?   */
  public org.gel.models.report.avro.ConfirmationOutcome getConfirmationOutcome() {
    return confirmationOutcome;
  }

  /**
   * Sets the value of the 'confirmationOutcome' field.
   * Did the test confirm that the variant is present?   * @param value the value to set.
   */
  public void setConfirmationOutcome(org.gel.models.report.avro.ConfirmationOutcome value) {
    this.confirmationOutcome = value;
  }

  /**
   * Gets the value of the 'reportingQuestion' field.
   * Did you include the variant in your report to the clinician?   */
  public org.gel.models.report.avro.ReportingQuestion getReportingQuestion() {
    return reportingQuestion;
  }

  /**
   * Sets the value of the 'reportingQuestion' field.
   * Did you include the variant in your report to the clinician?   * @param value the value to set.
   */
  public void setReportingQuestion(org.gel.models.report.avro.ReportingQuestion value) {
    this.reportingQuestion = value;
  }

  /**
   * Gets the value of the 'acmgClassification' field.
   * What ACMG pathogenicity score (1-5) did you assign to this variant?   */
  public org.gel.models.report.avro.ACMGClassification getAcmgClassification() {
    return acmgClassification;
  }

  /**
   * Sets the value of the 'acmgClassification' field.
   * What ACMG pathogenicity score (1-5) did you assign to this variant?   * @param value the value to set.
   */
  public void setAcmgClassification(org.gel.models.report.avro.ACMGClassification value) {
    this.acmgClassification = value;
  }

  /**
   * Gets the value of the 'publications' field.
   * Please provide PMIDs for papers which you have used to inform your assessment for this variant, separated by a `;` for multiple papers   */
  public java.lang.String getPublications() {
    return publications;
  }

  /**
   * Sets the value of the 'publications' field.
   * Please provide PMIDs for papers which you have used to inform your assessment for this variant, separated by a `;` for multiple papers   * @param value the value to set.
   */
  public void setPublications(java.lang.String value) {
    this.publications = value;
  }

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

    private org.gel.models.report.avro.VariantCoordinates variantCoordinates;
    private org.gel.models.report.avro.ConfirmationDecision confirmationDecision;
    private org.gel.models.report.avro.ConfirmationOutcome confirmationOutcome;
    private org.gel.models.report.avro.ReportingQuestion reportingQuestion;
    private org.gel.models.report.avro.ACMGClassification acmgClassification;
    private java.lang.String publications;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.VariantLevelQuestions.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.VariantLevelQuestions.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.variantCoordinates)) {
        this.variantCoordinates = data().deepCopy(fields()[0].schema(), other.variantCoordinates);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.confirmationDecision)) {
        this.confirmationDecision = data().deepCopy(fields()[1].schema(), other.confirmationDecision);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.confirmationOutcome)) {
        this.confirmationOutcome = data().deepCopy(fields()[2].schema(), other.confirmationOutcome);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.reportingQuestion)) {
        this.reportingQuestion = data().deepCopy(fields()[3].schema(), other.reportingQuestion);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.acmgClassification)) {
        this.acmgClassification = data().deepCopy(fields()[4].schema(), other.acmgClassification);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.publications)) {
        this.publications = data().deepCopy(fields()[5].schema(), other.publications);
        fieldSetFlags()[5] = true;
      }
    }
    
    /** Creates a Builder by copying an existing VariantLevelQuestions instance */
    private Builder(org.gel.models.report.avro.VariantLevelQuestions other) {
            super(org.gel.models.report.avro.VariantLevelQuestions.SCHEMA$);
      if (isValidValue(fields()[0], other.variantCoordinates)) {
        this.variantCoordinates = data().deepCopy(fields()[0].schema(), other.variantCoordinates);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.confirmationDecision)) {
        this.confirmationDecision = data().deepCopy(fields()[1].schema(), other.confirmationDecision);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.confirmationOutcome)) {
        this.confirmationOutcome = data().deepCopy(fields()[2].schema(), other.confirmationOutcome);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.reportingQuestion)) {
        this.reportingQuestion = data().deepCopy(fields()[3].schema(), other.reportingQuestion);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.acmgClassification)) {
        this.acmgClassification = data().deepCopy(fields()[4].schema(), other.acmgClassification);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.publications)) {
        this.publications = data().deepCopy(fields()[5].schema(), other.publications);
        fieldSetFlags()[5] = true;
      }
    }

    /** Gets the value of the 'variantCoordinates' field */
    public org.gel.models.report.avro.VariantCoordinates getVariantCoordinates() {
      return variantCoordinates;
    }
    
    /** Sets the value of the 'variantCoordinates' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder setVariantCoordinates(org.gel.models.report.avro.VariantCoordinates value) {
      validate(fields()[0], value);
      this.variantCoordinates = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'variantCoordinates' field has been set */
    public boolean hasVariantCoordinates() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'variantCoordinates' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder clearVariantCoordinates() {
      variantCoordinates = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'confirmationDecision' field */
    public org.gel.models.report.avro.ConfirmationDecision getConfirmationDecision() {
      return confirmationDecision;
    }
    
    /** Sets the value of the 'confirmationDecision' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder setConfirmationDecision(org.gel.models.report.avro.ConfirmationDecision value) {
      validate(fields()[1], value);
      this.confirmationDecision = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'confirmationDecision' field has been set */
    public boolean hasConfirmationDecision() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'confirmationDecision' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder clearConfirmationDecision() {
      confirmationDecision = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'confirmationOutcome' field */
    public org.gel.models.report.avro.ConfirmationOutcome getConfirmationOutcome() {
      return confirmationOutcome;
    }
    
    /** Sets the value of the 'confirmationOutcome' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder setConfirmationOutcome(org.gel.models.report.avro.ConfirmationOutcome value) {
      validate(fields()[2], value);
      this.confirmationOutcome = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'confirmationOutcome' field has been set */
    public boolean hasConfirmationOutcome() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'confirmationOutcome' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder clearConfirmationOutcome() {
      confirmationOutcome = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'reportingQuestion' field */
    public org.gel.models.report.avro.ReportingQuestion getReportingQuestion() {
      return reportingQuestion;
    }
    
    /** Sets the value of the 'reportingQuestion' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder setReportingQuestion(org.gel.models.report.avro.ReportingQuestion value) {
      validate(fields()[3], value);
      this.reportingQuestion = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'reportingQuestion' field has been set */
    public boolean hasReportingQuestion() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'reportingQuestion' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder clearReportingQuestion() {
      reportingQuestion = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'acmgClassification' field */
    public org.gel.models.report.avro.ACMGClassification getAcmgClassification() {
      return acmgClassification;
    }
    
    /** Sets the value of the 'acmgClassification' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder setAcmgClassification(org.gel.models.report.avro.ACMGClassification value) {
      validate(fields()[4], value);
      this.acmgClassification = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'acmgClassification' field has been set */
    public boolean hasAcmgClassification() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'acmgClassification' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder clearAcmgClassification() {
      acmgClassification = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'publications' field */
    public java.lang.String getPublications() {
      return publications;
    }
    
    /** Sets the value of the 'publications' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder setPublications(java.lang.String value) {
      validate(fields()[5], value);
      this.publications = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'publications' field has been set */
    public boolean hasPublications() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'publications' field */
    public org.gel.models.report.avro.VariantLevelQuestions.Builder clearPublications() {
      publications = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    @Override
    public VariantLevelQuestions build() {
      try {
        VariantLevelQuestions record = new VariantLevelQuestions();
        record.variantCoordinates = fieldSetFlags()[0] ? this.variantCoordinates : (org.gel.models.report.avro.VariantCoordinates) defaultValue(fields()[0]);
        record.confirmationDecision = fieldSetFlags()[1] ? this.confirmationDecision : (org.gel.models.report.avro.ConfirmationDecision) defaultValue(fields()[1]);
        record.confirmationOutcome = fieldSetFlags()[2] ? this.confirmationOutcome : (org.gel.models.report.avro.ConfirmationOutcome) defaultValue(fields()[2]);
        record.reportingQuestion = fieldSetFlags()[3] ? this.reportingQuestion : (org.gel.models.report.avro.ReportingQuestion) defaultValue(fields()[3]);
        record.acmgClassification = fieldSetFlags()[4] ? this.acmgClassification : (org.gel.models.report.avro.ACMGClassification) defaultValue(fields()[4]);
        record.publications = fieldSetFlags()[5] ? this.publications : (java.lang.String) defaultValue(fields()[5]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy