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

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

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class VariantIdentifiers 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\":\"VariantIdentifiers\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"dbSnpId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Variant identifier in dbSNP\"},{\"name\":\"cosmicIds\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"Variant identifier in Cosmic\"},{\"name\":\"clinVarIds\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"Variant identifier in ClinVar\"},{\"name\":\"otherIds\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Identifier\",\"fields\":[{\"name\":\"source\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Source i.e, esenmbl\"},{\"name\":\"identifier\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"identifier\"}]}}]}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Variant identifier in dbSNP */
   private java.lang.String dbSnpId;
  /** Variant identifier in Cosmic */
   private java.util.List cosmicIds;
  /** Variant identifier in ClinVar */
   private java.util.List clinVarIds;
   private java.util.List otherIds;

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

  /**
   * All-args constructor.
   */
  public VariantIdentifiers(java.lang.String dbSnpId, java.util.List cosmicIds, java.util.List clinVarIds, java.util.List otherIds) {
    this.dbSnpId = dbSnpId;
    this.cosmicIds = cosmicIds;
    this.clinVarIds = clinVarIds;
    this.otherIds = otherIds;
  }

  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 dbSnpId;
    case 1: return cosmicIds;
    case 2: return clinVarIds;
    case 3: return otherIds;
    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: dbSnpId = (java.lang.String)value$; break;
    case 1: cosmicIds = (java.util.List)value$; break;
    case 2: clinVarIds = (java.util.List)value$; break;
    case 3: otherIds = (java.util.List)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'dbSnpId' field.
   * Variant identifier in dbSNP   */
  public java.lang.String getDbSnpId() {
    return dbSnpId;
  }

  /**
   * Sets the value of the 'dbSnpId' field.
   * Variant identifier in dbSNP   * @param value the value to set.
   */
  public void setDbSnpId(java.lang.String value) {
    this.dbSnpId = value;
  }

  /**
   * Gets the value of the 'cosmicIds' field.
   * Variant identifier in Cosmic   */
  public java.util.List getCosmicIds() {
    return cosmicIds;
  }

  /**
   * Sets the value of the 'cosmicIds' field.
   * Variant identifier in Cosmic   * @param value the value to set.
   */
  public void setCosmicIds(java.util.List value) {
    this.cosmicIds = value;
  }

  /**
   * Gets the value of the 'clinVarIds' field.
   * Variant identifier in ClinVar   */
  public java.util.List getClinVarIds() {
    return clinVarIds;
  }

  /**
   * Sets the value of the 'clinVarIds' field.
   * Variant identifier in ClinVar   * @param value the value to set.
   */
  public void setClinVarIds(java.util.List value) {
    this.clinVarIds = value;
  }

  /**
   * Gets the value of the 'otherIds' field.
   */
  public java.util.List getOtherIds() {
    return otherIds;
  }

  /**
   * Sets the value of the 'otherIds' field.
   * @param value the value to set.
   */
  public void setOtherIds(java.util.List value) {
    this.otherIds = value;
  }

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

    private java.lang.String dbSnpId;
    private java.util.List cosmicIds;
    private java.util.List clinVarIds;
    private java.util.List otherIds;

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

    /** Gets the value of the 'dbSnpId' field */
    public java.lang.String getDbSnpId() {
      return dbSnpId;
    }
    
    /** Sets the value of the 'dbSnpId' field */
    public org.gel.models.report.avro.VariantIdentifiers.Builder setDbSnpId(java.lang.String value) {
      validate(fields()[0], value);
      this.dbSnpId = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'dbSnpId' field has been set */
    public boolean hasDbSnpId() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'dbSnpId' field */
    public org.gel.models.report.avro.VariantIdentifiers.Builder clearDbSnpId() {
      dbSnpId = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'cosmicIds' field */
    public java.util.List getCosmicIds() {
      return cosmicIds;
    }
    
    /** Sets the value of the 'cosmicIds' field */
    public org.gel.models.report.avro.VariantIdentifiers.Builder setCosmicIds(java.util.List value) {
      validate(fields()[1], value);
      this.cosmicIds = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'cosmicIds' field has been set */
    public boolean hasCosmicIds() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'cosmicIds' field */
    public org.gel.models.report.avro.VariantIdentifiers.Builder clearCosmicIds() {
      cosmicIds = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'clinVarIds' field */
    public java.util.List getClinVarIds() {
      return clinVarIds;
    }
    
    /** Sets the value of the 'clinVarIds' field */
    public org.gel.models.report.avro.VariantIdentifiers.Builder setClinVarIds(java.util.List value) {
      validate(fields()[2], value);
      this.clinVarIds = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'clinVarIds' field has been set */
    public boolean hasClinVarIds() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'clinVarIds' field */
    public org.gel.models.report.avro.VariantIdentifiers.Builder clearClinVarIds() {
      clinVarIds = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'otherIds' field */
    public java.util.List getOtherIds() {
      return otherIds;
    }
    
    /** Sets the value of the 'otherIds' field */
    public org.gel.models.report.avro.VariantIdentifiers.Builder setOtherIds(java.util.List value) {
      validate(fields()[3], value);
      this.otherIds = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'otherIds' field has been set */
    public boolean hasOtherIds() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'otherIds' field */
    public org.gel.models.report.avro.VariantIdentifiers.Builder clearOtherIds() {
      otherIds = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    @Override
    public VariantIdentifiers build() {
      try {
        VariantIdentifiers record = new VariantIdentifiers();
        record.dbSnpId = fieldSetFlags()[0] ? this.dbSnpId : (java.lang.String) defaultValue(fields()[0]);
        record.cosmicIds = fieldSetFlags()[1] ? this.cosmicIds : (java.util.List) defaultValue(fields()[1]);
        record.clinVarIds = fieldSetFlags()[2] ? this.clinVarIds : (java.util.List) defaultValue(fields()[2]);
        record.otherIds = fieldSetFlags()[3] ? this.otherIds : (java.util.List) defaultValue(fields()[3]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy