2 * Autogenerated by Avro
6 package gr.grnet.aquarium.message.avro.gen;
7 @SuppressWarnings("all")
8 public class _BillEntry extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
9 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\"}]}}}]}}}]}}}]}");
10 @Deprecated public java.lang.CharSequence id;
11 @Deprecated public java.lang.CharSequence userID;
12 @Deprecated public java.lang.CharSequence status;
13 @Deprecated public java.lang.CharSequence remainingCredits;
14 @Deprecated public java.lang.CharSequence deductedCredits;
15 @Deprecated public java.lang.CharSequence startTime;
16 @Deprecated public java.lang.CharSequence endTime;
17 @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> bill;
18 public org.apache.avro.Schema getSchema() { return SCHEMA$; }
19 // Used by DatumWriter. Applications should not call.
20 public java.lang.Object get(int field$) {
23 case 1: return userID;
24 case 2: return status;
25 case 3: return remainingCredits;
26 case 4: return deductedCredits;
27 case 5: return startTime;
28 case 6: return endTime;
30 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
33 // Used by DatumReader. Applications should not call.
34 @SuppressWarnings(value="unchecked")
35 public void put(int field$, java.lang.Object value$) {
37 case 0: id = (java.lang.CharSequence)value$; break;
38 case 1: userID = (java.lang.CharSequence)value$; break;
39 case 2: status = (java.lang.CharSequence)value$; break;
40 case 3: remainingCredits = (java.lang.CharSequence)value$; break;
41 case 4: deductedCredits = (java.lang.CharSequence)value$; break;
42 case 5: startTime = (java.lang.CharSequence)value$; break;
43 case 6: endTime = (java.lang.CharSequence)value$; break;
44 case 7: bill = (java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry>)value$; break;
45 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
50 * Gets the value of the 'id' field.
52 public java.lang.CharSequence getId() {
57 * Sets the value of the 'id' field.
58 * @param value the value to set.
60 public void setId(java.lang.CharSequence value) {
65 * Gets the value of the 'userID' field.
67 public java.lang.CharSequence getUserID() {
72 * Sets the value of the 'userID' field.
73 * @param value the value to set.
75 public void setUserID(java.lang.CharSequence value) {
80 * Gets the value of the 'status' field.
82 public java.lang.CharSequence getStatus() {
87 * Sets the value of the 'status' field.
88 * @param value the value to set.
90 public void setStatus(java.lang.CharSequence value) {
95 * Gets the value of the 'remainingCredits' field.
97 public java.lang.CharSequence getRemainingCredits() {
98 return remainingCredits;
102 * Sets the value of the 'remainingCredits' field.
103 * @param value the value to set.
105 public void setRemainingCredits(java.lang.CharSequence value) {
106 this.remainingCredits = value;
110 * Gets the value of the 'deductedCredits' field.
112 public java.lang.CharSequence getDeductedCredits() {
113 return deductedCredits;
117 * Sets the value of the 'deductedCredits' field.
118 * @param value the value to set.
120 public void setDeductedCredits(java.lang.CharSequence value) {
121 this.deductedCredits = value;
125 * Gets the value of the 'startTime' field.
127 public java.lang.CharSequence getStartTime() {
132 * Sets the value of the 'startTime' field.
133 * @param value the value to set.
135 public void setStartTime(java.lang.CharSequence value) {
136 this.startTime = value;
140 * Gets the value of the 'endTime' field.
142 public java.lang.CharSequence getEndTime() {
147 * Sets the value of the 'endTime' field.
148 * @param value the value to set.
150 public void setEndTime(java.lang.CharSequence value) {
151 this.endTime = value;
155 * Gets the value of the 'bill' field.
157 public java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> getBill() {
162 * Sets the value of the 'bill' field.
163 * @param value the value to set.
165 public void setBill(java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> value) {
169 /** Creates a new _BillEntry RecordBuilder */
170 public static gr.grnet.aquarium.message.avro.gen._BillEntry.Builder newBuilder() {
171 return new gr.grnet.aquarium.message.avro.gen._BillEntry.Builder();
174 /** Creates a new _BillEntry RecordBuilder by copying an existing Builder */
175 public static gr.grnet.aquarium.message.avro.gen._BillEntry.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._BillEntry.Builder other) {
176 return new gr.grnet.aquarium.message.avro.gen._BillEntry.Builder(other);
179 /** Creates a new _BillEntry RecordBuilder by copying an existing _BillEntry instance */
180 public static gr.grnet.aquarium.message.avro.gen._BillEntry.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._BillEntry other) {
181 return new gr.grnet.aquarium.message.avro.gen._BillEntry.Builder(other);
185 * RecordBuilder for _BillEntry instances.
187 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<_BillEntry>
188 implements org.apache.avro.data.RecordBuilder<_BillEntry> {
190 private java.lang.CharSequence id;
191 private java.lang.CharSequence userID;
192 private java.lang.CharSequence status;
193 private java.lang.CharSequence remainingCredits;
194 private java.lang.CharSequence deductedCredits;
195 private java.lang.CharSequence startTime;
196 private java.lang.CharSequence endTime;
197 private java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> bill;
199 /** Creates a new Builder */
201 super(gr.grnet.aquarium.message.avro.gen._BillEntry.SCHEMA$);
204 /** Creates a Builder by copying an existing Builder */
205 private Builder(gr.grnet.aquarium.message.avro.gen._BillEntry.Builder other) {
209 /** Creates a Builder by copying an existing _BillEntry instance */
210 private Builder(gr.grnet.aquarium.message.avro.gen._BillEntry other) {
211 super(gr.grnet.aquarium.message.avro.gen._BillEntry.SCHEMA$);
212 if (isValidValue(fields()[0], other.id)) {
213 this.id = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.id);
214 fieldSetFlags()[0] = true;
216 if (isValidValue(fields()[1], other.userID)) {
217 this.userID = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.userID);
218 fieldSetFlags()[1] = true;
220 if (isValidValue(fields()[2], other.status)) {
221 this.status = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.status);
222 fieldSetFlags()[2] = true;
224 if (isValidValue(fields()[3], other.remainingCredits)) {
225 this.remainingCredits = (java.lang.CharSequence) data().deepCopy(fields()[3].schema(), other.remainingCredits);
226 fieldSetFlags()[3] = true;
228 if (isValidValue(fields()[4], other.deductedCredits)) {
229 this.deductedCredits = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.deductedCredits);
230 fieldSetFlags()[4] = true;
232 if (isValidValue(fields()[5], other.startTime)) {
233 this.startTime = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.startTime);
234 fieldSetFlags()[5] = true;
236 if (isValidValue(fields()[6], other.endTime)) {
237 this.endTime = (java.lang.CharSequence) data().deepCopy(fields()[6].schema(), other.endTime);
238 fieldSetFlags()[6] = true;
240 if (isValidValue(fields()[7], other.bill)) {
241 this.bill = (java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry>) data().deepCopy(fields()[7].schema(), other.bill);
242 fieldSetFlags()[7] = true;
246 /** Gets the value of the 'id' field */
247 public java.lang.CharSequence getId() {
251 /** Sets the value of the 'id' field */
252 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setId(java.lang.CharSequence value) {
253 validate(fields()[0], value);
255 fieldSetFlags()[0] = true;
259 /** Checks whether the 'id' field has been set */
260 public boolean hasId() {
261 return fieldSetFlags()[0];
264 /** Clears the value of the 'id' field */
265 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearId() {
267 fieldSetFlags()[0] = false;
271 /** Gets the value of the 'userID' field */
272 public java.lang.CharSequence getUserID() {
276 /** Sets the value of the 'userID' field */
277 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setUserID(java.lang.CharSequence value) {
278 validate(fields()[1], value);
280 fieldSetFlags()[1] = true;
284 /** Checks whether the 'userID' field has been set */
285 public boolean hasUserID() {
286 return fieldSetFlags()[1];
289 /** Clears the value of the 'userID' field */
290 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearUserID() {
292 fieldSetFlags()[1] = false;
296 /** Gets the value of the 'status' field */
297 public java.lang.CharSequence getStatus() {
301 /** Sets the value of the 'status' field */
302 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setStatus(java.lang.CharSequence value) {
303 validate(fields()[2], value);
305 fieldSetFlags()[2] = true;
309 /** Checks whether the 'status' field has been set */
310 public boolean hasStatus() {
311 return fieldSetFlags()[2];
314 /** Clears the value of the 'status' field */
315 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearStatus() {
317 fieldSetFlags()[2] = false;
321 /** Gets the value of the 'remainingCredits' field */
322 public java.lang.CharSequence getRemainingCredits() {
323 return remainingCredits;
326 /** Sets the value of the 'remainingCredits' field */
327 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setRemainingCredits(java.lang.CharSequence value) {
328 validate(fields()[3], value);
329 this.remainingCredits = value;
330 fieldSetFlags()[3] = true;
334 /** Checks whether the 'remainingCredits' field has been set */
335 public boolean hasRemainingCredits() {
336 return fieldSetFlags()[3];
339 /** Clears the value of the 'remainingCredits' field */
340 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearRemainingCredits() {
341 remainingCredits = null;
342 fieldSetFlags()[3] = false;
346 /** Gets the value of the 'deductedCredits' field */
347 public java.lang.CharSequence getDeductedCredits() {
348 return deductedCredits;
351 /** Sets the value of the 'deductedCredits' field */
352 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setDeductedCredits(java.lang.CharSequence value) {
353 validate(fields()[4], value);
354 this.deductedCredits = value;
355 fieldSetFlags()[4] = true;
359 /** Checks whether the 'deductedCredits' field has been set */
360 public boolean hasDeductedCredits() {
361 return fieldSetFlags()[4];
364 /** Clears the value of the 'deductedCredits' field */
365 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearDeductedCredits() {
366 deductedCredits = null;
367 fieldSetFlags()[4] = false;
371 /** Gets the value of the 'startTime' field */
372 public java.lang.CharSequence getStartTime() {
376 /** Sets the value of the 'startTime' field */
377 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setStartTime(java.lang.CharSequence value) {
378 validate(fields()[5], value);
379 this.startTime = value;
380 fieldSetFlags()[5] = true;
384 /** Checks whether the 'startTime' field has been set */
385 public boolean hasStartTime() {
386 return fieldSetFlags()[5];
389 /** Clears the value of the 'startTime' field */
390 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearStartTime() {
392 fieldSetFlags()[5] = false;
396 /** Gets the value of the 'endTime' field */
397 public java.lang.CharSequence getEndTime() {
401 /** Sets the value of the 'endTime' field */
402 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setEndTime(java.lang.CharSequence value) {
403 validate(fields()[6], value);
404 this.endTime = value;
405 fieldSetFlags()[6] = true;
409 /** Checks whether the 'endTime' field has been set */
410 public boolean hasEndTime() {
411 return fieldSetFlags()[6];
414 /** Clears the value of the 'endTime' field */
415 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearEndTime() {
417 fieldSetFlags()[6] = false;
421 /** Gets the value of the 'bill' field */
422 public java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> getBill() {
426 /** Sets the value of the 'bill' field */
427 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder setBill(java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry> value) {
428 validate(fields()[7], value);
430 fieldSetFlags()[7] = true;
434 /** Checks whether the 'bill' field has been set */
435 public boolean hasBill() {
436 return fieldSetFlags()[7];
439 /** Clears the value of the 'bill' field */
440 public gr.grnet.aquarium.message.avro.gen._BillEntry.Builder clearBill() {
442 fieldSetFlags()[7] = false;
447 public _BillEntry build() {
449 _BillEntry record = new _BillEntry();
450 record.id = fieldSetFlags()[0] ? this.id : (java.lang.CharSequence) defaultValue(fields()[0]);
451 record.userID = fieldSetFlags()[1] ? this.userID : (java.lang.CharSequence) defaultValue(fields()[1]);
452 record.status = fieldSetFlags()[2] ? this.status : (java.lang.CharSequence) defaultValue(fields()[2]);
453 record.remainingCredits = fieldSetFlags()[3] ? this.remainingCredits : (java.lang.CharSequence) defaultValue(fields()[3]);
454 record.deductedCredits = fieldSetFlags()[4] ? this.deductedCredits : (java.lang.CharSequence) defaultValue(fields()[4]);
455 record.startTime = fieldSetFlags()[5] ? this.startTime : (java.lang.CharSequence) defaultValue(fields()[5]);
456 record.endTime = fieldSetFlags()[6] ? this.endTime : (java.lang.CharSequence) defaultValue(fields()[6]);
457 record.bill = fieldSetFlags()[7] ? this.bill : (java.util.List<gr.grnet.aquarium.message.avro.gen._ResourceEntry>) defaultValue(fields()[7]);
459 } catch (Exception e) {
460 throw new org.apache.avro.AvroRuntimeException(e);