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

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

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
/** A panel of genes */
@org.apache.avro.specific.AvroGenerated
public class GenePanel 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\":\"GenePanel\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"A panel of genes\",\"fields\":[{\"name\":\"panelIdentifier\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Panel name used\"},{\"name\":\"panelName\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Panel name used\"},{\"name\":\"panelVersion\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Panel version\"},{\"name\":\"source\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"source i.e, PanelApp\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Panel name used */
   private java.lang.String panelIdentifier;
  /** Panel name used */
   private java.lang.String panelName;
  /** Panel version */
   private java.lang.String panelVersion;
  /** source i.e, PanelApp */
   private java.lang.String source;

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

  /**
   * All-args constructor.
   */
  public GenePanel(java.lang.String panelIdentifier, java.lang.String panelName, java.lang.String panelVersion, java.lang.String source) {
    this.panelIdentifier = panelIdentifier;
    this.panelName = panelName;
    this.panelVersion = panelVersion;
    this.source = source;
  }

  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 panelIdentifier;
    case 1: return panelName;
    case 2: return panelVersion;
    case 3: return source;
    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: panelIdentifier = (java.lang.String)value$; break;
    case 1: panelName = (java.lang.String)value$; break;
    case 2: panelVersion = (java.lang.String)value$; break;
    case 3: source = (java.lang.String)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'panelIdentifier' field.
   * Panel name used   */
  public java.lang.String getPanelIdentifier() {
    return panelIdentifier;
  }

  /**
   * Sets the value of the 'panelIdentifier' field.
   * Panel name used   * @param value the value to set.
   */
  public void setPanelIdentifier(java.lang.String value) {
    this.panelIdentifier = value;
  }

  /**
   * Gets the value of the 'panelName' field.
   * Panel name used   */
  public java.lang.String getPanelName() {
    return panelName;
  }

  /**
   * Sets the value of the 'panelName' field.
   * Panel name used   * @param value the value to set.
   */
  public void setPanelName(java.lang.String value) {
    this.panelName = value;
  }

  /**
   * Gets the value of the 'panelVersion' field.
   * Panel version   */
  public java.lang.String getPanelVersion() {
    return panelVersion;
  }

  /**
   * Sets the value of the 'panelVersion' field.
   * Panel version   * @param value the value to set.
   */
  public void setPanelVersion(java.lang.String value) {
    this.panelVersion = value;
  }

  /**
   * Gets the value of the 'source' field.
   * source i.e, PanelApp   */
  public java.lang.String getSource() {
    return source;
  }

  /**
   * Sets the value of the 'source' field.
   * source i.e, PanelApp   * @param value the value to set.
   */
  public void setSource(java.lang.String value) {
    this.source = value;
  }

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

    private java.lang.String panelIdentifier;
    private java.lang.String panelName;
    private java.lang.String panelVersion;
    private java.lang.String source;

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

    /** Gets the value of the 'panelIdentifier' field */
    public java.lang.String getPanelIdentifier() {
      return panelIdentifier;
    }
    
    /** Sets the value of the 'panelIdentifier' field */
    public org.gel.models.report.avro.GenePanel.Builder setPanelIdentifier(java.lang.String value) {
      validate(fields()[0], value);
      this.panelIdentifier = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'panelIdentifier' field has been set */
    public boolean hasPanelIdentifier() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'panelIdentifier' field */
    public org.gel.models.report.avro.GenePanel.Builder clearPanelIdentifier() {
      panelIdentifier = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'panelName' field */
    public java.lang.String getPanelName() {
      return panelName;
    }
    
    /** Sets the value of the 'panelName' field */
    public org.gel.models.report.avro.GenePanel.Builder setPanelName(java.lang.String value) {
      validate(fields()[1], value);
      this.panelName = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'panelName' field has been set */
    public boolean hasPanelName() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'panelName' field */
    public org.gel.models.report.avro.GenePanel.Builder clearPanelName() {
      panelName = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'panelVersion' field */
    public java.lang.String getPanelVersion() {
      return panelVersion;
    }
    
    /** Sets the value of the 'panelVersion' field */
    public org.gel.models.report.avro.GenePanel.Builder setPanelVersion(java.lang.String value) {
      validate(fields()[2], value);
      this.panelVersion = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'panelVersion' field has been set */
    public boolean hasPanelVersion() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'panelVersion' field */
    public org.gel.models.report.avro.GenePanel.Builder clearPanelVersion() {
      panelVersion = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'source' field */
    public java.lang.String getSource() {
      return source;
    }
    
    /** Sets the value of the 'source' field */
    public org.gel.models.report.avro.GenePanel.Builder setSource(java.lang.String value) {
      validate(fields()[3], value);
      this.source = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'source' field has been set */
    public boolean hasSource() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'source' field */
    public org.gel.models.report.avro.GenePanel.Builder clearSource() {
      source = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    @Override
    public GenePanel build() {
      try {
        GenePanel record = new GenePanel();
        record.panelIdentifier = fieldSetFlags()[0] ? this.panelIdentifier : (java.lang.String) defaultValue(fields()[0]);
        record.panelName = fieldSetFlags()[1] ? this.panelName : (java.lang.String) defaultValue(fields()[1]);
        record.panelVersion = fieldSetFlags()[2] ? this.panelVersion : (java.lang.String) defaultValue(fields()[2]);
        record.source = fieldSetFlags()[3] ? this.source : (java.lang.String) defaultValue(fields()[3]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy