Move Avro generated classes to gen subpackage
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / _ResourceType.java
diff --git a/src/main/java/gr/grnet/aquarium/message/avro/gen/_ResourceType.java b/src/main/java/gr/grnet/aquarium/message/avro/gen/_ResourceType.java
new file mode 100644 (file)
index 0000000..8c03cdd
--- /dev/null
@@ -0,0 +1,219 @@
+/**
+ * Autogenerated by Avro
+ * 
+ * DO NOT EDIT DIRECTLY
+ */
+package gr.grnet.aquarium.message.avro.gen;  
+@SuppressWarnings("all")
+public class _ResourceType 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\":\"_ResourceType\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"unit\",\"type\":\"string\"},{\"name\":\"chargingBehaviorClass\",\"type\":\"string\"}]}");
+  @Deprecated public java.lang.CharSequence name;
+  @Deprecated public java.lang.CharSequence unit;
+  @Deprecated public java.lang.CharSequence chargingBehaviorClass;
+  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 name;
+    case 1: return unit;
+    case 2: return chargingBehaviorClass;
+    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: name = (java.lang.CharSequence)value$; break;
+    case 1: unit = (java.lang.CharSequence)value$; break;
+    case 2: chargingBehaviorClass = (java.lang.CharSequence)value$; break;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+
+  /**
+   * Gets the value of the 'name' field.
+   */
+  public java.lang.CharSequence getName() {
+    return name;
+  }
+
+  /**
+   * Sets the value of the 'name' field.
+   * @param value the value to set.
+   */
+  public void setName(java.lang.CharSequence value) {
+    this.name = value;
+  }
+
+  /**
+   * Gets the value of the 'unit' field.
+   */
+  public java.lang.CharSequence getUnit() {
+    return unit;
+  }
+
+  /**
+   * Sets the value of the 'unit' field.
+   * @param value the value to set.
+   */
+  public void setUnit(java.lang.CharSequence value) {
+    this.unit = value;
+  }
+
+  /**
+   * Gets the value of the 'chargingBehaviorClass' field.
+   */
+  public java.lang.CharSequence getChargingBehaviorClass() {
+    return chargingBehaviorClass;
+  }
+
+  /**
+   * Sets the value of the 'chargingBehaviorClass' field.
+   * @param value the value to set.
+   */
+  public void setChargingBehaviorClass(java.lang.CharSequence value) {
+    this.chargingBehaviorClass = value;
+  }
+
+  /** Creates a new _ResourceType RecordBuilder */
+  public static gr.grnet.aquarium.message.avro.gen._ResourceType.Builder newBuilder() {
+    return new gr.grnet.aquarium.message.avro.gen._ResourceType.Builder();
+  }
+  
+  /** Creates a new _ResourceType RecordBuilder by copying an existing Builder */
+  public static gr.grnet.aquarium.message.avro.gen._ResourceType.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._ResourceType.Builder other) {
+    return new gr.grnet.aquarium.message.avro.gen._ResourceType.Builder(other);
+  }
+  
+  /** Creates a new _ResourceType RecordBuilder by copying an existing _ResourceType instance */
+  public static gr.grnet.aquarium.message.avro.gen._ResourceType.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._ResourceType other) {
+    return new gr.grnet.aquarium.message.avro.gen._ResourceType.Builder(other);
+  }
+  
+  /**
+   * RecordBuilder for _ResourceType instances.
+   */
+  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<_ResourceType>
+    implements org.apache.avro.data.RecordBuilder<_ResourceType> {
+
+    private java.lang.CharSequence name;
+    private java.lang.CharSequence unit;
+    private java.lang.CharSequence chargingBehaviorClass;
+
+    /** Creates a new Builder */
+    private Builder() {
+      super(gr.grnet.aquarium.message.avro.gen._ResourceType.SCHEMA$);
+    }
+    
+    /** Creates a Builder by copying an existing Builder */
+    private Builder(gr.grnet.aquarium.message.avro.gen._ResourceType.Builder other) {
+      super(other);
+    }
+    
+    /** Creates a Builder by copying an existing _ResourceType instance */
+    private Builder(gr.grnet.aquarium.message.avro.gen._ResourceType other) {
+            super(gr.grnet.aquarium.message.avro.gen._ResourceType.SCHEMA$);
+      if (isValidValue(fields()[0], other.name)) {
+        this.name = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.name);
+        fieldSetFlags()[0] = true;
+      }
+      if (isValidValue(fields()[1], other.unit)) {
+        this.unit = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.unit);
+        fieldSetFlags()[1] = true;
+      }
+      if (isValidValue(fields()[2], other.chargingBehaviorClass)) {
+        this.chargingBehaviorClass = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.chargingBehaviorClass);
+        fieldSetFlags()[2] = true;
+      }
+    }
+
+    /** Gets the value of the 'name' field */
+    public java.lang.CharSequence getName() {
+      return name;
+    }
+    
+    /** Sets the value of the 'name' field */
+    public gr.grnet.aquarium.message.avro.gen._ResourceType.Builder setName(java.lang.CharSequence value) {
+      validate(fields()[0], value);
+      this.name = value;
+      fieldSetFlags()[0] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'name' field has been set */
+    public boolean hasName() {
+      return fieldSetFlags()[0];
+    }
+    
+    /** Clears the value of the 'name' field */
+    public gr.grnet.aquarium.message.avro.gen._ResourceType.Builder clearName() {
+      name = null;
+      fieldSetFlags()[0] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'unit' field */
+    public java.lang.CharSequence getUnit() {
+      return unit;
+    }
+    
+    /** Sets the value of the 'unit' field */
+    public gr.grnet.aquarium.message.avro.gen._ResourceType.Builder setUnit(java.lang.CharSequence value) {
+      validate(fields()[1], value);
+      this.unit = value;
+      fieldSetFlags()[1] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'unit' field has been set */
+    public boolean hasUnit() {
+      return fieldSetFlags()[1];
+    }
+    
+    /** Clears the value of the 'unit' field */
+    public gr.grnet.aquarium.message.avro.gen._ResourceType.Builder clearUnit() {
+      unit = null;
+      fieldSetFlags()[1] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'chargingBehaviorClass' field */
+    public java.lang.CharSequence getChargingBehaviorClass() {
+      return chargingBehaviorClass;
+    }
+    
+    /** Sets the value of the 'chargingBehaviorClass' field */
+    public gr.grnet.aquarium.message.avro.gen._ResourceType.Builder setChargingBehaviorClass(java.lang.CharSequence value) {
+      validate(fields()[2], value);
+      this.chargingBehaviorClass = value;
+      fieldSetFlags()[2] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'chargingBehaviorClass' field has been set */
+    public boolean hasChargingBehaviorClass() {
+      return fieldSetFlags()[2];
+    }
+    
+    /** Clears the value of the 'chargingBehaviorClass' field */
+    public gr.grnet.aquarium.message.avro.gen._ResourceType.Builder clearChargingBehaviorClass() {
+      chargingBehaviorClass = null;
+      fieldSetFlags()[2] = false;
+      return this;
+    }
+
+    @Override
+    public _ResourceType build() {
+      try {
+        _ResourceType record = new _ResourceType();
+        record.name = fieldSetFlags()[0] ? this.name : (java.lang.CharSequence) defaultValue(fields()[0]);
+        record.unit = fieldSetFlags()[1] ? this.unit : (java.lang.CharSequence) defaultValue(fields()[1]);
+        record.chargingBehaviorClass = fieldSetFlags()[2] ? this.chargingBehaviorClass : (java.lang.CharSequence) defaultValue(fields()[2]);
+        return record;
+      } catch (Exception e) {
+        throw new org.apache.avro.AvroRuntimeException(e);
+      }
+    }
+  }
+}