Now using schema-based messages
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / ResourceInstanceChargingStateMsg.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 ResourceInstanceChargingStateMsg 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\":\"ResourceInstanceChargingStateMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"clientID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"resource\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"instanceID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"AnyValueMsg\",\"fields\":[{\"name\":\"anyValue\",\"type\":[\"null\",\"int\",\"long\",\"boolean\",\"double\",\"bytes\",{\"type\":\"string\",\"avro.java.string\":\"String\"},{\"type\":\"array\",\"items\":\"AnyValueMsg\"},{\"type\":\"map\",\"values\":\"AnyValueMsg\",\"avro.java.string\":\"String\"}]}]},\"avro.java.string\":\"String\"}},{\"name\":\"previousEvents\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ResourceEventMsg\",\"fields\":[{\"name\":\"originalID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"inStoreID\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"occurredMillis\",\"type\":\"long\"},{\"name\":\"receivedMillis\",\"type\":\"long\",\"default\":0},{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"clientID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"eventVersion\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"default\":\"1.0\"},{\"name\":\"resource\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"instanceID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"value\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"isSynthetic\",\"type\":\"boolean\",\"default\":false},{\"name\":\"details\",\"type\":{\"type\":\"map\",\"values\":\"AnyValueMsg\",\"avro.java.string\":\"String\"}}]}}},{\"name\":\"implicitlyIssuedStartEvents\",\"type\":{\"type\":\"array\",\"items\":\"ResourceEventMsg\"}},{\"name\":\"accumulatingAmount\",\"type\":\"double\"},{\"name\":\"oldAccumulatingAmount\",\"type\":\"double\"},{\"name\":\"previousValue\",\"type\":\"double\"},{\"name\":\"currentValue\",\"type\":\"double\"}]}");
10   @Deprecated public java.lang.String clientID;
11   @Deprecated public java.lang.String resource;
12   @Deprecated public java.lang.String instanceID;
13   @Deprecated public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg> details;
14   @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> previousEvents;
15   @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> implicitlyIssuedStartEvents;
16   @Deprecated public double accumulatingAmount;
17   @Deprecated public double oldAccumulatingAmount;
18   @Deprecated public double previousValue;
19   @Deprecated public double currentValue;
20   public org.apache.avro.Schema getSchema() { return SCHEMA$; }
21   // Used by DatumWriter.  Applications should not call. 
22   public java.lang.Object get(int field$) {
23     switch (field$) {
24     case 0: return clientID;
25     case 1: return resource;
26     case 2: return instanceID;
27     case 3: return details;
28     case 4: return previousEvents;
29     case 5: return implicitlyIssuedStartEvents;
30     case 6: return accumulatingAmount;
31     case 7: return oldAccumulatingAmount;
32     case 8: return previousValue;
33     case 9: return currentValue;
34     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
35     }
36   }
37   // Used by DatumReader.  Applications should not call. 
38   @SuppressWarnings(value="unchecked")
39   public void put(int field$, java.lang.Object value$) {
40     switch (field$) {
41     case 0: clientID = (java.lang.String)value$; break;
42     case 1: resource = (java.lang.String)value$; break;
43     case 2: instanceID = (java.lang.String)value$; break;
44     case 3: details = (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg>)value$; break;
45     case 4: previousEvents = (java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg>)value$; break;
46     case 5: implicitlyIssuedStartEvents = (java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg>)value$; break;
47     case 6: accumulatingAmount = (java.lang.Double)value$; break;
48     case 7: oldAccumulatingAmount = (java.lang.Double)value$; break;
49     case 8: previousValue = (java.lang.Double)value$; break;
50     case 9: currentValue = (java.lang.Double)value$; break;
51     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
52     }
53   }
54
55   /**
56    * Gets the value of the 'clientID' field.
57    */
58   public java.lang.String getClientID() {
59     return clientID;
60   }
61
62   /**
63    * Sets the value of the 'clientID' field.
64    * @param value the value to set.
65    */
66   public void setClientID(java.lang.String value) {
67     this.clientID = value;
68   }
69
70   /**
71    * Gets the value of the 'resource' field.
72    */
73   public java.lang.String getResource() {
74     return resource;
75   }
76
77   /**
78    * Sets the value of the 'resource' field.
79    * @param value the value to set.
80    */
81   public void setResource(java.lang.String value) {
82     this.resource = value;
83   }
84
85   /**
86    * Gets the value of the 'instanceID' field.
87    */
88   public java.lang.String getInstanceID() {
89     return instanceID;
90   }
91
92   /**
93    * Sets the value of the 'instanceID' field.
94    * @param value the value to set.
95    */
96   public void setInstanceID(java.lang.String value) {
97     this.instanceID = value;
98   }
99
100   /**
101    * Gets the value of the 'details' field.
102    */
103   public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg> getDetails() {
104     return details;
105   }
106
107   /**
108    * Sets the value of the 'details' field.
109    * @param value the value to set.
110    */
111   public void setDetails(java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg> value) {
112     this.details = value;
113   }
114
115   /**
116    * Gets the value of the 'previousEvents' field.
117    */
118   public java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> getPreviousEvents() {
119     return previousEvents;
120   }
121
122   /**
123    * Sets the value of the 'previousEvents' field.
124    * @param value the value to set.
125    */
126   public void setPreviousEvents(java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> value) {
127     this.previousEvents = value;
128   }
129
130   /**
131    * Gets the value of the 'implicitlyIssuedStartEvents' field.
132    */
133   public java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> getImplicitlyIssuedStartEvents() {
134     return implicitlyIssuedStartEvents;
135   }
136
137   /**
138    * Sets the value of the 'implicitlyIssuedStartEvents' field.
139    * @param value the value to set.
140    */
141   public void setImplicitlyIssuedStartEvents(java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> value) {
142     this.implicitlyIssuedStartEvents = value;
143   }
144
145   /**
146    * Gets the value of the 'accumulatingAmount' field.
147    */
148   public java.lang.Double getAccumulatingAmount() {
149     return accumulatingAmount;
150   }
151
152   /**
153    * Sets the value of the 'accumulatingAmount' field.
154    * @param value the value to set.
155    */
156   public void setAccumulatingAmount(java.lang.Double value) {
157     this.accumulatingAmount = value;
158   }
159
160   /**
161    * Gets the value of the 'oldAccumulatingAmount' field.
162    */
163   public java.lang.Double getOldAccumulatingAmount() {
164     return oldAccumulatingAmount;
165   }
166
167   /**
168    * Sets the value of the 'oldAccumulatingAmount' field.
169    * @param value the value to set.
170    */
171   public void setOldAccumulatingAmount(java.lang.Double value) {
172     this.oldAccumulatingAmount = value;
173   }
174
175   /**
176    * Gets the value of the 'previousValue' field.
177    */
178   public java.lang.Double getPreviousValue() {
179     return previousValue;
180   }
181
182   /**
183    * Sets the value of the 'previousValue' field.
184    * @param value the value to set.
185    */
186   public void setPreviousValue(java.lang.Double value) {
187     this.previousValue = value;
188   }
189
190   /**
191    * Gets the value of the 'currentValue' field.
192    */
193   public java.lang.Double getCurrentValue() {
194     return currentValue;
195   }
196
197   /**
198    * Sets the value of the 'currentValue' field.
199    * @param value the value to set.
200    */
201   public void setCurrentValue(java.lang.Double value) {
202     this.currentValue = value;
203   }
204
205   /** Creates a new ResourceInstanceChargingStateMsg RecordBuilder */
206   public static gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder newBuilder() {
207     return new gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder();
208   }
209   
210   /** Creates a new ResourceInstanceChargingStateMsg RecordBuilder by copying an existing Builder */
211   public static gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder other) {
212     return new gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder(other);
213   }
214   
215   /** Creates a new ResourceInstanceChargingStateMsg RecordBuilder by copying an existing ResourceInstanceChargingStateMsg instance */
216   public static gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg other) {
217     return new gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder(other);
218   }
219   
220   /**
221    * RecordBuilder for ResourceInstanceChargingStateMsg instances.
222    */
223   public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<ResourceInstanceChargingStateMsg>
224     implements org.apache.avro.data.RecordBuilder<ResourceInstanceChargingStateMsg> {
225
226     private java.lang.String clientID;
227     private java.lang.String resource;
228     private java.lang.String instanceID;
229     private java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg> details;
230     private java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> previousEvents;
231     private java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> implicitlyIssuedStartEvents;
232     private double accumulatingAmount;
233     private double oldAccumulatingAmount;
234     private double previousValue;
235     private double currentValue;
236
237     /** Creates a new Builder */
238     private Builder() {
239       super(gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.SCHEMA$);
240     }
241     
242     /** Creates a Builder by copying an existing Builder */
243     private Builder(gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder other) {
244       super(other);
245     }
246     
247     /** Creates a Builder by copying an existing ResourceInstanceChargingStateMsg instance */
248     private Builder(gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg other) {
249             super(gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.SCHEMA$);
250       if (isValidValue(fields()[0], other.clientID)) {
251         this.clientID = (java.lang.String) data().deepCopy(fields()[0].schema(), other.clientID);
252         fieldSetFlags()[0] = true;
253       }
254       if (isValidValue(fields()[1], other.resource)) {
255         this.resource = (java.lang.String) data().deepCopy(fields()[1].schema(), other.resource);
256         fieldSetFlags()[1] = true;
257       }
258       if (isValidValue(fields()[2], other.instanceID)) {
259         this.instanceID = (java.lang.String) data().deepCopy(fields()[2].schema(), other.instanceID);
260         fieldSetFlags()[2] = true;
261       }
262       if (isValidValue(fields()[3], other.details)) {
263         this.details = (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg>) data().deepCopy(fields()[3].schema(), other.details);
264         fieldSetFlags()[3] = true;
265       }
266       if (isValidValue(fields()[4], other.previousEvents)) {
267         this.previousEvents = (java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg>) data().deepCopy(fields()[4].schema(), other.previousEvents);
268         fieldSetFlags()[4] = true;
269       }
270       if (isValidValue(fields()[5], other.implicitlyIssuedStartEvents)) {
271         this.implicitlyIssuedStartEvents = (java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg>) data().deepCopy(fields()[5].schema(), other.implicitlyIssuedStartEvents);
272         fieldSetFlags()[5] = true;
273       }
274       if (isValidValue(fields()[6], other.accumulatingAmount)) {
275         this.accumulatingAmount = (java.lang.Double) data().deepCopy(fields()[6].schema(), other.accumulatingAmount);
276         fieldSetFlags()[6] = true;
277       }
278       if (isValidValue(fields()[7], other.oldAccumulatingAmount)) {
279         this.oldAccumulatingAmount = (java.lang.Double) data().deepCopy(fields()[7].schema(), other.oldAccumulatingAmount);
280         fieldSetFlags()[7] = true;
281       }
282       if (isValidValue(fields()[8], other.previousValue)) {
283         this.previousValue = (java.lang.Double) data().deepCopy(fields()[8].schema(), other.previousValue);
284         fieldSetFlags()[8] = true;
285       }
286       if (isValidValue(fields()[9], other.currentValue)) {
287         this.currentValue = (java.lang.Double) data().deepCopy(fields()[9].schema(), other.currentValue);
288         fieldSetFlags()[9] = true;
289       }
290     }
291
292     /** Gets the value of the 'clientID' field */
293     public java.lang.String getClientID() {
294       return clientID;
295     }
296     
297     /** Sets the value of the 'clientID' field */
298     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setClientID(java.lang.String value) {
299       validate(fields()[0], value);
300       this.clientID = value;
301       fieldSetFlags()[0] = true;
302       return this; 
303     }
304     
305     /** Checks whether the 'clientID' field has been set */
306     public boolean hasClientID() {
307       return fieldSetFlags()[0];
308     }
309     
310     /** Clears the value of the 'clientID' field */
311     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearClientID() {
312       clientID = null;
313       fieldSetFlags()[0] = false;
314       return this;
315     }
316
317     /** Gets the value of the 'resource' field */
318     public java.lang.String getResource() {
319       return resource;
320     }
321     
322     /** Sets the value of the 'resource' field */
323     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setResource(java.lang.String value) {
324       validate(fields()[1], value);
325       this.resource = value;
326       fieldSetFlags()[1] = true;
327       return this; 
328     }
329     
330     /** Checks whether the 'resource' field has been set */
331     public boolean hasResource() {
332       return fieldSetFlags()[1];
333     }
334     
335     /** Clears the value of the 'resource' field */
336     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearResource() {
337       resource = null;
338       fieldSetFlags()[1] = false;
339       return this;
340     }
341
342     /** Gets the value of the 'instanceID' field */
343     public java.lang.String getInstanceID() {
344       return instanceID;
345     }
346     
347     /** Sets the value of the 'instanceID' field */
348     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setInstanceID(java.lang.String value) {
349       validate(fields()[2], value);
350       this.instanceID = value;
351       fieldSetFlags()[2] = true;
352       return this; 
353     }
354     
355     /** Checks whether the 'instanceID' field has been set */
356     public boolean hasInstanceID() {
357       return fieldSetFlags()[2];
358     }
359     
360     /** Clears the value of the 'instanceID' field */
361     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearInstanceID() {
362       instanceID = null;
363       fieldSetFlags()[2] = false;
364       return this;
365     }
366
367     /** Gets the value of the 'details' field */
368     public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg> getDetails() {
369       return details;
370     }
371     
372     /** Sets the value of the 'details' field */
373     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setDetails(java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg> value) {
374       validate(fields()[3], value);
375       this.details = value;
376       fieldSetFlags()[3] = true;
377       return this; 
378     }
379     
380     /** Checks whether the 'details' field has been set */
381     public boolean hasDetails() {
382       return fieldSetFlags()[3];
383     }
384     
385     /** Clears the value of the 'details' field */
386     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearDetails() {
387       details = null;
388       fieldSetFlags()[3] = false;
389       return this;
390     }
391
392     /** Gets the value of the 'previousEvents' field */
393     public java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> getPreviousEvents() {
394       return previousEvents;
395     }
396     
397     /** Sets the value of the 'previousEvents' field */
398     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setPreviousEvents(java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> value) {
399       validate(fields()[4], value);
400       this.previousEvents = value;
401       fieldSetFlags()[4] = true;
402       return this; 
403     }
404     
405     /** Checks whether the 'previousEvents' field has been set */
406     public boolean hasPreviousEvents() {
407       return fieldSetFlags()[4];
408     }
409     
410     /** Clears the value of the 'previousEvents' field */
411     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearPreviousEvents() {
412       previousEvents = null;
413       fieldSetFlags()[4] = false;
414       return this;
415     }
416
417     /** Gets the value of the 'implicitlyIssuedStartEvents' field */
418     public java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> getImplicitlyIssuedStartEvents() {
419       return implicitlyIssuedStartEvents;
420     }
421     
422     /** Sets the value of the 'implicitlyIssuedStartEvents' field */
423     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setImplicitlyIssuedStartEvents(java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg> value) {
424       validate(fields()[5], value);
425       this.implicitlyIssuedStartEvents = value;
426       fieldSetFlags()[5] = true;
427       return this; 
428     }
429     
430     /** Checks whether the 'implicitlyIssuedStartEvents' field has been set */
431     public boolean hasImplicitlyIssuedStartEvents() {
432       return fieldSetFlags()[5];
433     }
434     
435     /** Clears the value of the 'implicitlyIssuedStartEvents' field */
436     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearImplicitlyIssuedStartEvents() {
437       implicitlyIssuedStartEvents = null;
438       fieldSetFlags()[5] = false;
439       return this;
440     }
441
442     /** Gets the value of the 'accumulatingAmount' field */
443     public java.lang.Double getAccumulatingAmount() {
444       return accumulatingAmount;
445     }
446     
447     /** Sets the value of the 'accumulatingAmount' field */
448     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setAccumulatingAmount(double value) {
449       validate(fields()[6], value);
450       this.accumulatingAmount = value;
451       fieldSetFlags()[6] = true;
452       return this; 
453     }
454     
455     /** Checks whether the 'accumulatingAmount' field has been set */
456     public boolean hasAccumulatingAmount() {
457       return fieldSetFlags()[6];
458     }
459     
460     /** Clears the value of the 'accumulatingAmount' field */
461     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearAccumulatingAmount() {
462       fieldSetFlags()[6] = false;
463       return this;
464     }
465
466     /** Gets the value of the 'oldAccumulatingAmount' field */
467     public java.lang.Double getOldAccumulatingAmount() {
468       return oldAccumulatingAmount;
469     }
470     
471     /** Sets the value of the 'oldAccumulatingAmount' field */
472     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setOldAccumulatingAmount(double value) {
473       validate(fields()[7], value);
474       this.oldAccumulatingAmount = value;
475       fieldSetFlags()[7] = true;
476       return this; 
477     }
478     
479     /** Checks whether the 'oldAccumulatingAmount' field has been set */
480     public boolean hasOldAccumulatingAmount() {
481       return fieldSetFlags()[7];
482     }
483     
484     /** Clears the value of the 'oldAccumulatingAmount' field */
485     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearOldAccumulatingAmount() {
486       fieldSetFlags()[7] = false;
487       return this;
488     }
489
490     /** Gets the value of the 'previousValue' field */
491     public java.lang.Double getPreviousValue() {
492       return previousValue;
493     }
494     
495     /** Sets the value of the 'previousValue' field */
496     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setPreviousValue(double value) {
497       validate(fields()[8], value);
498       this.previousValue = value;
499       fieldSetFlags()[8] = true;
500       return this; 
501     }
502     
503     /** Checks whether the 'previousValue' field has been set */
504     public boolean hasPreviousValue() {
505       return fieldSetFlags()[8];
506     }
507     
508     /** Clears the value of the 'previousValue' field */
509     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearPreviousValue() {
510       fieldSetFlags()[8] = false;
511       return this;
512     }
513
514     /** Gets the value of the 'currentValue' field */
515     public java.lang.Double getCurrentValue() {
516       return currentValue;
517     }
518     
519     /** Sets the value of the 'currentValue' field */
520     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setCurrentValue(double value) {
521       validate(fields()[9], value);
522       this.currentValue = value;
523       fieldSetFlags()[9] = true;
524       return this; 
525     }
526     
527     /** Checks whether the 'currentValue' field has been set */
528     public boolean hasCurrentValue() {
529       return fieldSetFlags()[9];
530     }
531     
532     /** Clears the value of the 'currentValue' field */
533     public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder clearCurrentValue() {
534       fieldSetFlags()[9] = false;
535       return this;
536     }
537
538     @Override
539     public ResourceInstanceChargingStateMsg build() {
540       try {
541         ResourceInstanceChargingStateMsg record = new ResourceInstanceChargingStateMsg();
542         record.clientID = fieldSetFlags()[0] ? this.clientID : (java.lang.String) defaultValue(fields()[0]);
543         record.resource = fieldSetFlags()[1] ? this.resource : (java.lang.String) defaultValue(fields()[1]);
544         record.instanceID = fieldSetFlags()[2] ? this.instanceID : (java.lang.String) defaultValue(fields()[2]);
545         record.details = fieldSetFlags()[3] ? this.details : (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.AnyValueMsg>) defaultValue(fields()[3]);
546         record.previousEvents = fieldSetFlags()[4] ? this.previousEvents : (java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg>) defaultValue(fields()[4]);
547         record.implicitlyIssuedStartEvents = fieldSetFlags()[5] ? this.implicitlyIssuedStartEvents : (java.util.List<gr.grnet.aquarium.message.avro.gen.ResourceEventMsg>) defaultValue(fields()[5]);
548         record.accumulatingAmount = fieldSetFlags()[6] ? this.accumulatingAmount : (java.lang.Double) defaultValue(fields()[6]);
549         record.oldAccumulatingAmount = fieldSetFlags()[7] ? this.oldAccumulatingAmount : (java.lang.Double) defaultValue(fields()[7]);
550         record.previousValue = fieldSetFlags()[8] ? this.previousValue : (java.lang.Double) defaultValue(fields()[8]);
551         record.currentValue = fieldSetFlags()[9] ? this.currentValue : (java.lang.Double) defaultValue(fields()[9]);
552         return record;
553       } catch (Exception e) {
554         throw new org.apache.avro.AvroRuntimeException(e);
555       }
556     }
557   }
558 }