string unitPrice;
string startTime;
string endTime;
- string elapsedTime;
- string units;
- string credits;
+ string totalCredits;
+ string totalElapsedTime;
+ string totalUnits;
}
record EventEntryMsg {
string deductedCredits;
string startTime;
string endTime;
- array<ServiceEntryMsg> bill;
+ array<ServiceEntryMsg> details;
}
}
\ No newline at end of file
@SuppressWarnings("all")
public interface AquariumBill {
- public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.Protocol.parse("{\"protocol\":\"AquariumBill\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"types\":[{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"elapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"units\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"credits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":\"ChargeEntryMsg\"}}]},{\"type\":\"record\",\"name\":\"ResourceEntryMsg\",\"fields\":[{\"name\":\"resourceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":\"EventEntryMsg\"}}]},{\"type\":\"record\",\"name\":\"ServiceEntryMsg\",\"fields\":[{\"name\":\"serviceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":\"ResourceEntryMsg\"}}]},{\"type\":\"record\",\"name\":\"BillEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"status\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"remainingCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"deductedCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"bill\",\"type\":{\"type\":\"array\",\"items\":\"ServiceEntryMsg\"}}]}],\"messages\":{}}");
+ public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.Protocol.parse("{\"protocol\":\"AquariumBill\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"types\":[{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":\"ChargeEntryMsg\"}}]},{\"type\":\"record\",\"name\":\"ResourceEntryMsg\",\"fields\":[{\"name\":\"resourceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":\"EventEntryMsg\"}}]},{\"type\":\"record\",\"name\":\"ServiceEntryMsg\",\"fields\":[{\"name\":\"serviceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":\"ResourceEntryMsg\"}}]},{\"type\":\"record\",\"name\":\"BillEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"status\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"remainingCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"deductedCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":\"ServiceEntryMsg\"}}]}],\"messages\":{}}");
@SuppressWarnings("all")
public interface Callback extends AquariumBill {
package gr.grnet.aquarium.message.avro.gen;
@SuppressWarnings("all")
public class BillEntryMsg 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\":\"BillEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"status\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"remainingCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"deductedCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"bill\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ServiceEntryMsg\",\"fields\":[{\"name\":\"serviceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ResourceEntryMsg\",\"fields\":[{\"name\":\"resourceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"elapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"units\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"credits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}}}]}}}]}}}]}}}]}");
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"BillEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"status\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"remainingCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"deductedCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ServiceEntryMsg\",\"fields\":[{\"name\":\"serviceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ResourceEntryMsg\",\"fields\":[{\"name\":\"resourceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}}}]}}}]}}}]}}}]}");
@Deprecated public java.lang.String id;
@Deprecated public java.lang.String userID;
@Deprecated public java.lang.String status;
@Deprecated public java.lang.String deductedCredits;
@Deprecated public java.lang.String startTime;
@Deprecated public java.lang.String endTime;
- @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> bill;
+ @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> details;
/**
* Default constructor.
/**
* All-args constructor.
*/
- public BillEntryMsg(java.lang.String id, java.lang.String userID, java.lang.String status, java.lang.String remainingCredits, java.lang.String deductedCredits, java.lang.String startTime, java.lang.String endTime, java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> bill) {
+ public BillEntryMsg(java.lang.String id, java.lang.String userID, java.lang.String status, java.lang.String remainingCredits, java.lang.String deductedCredits, java.lang.String startTime, java.lang.String endTime, java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> details) {
this.id = id;
this.userID = userID;
this.status = status;
this.deductedCredits = deductedCredits;
this.startTime = startTime;
this.endTime = endTime;
- this.bill = bill;
+ this.details = details;
}
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
case 4: return deductedCredits;
case 5: return startTime;
case 6: return endTime;
- case 7: return bill;
+ case 7: return details;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
case 4: deductedCredits = (java.lang.String)value$; break;
case 5: startTime = (java.lang.String)value$; break;
case 6: endTime = (java.lang.String)value$; break;
- case 7: bill = (java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg>)value$; break;
+ case 7: details = (java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg>)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
}
/**
- * Gets the value of the 'bill' field.
+ * Gets the value of the 'details' field.
*/
- public java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> getBill() {
- return bill;
+ public java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> getDetails() {
+ return details;
}
/**
- * Sets the value of the 'bill' field.
+ * Sets the value of the 'details' field.
* @param value the value to set.
*/
- public void setBill(java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> value) {
- this.bill = value;
+ public void setDetails(java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> value) {
+ this.details = value;
}
/** Creates a new BillEntryMsg RecordBuilder */
private java.lang.String deductedCredits;
private java.lang.String startTime;
private java.lang.String endTime;
- private java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> bill;
+ private java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> details;
/** Creates a new Builder */
private Builder() {
this.endTime = (java.lang.String) 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.ServiceEntryMsg>) data().deepCopy(fields()[7].schema(), other.bill);
+ if (isValidValue(fields()[7], other.details)) {
+ this.details = (java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg>) data().deepCopy(fields()[7].schema(), other.details);
fieldSetFlags()[7] = true;
}
}
return this;
}
- /** Gets the value of the 'bill' field */
- public java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> getBill() {
- return bill;
+ /** Gets the value of the 'details' field */
+ public java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> getDetails() {
+ return details;
}
- /** Sets the value of the 'bill' field */
- public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setBill(java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> value) {
+ /** Sets the value of the 'details' field */
+ public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setDetails(java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg> value) {
validate(fields()[7], value);
- this.bill = value;
+ this.details = value;
fieldSetFlags()[7] = true;
return this;
}
- /** Checks whether the 'bill' field has been set */
- public boolean hasBill() {
+ /** Checks whether the 'details' field has been set */
+ public boolean hasDetails() {
return fieldSetFlags()[7];
}
- /** Clears the value of the 'bill' field */
- public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearBill() {
- bill = null;
+ /** Clears the value of the 'details' field */
+ public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearDetails() {
+ details = null;
fieldSetFlags()[7] = false;
return this;
}
record.deductedCredits = fieldSetFlags()[4] ? this.deductedCredits : (java.lang.String) defaultValue(fields()[4]);
record.startTime = fieldSetFlags()[5] ? this.startTime : (java.lang.String) defaultValue(fields()[5]);
record.endTime = fieldSetFlags()[6] ? this.endTime : (java.lang.String) defaultValue(fields()[6]);
- record.bill = fieldSetFlags()[7] ? this.bill : (java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg>) defaultValue(fields()[7]);
+ record.details = fieldSetFlags()[7] ? this.details : (java.util.List<gr.grnet.aquarium.message.avro.gen.ServiceEntryMsg>) defaultValue(fields()[7]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
package gr.grnet.aquarium.message.avro.gen;
@SuppressWarnings("all")
public class ChargeEntryMsg 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\":\"ChargeEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"elapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"units\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"credits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}");
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}");
@Deprecated public java.lang.String id;
@Deprecated public java.lang.String unitPrice;
@Deprecated public java.lang.String startTime;
@Deprecated public java.lang.String endTime;
- @Deprecated public java.lang.String elapsedTime;
- @Deprecated public java.lang.String units;
- @Deprecated public java.lang.String credits;
+ @Deprecated public java.lang.String totalCredits;
+ @Deprecated public java.lang.String totalElapsedTime;
+ @Deprecated public java.lang.String totalUnits;
/**
* Default constructor.
/**
* All-args constructor.
*/
- public ChargeEntryMsg(java.lang.String id, java.lang.String unitPrice, java.lang.String startTime, java.lang.String endTime, java.lang.String elapsedTime, java.lang.String units, java.lang.String credits) {
+ public ChargeEntryMsg(java.lang.String id, java.lang.String unitPrice, java.lang.String startTime, java.lang.String endTime, java.lang.String totalCredits, java.lang.String totalElapsedTime, java.lang.String totalUnits) {
this.id = id;
this.unitPrice = unitPrice;
this.startTime = startTime;
this.endTime = endTime;
- this.elapsedTime = elapsedTime;
- this.units = units;
- this.credits = credits;
+ this.totalCredits = totalCredits;
+ this.totalElapsedTime = totalElapsedTime;
+ this.totalUnits = totalUnits;
}
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
case 1: return unitPrice;
case 2: return startTime;
case 3: return endTime;
- case 4: return elapsedTime;
- case 5: return units;
- case 6: return credits;
+ case 4: return totalCredits;
+ case 5: return totalElapsedTime;
+ case 6: return totalUnits;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
case 1: unitPrice = (java.lang.String)value$; break;
case 2: startTime = (java.lang.String)value$; break;
case 3: endTime = (java.lang.String)value$; break;
- case 4: elapsedTime = (java.lang.String)value$; break;
- case 5: units = (java.lang.String)value$; break;
- case 6: credits = (java.lang.String)value$; break;
+ case 4: totalCredits = (java.lang.String)value$; break;
+ case 5: totalElapsedTime = (java.lang.String)value$; break;
+ case 6: totalUnits = (java.lang.String)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
}
/**
- * Gets the value of the 'elapsedTime' field.
+ * Gets the value of the 'totalCredits' field.
*/
- public java.lang.String getElapsedTime() {
- return elapsedTime;
+ public java.lang.String getTotalCredits() {
+ return totalCredits;
}
/**
- * Sets the value of the 'elapsedTime' field.
+ * Sets the value of the 'totalCredits' field.
* @param value the value to set.
*/
- public void setElapsedTime(java.lang.String value) {
- this.elapsedTime = value;
+ public void setTotalCredits(java.lang.String value) {
+ this.totalCredits = value;
}
/**
- * Gets the value of the 'units' field.
+ * Gets the value of the 'totalElapsedTime' field.
*/
- public java.lang.String getUnits() {
- return units;
+ public java.lang.String getTotalElapsedTime() {
+ return totalElapsedTime;
}
/**
- * Sets the value of the 'units' field.
+ * Sets the value of the 'totalElapsedTime' field.
* @param value the value to set.
*/
- public void setUnits(java.lang.String value) {
- this.units = value;
+ public void setTotalElapsedTime(java.lang.String value) {
+ this.totalElapsedTime = value;
}
/**
- * Gets the value of the 'credits' field.
+ * Gets the value of the 'totalUnits' field.
*/
- public java.lang.String getCredits() {
- return credits;
+ public java.lang.String getTotalUnits() {
+ return totalUnits;
}
/**
- * Sets the value of the 'credits' field.
+ * Sets the value of the 'totalUnits' field.
* @param value the value to set.
*/
- public void setCredits(java.lang.String value) {
- this.credits = value;
+ public void setTotalUnits(java.lang.String value) {
+ this.totalUnits = value;
}
/** Creates a new ChargeEntryMsg RecordBuilder */
private java.lang.String unitPrice;
private java.lang.String startTime;
private java.lang.String endTime;
- private java.lang.String elapsedTime;
- private java.lang.String units;
- private java.lang.String credits;
+ private java.lang.String totalCredits;
+ private java.lang.String totalElapsedTime;
+ private java.lang.String totalUnits;
/** Creates a new Builder */
private Builder() {
this.endTime = (java.lang.String) data().deepCopy(fields()[3].schema(), other.endTime);
fieldSetFlags()[3] = true;
}
- if (isValidValue(fields()[4], other.elapsedTime)) {
- this.elapsedTime = (java.lang.String) data().deepCopy(fields()[4].schema(), other.elapsedTime);
+ if (isValidValue(fields()[4], other.totalCredits)) {
+ this.totalCredits = (java.lang.String) data().deepCopy(fields()[4].schema(), other.totalCredits);
fieldSetFlags()[4] = true;
}
- if (isValidValue(fields()[5], other.units)) {
- this.units = (java.lang.String) data().deepCopy(fields()[5].schema(), other.units);
+ if (isValidValue(fields()[5], other.totalElapsedTime)) {
+ this.totalElapsedTime = (java.lang.String) data().deepCopy(fields()[5].schema(), other.totalElapsedTime);
fieldSetFlags()[5] = true;
}
- if (isValidValue(fields()[6], other.credits)) {
- this.credits = (java.lang.String) data().deepCopy(fields()[6].schema(), other.credits);
+ if (isValidValue(fields()[6], other.totalUnits)) {
+ this.totalUnits = (java.lang.String) data().deepCopy(fields()[6].schema(), other.totalUnits);
fieldSetFlags()[6] = true;
}
}
return this;
}
- /** Gets the value of the 'elapsedTime' field */
- public java.lang.String getElapsedTime() {
- return elapsedTime;
+ /** Gets the value of the 'totalCredits' field */
+ public java.lang.String getTotalCredits() {
+ return totalCredits;
}
- /** Sets the value of the 'elapsedTime' field */
- public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setElapsedTime(java.lang.String value) {
+ /** Sets the value of the 'totalCredits' field */
+ public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setTotalCredits(java.lang.String value) {
validate(fields()[4], value);
- this.elapsedTime = value;
+ this.totalCredits = value;
fieldSetFlags()[4] = true;
return this;
}
- /** Checks whether the 'elapsedTime' field has been set */
- public boolean hasElapsedTime() {
+ /** Checks whether the 'totalCredits' field has been set */
+ public boolean hasTotalCredits() {
return fieldSetFlags()[4];
}
- /** Clears the value of the 'elapsedTime' field */
- public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearElapsedTime() {
- elapsedTime = null;
+ /** Clears the value of the 'totalCredits' field */
+ public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearTotalCredits() {
+ totalCredits = null;
fieldSetFlags()[4] = false;
return this;
}
- /** Gets the value of the 'units' field */
- public java.lang.String getUnits() {
- return units;
+ /** Gets the value of the 'totalElapsedTime' field */
+ public java.lang.String getTotalElapsedTime() {
+ return totalElapsedTime;
}
- /** Sets the value of the 'units' field */
- public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setUnits(java.lang.String value) {
+ /** Sets the value of the 'totalElapsedTime' field */
+ public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setTotalElapsedTime(java.lang.String value) {
validate(fields()[5], value);
- this.units = value;
+ this.totalElapsedTime = value;
fieldSetFlags()[5] = true;
return this;
}
- /** Checks whether the 'units' field has been set */
- public boolean hasUnits() {
+ /** Checks whether the 'totalElapsedTime' field has been set */
+ public boolean hasTotalElapsedTime() {
return fieldSetFlags()[5];
}
- /** Clears the value of the 'units' field */
- public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearUnits() {
- units = null;
+ /** Clears the value of the 'totalElapsedTime' field */
+ public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearTotalElapsedTime() {
+ totalElapsedTime = null;
fieldSetFlags()[5] = false;
return this;
}
- /** Gets the value of the 'credits' field */
- public java.lang.String getCredits() {
- return credits;
+ /** Gets the value of the 'totalUnits' field */
+ public java.lang.String getTotalUnits() {
+ return totalUnits;
}
- /** Sets the value of the 'credits' field */
- public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setCredits(java.lang.String value) {
+ /** Sets the value of the 'totalUnits' field */
+ public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setTotalUnits(java.lang.String value) {
validate(fields()[6], value);
- this.credits = value;
+ this.totalUnits = value;
fieldSetFlags()[6] = true;
return this;
}
- /** Checks whether the 'credits' field has been set */
- public boolean hasCredits() {
+ /** Checks whether the 'totalUnits' field has been set */
+ public boolean hasTotalUnits() {
return fieldSetFlags()[6];
}
- /** Clears the value of the 'credits' field */
- public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearCredits() {
- credits = null;
+ /** Clears the value of the 'totalUnits' field */
+ public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearTotalUnits() {
+ totalUnits = null;
fieldSetFlags()[6] = false;
return this;
}
record.unitPrice = fieldSetFlags()[1] ? this.unitPrice : (java.lang.String) defaultValue(fields()[1]);
record.startTime = fieldSetFlags()[2] ? this.startTime : (java.lang.String) defaultValue(fields()[2]);
record.endTime = fieldSetFlags()[3] ? this.endTime : (java.lang.String) defaultValue(fields()[3]);
- record.elapsedTime = fieldSetFlags()[4] ? this.elapsedTime : (java.lang.String) defaultValue(fields()[4]);
- record.units = fieldSetFlags()[5] ? this.units : (java.lang.String) defaultValue(fields()[5]);
- record.credits = fieldSetFlags()[6] ? this.credits : (java.lang.String) defaultValue(fields()[6]);
+ record.totalCredits = fieldSetFlags()[4] ? this.totalCredits : (java.lang.String) defaultValue(fields()[4]);
+ record.totalElapsedTime = fieldSetFlags()[5] ? this.totalElapsedTime : (java.lang.String) defaultValue(fields()[5]);
+ record.totalUnits = fieldSetFlags()[6] ? this.totalUnits : (java.lang.String) defaultValue(fields()[6]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
package gr.grnet.aquarium.message.avro.gen;
@SuppressWarnings("all")
public class EventEntryMsg 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\":\"EventEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"elapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"units\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"credits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}}}]}");
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}}}]}");
@Deprecated public java.lang.String eventType;
@Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg> details;
package gr.grnet.aquarium.message.avro.gen;
@SuppressWarnings("all")
public class ResourceEntryMsg 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\":\"ResourceEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"resourceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"elapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"units\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"credits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}}}]}}}]}");
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ResourceEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"resourceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}}}]}}}]}");
@Deprecated public java.lang.String resourceName;
@Deprecated public java.lang.String resourceType;
@Deprecated public java.lang.String unitName;
package gr.grnet.aquarium.message.avro.gen;
@SuppressWarnings("all")
public class ServiceEntryMsg 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\":\"ServiceEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"serviceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ResourceEntryMsg\",\"fields\":[{\"name\":\"resourceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"elapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"units\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"credits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}}}]}}}]}}}]}");
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ServiceEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"serviceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ResourceEntryMsg\",\"fields\":[{\"name\":\"resourceName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"startTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"endTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalElapsedTime\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"totalUnits\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}}}]}}}]}}}]}");
@Deprecated public java.lang.String serviceName;
@Deprecated public java.lang.String totalCredits;
@Deprecated public java.lang.String totalElapsedTime;
this._userStateModel.userID,
this._userStateModel.latestResourceEventOccurredMillis,
TimeHelpers.nowMillis()
- )
+ )(_⇒{})
}
private[this] def makeUserStateMsgUpToDate() {
val dend = cal.getTime
Timeslot(dstart,dend)
} */
- private [this] def newChargeEntry(id:String,
+ //private[this] val emptyJavaList = new java.util.ArrayList[String]()
+ private[this] def newChargeEntry(id:String,
unitPrice:String,
startTime:String,
endTime:String,
msg.setUnitPrice(unitPrice)
msg.setStartTime(startTime)
msg.setEndTime(endTime)
- msg.setElapsedTime(elapsedTime)
- msg.setUnits(units)
- msg.setCredits(credits)
+ msg.setTotalElapsedTime(elapsedTime)
+ msg.setTotalUnits(units)
+ msg.setTotalCredits(credits)
+ //msg.setDetails(emptyJavaList)
msg
}
msg.setDeductedCredits(deductedCredits)
msg.setStartTime(startTime)
msg.setEndTime(endTime)
- msg.setBill(bill)
+ msg.setDetails(bill)
msg
}
}
Debug(logger, "effectivePriceTableOfSelectorForResource:")
- Debug(logger, " selectorPath = %s", selectorPath.mkString("/"))
+ Debug(logger, "selectorPath = %s", selectorPath.mkString("/"))
val perResource = fullPriceTable.getPerResource
val selectorData = perResource.get(resource)
import gr.grnet.aquarium.message.avro.{MessageHelpers, MessageFactory, OrderingHelpers, AvroHelpers}
import gr.grnet.aquarium.store._
import gr.grnet.aquarium.util._
+import gr.grnet.aquarium.util.Once
import gr.grnet.aquarium.util.json.JsonSupport
import gr.grnet.aquarium.{Aquarium, AquariumException}
import org.apache.avro.specific.SpecificRecord
private[store] lazy val imEvents = getCollection(MongoDBStore.IMEventCollection)
private[store] lazy val policies = getCollection(MongoDBStore.PolicyCollection)
+ private[store] lazy val indicesMap = {
+ val resev= new BasicDBObjectBuilder().
+ add(MongoDBStore.JsonNames.id,1).
+ add(MongoDBStore.JsonNames.userID,1).
+ add(MongoDBStore.JsonNames.occurredMillis,1).
+ add(MongoDBStore.JsonNames.receivedMillis,1).get
+ val imev = new BasicDBObjectBuilder().
+ add(MongoDBStore.JsonNames.userID,1).
+ add(MongoDBStore.JsonNames.eventType,"").
+ add(MongoDBStore.JsonNames.occurredMillis,1).get
+ val policy = new BasicDBObjectBuilder().
+ add("validFromMillis",1).
+ add("validToMillis",1).get
+ val user = new BasicDBObjectBuilder().
+ add( "occurredMillis",1).
+ add("isFullBillingMonth",false).
+ add("billingYear",1).
+ add("billingMonth",1).
+ add("billingMonthDay",1).get
+ Map(MongoDBStore.ResourceEventCollection -> resev,
+ MongoDBStore.IMEventCollection-> imev,
+ MongoDBStore.PolicyCollection-> policy,
+ MongoDBStore.UserStateCollection-> user
+ )
+ }
+ private[this] val once = new Once()
+
private[this] def doAuthenticate(db: DB) {
if(!db.isAuthenticated && !db.authenticate(username, password.toCharArray)) {
throw new AquariumException("Could not authenticate user %s".format(username))
private[this] def getCollection(name: String): DBCollection = {
val db = mongo.getDB(database)
doAuthenticate(db)
+ once.run { /* this code is thread-safe and will run exactly once*/
+ indicesMap.foreach { case (collection,obj) =>
+ mongo.getDB(database).getCollection(collection).createIndex(obj)
+ }
+ }
db.getCollection(name)
}
object MongoDBStore {
final val JsonNames = gr.grnet.aquarium.util.json.JsonNames
- final val ResourceEventCollection = "resevents"
+ final val collections = List("resevents","userstates","imevents","policies")
- final val UserStateCollection = "userstates"
+ final val ResourceEventCollection = collections(0)
- final val UserAgreementHistoryCollection = "useragreementhistory"
+ final val UserStateCollection = collections(1)
- final val IMEventCollection = "imevents"
+ final val IMEventCollection = collections(2)
- final val PolicyCollection = "policies"
+ final val PolicyCollection = collections(3)
def firstResultIfExists[A](cursor: DBCursor, f: DBObject ⇒ A): Option[A] = {
withCloseable(cursor) { cursor ⇒
--- /dev/null
+package gr.grnet.aquarium.util
+
+/**
+ * Run exactly once
+ *
+ * @author Prodromos Gerakios <pgerakios@grnet.gr>
+ */
+
+class Once {
+ private[this] val count=new java.util.concurrent.atomic.AtomicLong()
+ private[this] val ready=new java.util.concurrent.atomic.AtomicBoolean(false)
+
+ def run(once : => Unit): Unit = {
+ if(!ready.get){
+ if(count.addAndGet(1) == 1){
+ try {
+ once
+ } finally {
+ this.synchronized{
+ ready.set(true)
+ this.synchronized(this.notifyAll)
+ }
+ }
+ } else
+ this.synchronized {while(!ready.get) this.wait}
+ }
+ }
+}
import gr.grnet.aquarium.util.{Lock, Loggable}
import java.util.{Date, Calendar, GregorianCalendar}
import gr.grnet.aquarium.logic.accounting.dsl.Timeslot
-import gr.grnet.aquarium.policy.CronSpec
-import gr.grnet.aquarium.message.avro.gen.{BillEntryMsg, IMEventMsg, ResourceEventMsg}
+import message.avro.gen._
import org.apache.avro.specific.SpecificRecord
+import policy.CronSpec
import util.json.JsonSupport
+import scala.Some
+import scala.Tuple2
+import java.util.concurrent.locks.ReentrantLock
/*
object UID {
+
+ private[this] var privCounters = Map[String,Long]()
+ private[this] val lock = new Lock()
+
+ def next(s:String) : Long = {
+ val l = lock.withLock{
+ privCounters.get(s) match {
+ case None => 1
+ case Some(l) => l+1
+ }
+ }
+ privCounters = privCounters + ((s,l))
+ l
+ }
+
private[this] val counter = new AtomicLong(0L)
def next() = counter.getAndIncrement
def random(min:Int=Int.MinValue,max:Int=Int.MaxValue) =
}
private[this] val count=new java.util.concurrent.atomic.AtomicLong()
+ private[this] val ready=new java.util.concurrent.atomic.AtomicBoolean(false)
+
def run(billWait:Int, stop:Int)(f : => Unit) = {
- if(count.addAndGet(1) == 1)
+ if(count.addAndGet(1) == 1){
+ Console.err.println("Starting aquarium")
aquarium.start
- Thread.sleep(billWait)
+ Thread.sleep(billWait)
+ Console.err.println("Starting aquarium (%d seconds) --- DONE".format(billWait/1000))
+ this.synchronized{
+ ready.set(true)
+ this.synchronized(this.notifyAll)
+ }
+ }
try{
- f
+ this.synchronized{
+ while(!ready.get) this.wait
+ }
} finally {
- Console.err.println("Stopping aquarium")
- if(count.addAndGet(-1) == 0)
- aquarium.stop
- Thread.sleep(stop)
- Console.err.println("Stopping aquarium --- DONE")
+ if(count.addAndGet(-1) == 0){
+ Console.err.println("Stopping aquarium")
+ aquarium.stop
+ Thread.sleep(stop)
+ Console.err.println("Stopping aquarium --- DONE")
+ }
}
}
}
} */
object MessageService {
+ private[this] val lock = new Lock
def send(event:SpecificRecord, rabbitMQEnabled : Boolean = false, debugEnabled:Boolean =false) = {
val json = AvroHelpers.jsonStringOfSpecificRecord(event)
AquariumInstance.aquarium.imEventStore.insertIMEvent(imevent)
imevent.getUserID
}
- val userActorRef = AquariumInstance.aquarium.akkaService.getOrCreateUserActor(uid)
+ val userActorRef = lock.withLock(AquariumInstance.aquarium.akkaService.getOrCreateUserActor(uid))
userActorRef ! event
}
val millis = event match {
if((_cronSpec==null || _cronSpec.cronSpec != spec ||cal.get(Calendar.MONTH) != month -1)) {
val d1 = getDate(1,if(month==12) 1 else month+1,year,0,0,0)
val d0 = getDate(1,month,year,0,0,0)
- _range = Timeslot(d0,d1 - 1000)
+ _range = Timeslot((d0/1000)*1000,(d1/1000)*1000 - 1000)
+ cal.setTimeInMillis(d0)
_cronSpec = new CronSpec(if(spec.isEmpty) "* * * * *" else spec)
}
case _ => ()
}
def year : Int = {
+ val tmp = getMillis
cal.setTimeInMillis(System.currentTimeMillis())
- cal.get(Calendar.YEAR)
+ val ret = cal.get(Calendar.YEAR)
+ cal.setTimeInMillis(tmp)
+ ret
}
def getDate(day:Int,month:Int,year:Int,hour:Int,min:Int,sec:Int) : Long = {
+ val tmp = getMillis
cal.set(year,month-1,day,hour,min,sec)
- cal.getTimeInMillis
+ val ret = cal.getTimeInMillis
+ cal.setTimeInMillis(tmp)
+ ret
}
def getMillis : Long = cal.getTimeInMillis
def getDate(day:Int,month:Int,year:Int,hour:Int,min:Int) : Long =
getDate(day,month,year,hour,min,0)
- def setMillis(millis:Long) = {
+ /*def setMillis(millis:Long) = {
cal.setTimeInMillis(millis)
- }
+ }*/
- def addMillis(day:Int,hour:Int) = {
+ /*def addMillis(day:Int,hour:Int) = {
cal.roll(Calendar.DATE,day)
cal.roll(Calendar.DATE,hour)
- }
+ }*/
- def nextID = UID.next
+ def nextID = UID.next(this.getClass().getName) /*this match {
+ case _:DiskMessage => UID.next("DiskMessage")
+ case _:CreationMessage => UID.next("CreationMessage")
+ case _:VMMessage => UID.next("VMMessage")
+ case _:AddCreditsMessage => UID.next("AddCreditsMessage")
+ }*/
def makeEvent(millis:Long,map:Map[String,String]) : SpecificRecord
MessageFactory.newDetails(),
uid
)
-
msg
}
}
MessageFactory.newDetails(),
uid
)
-
msg
}
}
val _creationMessage : Message = Message("create","uid"->uid,"month"->month.toString,"spec"->"")
var _resources : List[Message] = Nil
var _billEntryMsg :Option[BillEntryMsg] = None
+ var _resMsgs = 0
+ var _vmMsgs = 0
+ var _addMsgs = 0
+ var _messagesSent : List[Message] = Nil
override def toString() = uid
+ def scalaList[A](s:java.util.List[A]) : List[A] = {
+ import scala.collection.JavaConverters.asScalaBufferConverter
+ s.asScala.toList
+ }
+
+ def sumOf[A,D](l: java.util.List[A],start:D)(f:A=>D)(add:(D,D)=>D) : D =
+ scalaList(l).map(f).foldLeft(start) {case (sum,v) => add(sum,v) }
+
+
+ def checkSum[A,D](s:D,l: java.util.List[A],start:D)(f:A=>D)(add:(D,D)=>D) =
+ check(s == sumOf(l,start)(f)(add))
+
+ def check(b: => Boolean) = {
+ if(!b)
+ throw new Exception("Invalid property")
+ }
+
+
+ type S[A] = {def getTotalCredits : String
+ def getTotalElapsedTime:String
+ def getTotalUnits:String
+ def getDetails:java.util.List[A]}
+ type V = (Double,Long,Double)
+
+ def valuesOf[A,T<:S[A]](t:T) : (V,java.util.List[A]) =
+ ((t.getTotalCredits.toDouble,
+ t.getTotalElapsedTime.toLong,
+ t.getTotalUnits.toDouble),
+ t.getDetails)
+
+ def checkS[A,T<:S[A]](s:T)(f:A=>V)(add:(V,V)=>V) = {
+ val zero = (0D,0L,0D)
+ val (v0,v1) = valuesOf[A,T](s)
+ checkSum(v0,v1,zero)(f)(add)
+ }
+
+ def add(a:V,b:V) : V= {
+ val (a1,a2,a3) = a
+ val (b1,b2,b3) = b
+ //if(pos && b1 < 0.0D) a else
+ (a1+b1,a2+b2,a3+b3)
+ }
+
+ val zero = (0.0D,0L,0.0D)
+
+ def filterMessagesSent(serviceName:String) : List[Message] =
+ _messagesSent.filter { (_,serviceName) match {
+ case (_:DiskMessage,"diskspace") => true
+ case (_:VMMessage,"vmtime") => true
+ case (_:AddCreditsMessage,"addcredits") => true
+ case _ => false
+ }}
+
+ def checkMessages(serviceName:String,c:List[ChargeEntryMsg],m:List[Message]) = {
+ if(m.length == 0) check(c.length == 0)
+ else check(c.length == (serviceName match {
+ case "diskspace" => m.length - 1
+ case "vmtime" => m.length - 1
+ case "addcredits" => m.length
+ }))
+ }
+
+ def validateChargeEntry(c:ChargeEntryMsg) : V = {
+ (c.getTotalCredits.toDouble,c.getTotalElapsedTime.toLong,c.getTotalUnits.toDouble)
+ }
+
+ def validateEventEntry(serviceName:String,e:EventEntryMsg) : V = {
+ val v1 = scalaList(e.getDetails)
+ val v2 = filterMessagesSent(serviceName)
+ checkMessages(serviceName,v1,v2)
+ //val v3 = (e.getTotalCredits.toDouble,e.getTotalElapsedTime.toLong,e.getTotalUnits.toDouble)
+ val v4 = sumOf(e.getDetails,zero)(validateChargeEntry)(add)
+ v4
+ }
+
+ def validateResourceEntry(serviceName:String,r:ResourceEntryMsg) : V = {
+ val v0 = (r.getTotalCredits.toDouble,r.getTotalElapsedTime.toLong,r.getTotalUnits.toDouble)
+ val v1 = sumOf(r.getDetails,zero)(validateEventEntry(serviceName,_))(add)
+ check(v0 == v1)
+ v0
+ }
+
+ def validateServiceEntry(s:ServiceEntryMsg) : Double = {
+ val v0 = (s.getTotalCredits.toDouble,s.getTotalElapsedTime.toLong,s.getTotalUnits.toDouble)
+ val v1 = sumOf(s.getDetails,zero)(validateResourceEntry(s.getServiceName,_))(add)
+ check(v0 == v1)
+ v0._1
+ }
+
+ def validateBillEntry(b:BillEntryMsg) : Boolean = {
+ try{
+ check(b.getStatus == "ok")
+ check(uid == b.getUserID)
+ check(_creationMessage._range.from.getTime == b.getStartTime().toLong &&
+ _creationMessage._range.to.getTime == b.getEndTime().toLong)
+ check(b.getDeductedCredits.toDouble ==
+ sumOf(b.getDetails,0.0D)(validateServiceEntry)(_ + _))
+ true
+ } catch {
+ case e:Exception =>
+ e.printStackTrace
+ false
+ }
+ }
+
def validateResults() : Boolean = {
- throw new Exception("Not implemented !!!!")
+ _billEntryMsg match {
+ case None => false
+ case Some(b) => validateBillEntry(b)
+ }
+ //throw new Exception("Not implemented !!!!")
}
- def printResults() = {
+ def printMessages() = {
Console.err.println("Messages sent:")
for { m <- JsonLog.get}
Console.err.println("%s".format(m)) //"\n==============\n%s\n==============="
Console.err.println("\n=========================\n")
+ }
+ def printResponse() = {
Console.err.println("Response:\n" + (_billEntryMsg match {
case None => "NONE!!!!"
case Some(r) => AvroHelpers.jsonStringOfSpecificRecord(r)
Map("instanceID"->"cyclades.vm.%d".format(i),
"vmName" -> "Virtual Machine #%d".format(i),
"status" -> "on", // initially "on" msg
- "spec" -> cronSpec)})
+ "spec" -> cronSpec.format(month))})
def addFiles(no:Int,action:String/*,value:Int,minVal:Int,maxVal:Int*/,spec:String) : User =
add(no,"disk",{i =>
Map("action" -> action,
"path"->"/Papers/file_%d.PDF".format(i),
//"value"->UID.random(minVal,maxVal).toString,
- "spec" -> spec
+ "spec" -> spec.format(month)
)
})
def addCredits(no:Int,spec:String) : User = {
- add(no,"credits",/*"month"->month.toString,"uid"->uid,*/"spec"->spec/*,"amount"->amount.toString*/)
+ add(no,"credits",/*"month"->month.toString,"uid"->uid,*/"spec"->spec.format(month)
+ /*,"amount"->amount.toString*/)
}
def run(ordered:Boolean,wait:Int,minFile:Int,maxFile:Int,minAmount:Int,maxAmount:Int,maxJSONRetry :Int,
sendViaRabbitMQ:Boolean, sendDebugEnabled : Boolean) = {
- var _messagesSent : List[Message] = Nil
+ _messagesSent = Nil
_creationMessage.send("month"->month.toString,"uid"->uid,"spec"->"0 0 * %d ?".format(month)) // send once!
//Thread.sleep(2000)
var iter = _resources.toList
case (Some(l),None) => false
}}).filter({m =>
_messagesSent = _messagesSent ::: List(m)
- m.send("value"->UID.random(minFile,maxFile).toString,
- "amount"->UID.random(minAmount,maxAmount).toString,
- "rabbitMQEnabled" -> sendViaRabbitMQ.toString,
- "debugEnabled" -> sendDebugEnabled.toString
- //"status" -> UID.random(List("off","on"))
- )})
+ val b = m.send("value"->UID.random(minFile,maxFile).toString,
+ "amount"->UID.random(minAmount,maxAmount).toString,
+ "rabbitMQEnabled" -> sendViaRabbitMQ.toString,
+ "debugEnabled" -> sendDebugEnabled.toString
+ //"status" -> UID.random(List("off","on"))
+ )
+ if(b) m match {
+ case _:DiskMessage => _resMsgs += 1
+ case _:VMMessage => _vmMsgs += 1
+ case _:AddCreditsMessage => _addMsgs +=1
+ }
+ b
+ })
Thread.sleep(wait)
_billEntryMsg = getBillResponse(maxJSONRetry)
}
case class Scenario(
val ignoreScenario : Boolean,
+ val printMessages : Boolean,
+ val printResponses: Boolean,
val host : String,
val port : Long,
val sendOrdered : Boolean,
val (minFileCredits,maxFileCredits) = (s.minFileCredits,s.maxFileCredits)
val (minUserCredits,maxUserCredits) = (s.maxUserCredits,s.maxUserCredits)
//Cron spec minutes hours day-of-month Month Day-of-Week (we do not specify seconds)
- AquariumInstance.run(s.aquariumStartWaitMillis.toInt,s.aquariumStopWaitMillis.toInt) {
+ //AquariumInstance.run(s.aquariumStartWaitMillis.toInt,s.aquariumStopWaitMillis.toInt) {
for{ r <- s.resources} // create messages
r.resType match {
case "vm" =>
user.run(s.sendOrdered,s.billResponseWaitMillis.toInt,s.minFileCredits.toInt,
s.maxFileCredits.toInt,s.minUserCredits.toInt,s.maxUserCredits.toInt,
s.numberOfResponseRetries.toInt,s.sendViaRabbitMQ,s.sendDebugEnabled)
- }
+ //}
user
}
+ private[this] def runAquarium[A](billWait:Long,stop:Long,default:A)(forkJoinCode: => A) : A = {
+ Console.err.println("Starting aquarium")
+ AquariumInstance.aquarium.start
+ Thread.sleep(billWait)
+ Console.err.println("Starting aquarium (%d seconds) --- DONE".format(billWait/1000))
+ try{
+ forkJoinCode
+ } finally {
+ Console.err.println("Stopping aquarium")
+ AquariumInstance.aquarium.stop
+ Thread.sleep(stop)
+ Console.err.println("Stopping aquarium --- DONE")
+ default
+ }
+ }
+
def runScenario(s:Scenario): Unit = {
if(s.ignoreScenario == false) {
Console.err.println("=================\nRunning scenario:\n %s\n=======================\n".format(s.toJsonString))
- val tasks = for { u <- 1 to s.numberOfUsers.toInt}
- yield scala.actors.Futures.future(runUser(s))
- val users = for { u <- tasks} yield u()
- users.foreach {u =>
- u.printResults()
- if(s.validationEnabled && u.validateResults() == false)
- Console.err.println("Validation FAILED for user " + u)
+ runAquarium(s.aquariumStartWaitMillis.toInt,s.aquariumStopWaitMillis.toInt,List[User]()){
+ val tasks = for { u <- 1 to s.numberOfUsers.toInt}
+ yield scala.actors.Futures.future(runUser(s))
+ tasks.map(_()).toList
+ }.foreach{ u =>
+ if(s.printMessages) u.printMessages()
+ if(s.printResponses) u.printResponse()
+ if(s.validationEnabled && u.validateResults() == false)
+ Console.err.println("Validation FAILED for user " + u)
}
Console.err.println("\n=========================\nStopping scenario\n=======================")
}
}
object UserTest extends Loggable {
-
- //vm,disk,credits
- //add(1,"credits","month"->month.toString,"uid"->uid,"spec"->spec,"amount"->amount.toString)
- /*
- val host : String,
- val port : Long,
- val sendOrdered : Boolean,
- val sendViaRabbitMQ : Boolean,
- val sendDebugEnabled : Boolean,
- val validationEnabled : Boolean,
- val billingMonth: Long,
- val aquariumStartWaitMillis : Long,
- val aquariumStopWaitMillis : Long,
- val billResponseWaitMillis : Long,
- val numberOfUsers : Long,
- val numberOfResponseRetries : Long,
- val minFileCredits : Long,
- val maxFileCredits : Long,
- val minUserCredits : Long,
- val maxUserCredits : Long,
- val resources : List[Resource]
-
- */
- val basic = new Scenario(false,"localhost",8888,true,false,false,false,9,2000,2000,2000,
+/*
+ JSON example:
+ {
+ "scenarios":[{
+ "ignoreScenario":false,
+ "printMessages":false,
+ "printResponses":true,
+ "host":"localhost",
+ "port":8888,
+ "sendOrdered":true,
+ "sendViaRabbitMQ":false,
+ "sendDebugEnabled":false,
+ "validationEnabled":false,
+ "billingMonth":9,
+ "aquariumStartWaitMillis":2000,
+ "aquariumStopWaitMillis":2000,
+ "billResponseWaitMillis":2000,
+ "numberOfUsers":2,
+ "numberOfResponseRetries":10,
+ "minFileCredits":2000,
+ "maxFileCredits":5000,
+ "minUserCredits":10000,
+ "maxUserCredits":50000,
+ "resources":[{
+ "resType":"credits",
+ "instances":1,
+ "cronSpec":"00 00 10,12 %d ?"
+ },{
+ "resType":"disk",
+ "instances":1,
+ "cronSpec":"00 18 15,20,29,30 %d ?"
+ },{
+ "resType":"vm",
+ "instances":1,
+ "cronSpec":"00 18 14,17,19,20 %d ?"
+ }]
+ }]
+}
+ */
+ val basic = new Scenario(false,false,true,"localhost",8888,true,false,false,false,9,2000,2000,2000,
1,10,2000,5000,10000,50000,List[Resource](
- new Resource("credits",1, "00 00 10,12 9 ?"),
- new Resource("disk",1,"00 18 15,20,29,30 9 ?"),
- new Resource("vm",1,"00 18 14,17,19,20 9 ?")
+ new Resource("credits",1, "00 00 10,12 %d ?".format(9)),
+ new Resource("disk",1,"00 18 15,20,29,30 %d ?".format(9)),
+ new Resource("vm",1,"00 18 14,17,19,20 %d ?".format(9))
))
def main(args: Array[String]) = {