More Avro stuff
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / _BillEntry.java
diff --git a/src/main/java/gr/grnet/aquarium/message/avro/gen/_BillEntry.java b/src/main/java/gr/grnet/aquarium/message/avro/gen/_BillEntry.java
new file mode 100644 (file)
index 0000000..4ad52cd
--- /dev/null
@@ -0,0 +1,464 @@
+/**
+ * Autogenerated by Avro
+ * 
+ * DO NOT EDIT DIRECTLY
+ */
+package gr.grnet.aquarium.message.avro.gen;  
+@SuppressWarnings("all")
+public class _BillEntry 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\":\"_BillEntry\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"userID\",\"type\":\"string\"},{\"name\":\"status\",\"type\":\"string\"},{\"name\":\"remainingCredits\",\"type\":\"string\"},{\"name\":\"deductedCredits\",\"type\":\"string\"},{\"name\":\"startTime\",\"type\":\"string\"},{\"name\":\"endTime\",\"type\":\"string\"},{\"name\":\"bill\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"_ResourceEntry\",\"fields\":[{\"name\":\"resourceName\",\"type\":\"string\"},{\"name\":\"resourceType\",\"type\":\"string\"},{\"name\":\"unitName\",\"type\":\"string\"},{\"name\":\"totalCredits\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"_EventEntry\",\"fields\":[{\"name\":\"eventType\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"_ChargeEntry\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"unitPrice\",\"type\":\"string\"},{\"name\":\"startTime\",\"type\":\"string\"},{\"name\":\"endTime\",\"type\":\"string\"},{\"name\":\"ellapsedTime\",\"type\":\"string\"},{\"name\":\"credits\",\"type\":\"string\"}]}}}]}}}]}}}]}");
+  @Deprecated public java.lang.CharSequence id;
+  @Deprecated public java.lang.CharSequence userID;
+  @Deprecated public java.lang.CharSequence status;
+  @Deprecated public java.lang.CharSequence remainingCredits;
+  @Deprecated public java.lang.CharSequence deductedCredits;
+  @Deprecated public java.lang.CharSequence startTime;
+  @Deprecated public java.lang.CharSequence endTime;
+  @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> bill;
+  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 id;
+    case 1: return userID;
+    case 2: return status;
+    case 3: return remainingCredits;
+    case 4: return deductedCredits;
+    case 5: return startTime;
+    case 6: return endTime;
+    case 7: return bill;
+    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: id = (java.lang.CharSequence)value$; break;
+    case 1: userID = (java.lang.CharSequence)value$; break;
+    case 2: status = (java.lang.CharSequence)value$; break;
+    case 3: remainingCredits = (java.lang.CharSequence)value$; break;
+    case 4: deductedCredits = (java.lang.CharSequence)value$; break;
+    case 5: startTime = (java.lang.CharSequence)value$; break;
+    case 6: endTime = (java.lang.CharSequence)value$; break;
+    case 7: bill = (java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry>)value$; break;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+
+  /**
+   * Gets the value of the 'id' field.
+   */
+  public java.lang.CharSequence getId() {
+    return id;
+  }
+
+  /**
+   * Sets the value of the 'id' field.
+   * @param value the value to set.
+   */
+  public void setId(java.lang.CharSequence value) {
+    this.id = value;
+  }
+
+  /**
+   * Gets the value of the 'userID' field.
+   */
+  public java.lang.CharSequence getUserID() {
+    return userID;
+  }
+
+  /**
+   * Sets the value of the 'userID' field.
+   * @param value the value to set.
+   */
+  public void setUserID(java.lang.CharSequence value) {
+    this.userID = value;
+  }
+
+  /**
+   * Gets the value of the 'status' field.
+   */
+  public java.lang.CharSequence getStatus() {
+    return status;
+  }
+
+  /**
+   * Sets the value of the 'status' field.
+   * @param value the value to set.
+   */
+  public void setStatus(java.lang.CharSequence value) {
+    this.status = value;
+  }
+
+  /**
+   * Gets the value of the 'remainingCredits' field.
+   */
+  public java.lang.CharSequence getRemainingCredits() {
+    return remainingCredits;
+  }
+
+  /**
+   * Sets the value of the 'remainingCredits' field.
+   * @param value the value to set.
+   */
+  public void setRemainingCredits(java.lang.CharSequence value) {
+    this.remainingCredits = value;
+  }
+
+  /**
+   * Gets the value of the 'deductedCredits' field.
+   */
+  public java.lang.CharSequence getDeductedCredits() {
+    return deductedCredits;
+  }
+
+  /**
+   * Sets the value of the 'deductedCredits' field.
+   * @param value the value to set.
+   */
+  public void setDeductedCredits(java.lang.CharSequence value) {
+    this.deductedCredits = value;
+  }
+
+  /**
+   * Gets the value of the 'startTime' field.
+   */
+  public java.lang.CharSequence getStartTime() {
+    return startTime;
+  }
+
+  /**
+   * Sets the value of the 'startTime' field.
+   * @param value the value to set.
+   */
+  public void setStartTime(java.lang.CharSequence value) {
+    this.startTime = value;
+  }
+
+  /**
+   * Gets the value of the 'endTime' field.
+   */
+  public java.lang.CharSequence getEndTime() {
+    return endTime;
+  }
+
+  /**
+   * Sets the value of the 'endTime' field.
+   * @param value the value to set.
+   */
+  public void setEndTime(java.lang.CharSequence value) {
+    this.endTime = value;
+  }
+
+  /**
+   * Gets the value of the 'bill' field.
+   */
+  public java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> getBill() {
+    return bill;
+  }
+
+  /**
+   * Sets the value of the 'bill' field.
+   * @param value the value to set.
+   */
+  public void setBill(java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> value) {
+    this.bill = value;
+  }
+
+  /** Creates a new _BillEntry RecordBuilder */
+  public static gr.grnet.aquarium.message.avro.gen._BillEntry.Builder newBuilder() {
+    return new gr.grnet.aquarium.message.avro.gen._BillEntry.Builder();
+  }
+  
+  /** Creates a new _BillEntry RecordBuilder by copying an existing Builder */
+  public static gr.grnet.aquarium.message.avro.gen._BillEntry.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._BillEntry.Builder other) {
+    return new gr.grnet.aquarium.message.avro.gen._BillEntry.Builder(other);
+  }
+  
+  /** Creates a new _BillEntry RecordBuilder by copying an existing _BillEntry instance */
+  public static gr.grnet.aquarium.message.avro.gen._BillEntry.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._BillEntry other) {
+    return new gr.grnet.aquarium.message.avro.gen._BillEntry.Builder(other);
+  }
+  
+  /**
+   * RecordBuilder for _BillEntry instances.
+   */
+  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<_BillEntry>
+    implements org.apache.avro.data.RecordBuilder<_BillEntry> {
+
+    private java.lang.CharSequence id;
+    private java.lang.CharSequence userID;
+    private java.lang.CharSequence status;
+    private java.lang.CharSequence remainingCredits;
+    private java.lang.CharSequence deductedCredits;
+    private java.lang.CharSequence startTime;
+    private java.lang.CharSequence endTime;
+    private java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> bill;
+
+    /** Creates a new Builder */
+    private Builder() {
+      super(gr.grnet.aquarium.message.avro.gen._BillEntry.SCHEMA$);
+    }
+    
+    /** Creates a Builder by copying an existing Builder */
+    private Builder(gr.grnet.aquarium.message.avro.gen._BillEntry.Builder other) {
+      super(other);
+    }
+    
+    /** Creates a Builder by copying an existing _BillEntry instance */
+    private Builder(gr.grnet.aquarium.message.avro.gen._BillEntry other) {
+            super(gr.grnet.aquarium.message.avro.gen._BillEntry.SCHEMA$);
+      if (isValidValue(fields()[0], other.id)) {
+        this.id = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.id);
+        fieldSetFlags()[0] = true;
+      }
+      if (isValidValue(fields()[1], other.userID)) {
+        this.userID = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.userID);
+        fieldSetFlags()[1] = true;
+      }
+      if (isValidValue(fields()[2], other.status)) {
+        this.status = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.status);
+        fieldSetFlags()[2] = true;
+      }
+      if (isValidValue(fields()[3], other.remainingCredits)) {
+        this.remainingCredits = (java.lang.CharSequence) data().deepCopy(fields()[3].schema(), other.remainingCredits);
+        fieldSetFlags()[3] = true;
+      }
+      if (isValidValue(fields()[4], other.deductedCredits)) {
+        this.deductedCredits = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.deductedCredits);
+        fieldSetFlags()[4] = true;
+      }
+      if (isValidValue(fields()[5], other.startTime)) {
+        this.startTime = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.startTime);
+        fieldSetFlags()[5] = true;
+      }
+      if (isValidValue(fields()[6], other.endTime)) {
+        this.endTime = (java.lang.CharSequence) data().deepCopy(fields()[6].schema(), other.endTime);
+        fieldSetFlags()[6] = true;
+      }
+      if (isValidValue(fields()[7], other.bill)) {
+        this.bill = (java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry>) data().deepCopy(fields()[7].schema(), other.bill);
+        fieldSetFlags()[7] = true;
+      }
+    }
+
+    /** Gets the value of the 'id' field */
+    public java.lang.CharSequence getId() {
+      return id;
+    }
+    
+    /** Sets the value of the 'id' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setId(java.lang.CharSequence value) {
+      validate(fields()[0], value);
+      this.id = value;
+      fieldSetFlags()[0] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'id' field has been set */
+    public boolean hasId() {
+      return fieldSetFlags()[0];
+    }
+    
+    /** Clears the value of the 'id' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearId() {
+      id = null;
+      fieldSetFlags()[0] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'userID' field */
+    public java.lang.CharSequence getUserID() {
+      return userID;
+    }
+    
+    /** Sets the value of the 'userID' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setUserID(java.lang.CharSequence value) {
+      validate(fields()[1], value);
+      this.userID = value;
+      fieldSetFlags()[1] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'userID' field has been set */
+    public boolean hasUserID() {
+      return fieldSetFlags()[1];
+    }
+    
+    /** Clears the value of the 'userID' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearUserID() {
+      userID = null;
+      fieldSetFlags()[1] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'status' field */
+    public java.lang.CharSequence getStatus() {
+      return status;
+    }
+    
+    /** Sets the value of the 'status' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setStatus(java.lang.CharSequence value) {
+      validate(fields()[2], value);
+      this.status = value;
+      fieldSetFlags()[2] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'status' field has been set */
+    public boolean hasStatus() {
+      return fieldSetFlags()[2];
+    }
+    
+    /** Clears the value of the 'status' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearStatus() {
+      status = null;
+      fieldSetFlags()[2] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'remainingCredits' field */
+    public java.lang.CharSequence getRemainingCredits() {
+      return remainingCredits;
+    }
+    
+    /** Sets the value of the 'remainingCredits' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setRemainingCredits(java.lang.CharSequence value) {
+      validate(fields()[3], value);
+      this.remainingCredits = value;
+      fieldSetFlags()[3] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'remainingCredits' field has been set */
+    public boolean hasRemainingCredits() {
+      return fieldSetFlags()[3];
+    }
+    
+    /** Clears the value of the 'remainingCredits' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearRemainingCredits() {
+      remainingCredits = null;
+      fieldSetFlags()[3] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'deductedCredits' field */
+    public java.lang.CharSequence getDeductedCredits() {
+      return deductedCredits;
+    }
+    
+    /** Sets the value of the 'deductedCredits' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setDeductedCredits(java.lang.CharSequence value) {
+      validate(fields()[4], value);
+      this.deductedCredits = value;
+      fieldSetFlags()[4] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'deductedCredits' field has been set */
+    public boolean hasDeductedCredits() {
+      return fieldSetFlags()[4];
+    }
+    
+    /** Clears the value of the 'deductedCredits' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearDeductedCredits() {
+      deductedCredits = null;
+      fieldSetFlags()[4] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'startTime' field */
+    public java.lang.CharSequence getStartTime() {
+      return startTime;
+    }
+    
+    /** Sets the value of the 'startTime' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setStartTime(java.lang.CharSequence value) {
+      validate(fields()[5], value);
+      this.startTime = value;
+      fieldSetFlags()[5] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'startTime' field has been set */
+    public boolean hasStartTime() {
+      return fieldSetFlags()[5];
+    }
+    
+    /** Clears the value of the 'startTime' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearStartTime() {
+      startTime = null;
+      fieldSetFlags()[5] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'endTime' field */
+    public java.lang.CharSequence getEndTime() {
+      return endTime;
+    }
+    
+    /** Sets the value of the 'endTime' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setEndTime(java.lang.CharSequence value) {
+      validate(fields()[6], value);
+      this.endTime = value;
+      fieldSetFlags()[6] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'endTime' field has been set */
+    public boolean hasEndTime() {
+      return fieldSetFlags()[6];
+    }
+    
+    /** Clears the value of the 'endTime' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearEndTime() {
+      endTime = null;
+      fieldSetFlags()[6] = false;
+      return this;
+    }
+
+    /** Gets the value of the 'bill' field */
+    public java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> getBill() {
+      return bill;
+    }
+    
+    /** Sets the value of the 'bill' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setBill(java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> value) {
+      validate(fields()[7], value);
+      this.bill = value;
+      fieldSetFlags()[7] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'bill' field has been set */
+    public boolean hasBill() {
+      return fieldSetFlags()[7];
+    }
+    
+    /** Clears the value of the 'bill' field */
+    public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearBill() {
+      bill = null;
+      fieldSetFlags()[7] = false;
+      return this;
+    }
+
+    @Override
+    public _BillEntry build() {
+      try {
+        _BillEntry record = new _BillEntry();
+        record.id = fieldSetFlags()[0] ? this.id : (java.lang.CharSequence) defaultValue(fields()[0]);
+        record.userID = fieldSetFlags()[1] ? this.userID : (java.lang.CharSequence) defaultValue(fields()[1]);
+        record.status = fieldSetFlags()[2] ? this.status : (java.lang.CharSequence) defaultValue(fields()[2]);
+        record.remainingCredits = fieldSetFlags()[3] ? this.remainingCredits : (java.lang.CharSequence) defaultValue(fields()[3]);
+        record.deductedCredits = fieldSetFlags()[4] ? this.deductedCredits : (java.lang.CharSequence) defaultValue(fields()[4]);
+        record.startTime = fieldSetFlags()[5] ? this.startTime : (java.lang.CharSequence) defaultValue(fields()[5]);
+        record.endTime = fieldSetFlags()[6] ? this.endTime : (java.lang.CharSequence) defaultValue(fields()[6]);
+        record.bill = fieldSetFlags()[7] ? this.bill : (java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry>) defaultValue(fields()[7]);
+        return record;
+      } catch (Exception e) {
+        throw new org.apache.avro.AvroRuntimeException(e);
+      }
+    }
+  }
+}