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

org.gel.models.report.avro.OtherAction 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")
@org.apache.avro.specific.AvroGenerated
public class OtherAction 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\":\"OtherAction\",\"namespace\":\"org.gel.models.report.avro\",\"fields\":[{\"name\":\"referenceUrl\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"URL where reference information for this action can be found\"},{\"name\":\"identifier\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Action identifier\"},{\"name\":\"sources\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"Sources if known\"},{\"name\":\"actionType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Action type\"},{\"name\":\"conditions\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"Associated conditions\"},{\"name\":\"otherAttributes\",\"type\":[\"null\",{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}],\"doc\":\"Other attributes\"},{\"name\":\"variantActionable\",\"type\":\"boolean\",\"doc\":\"If true, the association was made at the variant level, if not the association was made at Genomic Entity level\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** URL where reference information for this action can be found */
   private java.lang.String referenceUrl;
  /** Action identifier */
   private java.lang.String identifier;
  /** Sources if known */
   private java.util.List sources;
  /** Action type */
   private java.lang.String actionType;
  /** Associated conditions */
   private java.util.List conditions;
  /** Other attributes */
   private java.util.Map otherAttributes;
  /** If true, the association was made at the variant level, if not the association was made at Genomic Entity level */
   private boolean variantActionable;

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

  /**
   * All-args constructor.
   */
  public OtherAction(java.lang.String referenceUrl, java.lang.String identifier, java.util.List sources, java.lang.String actionType, java.util.List conditions, java.util.Map otherAttributes, java.lang.Boolean variantActionable) {
    this.referenceUrl = referenceUrl;
    this.identifier = identifier;
    this.sources = sources;
    this.actionType = actionType;
    this.conditions = conditions;
    this.otherAttributes = otherAttributes;
    this.variantActionable = variantActionable;
  }

  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 referenceUrl;
    case 1: return identifier;
    case 2: return sources;
    case 3: return actionType;
    case 4: return conditions;
    case 5: return otherAttributes;
    case 6: return variantActionable;
    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: referenceUrl = (java.lang.String)value$; break;
    case 1: identifier = (java.lang.String)value$; break;
    case 2: sources = (java.util.List)value$; break;
    case 3: actionType = (java.lang.String)value$; break;
    case 4: conditions = (java.util.List)value$; break;
    case 5: otherAttributes = (java.util.Map)value$; break;
    case 6: variantActionable = (java.lang.Boolean)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'referenceUrl' field.
   * URL where reference information for this action can be found   */
  public java.lang.String getReferenceUrl() {
    return referenceUrl;
  }

  /**
   * Sets the value of the 'referenceUrl' field.
   * URL where reference information for this action can be found   * @param value the value to set.
   */
  public void setReferenceUrl(java.lang.String value) {
    this.referenceUrl = value;
  }

  /**
   * Gets the value of the 'identifier' field.
   * Action identifier   */
  public java.lang.String getIdentifier() {
    return identifier;
  }

  /**
   * Sets the value of the 'identifier' field.
   * Action identifier   * @param value the value to set.
   */
  public void setIdentifier(java.lang.String value) {
    this.identifier = value;
  }

  /**
   * Gets the value of the 'sources' field.
   * Sources if known   */
  public java.util.List getSources() {
    return sources;
  }

  /**
   * Sets the value of the 'sources' field.
   * Sources if known   * @param value the value to set.
   */
  public void setSources(java.util.List value) {
    this.sources = value;
  }

  /**
   * Gets the value of the 'actionType' field.
   * Action type   */
  public java.lang.String getActionType() {
    return actionType;
  }

  /**
   * Sets the value of the 'actionType' field.
   * Action type   * @param value the value to set.
   */
  public void setActionType(java.lang.String value) {
    this.actionType = value;
  }

  /**
   * Gets the value of the 'conditions' field.
   * Associated conditions   */
  public java.util.List getConditions() {
    return conditions;
  }

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

  /**
   * Gets the value of the 'otherAttributes' field.
   * Other attributes   */
  public java.util.Map getOtherAttributes() {
    return otherAttributes;
  }

  /**
   * Sets the value of the 'otherAttributes' field.
   * Other attributes   * @param value the value to set.
   */
  public void setOtherAttributes(java.util.Map value) {
    this.otherAttributes = value;
  }

  /**
   * Gets the value of the 'variantActionable' field.
   * If true, the association was made at the variant level, if not the association was made at Genomic Entity level   */
  public java.lang.Boolean getVariantActionable() {
    return variantActionable;
  }

  /**
   * Sets the value of the 'variantActionable' field.
   * If true, the association was made at the variant level, if not the association was made at Genomic Entity level   * @param value the value to set.
   */
  public void setVariantActionable(java.lang.Boolean value) {
    this.variantActionable = value;
  }

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

    private java.lang.String referenceUrl;
    private java.lang.String identifier;
    private java.util.List sources;
    private java.lang.String actionType;
    private java.util.List conditions;
    private java.util.Map otherAttributes;
    private boolean variantActionable;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.OtherAction.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.OtherAction.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.referenceUrl)) {
        this.referenceUrl = data().deepCopy(fields()[0].schema(), other.referenceUrl);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.identifier)) {
        this.identifier = data().deepCopy(fields()[1].schema(), other.identifier);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.sources)) {
        this.sources = data().deepCopy(fields()[2].schema(), other.sources);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.actionType)) {
        this.actionType = data().deepCopy(fields()[3].schema(), other.actionType);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.conditions)) {
        this.conditions = data().deepCopy(fields()[4].schema(), other.conditions);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.otherAttributes)) {
        this.otherAttributes = data().deepCopy(fields()[5].schema(), other.otherAttributes);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.variantActionable)) {
        this.variantActionable = data().deepCopy(fields()[6].schema(), other.variantActionable);
        fieldSetFlags()[6] = true;
      }
    }
    
    /** Creates a Builder by copying an existing OtherAction instance */
    private Builder(org.gel.models.report.avro.OtherAction other) {
            super(org.gel.models.report.avro.OtherAction.SCHEMA$);
      if (isValidValue(fields()[0], other.referenceUrl)) {
        this.referenceUrl = data().deepCopy(fields()[0].schema(), other.referenceUrl);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.identifier)) {
        this.identifier = data().deepCopy(fields()[1].schema(), other.identifier);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.sources)) {
        this.sources = data().deepCopy(fields()[2].schema(), other.sources);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.actionType)) {
        this.actionType = data().deepCopy(fields()[3].schema(), other.actionType);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.conditions)) {
        this.conditions = data().deepCopy(fields()[4].schema(), other.conditions);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.otherAttributes)) {
        this.otherAttributes = data().deepCopy(fields()[5].schema(), other.otherAttributes);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.variantActionable)) {
        this.variantActionable = data().deepCopy(fields()[6].schema(), other.variantActionable);
        fieldSetFlags()[6] = true;
      }
    }

    /** Gets the value of the 'referenceUrl' field */
    public java.lang.String getReferenceUrl() {
      return referenceUrl;
    }
    
    /** Sets the value of the 'referenceUrl' field */
    public org.gel.models.report.avro.OtherAction.Builder setReferenceUrl(java.lang.String value) {
      validate(fields()[0], value);
      this.referenceUrl = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'referenceUrl' field has been set */
    public boolean hasReferenceUrl() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'referenceUrl' field */
    public org.gel.models.report.avro.OtherAction.Builder clearReferenceUrl() {
      referenceUrl = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'identifier' field */
    public java.lang.String getIdentifier() {
      return identifier;
    }
    
    /** Sets the value of the 'identifier' field */
    public org.gel.models.report.avro.OtherAction.Builder setIdentifier(java.lang.String value) {
      validate(fields()[1], value);
      this.identifier = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'identifier' field has been set */
    public boolean hasIdentifier() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'identifier' field */
    public org.gel.models.report.avro.OtherAction.Builder clearIdentifier() {
      identifier = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'sources' field */
    public java.util.List getSources() {
      return sources;
    }
    
    /** Sets the value of the 'sources' field */
    public org.gel.models.report.avro.OtherAction.Builder setSources(java.util.List value) {
      validate(fields()[2], value);
      this.sources = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'sources' field has been set */
    public boolean hasSources() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'sources' field */
    public org.gel.models.report.avro.OtherAction.Builder clearSources() {
      sources = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'actionType' field */
    public java.lang.String getActionType() {
      return actionType;
    }
    
    /** Sets the value of the 'actionType' field */
    public org.gel.models.report.avro.OtherAction.Builder setActionType(java.lang.String value) {
      validate(fields()[3], value);
      this.actionType = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'actionType' field has been set */
    public boolean hasActionType() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'actionType' field */
    public org.gel.models.report.avro.OtherAction.Builder clearActionType() {
      actionType = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'conditions' field */
    public java.util.List getConditions() {
      return conditions;
    }
    
    /** Sets the value of the 'conditions' field */
    public org.gel.models.report.avro.OtherAction.Builder setConditions(java.util.List value) {
      validate(fields()[4], value);
      this.conditions = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'conditions' field has been set */
    public boolean hasConditions() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'conditions' field */
    public org.gel.models.report.avro.OtherAction.Builder clearConditions() {
      conditions = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'otherAttributes' field */
    public java.util.Map getOtherAttributes() {
      return otherAttributes;
    }
    
    /** Sets the value of the 'otherAttributes' field */
    public org.gel.models.report.avro.OtherAction.Builder setOtherAttributes(java.util.Map value) {
      validate(fields()[5], value);
      this.otherAttributes = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'otherAttributes' field has been set */
    public boolean hasOtherAttributes() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'otherAttributes' field */
    public org.gel.models.report.avro.OtherAction.Builder clearOtherAttributes() {
      otherAttributes = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'variantActionable' field */
    public java.lang.Boolean getVariantActionable() {
      return variantActionable;
    }
    
    /** Sets the value of the 'variantActionable' field */
    public org.gel.models.report.avro.OtherAction.Builder setVariantActionable(boolean value) {
      validate(fields()[6], value);
      this.variantActionable = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'variantActionable' field has been set */
    public boolean hasVariantActionable() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'variantActionable' field */
    public org.gel.models.report.avro.OtherAction.Builder clearVariantActionable() {
      fieldSetFlags()[6] = false;
      return this;
    }

    @Override
    public OtherAction build() {
      try {
        OtherAction record = new OtherAction();
        record.referenceUrl = fieldSetFlags()[0] ? this.referenceUrl : (java.lang.String) defaultValue(fields()[0]);
        record.identifier = fieldSetFlags()[1] ? this.identifier : (java.lang.String) defaultValue(fields()[1]);
        record.sources = fieldSetFlags()[2] ? this.sources : (java.util.List) defaultValue(fields()[2]);
        record.actionType = fieldSetFlags()[3] ? this.actionType : (java.lang.String) defaultValue(fields()[3]);
        record.conditions = fieldSetFlags()[4] ? this.conditions : (java.util.List) defaultValue(fields()[4]);
        record.otherAttributes = fieldSetFlags()[5] ? this.otherAttributes : (java.util.Map) defaultValue(fields()[5]);
        record.variantActionable = fieldSetFlags()[6] ? this.variantActionable : (java.lang.Boolean) defaultValue(fields()[6]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy