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

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

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
/** A given interpretation flag together with an optional description */
@org.apache.avro.specific.AvroGenerated
public class InterpretationFlag 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\":\"InterpretationFlag\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"A given interpretation flag together with an optional description\",\"fields\":[{\"name\":\"interpretationFlag\",\"type\":{\"type\":\"enum\",\"name\":\"InterpretationFlags\",\"doc\":\"Some flags relevant to the interpretation of a case\",\"symbols\":[\"mixed_chemistries\",\"mixedLab_preparation\",\"low_tumour_purity\",\"uniparental_isodisomy\",\"uniparental_heterodisomy\",\"unusual_karyotype\",\"high_cnv_count\",\"high_estimate_human_contamination_fraction\",\"mixed_recruiting_gmc\",\"suspected_mosaicism\",\"low_quality_sample\",\"ffpe_tumour_sample\",\"ff_nano_tumour_sample\",\"missing_values_for_proband_in_reported_variant\",\"reissued\",\"supplementary_report_errors\",\"internal_use_only\",\"high_priority\",\"suspected_increased_number_of_false_positive_heterozygous_loss_calls\",\"suspected_poor_quality_cnv_calls\",\"cnv_calls_assumed_xx_karyo\",\"cnv_calls_assumed_xy_karyo\",\"other\"]},\"doc\":\"The interpretation flag\"},{\"name\":\"additionalDescription\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The description for the flag\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** The interpretation flag */
   private org.gel.models.report.avro.InterpretationFlags interpretationFlag;
  /** The description for the flag */
   private java.lang.String additionalDescription;

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

  /**
   * All-args constructor.
   */
  public InterpretationFlag(org.gel.models.report.avro.InterpretationFlags interpretationFlag, java.lang.String additionalDescription) {
    this.interpretationFlag = interpretationFlag;
    this.additionalDescription = additionalDescription;
  }

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

  /**
   * Gets the value of the 'interpretationFlag' field.
   * The interpretation flag   */
  public org.gel.models.report.avro.InterpretationFlags getInterpretationFlag() {
    return interpretationFlag;
  }

  /**
   * Sets the value of the 'interpretationFlag' field.
   * The interpretation flag   * @param value the value to set.
   */
  public void setInterpretationFlag(org.gel.models.report.avro.InterpretationFlags value) {
    this.interpretationFlag = value;
  }

  /**
   * Gets the value of the 'additionalDescription' field.
   * The description for the flag   */
  public java.lang.String getAdditionalDescription() {
    return additionalDescription;
  }

  /**
   * Sets the value of the 'additionalDescription' field.
   * The description for the flag   * @param value the value to set.
   */
  public void setAdditionalDescription(java.lang.String value) {
    this.additionalDescription = value;
  }

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

    private org.gel.models.report.avro.InterpretationFlags interpretationFlag;
    private java.lang.String additionalDescription;

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

    /** Gets the value of the 'interpretationFlag' field */
    public org.gel.models.report.avro.InterpretationFlags getInterpretationFlag() {
      return interpretationFlag;
    }
    
    /** Sets the value of the 'interpretationFlag' field */
    public org.gel.models.report.avro.InterpretationFlag.Builder setInterpretationFlag(org.gel.models.report.avro.InterpretationFlags value) {
      validate(fields()[0], value);
      this.interpretationFlag = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'interpretationFlag' field has been set */
    public boolean hasInterpretationFlag() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'interpretationFlag' field */
    public org.gel.models.report.avro.InterpretationFlag.Builder clearInterpretationFlag() {
      interpretationFlag = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'additionalDescription' field */
    public java.lang.String getAdditionalDescription() {
      return additionalDescription;
    }
    
    /** Sets the value of the 'additionalDescription' field */
    public org.gel.models.report.avro.InterpretationFlag.Builder setAdditionalDescription(java.lang.String value) {
      validate(fields()[1], value);
      this.additionalDescription = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'additionalDescription' field has been set */
    public boolean hasAdditionalDescription() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'additionalDescription' field */
    public org.gel.models.report.avro.InterpretationFlag.Builder clearAdditionalDescription() {
      additionalDescription = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    @Override
    public InterpretationFlag build() {
      try {
        InterpretationFlag record = new InterpretationFlag();
        record.interpretationFlag = fieldSetFlags()[0] ? this.interpretationFlag : (org.gel.models.report.avro.InterpretationFlags) defaultValue(fields()[0]);
        record.additionalDescription = fieldSetFlags()[1] ? this.additionalDescription : (java.lang.String) defaultValue(fields()[1]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy