Rename all messages
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / BillEntryMsg.java
1 /**
2  * Autogenerated by Avro
3  * 
4  * DO NOT EDIT DIRECTLY
5  */
6 package gr.grnet.aquarium.message.avro.gen;  
7 @SuppressWarnings("all")
8 public class BillEntryMsg 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\":\"BillEntryMsg\",\"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\":\"ResourceEntryMsg\",\"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\":\"EventEntryMsg\",\"fields\":[{\"name\":\"eventType\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeEntryMsg\",\"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.ResourceEntryMsg> 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$) {
21     switch (field$) {
22     case 0: return id;
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;
29     case 7: return bill;
30     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
31     }
32   }
33   // Used by DatumReader.  Applications should not call. 
34   @SuppressWarnings(value="unchecked")
35   public void put(int field$, java.lang.Object value$) {
36     switch (field$) {
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.ResourceEntryMsg>)value$; break;
45     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
46     }
47   }
48
49   /**
50    * Gets the value of the 'id' field.
51    */
52   public java.lang.CharSequence getId() {
53     return id;
54   }
55
56   /**
57    * Sets the value of the 'id' field.
58    * @param value the value to set.
59    */
60   public void setId(java.lang.CharSequence value) {
61     this.id = value;
62   }
63
64   /**
65    * Gets the value of the 'userID' field.
66    */
67   public java.lang.CharSequence getUserID() {
68     return userID;
69   }
70
71   /**
72    * Sets the value of the 'userID' field.
73    * @param value the value to set.
74    */
75   public void setUserID(java.lang.CharSequence value) {
76     this.userID = value;
77   }
78
79   /**
80    * Gets the value of the 'status' field.
81    */
82   public java.lang.CharSequence getStatus() {
83     return status;
84   }
85
86   /**
87    * Sets the value of the 'status' field.
88    * @param value the value to set.
89    */
90   public void setStatus(java.lang.CharSequence value) {
91     this.status = value;
92   }
93
94   /**
95    * Gets the value of the 'remainingCredits' field.
96    */
97   public java.lang.CharSequence getRemainingCredits() {
98     return remainingCredits;
99   }
100
101   /**
102    * Sets the value of the 'remainingCredits' field.
103    * @param value the value to set.
104    */
105   public void setRemainingCredits(java.lang.CharSequence value) {
106     this.remainingCredits = value;
107   }
108
109   /**
110    * Gets the value of the 'deductedCredits' field.
111    */
112   public java.lang.CharSequence getDeductedCredits() {
113     return deductedCredits;
114   }
115
116   /**
117    * Sets the value of the 'deductedCredits' field.
118    * @param value the value to set.
119    */
120   public void setDeductedCredits(java.lang.CharSequence value) {
121     this.deductedCredits = value;
122   }
123
124   /**
125    * Gets the value of the 'startTime' field.
126    */
127   public java.lang.CharSequence getStartTime() {
128     return startTime;
129   }
130
131   /**
132    * Sets the value of the 'startTime' field.
133    * @param value the value to set.
134    */
135   public void setStartTime(java.lang.CharSequence value) {
136     this.startTime = value;
137   }
138
139   /**
140    * Gets the value of the 'endTime' field.
141    */
142   public java.lang.CharSequence getEndTime() {
143     return endTime;
144   }
145
146   /**
147    * Sets the value of the 'endTime' field.
148    * @param value the value to set.
149    */
150   public void setEndTime(java.lang.CharSequence value) {
151     this.endTime = value;
152   }
153
154   /**
155    * Gets the value of the 'bill' field.
156    */
157   public java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEntryMsg> getBill() {
158     return bill;
159   }
160
161   /**
162    * Sets the value of the 'bill' field.
163    * @param value the value to set.
164    */
165   public void setBill(java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEntryMsg> value) {
166     this.bill = value;
167   }
168
169   /** Creates a new BillEntryMsg RecordBuilder */
170   public static gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder newBuilder() {
171     return new gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder();
172   }
173   
174   /** Creates a new BillEntryMsg RecordBuilder by copying an existing Builder */
175   public static gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder other) {
176     return new gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder(other);
177   }
178   
179   /** Creates a new BillEntryMsg RecordBuilder by copying an existing BillEntryMsg instance */
180   public static gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.BillEntryMsg other) {
181     return new gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder(other);
182   }
183   
184   /**
185    * RecordBuilder for BillEntryMsg instances.
186    */
187   public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<BillEntryMsg>
188     implements org.apache.avro.data.RecordBuilder<BillEntryMsg> {
189
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.ResourceEntryMsg> bill;
198
199     /** Creates a new Builder */
200     private Builder() {
201       super(gr.grnet.aquarium.message.avro.gen.BillEntryMsg.SCHEMA$);
202     }
203     
204     /** Creates a Builder by copying an existing Builder */
205     private Builder(gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder other) {
206       super(other);
207     }
208     
209     /** Creates a Builder by copying an existing BillEntryMsg instance */
210     private Builder(gr.grnet.aquarium.message.avro.gen.BillEntryMsg other) {
211             super(gr.grnet.aquarium.message.avro.gen.BillEntryMsg.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;
215       }
216       if (isValidValue(fields()[1], other.userID)) {
217         this.userID = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.userID);
218         fieldSetFlags()[1] = true;
219       }
220       if (isValidValue(fields()[2], other.status)) {
221         this.status = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.status);
222         fieldSetFlags()[2] = true;
223       }
224       if (isValidValue(fields()[3], other.remainingCredits)) {
225         this.remainingCredits = (java.lang.CharSequence) data().deepCopy(fields()[3].schema(), other.remainingCredits);
226         fieldSetFlags()[3] = true;
227       }
228       if (isValidValue(fields()[4], other.deductedCredits)) {
229         this.deductedCredits = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.deductedCredits);
230         fieldSetFlags()[4] = true;
231       }
232       if (isValidValue(fields()[5], other.startTime)) {
233         this.startTime = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.startTime);
234         fieldSetFlags()[5] = true;
235       }
236       if (isValidValue(fields()[6], other.endTime)) {
237         this.endTime = (java.lang.CharSequence) data().deepCopy(fields()[6].schema(), other.endTime);
238         fieldSetFlags()[6] = true;
239       }
240       if (isValidValue(fields()[7], other.bill)) {
241         this.bill = (java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEntryMsg>) data().deepCopy(fields()[7].schema(), other.bill);
242         fieldSetFlags()[7] = true;
243       }
244     }
245
246     /** Gets the value of the 'id' field */
247     public java.lang.CharSequence getId() {
248       return id;
249     }
250     
251     /** Sets the value of the 'id' field */
252     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setId(java.lang.CharSequence value) {
253       validate(fields()[0], value);
254       this.id = value;
255       fieldSetFlags()[0] = true;
256       return this; 
257     }
258     
259     /** Checks whether the 'id' field has been set */
260     public boolean hasId() {
261       return fieldSetFlags()[0];
262     }
263     
264     /** Clears the value of the 'id' field */
265     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearId() {
266       id = null;
267       fieldSetFlags()[0] = false;
268       return this;
269     }
270
271     /** Gets the value of the 'userID' field */
272     public java.lang.CharSequence getUserID() {
273       return userID;
274     }
275     
276     /** Sets the value of the 'userID' field */
277     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setUserID(java.lang.CharSequence value) {
278       validate(fields()[1], value);
279       this.userID = value;
280       fieldSetFlags()[1] = true;
281       return this; 
282     }
283     
284     /** Checks whether the 'userID' field has been set */
285     public boolean hasUserID() {
286       return fieldSetFlags()[1];
287     }
288     
289     /** Clears the value of the 'userID' field */
290     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearUserID() {
291       userID = null;
292       fieldSetFlags()[1] = false;
293       return this;
294     }
295
296     /** Gets the value of the 'status' field */
297     public java.lang.CharSequence getStatus() {
298       return status;
299     }
300     
301     /** Sets the value of the 'status' field */
302     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setStatus(java.lang.CharSequence value) {
303       validate(fields()[2], value);
304       this.status = value;
305       fieldSetFlags()[2] = true;
306       return this; 
307     }
308     
309     /** Checks whether the 'status' field has been set */
310     public boolean hasStatus() {
311       return fieldSetFlags()[2];
312     }
313     
314     /** Clears the value of the 'status' field */
315     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearStatus() {
316       status = null;
317       fieldSetFlags()[2] = false;
318       return this;
319     }
320
321     /** Gets the value of the 'remainingCredits' field */
322     public java.lang.CharSequence getRemainingCredits() {
323       return remainingCredits;
324     }
325     
326     /** Sets the value of the 'remainingCredits' field */
327     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setRemainingCredits(java.lang.CharSequence value) {
328       validate(fields()[3], value);
329       this.remainingCredits = value;
330       fieldSetFlags()[3] = true;
331       return this; 
332     }
333     
334     /** Checks whether the 'remainingCredits' field has been set */
335     public boolean hasRemainingCredits() {
336       return fieldSetFlags()[3];
337     }
338     
339     /** Clears the value of the 'remainingCredits' field */
340     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearRemainingCredits() {
341       remainingCredits = null;
342       fieldSetFlags()[3] = false;
343       return this;
344     }
345
346     /** Gets the value of the 'deductedCredits' field */
347     public java.lang.CharSequence getDeductedCredits() {
348       return deductedCredits;
349     }
350     
351     /** Sets the value of the 'deductedCredits' field */
352     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setDeductedCredits(java.lang.CharSequence value) {
353       validate(fields()[4], value);
354       this.deductedCredits = value;
355       fieldSetFlags()[4] = true;
356       return this; 
357     }
358     
359     /** Checks whether the 'deductedCredits' field has been set */
360     public boolean hasDeductedCredits() {
361       return fieldSetFlags()[4];
362     }
363     
364     /** Clears the value of the 'deductedCredits' field */
365     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearDeductedCredits() {
366       deductedCredits = null;
367       fieldSetFlags()[4] = false;
368       return this;
369     }
370
371     /** Gets the value of the 'startTime' field */
372     public java.lang.CharSequence getStartTime() {
373       return startTime;
374     }
375     
376     /** Sets the value of the 'startTime' field */
377     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setStartTime(java.lang.CharSequence value) {
378       validate(fields()[5], value);
379       this.startTime = value;
380       fieldSetFlags()[5] = true;
381       return this; 
382     }
383     
384     /** Checks whether the 'startTime' field has been set */
385     public boolean hasStartTime() {
386       return fieldSetFlags()[5];
387     }
388     
389     /** Clears the value of the 'startTime' field */
390     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearStartTime() {
391       startTime = null;
392       fieldSetFlags()[5] = false;
393       return this;
394     }
395
396     /** Gets the value of the 'endTime' field */
397     public java.lang.CharSequence getEndTime() {
398       return endTime;
399     }
400     
401     /** Sets the value of the 'endTime' field */
402     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setEndTime(java.lang.CharSequence value) {
403       validate(fields()[6], value);
404       this.endTime = value;
405       fieldSetFlags()[6] = true;
406       return this; 
407     }
408     
409     /** Checks whether the 'endTime' field has been set */
410     public boolean hasEndTime() {
411       return fieldSetFlags()[6];
412     }
413     
414     /** Clears the value of the 'endTime' field */
415     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearEndTime() {
416       endTime = null;
417       fieldSetFlags()[6] = false;
418       return this;
419     }
420
421     /** Gets the value of the 'bill' field */
422     public java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEntryMsg> getBill() {
423       return bill;
424     }
425     
426     /** Sets the value of the 'bill' field */
427     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder setBill(java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEntryMsg> value) {
428       validate(fields()[7], value);
429       this.bill = value;
430       fieldSetFlags()[7] = true;
431       return this; 
432     }
433     
434     /** Checks whether the 'bill' field has been set */
435     public boolean hasBill() {
436       return fieldSetFlags()[7];
437     }
438     
439     /** Clears the value of the 'bill' field */
440     public gr.grnet.aquarium.message.avro.gen.BillEntryMsg.Builder clearBill() {
441       bill = null;
442       fieldSetFlags()[7] = false;
443       return this;
444     }
445
446     @Override
447     public BillEntryMsg build() {
448       try {
449         BillEntryMsg record = new BillEntryMsg();
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.ResourceEntryMsg>) defaultValue(fields()[7]);
458         return record;
459       } catch (Exception e) {
460         throw new org.apache.avro.AvroRuntimeException(e);
461       }
462     }
463   }
464 }