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

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

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
/** The family level questions */
@org.apache.avro.specific.AvroGenerated
public class FamilyLevelQuestions 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\":\"FamilyLevelQuestions\",\"namespace\":\"org.gel.models.report.avro\",\"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\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Have the results reported here explained the genetic basis of the family’s presenting phenotype(s)? */
   private org.gel.models.report.avro.CaseSolvedFamily caseSolvedFamily;
  /** Have you done any segregation testing in non-participating family members? */
   private org.gel.models.report.avro.SegregationQuestion segregationQuestion;
  /** Comments regarding report */
   private java.lang.String additionalComments;

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

  /**
   * All-args constructor.
   */
  public FamilyLevelQuestions(org.gel.models.report.avro.CaseSolvedFamily caseSolvedFamily, org.gel.models.report.avro.SegregationQuestion segregationQuestion, java.lang.String additionalComments) {
    this.caseSolvedFamily = caseSolvedFamily;
    this.segregationQuestion = segregationQuestion;
    this.additionalComments = additionalComments;
  }

  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 caseSolvedFamily;
    case 1: return segregationQuestion;
    case 2: return additionalComments;
    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: caseSolvedFamily = (org.gel.models.report.avro.CaseSolvedFamily)value$; break;
    case 1: segregationQuestion = (org.gel.models.report.avro.SegregationQuestion)value$; break;
    case 2: additionalComments = (java.lang.String)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'caseSolvedFamily' field.
   * Have the results reported here explained the genetic basis of the family’s presenting phenotype(s)?   */
  public org.gel.models.report.avro.CaseSolvedFamily getCaseSolvedFamily() {
    return caseSolvedFamily;
  }

  /**
   * Sets the value of the 'caseSolvedFamily' field.
   * Have the results reported here explained the genetic basis of the family’s presenting phenotype(s)?   * @param value the value to set.
   */
  public void setCaseSolvedFamily(org.gel.models.report.avro.CaseSolvedFamily value) {
    this.caseSolvedFamily = value;
  }

  /**
   * Gets the value of the 'segregationQuestion' field.
   * Have you done any segregation testing in non-participating family members?   */
  public org.gel.models.report.avro.SegregationQuestion getSegregationQuestion() {
    return segregationQuestion;
  }

  /**
   * Sets the value of the 'segregationQuestion' field.
   * Have you done any segregation testing in non-participating family members?   * @param value the value to set.
   */
  public void setSegregationQuestion(org.gel.models.report.avro.SegregationQuestion value) {
    this.segregationQuestion = value;
  }

  /**
   * Gets the value of the 'additionalComments' field.
   * Comments regarding report   */
  public java.lang.String getAdditionalComments() {
    return additionalComments;
  }

  /**
   * Sets the value of the 'additionalComments' field.
   * Comments regarding report   * @param value the value to set.
   */
  public void setAdditionalComments(java.lang.String value) {
    this.additionalComments = value;
  }

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

    private org.gel.models.report.avro.CaseSolvedFamily caseSolvedFamily;
    private org.gel.models.report.avro.SegregationQuestion segregationQuestion;
    private java.lang.String additionalComments;

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

    /** Gets the value of the 'caseSolvedFamily' field */
    public org.gel.models.report.avro.CaseSolvedFamily getCaseSolvedFamily() {
      return caseSolvedFamily;
    }
    
    /** Sets the value of the 'caseSolvedFamily' field */
    public org.gel.models.report.avro.FamilyLevelQuestions.Builder setCaseSolvedFamily(org.gel.models.report.avro.CaseSolvedFamily value) {
      validate(fields()[0], value);
      this.caseSolvedFamily = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'caseSolvedFamily' field has been set */
    public boolean hasCaseSolvedFamily() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'caseSolvedFamily' field */
    public org.gel.models.report.avro.FamilyLevelQuestions.Builder clearCaseSolvedFamily() {
      caseSolvedFamily = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'segregationQuestion' field */
    public org.gel.models.report.avro.SegregationQuestion getSegregationQuestion() {
      return segregationQuestion;
    }
    
    /** Sets the value of the 'segregationQuestion' field */
    public org.gel.models.report.avro.FamilyLevelQuestions.Builder setSegregationQuestion(org.gel.models.report.avro.SegregationQuestion value) {
      validate(fields()[1], value);
      this.segregationQuestion = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'segregationQuestion' field has been set */
    public boolean hasSegregationQuestion() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'segregationQuestion' field */
    public org.gel.models.report.avro.FamilyLevelQuestions.Builder clearSegregationQuestion() {
      segregationQuestion = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'additionalComments' field */
    public java.lang.String getAdditionalComments() {
      return additionalComments;
    }
    
    /** Sets the value of the 'additionalComments' field */
    public org.gel.models.report.avro.FamilyLevelQuestions.Builder setAdditionalComments(java.lang.String value) {
      validate(fields()[2], value);
      this.additionalComments = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'additionalComments' field has been set */
    public boolean hasAdditionalComments() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'additionalComments' field */
    public org.gel.models.report.avro.FamilyLevelQuestions.Builder clearAdditionalComments() {
      additionalComments = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    @Override
    public FamilyLevelQuestions build() {
      try {
        FamilyLevelQuestions record = new FamilyLevelQuestions();
        record.caseSolvedFamily = fieldSetFlags()[0] ? this.caseSolvedFamily : (org.gel.models.report.avro.CaseSolvedFamily) defaultValue(fields()[0]);
        record.segregationQuestion = fieldSetFlags()[1] ? this.segregationQuestion : (org.gel.models.report.avro.SegregationQuestion) defaultValue(fields()[1]);
        record.additionalComments = fieldSetFlags()[2] ? this.additionalComments : (java.lang.String) defaultValue(fields()[2]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy