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

org.gel.models.report.avro.ParticipantInterpretationFlags 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")
/** Interpretation flags at the participant level */
@org.apache.avro.specific.AvroGenerated
public class ParticipantInterpretationFlags 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\":\"ParticipantInterpretationFlags\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"Interpretation flags at the participant level\",\"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\"},{\"name\":\"SampleId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Sample Id fron which this flag was reported\"},{\"name\":\"participantId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Participant Id as appeared in the pedigree\"}]}");
  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;
  /** Sample Id fron which this flag was reported */
   private java.lang.String SampleId;
  /** Participant Id as appeared in the pedigree */
   private java.lang.String participantId;

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

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

  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;
    case 2: return SampleId;
    case 3: return participantId;
    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;
    case 2: SampleId = (java.lang.String)value$; break;
    case 3: participantId = (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;
  }

  /**
   * Gets the value of the 'SampleId' field.
   * Sample Id fron which this flag was reported   */
  public java.lang.String getSampleId() {
    return SampleId;
  }

  /**
   * Sets the value of the 'SampleId' field.
   * Sample Id fron which this flag was reported   * @param value the value to set.
   */
  public void setSampleId(java.lang.String value) {
    this.SampleId = value;
  }

  /**
   * Gets the value of the 'participantId' field.
   * Participant Id as appeared in the pedigree   */
  public java.lang.String getParticipantId() {
    return participantId;
  }

  /**
   * Sets the value of the 'participantId' field.
   * Participant Id as appeared in the pedigree   * @param value the value to set.
   */
  public void setParticipantId(java.lang.String value) {
    this.participantId = value;
  }

  /** Creates a new ParticipantInterpretationFlags RecordBuilder */
  public static org.gel.models.report.avro.ParticipantInterpretationFlags.Builder newBuilder() {
    return new org.gel.models.report.avro.ParticipantInterpretationFlags.Builder();
  }
  
  /** Creates a new ParticipantInterpretationFlags RecordBuilder by copying an existing Builder */
  public static org.gel.models.report.avro.ParticipantInterpretationFlags.Builder newBuilder(org.gel.models.report.avro.ParticipantInterpretationFlags.Builder other) {
    return new org.gel.models.report.avro.ParticipantInterpretationFlags.Builder(other);
  }
  
  /** Creates a new ParticipantInterpretationFlags RecordBuilder by copying an existing ParticipantInterpretationFlags instance */
  public static org.gel.models.report.avro.ParticipantInterpretationFlags.Builder newBuilder(org.gel.models.report.avro.ParticipantInterpretationFlags other) {
    return new org.gel.models.report.avro.ParticipantInterpretationFlags.Builder(other);
  }
  
  /**
   * RecordBuilder for ParticipantInterpretationFlags 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;
    private java.lang.String SampleId;
    private java.lang.String participantId;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.ParticipantInterpretationFlags.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.ParticipantInterpretationFlags.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;
      }
      if (isValidValue(fields()[2], other.SampleId)) {
        this.SampleId = data().deepCopy(fields()[2].schema(), other.SampleId);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.participantId)) {
        this.participantId = data().deepCopy(fields()[3].schema(), other.participantId);
        fieldSetFlags()[3] = true;
      }
    }
    
    /** Creates a Builder by copying an existing ParticipantInterpretationFlags instance */
    private Builder(org.gel.models.report.avro.ParticipantInterpretationFlags other) {
            super(org.gel.models.report.avro.ParticipantInterpretationFlags.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;
      }
      if (isValidValue(fields()[2], other.SampleId)) {
        this.SampleId = data().deepCopy(fields()[2].schema(), other.SampleId);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.participantId)) {
        this.participantId = data().deepCopy(fields()[3].schema(), other.participantId);
        fieldSetFlags()[3] = 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.ParticipantInterpretationFlags.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.ParticipantInterpretationFlags.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.ParticipantInterpretationFlags.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.ParticipantInterpretationFlags.Builder clearAdditionalDescription() {
      additionalDescription = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'SampleId' field */
    public java.lang.String getSampleId() {
      return SampleId;
    }
    
    /** Sets the value of the 'SampleId' field */
    public org.gel.models.report.avro.ParticipantInterpretationFlags.Builder setSampleId(java.lang.String value) {
      validate(fields()[2], value);
      this.SampleId = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'SampleId' field has been set */
    public boolean hasSampleId() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'SampleId' field */
    public org.gel.models.report.avro.ParticipantInterpretationFlags.Builder clearSampleId() {
      SampleId = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'participantId' field */
    public java.lang.String getParticipantId() {
      return participantId;
    }
    
    /** Sets the value of the 'participantId' field */
    public org.gel.models.report.avro.ParticipantInterpretationFlags.Builder setParticipantId(java.lang.String value) {
      validate(fields()[3], value);
      this.participantId = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'participantId' field has been set */
    public boolean hasParticipantId() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'participantId' field */
    public org.gel.models.report.avro.ParticipantInterpretationFlags.Builder clearParticipantId() {
      participantId = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    @Override
    public ParticipantInterpretationFlags build() {
      try {
        ParticipantInterpretationFlags record = new ParticipantInterpretationFlags();
        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]);
        record.SampleId = fieldSetFlags()[2] ? this.SampleId : (java.lang.String) defaultValue(fields()[2]);
        record.participantId = fieldSetFlags()[3] ? this.participantId : (java.lang.String) defaultValue(fields()[3]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy