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

org.gel.models.participant.avro.ClinicalIndicationTest 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 ClinicalIndicationTest 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\":\"ClinicalIndicationTest\",\"namespace\":\"org.gel.models.participant.avro\",\"fields\":[{\"name\":\"clinicalIndicationTestTypeId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Clinical indication Test type ID\"},{\"name\":\"clinicalIndicationTestTypeCode\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Clinical indication Test code (e.g. R13-1)\"},{\"name\":\"testTypeId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Test Type Id\"},{\"name\":\"testTypeName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Test Type Name\"},{\"name\":\"technology\",\"type\":{\"type\":\"record\",\"name\":\"Technology\",\"fields\":[{\"name\":\"testTechnologyId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Technology unique identifier\"},{\"name\":\"testTechnologyDescription\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Technology description\"}]},\"doc\":\"Technology used in ClinicalIndicationTest\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Clinical indication Test type ID */
   private java.lang.String clinicalIndicationTestTypeId;
  /** Clinical indication Test code (e.g. R13-1) */
   private java.lang.String clinicalIndicationTestTypeCode;
  /** Test Type Id */
   private java.lang.String testTypeId;
  /** Test Type Name */
   private java.lang.String testTypeName;
  /** Technology used in ClinicalIndicationTest */
   private org.gel.models.participant.avro.Technology technology;

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

  /**
   * All-args constructor.
   */
  public ClinicalIndicationTest(java.lang.String clinicalIndicationTestTypeId, java.lang.String clinicalIndicationTestTypeCode, java.lang.String testTypeId, java.lang.String testTypeName, org.gel.models.participant.avro.Technology technology) {
    this.clinicalIndicationTestTypeId = clinicalIndicationTestTypeId;
    this.clinicalIndicationTestTypeCode = clinicalIndicationTestTypeCode;
    this.testTypeId = testTypeId;
    this.testTypeName = testTypeName;
    this.technology = technology;
  }

  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 clinicalIndicationTestTypeId;
    case 1: return clinicalIndicationTestTypeCode;
    case 2: return testTypeId;
    case 3: return testTypeName;
    case 4: return technology;
    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: clinicalIndicationTestTypeId = (java.lang.String)value$; break;
    case 1: clinicalIndicationTestTypeCode = (java.lang.String)value$; break;
    case 2: testTypeId = (java.lang.String)value$; break;
    case 3: testTypeName = (java.lang.String)value$; break;
    case 4: technology = (org.gel.models.participant.avro.Technology)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'clinicalIndicationTestTypeId' field.
   * Clinical indication Test type ID   */
  public java.lang.String getClinicalIndicationTestTypeId() {
    return clinicalIndicationTestTypeId;
  }

  /**
   * Sets the value of the 'clinicalIndicationTestTypeId' field.
   * Clinical indication Test type ID   * @param value the value to set.
   */
  public void setClinicalIndicationTestTypeId(java.lang.String value) {
    this.clinicalIndicationTestTypeId = value;
  }

  /**
   * Gets the value of the 'clinicalIndicationTestTypeCode' field.
   * Clinical indication Test code (e.g. R13-1)   */
  public java.lang.String getClinicalIndicationTestTypeCode() {
    return clinicalIndicationTestTypeCode;
  }

  /**
   * Sets the value of the 'clinicalIndicationTestTypeCode' field.
   * Clinical indication Test code (e.g. R13-1)   * @param value the value to set.
   */
  public void setClinicalIndicationTestTypeCode(java.lang.String value) {
    this.clinicalIndicationTestTypeCode = value;
  }

  /**
   * Gets the value of the 'testTypeId' field.
   * Test Type Id   */
  public java.lang.String getTestTypeId() {
    return testTypeId;
  }

  /**
   * Sets the value of the 'testTypeId' field.
   * Test Type Id   * @param value the value to set.
   */
  public void setTestTypeId(java.lang.String value) {
    this.testTypeId = value;
  }

  /**
   * Gets the value of the 'testTypeName' field.
   * Test Type Name   */
  public java.lang.String getTestTypeName() {
    return testTypeName;
  }

  /**
   * Sets the value of the 'testTypeName' field.
   * Test Type Name   * @param value the value to set.
   */
  public void setTestTypeName(java.lang.String value) {
    this.testTypeName = value;
  }

  /**
   * Gets the value of the 'technology' field.
   * Technology used in ClinicalIndicationTest   */
  public org.gel.models.participant.avro.Technology getTechnology() {
    return technology;
  }

  /**
   * Sets the value of the 'technology' field.
   * Technology used in ClinicalIndicationTest   * @param value the value to set.
   */
  public void setTechnology(org.gel.models.participant.avro.Technology value) {
    this.technology = value;
  }

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

    private java.lang.String clinicalIndicationTestTypeId;
    private java.lang.String clinicalIndicationTestTypeCode;
    private java.lang.String testTypeId;
    private java.lang.String testTypeName;
    private org.gel.models.participant.avro.Technology technology;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.participant.avro.ClinicalIndicationTest.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.participant.avro.ClinicalIndicationTest.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.clinicalIndicationTestTypeId)) {
        this.clinicalIndicationTestTypeId = data().deepCopy(fields()[0].schema(), other.clinicalIndicationTestTypeId);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.clinicalIndicationTestTypeCode)) {
        this.clinicalIndicationTestTypeCode = data().deepCopy(fields()[1].schema(), other.clinicalIndicationTestTypeCode);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.testTypeId)) {
        this.testTypeId = data().deepCopy(fields()[2].schema(), other.testTypeId);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.testTypeName)) {
        this.testTypeName = data().deepCopy(fields()[3].schema(), other.testTypeName);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.technology)) {
        this.technology = data().deepCopy(fields()[4].schema(), other.technology);
        fieldSetFlags()[4] = true;
      }
    }
    
    /** Creates a Builder by copying an existing ClinicalIndicationTest instance */
    private Builder(org.gel.models.participant.avro.ClinicalIndicationTest other) {
            super(org.gel.models.participant.avro.ClinicalIndicationTest.SCHEMA$);
      if (isValidValue(fields()[0], other.clinicalIndicationTestTypeId)) {
        this.clinicalIndicationTestTypeId = data().deepCopy(fields()[0].schema(), other.clinicalIndicationTestTypeId);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.clinicalIndicationTestTypeCode)) {
        this.clinicalIndicationTestTypeCode = data().deepCopy(fields()[1].schema(), other.clinicalIndicationTestTypeCode);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.testTypeId)) {
        this.testTypeId = data().deepCopy(fields()[2].schema(), other.testTypeId);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.testTypeName)) {
        this.testTypeName = data().deepCopy(fields()[3].schema(), other.testTypeName);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.technology)) {
        this.technology = data().deepCopy(fields()[4].schema(), other.technology);
        fieldSetFlags()[4] = true;
      }
    }

    /** Gets the value of the 'clinicalIndicationTestTypeId' field */
    public java.lang.String getClinicalIndicationTestTypeId() {
      return clinicalIndicationTestTypeId;
    }
    
    /** Sets the value of the 'clinicalIndicationTestTypeId' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder setClinicalIndicationTestTypeId(java.lang.String value) {
      validate(fields()[0], value);
      this.clinicalIndicationTestTypeId = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'clinicalIndicationTestTypeId' field has been set */
    public boolean hasClinicalIndicationTestTypeId() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'clinicalIndicationTestTypeId' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder clearClinicalIndicationTestTypeId() {
      clinicalIndicationTestTypeId = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'clinicalIndicationTestTypeCode' field */
    public java.lang.String getClinicalIndicationTestTypeCode() {
      return clinicalIndicationTestTypeCode;
    }
    
    /** Sets the value of the 'clinicalIndicationTestTypeCode' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder setClinicalIndicationTestTypeCode(java.lang.String value) {
      validate(fields()[1], value);
      this.clinicalIndicationTestTypeCode = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'clinicalIndicationTestTypeCode' field has been set */
    public boolean hasClinicalIndicationTestTypeCode() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'clinicalIndicationTestTypeCode' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder clearClinicalIndicationTestTypeCode() {
      clinicalIndicationTestTypeCode = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'testTypeId' field */
    public java.lang.String getTestTypeId() {
      return testTypeId;
    }
    
    /** Sets the value of the 'testTypeId' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder setTestTypeId(java.lang.String value) {
      validate(fields()[2], value);
      this.testTypeId = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'testTypeId' field has been set */
    public boolean hasTestTypeId() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'testTypeId' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder clearTestTypeId() {
      testTypeId = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'testTypeName' field */
    public java.lang.String getTestTypeName() {
      return testTypeName;
    }
    
    /** Sets the value of the 'testTypeName' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder setTestTypeName(java.lang.String value) {
      validate(fields()[3], value);
      this.testTypeName = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'testTypeName' field has been set */
    public boolean hasTestTypeName() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'testTypeName' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder clearTestTypeName() {
      testTypeName = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'technology' field */
    public org.gel.models.participant.avro.Technology getTechnology() {
      return technology;
    }
    
    /** Sets the value of the 'technology' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder setTechnology(org.gel.models.participant.avro.Technology value) {
      validate(fields()[4], value);
      this.technology = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'technology' field has been set */
    public boolean hasTechnology() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'technology' field */
    public org.gel.models.participant.avro.ClinicalIndicationTest.Builder clearTechnology() {
      technology = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    @Override
    public ClinicalIndicationTest build() {
      try {
        ClinicalIndicationTest record = new ClinicalIndicationTest();
        record.clinicalIndicationTestTypeId = fieldSetFlags()[0] ? this.clinicalIndicationTestTypeId : (java.lang.String) defaultValue(fields()[0]);
        record.clinicalIndicationTestTypeCode = fieldSetFlags()[1] ? this.clinicalIndicationTestTypeCode : (java.lang.String) defaultValue(fields()[1]);
        record.testTypeId = fieldSetFlags()[2] ? this.testTypeId : (java.lang.String) defaultValue(fields()[2]);
        record.testTypeName = fieldSetFlags()[3] ? this.testTypeName : (java.lang.String) defaultValue(fields()[3]);
        record.technology = fieldSetFlags()[4] ? this.technology : (org.gel.models.participant.avro.Technology) defaultValue(fields()[4]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy