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

org.gel.models.report.avro.AcmgEvidence 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")
/** AcmgEvidence. This should be buit for each one of the evidences assing to a variants following the ACMG guidelines.
    An AcmgEvidence, should map with one of the criteria defined, i.e, PVS1, BA1, PM1... */
@org.apache.avro.specific.AvroGenerated
public class AcmgEvidence 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\":\"AcmgEvidence\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"AcmgEvidence. This should be buit for each one of the evidences assing to a variants following the ACMG guidelines.\\n    An AcmgEvidence, should map with one of the criteria defined, i.e, PVS1, BA1, PM1...\",\"fields\":[{\"name\":\"category\",\"type\":{\"type\":\"enum\",\"name\":\"AcmgEvidenceCategory\",\"doc\":\"Each ACMG criterion is classified in one of these categories\",\"symbols\":[\"population_data\",\"computational_and_predictive_data\",\"functional_data\",\"segregation_data\",\"de_novo_data\",\"allelic_data\",\"other_database\",\"other_data\"]},\"doc\":\"Evidence category as defined in ACMG guidelines\"},{\"name\":\"type\",\"type\":{\"type\":\"enum\",\"name\":\"AcmgEvidenceType\",\"doc\":\"Each ACMG cirterion will be classifed as benign or pathogenic\",\"symbols\":[\"benign\",\"pathogenic\"]},\"doc\":\"Evidence type: benign or pathogenic\"},{\"name\":\"weight\",\"type\":{\"type\":\"enum\",\"name\":\"AcmgEvidenceWeight\",\"doc\":\"Each ACMG criterion is weighted using the following terms:\\n\\n* `stand_alone`: `A`, stand-alone applied for benign variant critieria `(BA1)`\\n* `supporting`: `P`, supporting applied for benign variant critieria `(BP1-6)` and pathogenic variant criteria `(PP1-5)`\\n* `moderate`: `M`, moderate applied for pathogenic variant critieria (PM1-6)\\n* `strong`: `S`, strong applied for pathogenic variant critieria (PS1-4)\\n* `very_strong`: `S`, Very Stong applied for pathogenic variant critieria (PVS1)\",\"symbols\":[\"stand_alone\",\"supporting\",\"moderate\",\"strong\",\"very_strong\"]},\"doc\":\"Default strength for criterion as defined in Table 3 of ACMG guidelines (Richards et al 2015). e.g. PM2 would be \\\"moderate\\\"\"},{\"name\":\"modifier\",\"type\":\"int\",\"doc\":\"The number suffix at the end of the ACMG criteria code e.g PM2 would be 2\"},{\"name\":\"activationStrength\",\"type\":{\"type\":\"enum\",\"name\":\"ActivationStrength\",\"doc\":\"Activation Strength enumeration:\\n* `strong`\\n* `moderate`\\n* `supporting`\\n* `very_strong`\\n* `stand_alone`\",\"symbols\":[\"strong\",\"moderate\",\"supporting\",\"very_strong\",\"stand_alone\"]},\"doc\":\"The strength this criterion has been used at in this interpretation. e.g. if PM2 was only used at \\\"supporting\\\" rather than \\\"moderate\\\", the activation strength would be \\\"supporting\\\"\"},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The description of the evidence as described in ACMG guidelines e.g. for PM2 the description would be \\\"Absent from controls (or at extremely low frequency if recessive) in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium\\\"\"},{\"name\":\"comments\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"UserComment\",\"fields\":[{\"name\":\"comment\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Comment text\"},{\"name\":\"user\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"userid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Azure Active Directory immutable user OID\"},{\"name\":\"email\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"User email address\"},{\"name\":\"username\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Username\"},{\"name\":\"role\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"groups\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}]}],\"doc\":\"User who created comment\"},{\"name\":\"timestamp\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Date and time comment was created (ISO 8601 datetime with seconds and timezone e.g. 2020-11-23T15:52:36+00:00)\"}]}}],\"doc\":\"User comments attached to this ACMG criteria in this case\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Evidence category as defined in ACMG guidelines */
   private org.gel.models.report.avro.AcmgEvidenceCategory category;
  /** Evidence type: benign or pathogenic */
   private org.gel.models.report.avro.AcmgEvidenceType type;
  /** Default strength for criterion as defined in Table 3 of ACMG guidelines (Richards et al 2015). e.g. PM2 would be "moderate" */
   private org.gel.models.report.avro.AcmgEvidenceWeight weight;
  /** The number suffix at the end of the ACMG criteria code e.g PM2 would be 2 */
   private int modifier;
  /** The strength this criterion has been used at in this interpretation. e.g. if PM2 was only used at "supporting" rather than "moderate", the activation strength would be "supporting" */
   private org.gel.models.report.avro.ActivationStrength activationStrength;
  /** The description of the evidence as described in ACMG guidelines e.g. for PM2 the description would be "Absent from controls (or at extremely low frequency if recessive) in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium" */
   private java.lang.String description;
  /** User comments attached to this ACMG criteria in this case */
   private java.util.List comments;

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

  /**
   * All-args constructor.
   */
  public AcmgEvidence(org.gel.models.report.avro.AcmgEvidenceCategory category, org.gel.models.report.avro.AcmgEvidenceType type, org.gel.models.report.avro.AcmgEvidenceWeight weight, java.lang.Integer modifier, org.gel.models.report.avro.ActivationStrength activationStrength, java.lang.String description, java.util.List comments) {
    this.category = category;
    this.type = type;
    this.weight = weight;
    this.modifier = modifier;
    this.activationStrength = activationStrength;
    this.description = description;
    this.comments = comments;
  }

  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 category;
    case 1: return type;
    case 2: return weight;
    case 3: return modifier;
    case 4: return activationStrength;
    case 5: return description;
    case 6: return comments;
    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: category = (org.gel.models.report.avro.AcmgEvidenceCategory)value$; break;
    case 1: type = (org.gel.models.report.avro.AcmgEvidenceType)value$; break;
    case 2: weight = (org.gel.models.report.avro.AcmgEvidenceWeight)value$; break;
    case 3: modifier = (java.lang.Integer)value$; break;
    case 4: activationStrength = (org.gel.models.report.avro.ActivationStrength)value$; break;
    case 5: description = (java.lang.String)value$; break;
    case 6: comments = (java.util.List)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'category' field.
   * Evidence category as defined in ACMG guidelines   */
  public org.gel.models.report.avro.AcmgEvidenceCategory getCategory() {
    return category;
  }

  /**
   * Sets the value of the 'category' field.
   * Evidence category as defined in ACMG guidelines   * @param value the value to set.
   */
  public void setCategory(org.gel.models.report.avro.AcmgEvidenceCategory value) {
    this.category = value;
  }

  /**
   * Gets the value of the 'type' field.
   * Evidence type: benign or pathogenic   */
  public org.gel.models.report.avro.AcmgEvidenceType getType() {
    return type;
  }

  /**
   * Sets the value of the 'type' field.
   * Evidence type: benign or pathogenic   * @param value the value to set.
   */
  public void setType(org.gel.models.report.avro.AcmgEvidenceType value) {
    this.type = value;
  }

  /**
   * Gets the value of the 'weight' field.
   * Default strength for criterion as defined in Table 3 of ACMG guidelines (Richards et al 2015). e.g. PM2 would be "moderate"   */
  public org.gel.models.report.avro.AcmgEvidenceWeight getWeight() {
    return weight;
  }

  /**
   * Sets the value of the 'weight' field.
   * Default strength for criterion as defined in Table 3 of ACMG guidelines (Richards et al 2015). e.g. PM2 would be "moderate"   * @param value the value to set.
   */
  public void setWeight(org.gel.models.report.avro.AcmgEvidenceWeight value) {
    this.weight = value;
  }

  /**
   * Gets the value of the 'modifier' field.
   * The number suffix at the end of the ACMG criteria code e.g PM2 would be 2   */
  public java.lang.Integer getModifier() {
    return modifier;
  }

  /**
   * Sets the value of the 'modifier' field.
   * The number suffix at the end of the ACMG criteria code e.g PM2 would be 2   * @param value the value to set.
   */
  public void setModifier(java.lang.Integer value) {
    this.modifier = value;
  }

  /**
   * Gets the value of the 'activationStrength' field.
   * The strength this criterion has been used at in this interpretation. e.g. if PM2 was only used at "supporting" rather than "moderate", the activation strength would be "supporting"   */
  public org.gel.models.report.avro.ActivationStrength getActivationStrength() {
    return activationStrength;
  }

  /**
   * Sets the value of the 'activationStrength' field.
   * The strength this criterion has been used at in this interpretation. e.g. if PM2 was only used at "supporting" rather than "moderate", the activation strength would be "supporting"   * @param value the value to set.
   */
  public void setActivationStrength(org.gel.models.report.avro.ActivationStrength value) {
    this.activationStrength = value;
  }

  /**
   * Gets the value of the 'description' field.
   * The description of the evidence as described in ACMG guidelines e.g. for PM2 the description would be "Absent from controls (or at extremely low frequency if recessive) in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium"   */
  public java.lang.String getDescription() {
    return description;
  }

  /**
   * Sets the value of the 'description' field.
   * The description of the evidence as described in ACMG guidelines e.g. for PM2 the description would be "Absent from controls (or at extremely low frequency if recessive) in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium"   * @param value the value to set.
   */
  public void setDescription(java.lang.String value) {
    this.description = value;
  }

  /**
   * Gets the value of the 'comments' field.
   * User comments attached to this ACMG criteria in this case   */
  public java.util.List getComments() {
    return comments;
  }

  /**
   * Sets the value of the 'comments' field.
   * User comments attached to this ACMG criteria in this case   * @param value the value to set.
   */
  public void setComments(java.util.List value) {
    this.comments = value;
  }

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

    private org.gel.models.report.avro.AcmgEvidenceCategory category;
    private org.gel.models.report.avro.AcmgEvidenceType type;
    private org.gel.models.report.avro.AcmgEvidenceWeight weight;
    private int modifier;
    private org.gel.models.report.avro.ActivationStrength activationStrength;
    private java.lang.String description;
    private java.util.List comments;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.AcmgEvidence.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.AcmgEvidence.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.category)) {
        this.category = data().deepCopy(fields()[0].schema(), other.category);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.type)) {
        this.type = data().deepCopy(fields()[1].schema(), other.type);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.weight)) {
        this.weight = data().deepCopy(fields()[2].schema(), other.weight);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.modifier)) {
        this.modifier = data().deepCopy(fields()[3].schema(), other.modifier);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.activationStrength)) {
        this.activationStrength = data().deepCopy(fields()[4].schema(), other.activationStrength);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.description)) {
        this.description = data().deepCopy(fields()[5].schema(), other.description);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.comments)) {
        this.comments = data().deepCopy(fields()[6].schema(), other.comments);
        fieldSetFlags()[6] = true;
      }
    }
    
    /** Creates a Builder by copying an existing AcmgEvidence instance */
    private Builder(org.gel.models.report.avro.AcmgEvidence other) {
            super(org.gel.models.report.avro.AcmgEvidence.SCHEMA$);
      if (isValidValue(fields()[0], other.category)) {
        this.category = data().deepCopy(fields()[0].schema(), other.category);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.type)) {
        this.type = data().deepCopy(fields()[1].schema(), other.type);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.weight)) {
        this.weight = data().deepCopy(fields()[2].schema(), other.weight);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.modifier)) {
        this.modifier = data().deepCopy(fields()[3].schema(), other.modifier);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.activationStrength)) {
        this.activationStrength = data().deepCopy(fields()[4].schema(), other.activationStrength);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.description)) {
        this.description = data().deepCopy(fields()[5].schema(), other.description);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.comments)) {
        this.comments = data().deepCopy(fields()[6].schema(), other.comments);
        fieldSetFlags()[6] = true;
      }
    }

    /** Gets the value of the 'category' field */
    public org.gel.models.report.avro.AcmgEvidenceCategory getCategory() {
      return category;
    }
    
    /** Sets the value of the 'category' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder setCategory(org.gel.models.report.avro.AcmgEvidenceCategory value) {
      validate(fields()[0], value);
      this.category = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'category' field has been set */
    public boolean hasCategory() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'category' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder clearCategory() {
      category = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'type' field */
    public org.gel.models.report.avro.AcmgEvidenceType getType() {
      return type;
    }
    
    /** Sets the value of the 'type' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder setType(org.gel.models.report.avro.AcmgEvidenceType value) {
      validate(fields()[1], value);
      this.type = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'type' field has been set */
    public boolean hasType() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'type' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder clearType() {
      type = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'weight' field */
    public org.gel.models.report.avro.AcmgEvidenceWeight getWeight() {
      return weight;
    }
    
    /** Sets the value of the 'weight' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder setWeight(org.gel.models.report.avro.AcmgEvidenceWeight value) {
      validate(fields()[2], value);
      this.weight = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'weight' field has been set */
    public boolean hasWeight() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'weight' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder clearWeight() {
      weight = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'modifier' field */
    public java.lang.Integer getModifier() {
      return modifier;
    }
    
    /** Sets the value of the 'modifier' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder setModifier(int value) {
      validate(fields()[3], value);
      this.modifier = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'modifier' field has been set */
    public boolean hasModifier() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'modifier' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder clearModifier() {
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'activationStrength' field */
    public org.gel.models.report.avro.ActivationStrength getActivationStrength() {
      return activationStrength;
    }
    
    /** Sets the value of the 'activationStrength' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder setActivationStrength(org.gel.models.report.avro.ActivationStrength value) {
      validate(fields()[4], value);
      this.activationStrength = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'activationStrength' field has been set */
    public boolean hasActivationStrength() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'activationStrength' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder clearActivationStrength() {
      activationStrength = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'description' field */
    public java.lang.String getDescription() {
      return description;
    }
    
    /** Sets the value of the 'description' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder setDescription(java.lang.String value) {
      validate(fields()[5], value);
      this.description = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'description' field has been set */
    public boolean hasDescription() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'description' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder clearDescription() {
      description = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'comments' field */
    public java.util.List getComments() {
      return comments;
    }
    
    /** Sets the value of the 'comments' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder setComments(java.util.List value) {
      validate(fields()[6], value);
      this.comments = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'comments' field has been set */
    public boolean hasComments() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'comments' field */
    public org.gel.models.report.avro.AcmgEvidence.Builder clearComments() {
      comments = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    @Override
    public AcmgEvidence build() {
      try {
        AcmgEvidence record = new AcmgEvidence();
        record.category = fieldSetFlags()[0] ? this.category : (org.gel.models.report.avro.AcmgEvidenceCategory) defaultValue(fields()[0]);
        record.type = fieldSetFlags()[1] ? this.type : (org.gel.models.report.avro.AcmgEvidenceType) defaultValue(fields()[1]);
        record.weight = fieldSetFlags()[2] ? this.weight : (org.gel.models.report.avro.AcmgEvidenceWeight) defaultValue(fields()[2]);
        record.modifier = fieldSetFlags()[3] ? this.modifier : (java.lang.Integer) defaultValue(fields()[3]);
        record.activationStrength = fieldSetFlags()[4] ? this.activationStrength : (org.gel.models.report.avro.ActivationStrength) defaultValue(fields()[4]);
        record.description = fieldSetFlags()[5] ? this.description : (java.lang.String) defaultValue(fields()[5]);
        record.comments = fieldSetFlags()[6] ? this.comments : (java.util.List) defaultValue(fields()[6]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy