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

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

There is a newer version: 3.3.0
Show newest version
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
/** The rare disease program exit questionnaire */
@org.apache.avro.specific.AvroGenerated
public class RareDiseaseExitQuestionnaire 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\":\"RareDiseaseExitQuestionnaire\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"The rare disease program exit questionnaire\",\"fields\":[{\"name\":\"eventDate\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The date when the questionnaire was submitted\"},{\"name\":\"reporter\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The person that submitted the questionnaire\"},{\"name\":\"familyLevelQuestions\",\"type\":{\"type\":\"record\",\"name\":\"FamilyLevelQuestions\",\"doc\":\"The family level questions\",\"fields\":[{\"name\":\"caseSolvedFamily\",\"type\":{\"type\":\"enum\",\"name\":\"CaseSolvedFamily\",\"symbols\":[\"yes\",\"no\",\"partially\",\"unknown\"]},\"doc\":\"Have the results reported here explained the genetic basis of the family’s presenting phenotype(s)?\"},{\"name\":\"segregationQuestion\",\"type\":{\"type\":\"enum\",\"name\":\"SegregationQuestion\",\"symbols\":[\"yes\",\"no\"]},\"doc\":\"Have you done any segregation testing in non-participating family members?\"},{\"name\":\"additionalComments\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Comments regarding report\"}]},\"doc\":\"The set of questions at family level\"},{\"name\":\"variantGroupLevelQuestions\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"VariantGroupLevelQuestions\",\"doc\":\"The variant group level questions\",\"fields\":[{\"name\":\"variantGroup\",\"type\":\"int\",\"doc\":\"This value groups variants that together could explain the phenotype according to the mode of inheritance used.\\n        (e.g.: compound heterozygous). All the variants in the same report sharing the same value will be considered in\\n        the same group (i.e.: reported together). This value is an integer unique in the whole report.\\n        These values are only relevant within the same report.\"},{\"name\":\"variantLevelQuestions\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"VariantLevelQuestions\",\"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\"}]}}],\"doc\":\"Variant level questions for each of the variants in the group\"},{\"name\":\"shortTandemRepeatLevelQuestions\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ShortTandemRepeatLevelQuestions\",\"doc\":\"The variant level questions\",\"fields\":[{\"name\":\"coordinates\",\"type\":{\"type\":\"record\",\"name\":\"Coordinates\",\"fields\":[{\"name\":\"assembly\",\"type\":\"Assembly\",\"doc\":\"The assembly to which this variant corresponds\"},{\"name\":\"chromosome\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Chromosome without \\\"chr\\\" prefix (e.g. X rather than chrX)\"},{\"name\":\"start\",\"type\":\"int\",\"doc\":\"Start genomic position for variant (1-based)\"},{\"name\":\"end\",\"type\":\"int\",\"doc\":\"End genomic position for variant\"},{\"name\":\"ciStart\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"ConfidenceInterval\",\"fields\":[{\"name\":\"left\",\"type\":\"int\"},{\"name\":\"right\",\"type\":\"int\"}]}]},{\"name\":\"ciEnd\",\"type\":[\"null\",\"ConfidenceInterval\"]}]},\"doc\":\"Variant coordinates\"},{\"name\":\"confirmationDecision\",\"type\":\"ConfirmationDecision\",\"doc\":\"Did you carry out technical confirmation of this variant via an alternative test?\"},{\"name\":\"confirmationOutcome\",\"type\":\"ConfirmationOutcome\",\"doc\":\"Did the test confirm that the variant is present?\"},{\"name\":\"reportingQuestion\",\"type\":\"ReportingQuestion\",\"doc\":\"Did you include the variant in your report to the clinician?\"},{\"name\":\"acmgClassification\",\"type\":\"ACMGClassification\",\"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\"}]}}],\"doc\":\"STR level questions for each of the variants in the group\"},{\"name\":\"structuralVariantLevelQuestions\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"StructuralVariantLevelQuestions\",\"doc\":\"Structural variant level questions\",\"fields\":[{\"name\":\"variantType\",\"type\":{\"type\":\"enum\",\"name\":\"StructuralVariantType\",\"symbols\":[\"ins\",\"dup\",\"inv\",\"amplification\",\"deletion\",\"dup_tandem\",\"del_me\",\"ins_me\"]},\"doc\":\"Structural variant type\"},{\"name\":\"coordinates\",\"type\":\"Coordinates\",\"doc\":\"Variant coordinates\"},{\"name\":\"confirmationDecision\",\"type\":\"ConfirmationDecision\",\"doc\":\"Did you carry out technical confirmation of this variant via an alternative test?\"},{\"name\":\"confirmationOutcome\",\"type\":\"ConfirmationOutcome\",\"doc\":\"Did the test confirm that the variant is present?\"},{\"name\":\"reportingQuestion\",\"type\":\"ReportingQuestion\",\"doc\":\"Did you include the variant in your report to the clinician?\"},{\"name\":\"acmgClassification\",\"type\":\"ACMGClassification\",\"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\"}]}}],\"doc\":\"Structural level questions for each of the variants in the group\"},{\"name\":\"actionability\",\"type\":{\"type\":\"enum\",\"name\":\"Actionability\",\"symbols\":[\"yes\",\"no\",\"not_yet\",\"na\"]},\"doc\":\"Is evidence for this variant/variant pair sufficient to use it for clinical purposes such as prenatal diagnosis or predictive testing?\"},{\"name\":\"clinicalUtility\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"enum\",\"name\":\"ClinicalUtility\",\"symbols\":[\"none\",\"change_in_medication\",\"surgical_option\",\"additional_surveillance_for_proband_or_relatives\",\"clinical_trial_eligibility\",\"informs_reproductive_choice\",\"unknown\",\"other\"]}},\"doc\":\"Has the clinical team identified any changes to clinical care which could potentially arise as a result of this variant/variant pair?\"},{\"name\":\"phenotypesSolved\",\"type\":{\"type\":\"enum\",\"name\":\"PhenotypesSolved\",\"symbols\":[\"yes\",\"no\",\"partially\",\"unknown\"]},\"doc\":\"Did you report the variant(s) as being partially or completely causative of the family's presenting phenotype(s)?\"},{\"name\":\"phenotypesExplained\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"If you indicated that the variant(s) only partially explained the family’s presenting phenotypes, please indicate which HPO terms you are confident that they DO explain\"}]}},\"doc\":\"The list of variant g","roup level variants (ungrouped variants are to be set in single variant group)\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** The date when the questionnaire was submitted */
   private java.lang.String eventDate;
  /** The person that submitted the questionnaire */
   private java.lang.String reporter;
  /** The set of questions at family level */
   private org.gel.models.report.avro.FamilyLevelQuestions familyLevelQuestions;
  /** The list of variant group level variants (ungrouped variants are to be set in single variant group) */
   private java.util.List variantGroupLevelQuestions;

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

  /**
   * All-args constructor.
   */
  public RareDiseaseExitQuestionnaire(java.lang.String eventDate, java.lang.String reporter, org.gel.models.report.avro.FamilyLevelQuestions familyLevelQuestions, java.util.List variantGroupLevelQuestions) {
    this.eventDate = eventDate;
    this.reporter = reporter;
    this.familyLevelQuestions = familyLevelQuestions;
    this.variantGroupLevelQuestions = variantGroupLevelQuestions;
  }

  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 eventDate;
    case 1: return reporter;
    case 2: return familyLevelQuestions;
    case 3: return variantGroupLevelQuestions;
    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: eventDate = (java.lang.String)value$; break;
    case 1: reporter = (java.lang.String)value$; break;
    case 2: familyLevelQuestions = (org.gel.models.report.avro.FamilyLevelQuestions)value$; break;
    case 3: variantGroupLevelQuestions = (java.util.List)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'eventDate' field.
   * The date when the questionnaire was submitted   */
  public java.lang.String getEventDate() {
    return eventDate;
  }

  /**
   * Sets the value of the 'eventDate' field.
   * The date when the questionnaire was submitted   * @param value the value to set.
   */
  public void setEventDate(java.lang.String value) {
    this.eventDate = value;
  }

  /**
   * Gets the value of the 'reporter' field.
   * The person that submitted the questionnaire   */
  public java.lang.String getReporter() {
    return reporter;
  }

  /**
   * Sets the value of the 'reporter' field.
   * The person that submitted the questionnaire   * @param value the value to set.
   */
  public void setReporter(java.lang.String value) {
    this.reporter = value;
  }

  /**
   * Gets the value of the 'familyLevelQuestions' field.
   * The set of questions at family level   */
  public org.gel.models.report.avro.FamilyLevelQuestions getFamilyLevelQuestions() {
    return familyLevelQuestions;
  }

  /**
   * Sets the value of the 'familyLevelQuestions' field.
   * The set of questions at family level   * @param value the value to set.
   */
  public void setFamilyLevelQuestions(org.gel.models.report.avro.FamilyLevelQuestions value) {
    this.familyLevelQuestions = value;
  }

  /**
   * Gets the value of the 'variantGroupLevelQuestions' field.
   * The list of variant group level variants (ungrouped variants are to be set in single variant group)   */
  public java.util.List getVariantGroupLevelQuestions() {
    return variantGroupLevelQuestions;
  }

  /**
   * Sets the value of the 'variantGroupLevelQuestions' field.
   * The list of variant group level variants (ungrouped variants are to be set in single variant group)   * @param value the value to set.
   */
  public void setVariantGroupLevelQuestions(java.util.List value) {
    this.variantGroupLevelQuestions = value;
  }

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

    private java.lang.String eventDate;
    private java.lang.String reporter;
    private org.gel.models.report.avro.FamilyLevelQuestions familyLevelQuestions;
    private java.util.List variantGroupLevelQuestions;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.RareDiseaseExitQuestionnaire.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.eventDate)) {
        this.eventDate = data().deepCopy(fields()[0].schema(), other.eventDate);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.reporter)) {
        this.reporter = data().deepCopy(fields()[1].schema(), other.reporter);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.familyLevelQuestions)) {
        this.familyLevelQuestions = data().deepCopy(fields()[2].schema(), other.familyLevelQuestions);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.variantGroupLevelQuestions)) {
        this.variantGroupLevelQuestions = data().deepCopy(fields()[3].schema(), other.variantGroupLevelQuestions);
        fieldSetFlags()[3] = true;
      }
    }
    
    /** Creates a Builder by copying an existing RareDiseaseExitQuestionnaire instance */
    private Builder(org.gel.models.report.avro.RareDiseaseExitQuestionnaire other) {
            super(org.gel.models.report.avro.RareDiseaseExitQuestionnaire.SCHEMA$);
      if (isValidValue(fields()[0], other.eventDate)) {
        this.eventDate = data().deepCopy(fields()[0].schema(), other.eventDate);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.reporter)) {
        this.reporter = data().deepCopy(fields()[1].schema(), other.reporter);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.familyLevelQuestions)) {
        this.familyLevelQuestions = data().deepCopy(fields()[2].schema(), other.familyLevelQuestions);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.variantGroupLevelQuestions)) {
        this.variantGroupLevelQuestions = data().deepCopy(fields()[3].schema(), other.variantGroupLevelQuestions);
        fieldSetFlags()[3] = true;
      }
    }

    /** Gets the value of the 'eventDate' field */
    public java.lang.String getEventDate() {
      return eventDate;
    }
    
    /** Sets the value of the 'eventDate' field */
    public org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder setEventDate(java.lang.String value) {
      validate(fields()[0], value);
      this.eventDate = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'eventDate' field has been set */
    public boolean hasEventDate() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'eventDate' field */
    public org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder clearEventDate() {
      eventDate = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'reporter' field */
    public java.lang.String getReporter() {
      return reporter;
    }
    
    /** Sets the value of the 'reporter' field */
    public org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder setReporter(java.lang.String value) {
      validate(fields()[1], value);
      this.reporter = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'reporter' field has been set */
    public boolean hasReporter() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'reporter' field */
    public org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder clearReporter() {
      reporter = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'familyLevelQuestions' field */
    public org.gel.models.report.avro.FamilyLevelQuestions getFamilyLevelQuestions() {
      return familyLevelQuestions;
    }
    
    /** Sets the value of the 'familyLevelQuestions' field */
    public org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder setFamilyLevelQuestions(org.gel.models.report.avro.FamilyLevelQuestions value) {
      validate(fields()[2], value);
      this.familyLevelQuestions = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'familyLevelQuestions' field has been set */
    public boolean hasFamilyLevelQuestions() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'familyLevelQuestions' field */
    public org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder clearFamilyLevelQuestions() {
      familyLevelQuestions = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'variantGroupLevelQuestions' field */
    public java.util.List getVariantGroupLevelQuestions() {
      return variantGroupLevelQuestions;
    }
    
    /** Sets the value of the 'variantGroupLevelQuestions' field */
    public org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder setVariantGroupLevelQuestions(java.util.List value) {
      validate(fields()[3], value);
      this.variantGroupLevelQuestions = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'variantGroupLevelQuestions' field has been set */
    public boolean hasVariantGroupLevelQuestions() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'variantGroupLevelQuestions' field */
    public org.gel.models.report.avro.RareDiseaseExitQuestionnaire.Builder clearVariantGroupLevelQuestions() {
      variantGroupLevelQuestions = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    @Override
    public RareDiseaseExitQuestionnaire build() {
      try {
        RareDiseaseExitQuestionnaire record = new RareDiseaseExitQuestionnaire();
        record.eventDate = fieldSetFlags()[0] ? this.eventDate : (java.lang.String) defaultValue(fields()[0]);
        record.reporter = fieldSetFlags()[1] ? this.reporter : (java.lang.String) defaultValue(fields()[1]);
        record.familyLevelQuestions = fieldSetFlags()[2] ? this.familyLevelQuestions : (org.gel.models.report.avro.FamilyLevelQuestions) defaultValue(fields()[2]);
        record.variantGroupLevelQuestions = fieldSetFlags()[3] ? this.variantGroupLevelQuestions : (java.util.List) defaultValue(fields()[3]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy