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

org.gel.models.participant.avro.DiagnosticDetail Maven / Gradle / Ivy

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.participant.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class DiagnosticDetail 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\":\"DiagnosticDetail\",\"namespace\":\"org.gel.models.participant.avro\",\"fields\":[{\"name\":\"diagnosisCodingSystem\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Diagnosis coding system\"},{\"name\":\"diagnosisCodingSystemVersion\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Diagnosis Coding System Version\"},{\"name\":\"diagnosisCode\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Diagnosis Code\"},{\"name\":\"diagnosisDescription\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Diagnosis description\"},{\"name\":\"diagnosisCertainty\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Diagnosis Certainty\"},{\"name\":\"ageAtOnsetInYears\",\"type\":[\"null\",\"float\"],\"doc\":\"Age at diagnosis\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Diagnosis coding system */
   private java.lang.String diagnosisCodingSystem;
  /** Diagnosis Coding System Version */
   private java.lang.String diagnosisCodingSystemVersion;
  /** Diagnosis Code */
   private java.lang.String diagnosisCode;
  /** Diagnosis description */
   private java.lang.String diagnosisDescription;
  /** Diagnosis Certainty */
   private java.lang.String diagnosisCertainty;
  /** Age at diagnosis */
   private java.lang.Float ageAtOnsetInYears;

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

  /**
   * All-args constructor.
   */
  public DiagnosticDetail(java.lang.String diagnosisCodingSystem, java.lang.String diagnosisCodingSystemVersion, java.lang.String diagnosisCode, java.lang.String diagnosisDescription, java.lang.String diagnosisCertainty, java.lang.Float ageAtOnsetInYears) {
    this.diagnosisCodingSystem = diagnosisCodingSystem;
    this.diagnosisCodingSystemVersion = diagnosisCodingSystemVersion;
    this.diagnosisCode = diagnosisCode;
    this.diagnosisDescription = diagnosisDescription;
    this.diagnosisCertainty = diagnosisCertainty;
    this.ageAtOnsetInYears = ageAtOnsetInYears;
  }

  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 diagnosisCodingSystem;
    case 1: return diagnosisCodingSystemVersion;
    case 2: return diagnosisCode;
    case 3: return diagnosisDescription;
    case 4: return diagnosisCertainty;
    case 5: return ageAtOnsetInYears;
    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: diagnosisCodingSystem = (java.lang.String)value$; break;
    case 1: diagnosisCodingSystemVersion = (java.lang.String)value$; break;
    case 2: diagnosisCode = (java.lang.String)value$; break;
    case 3: diagnosisDescription = (java.lang.String)value$; break;
    case 4: diagnosisCertainty = (java.lang.String)value$; break;
    case 5: ageAtOnsetInYears = (java.lang.Float)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'diagnosisCodingSystem' field.
   * Diagnosis coding system   */
  public java.lang.String getDiagnosisCodingSystem() {
    return diagnosisCodingSystem;
  }

  /**
   * Sets the value of the 'diagnosisCodingSystem' field.
   * Diagnosis coding system   * @param value the value to set.
   */
  public void setDiagnosisCodingSystem(java.lang.String value) {
    this.diagnosisCodingSystem = value;
  }

  /**
   * Gets the value of the 'diagnosisCodingSystemVersion' field.
   * Diagnosis Coding System Version   */
  public java.lang.String getDiagnosisCodingSystemVersion() {
    return diagnosisCodingSystemVersion;
  }

  /**
   * Sets the value of the 'diagnosisCodingSystemVersion' field.
   * Diagnosis Coding System Version   * @param value the value to set.
   */
  public void setDiagnosisCodingSystemVersion(java.lang.String value) {
    this.diagnosisCodingSystemVersion = value;
  }

  /**
   * Gets the value of the 'diagnosisCode' field.
   * Diagnosis Code   */
  public java.lang.String getDiagnosisCode() {
    return diagnosisCode;
  }

  /**
   * Sets the value of the 'diagnosisCode' field.
   * Diagnosis Code   * @param value the value to set.
   */
  public void setDiagnosisCode(java.lang.String value) {
    this.diagnosisCode = value;
  }

  /**
   * Gets the value of the 'diagnosisDescription' field.
   * Diagnosis description   */
  public java.lang.String getDiagnosisDescription() {
    return diagnosisDescription;
  }

  /**
   * Sets the value of the 'diagnosisDescription' field.
   * Diagnosis description   * @param value the value to set.
   */
  public void setDiagnosisDescription(java.lang.String value) {
    this.diagnosisDescription = value;
  }

  /**
   * Gets the value of the 'diagnosisCertainty' field.
   * Diagnosis Certainty   */
  public java.lang.String getDiagnosisCertainty() {
    return diagnosisCertainty;
  }

  /**
   * Sets the value of the 'diagnosisCertainty' field.
   * Diagnosis Certainty   * @param value the value to set.
   */
  public void setDiagnosisCertainty(java.lang.String value) {
    this.diagnosisCertainty = value;
  }

  /**
   * Gets the value of the 'ageAtOnsetInYears' field.
   * Age at diagnosis   */
  public java.lang.Float getAgeAtOnsetInYears() {
    return ageAtOnsetInYears;
  }

  /**
   * Sets the value of the 'ageAtOnsetInYears' field.
   * Age at diagnosis   * @param value the value to set.
   */
  public void setAgeAtOnsetInYears(java.lang.Float value) {
    this.ageAtOnsetInYears = value;
  }

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

    private java.lang.String diagnosisCodingSystem;
    private java.lang.String diagnosisCodingSystemVersion;
    private java.lang.String diagnosisCode;
    private java.lang.String diagnosisDescription;
    private java.lang.String diagnosisCertainty;
    private java.lang.Float ageAtOnsetInYears;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.participant.avro.DiagnosticDetail.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.participant.avro.DiagnosticDetail.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.diagnosisCodingSystem)) {
        this.diagnosisCodingSystem = data().deepCopy(fields()[0].schema(), other.diagnosisCodingSystem);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.diagnosisCodingSystemVersion)) {
        this.diagnosisCodingSystemVersion = data().deepCopy(fields()[1].schema(), other.diagnosisCodingSystemVersion);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.diagnosisCode)) {
        this.diagnosisCode = data().deepCopy(fields()[2].schema(), other.diagnosisCode);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.diagnosisDescription)) {
        this.diagnosisDescription = data().deepCopy(fields()[3].schema(), other.diagnosisDescription);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.diagnosisCertainty)) {
        this.diagnosisCertainty = data().deepCopy(fields()[4].schema(), other.diagnosisCertainty);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.ageAtOnsetInYears)) {
        this.ageAtOnsetInYears = data().deepCopy(fields()[5].schema(), other.ageAtOnsetInYears);
        fieldSetFlags()[5] = true;
      }
    }
    
    /** Creates a Builder by copying an existing DiagnosticDetail instance */
    private Builder(org.gel.models.participant.avro.DiagnosticDetail other) {
            super(org.gel.models.participant.avro.DiagnosticDetail.SCHEMA$);
      if (isValidValue(fields()[0], other.diagnosisCodingSystem)) {
        this.diagnosisCodingSystem = data().deepCopy(fields()[0].schema(), other.diagnosisCodingSystem);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.diagnosisCodingSystemVersion)) {
        this.diagnosisCodingSystemVersion = data().deepCopy(fields()[1].schema(), other.diagnosisCodingSystemVersion);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.diagnosisCode)) {
        this.diagnosisCode = data().deepCopy(fields()[2].schema(), other.diagnosisCode);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.diagnosisDescription)) {
        this.diagnosisDescription = data().deepCopy(fields()[3].schema(), other.diagnosisDescription);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.diagnosisCertainty)) {
        this.diagnosisCertainty = data().deepCopy(fields()[4].schema(), other.diagnosisCertainty);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.ageAtOnsetInYears)) {
        this.ageAtOnsetInYears = data().deepCopy(fields()[5].schema(), other.ageAtOnsetInYears);
        fieldSetFlags()[5] = true;
      }
    }

    /** Gets the value of the 'diagnosisCodingSystem' field */
    public java.lang.String getDiagnosisCodingSystem() {
      return diagnosisCodingSystem;
    }
    
    /** Sets the value of the 'diagnosisCodingSystem' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder setDiagnosisCodingSystem(java.lang.String value) {
      validate(fields()[0], value);
      this.diagnosisCodingSystem = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'diagnosisCodingSystem' field has been set */
    public boolean hasDiagnosisCodingSystem() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'diagnosisCodingSystem' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder clearDiagnosisCodingSystem() {
      diagnosisCodingSystem = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'diagnosisCodingSystemVersion' field */
    public java.lang.String getDiagnosisCodingSystemVersion() {
      return diagnosisCodingSystemVersion;
    }
    
    /** Sets the value of the 'diagnosisCodingSystemVersion' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder setDiagnosisCodingSystemVersion(java.lang.String value) {
      validate(fields()[1], value);
      this.diagnosisCodingSystemVersion = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'diagnosisCodingSystemVersion' field has been set */
    public boolean hasDiagnosisCodingSystemVersion() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'diagnosisCodingSystemVersion' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder clearDiagnosisCodingSystemVersion() {
      diagnosisCodingSystemVersion = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'diagnosisCode' field */
    public java.lang.String getDiagnosisCode() {
      return diagnosisCode;
    }
    
    /** Sets the value of the 'diagnosisCode' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder setDiagnosisCode(java.lang.String value) {
      validate(fields()[2], value);
      this.diagnosisCode = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'diagnosisCode' field has been set */
    public boolean hasDiagnosisCode() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'diagnosisCode' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder clearDiagnosisCode() {
      diagnosisCode = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'diagnosisDescription' field */
    public java.lang.String getDiagnosisDescription() {
      return diagnosisDescription;
    }
    
    /** Sets the value of the 'diagnosisDescription' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder setDiagnosisDescription(java.lang.String value) {
      validate(fields()[3], value);
      this.diagnosisDescription = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'diagnosisDescription' field has been set */
    public boolean hasDiagnosisDescription() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'diagnosisDescription' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder clearDiagnosisDescription() {
      diagnosisDescription = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'diagnosisCertainty' field */
    public java.lang.String getDiagnosisCertainty() {
      return diagnosisCertainty;
    }
    
    /** Sets the value of the 'diagnosisCertainty' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder setDiagnosisCertainty(java.lang.String value) {
      validate(fields()[4], value);
      this.diagnosisCertainty = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'diagnosisCertainty' field has been set */
    public boolean hasDiagnosisCertainty() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'diagnosisCertainty' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder clearDiagnosisCertainty() {
      diagnosisCertainty = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'ageAtOnsetInYears' field */
    public java.lang.Float getAgeAtOnsetInYears() {
      return ageAtOnsetInYears;
    }
    
    /** Sets the value of the 'ageAtOnsetInYears' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder setAgeAtOnsetInYears(java.lang.Float value) {
      validate(fields()[5], value);
      this.ageAtOnsetInYears = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'ageAtOnsetInYears' field has been set */
    public boolean hasAgeAtOnsetInYears() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'ageAtOnsetInYears' field */
    public org.gel.models.participant.avro.DiagnosticDetail.Builder clearAgeAtOnsetInYears() {
      ageAtOnsetInYears = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    @Override
    public DiagnosticDetail build() {
      try {
        DiagnosticDetail record = new DiagnosticDetail();
        record.diagnosisCodingSystem = fieldSetFlags()[0] ? this.diagnosisCodingSystem : (java.lang.String) defaultValue(fields()[0]);
        record.diagnosisCodingSystemVersion = fieldSetFlags()[1] ? this.diagnosisCodingSystemVersion : (java.lang.String) defaultValue(fields()[1]);
        record.diagnosisCode = fieldSetFlags()[2] ? this.diagnosisCode : (java.lang.String) defaultValue(fields()[2]);
        record.diagnosisDescription = fieldSetFlags()[3] ? this.diagnosisDescription : (java.lang.String) defaultValue(fields()[3]);
        record.diagnosisCertainty = fieldSetFlags()[4] ? this.diagnosisCertainty : (java.lang.String) defaultValue(fields()[4]);
        record.ageAtOnsetInYears = fieldSetFlags()[5] ? this.ageAtOnsetInYears : (java.lang.Float) defaultValue(fields()[5]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy