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

org.dummy.avro.DummyClinicalReport Maven / Gradle / Ivy

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.dummy.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class DummyClinicalReport 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\":\"DummyClinicalReport\",\"namespace\":\"org.dummy.avro\",\"fields\":[{\"name\":\"valid\",\"type\":\"boolean\"},{\"name\":\"exit_questionnaire\",\"type\":{\"type\":\"record\",\"name\":\"DummyExit\",\"fields\":[{\"name\":\"created_at\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"exit_questionnaire_data\",\"type\":{\"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 group level variants (ungrouped variants are to be set in single variant group)\"}]}}]}}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
   private boolean valid;
   private org.dummy.avro.DummyExit exit_questionnaire;

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

  /**
   * All-args constructor.
   */
  public DummyClinicalReport(java.lang.Boolean valid, org.dummy.avro.DummyExit exit_questionnaire) {
    this.valid = valid;
    this.exit_questionnaire = exit_questionnaire;
  }

  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 valid;
    case 1: return exit_questionnaire;
    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: valid = (java.lang.Boolean)value$; break;
    case 1: exit_questionnaire = (org.dummy.avro.DummyExit)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'valid' field.
   */
  public java.lang.Boolean getValid() {
    return valid;
  }

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

  /**
   * Gets the value of the 'exit_questionnaire' field.
   */
  public org.dummy.avro.DummyExit getExitQuestionnaire() {
    return exit_questionnaire;
  }

  /**
   * Sets the value of the 'exit_questionnaire' field.
   * @param value the value to set.
   */
  public void setExitQuestionnaire(org.dummy.avro.DummyExit value) {
    this.exit_questionnaire = value;
  }

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

    private boolean valid;
    private org.dummy.avro.DummyExit exit_questionnaire;

    /** Creates a new Builder */
    private Builder() {
      super(org.dummy.avro.DummyClinicalReport.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.dummy.avro.DummyClinicalReport.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.valid)) {
        this.valid = data().deepCopy(fields()[0].schema(), other.valid);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.exit_questionnaire)) {
        this.exit_questionnaire = data().deepCopy(fields()[1].schema(), other.exit_questionnaire);
        fieldSetFlags()[1] = true;
      }
    }
    
    /** Creates a Builder by copying an existing DummyClinicalReport instance */
    private Builder(org.dummy.avro.DummyClinicalReport other) {
            super(org.dummy.avro.DummyClinicalReport.SCHEMA$);
      if (isValidValue(fields()[0], other.valid)) {
        this.valid = data().deepCopy(fields()[0].schema(), other.valid);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.exit_questionnaire)) {
        this.exit_questionnaire = data().deepCopy(fields()[1].schema(), other.exit_questionnaire);
        fieldSetFlags()[1] = true;
      }
    }

    /** Gets the value of the 'valid' field */
    public java.lang.Boolean getValid() {
      return valid;
    }
    
    /** Sets the value of the 'valid' field */
    public org.dummy.avro.DummyClinicalReport.Builder setValid(boolean value) {
      validate(fields()[0], value);
      this.valid = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'valid' field has been set */
    public boolean hasValid() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'valid' field */
    public org.dummy.avro.DummyClinicalReport.Builder clearValid() {
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'exit_questionnaire' field */
    public org.dummy.avro.DummyExit getExitQuestionnaire() {
      return exit_questionnaire;
    }
    
    /** Sets the value of the 'exit_questionnaire' field */
    public org.dummy.avro.DummyClinicalReport.Builder setExitQuestionnaire(org.dummy.avro.DummyExit value) {
      validate(fields()[1], value);
      this.exit_questionnaire = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'exit_questionnaire' field has been set */
    public boolean hasExitQuestionnaire() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'exit_questionnaire' field */
    public org.dummy.avro.DummyClinicalReport.Builder clearExitQuestionnaire() {
      exit_questionnaire = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    @Override
    public DummyClinicalReport build() {
      try {
        DummyClinicalReport record = new DummyClinicalReport();
        record.valid = fieldSetFlags()[0] ? this.valid : (java.lang.Boolean) defaultValue(fields()[0]);
        record.exit_questionnaire = fieldSetFlags()[1] ? this.exit_questionnaire : (org.dummy.avro.DummyExit) defaultValue(fields()[1]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy