WIP: New state machine for message processing
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / UserStateMsg.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 UserStateMsg 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\":\"UserStateMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"originalID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"inStoreID\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"occurredMillis\",\"type\":\"long\"},{\"name\":\"parentOriginalID\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"parentInStoreID\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"stateOfResources\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"ResourcesChargingStateMsg\",\"fields\":[{\"name\":\"resource\",\"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\":\"stateOfResourceInstance\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"ResourceInstanceChargingStateMsg\",\"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\":\"AnyValueMsg\",\"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\"}]},\"avro.java.string\":\"String\"}}]},\"avro.java.string\":\"String\"}},{\"name\":\"totalCredits\",\"type\":\"double\",\"default\":0.0},{\"name\":\"latestUpdateMillis\",\"type\":\"long\"},{\"name\":\"latestResourceEventOccurredMillis\",\"type\":\"long\"},{\"name\":\"billingPeriodOutOfSyncResourceEventsCounter\",\"type\":\"long\",\"default\":0},{\"name\":\"billingYear\",\"type\":\"int\"},{\"name\":\"billingMonth\",\"type\":\"int\"},{\"name\":\"billingMonthDay\",\"type\":\"int\"},{\"name\":\"isFullBillingMonth\",\"type\":\"boolean\",\"default\":false},{\"name\":\"walletEntries\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"WalletEntryMsg\",\"fields\":[{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"sumOfCreditsToSubtract\",\"type\":\"double\"},{\"name\":\"oldTotalCredits\",\"type\":\"double\"},{\"name\":\"newTotalCredits\",\"type\":\"double\"},{\"name\":\"whenComputedMillis\",\"type\":\"long\"},{\"name\":\"referenceStartMillis\",\"type\":\"long\"},{\"name\":\"referenceStopMillis\",\"type\":\"long\"},{\"name\":\"billingYear\",\"type\":\"int\"},{\"name\":\"billingMonth\",\"type\":\"int\"},{\"name\":\"billingMonthDay\",\"type\":\"int\"},{\"name\":\"chargeslots\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChargeslotMsg\",\"fields\":[{\"name\":\"startMillis\",\"type\":\"long\"},{\"name\":\"stopMillis\",\"type\":\"long\"},{\"name\":\"unitPrice\",\"type\":\"double\"},{\"name\":\"explanation\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"default\":\"\"},{\"name\":\"creditsToSubtract\",\"type\":\"double\",\"default\":0.0}]}}},{\"name\":\"resourceEvents\",\"type\":{\"type\":\"array\",\"items\":\"ResourceEventMsg\"}},{\"name\":\"resourceType\",\"type\":{\"type\":\"record\",\"name\":\"ResourceTypeMsg\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"unit\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"chargingBehaviorClass\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}},{\"name\":\"isSynthetic\",\"type\":\"boolean\",\"default\":false}]}}}]}");
10   @Deprecated public java.lang.String originalID;
11   @Deprecated public java.lang.String inStoreID;
12   @Deprecated public java.lang.String userID;
13   @Deprecated public long occurredMillis;
14   @Deprecated public java.lang.String parentOriginalID;
15   @Deprecated public java.lang.String parentInStoreID;
16   @Deprecated public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> stateOfResources;
17   @Deprecated public double totalCredits;
18   @Deprecated public long latestUpdateMillis;
19   @Deprecated public long latestResourceEventOccurredMillis;
20   @Deprecated public long billingPeriodOutOfSyncResourceEventsCounter;
21   @Deprecated public int billingYear;
22   @Deprecated public int billingMonth;
23   @Deprecated public int billingMonthDay;
24   @Deprecated public boolean isFullBillingMonth;
25   @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> walletEntries;
26   public org.apache.avro.Schema getSchema() { return SCHEMA$; }
27   // Used by DatumWriter.  Applications should not call. 
28   public java.lang.Object get(int field$) {
29     switch (field$) {
30     case 0: return originalID;
31     case 1: return inStoreID;
32     case 2: return userID;
33     case 3: return occurredMillis;
34     case 4: return parentOriginalID;
35     case 5: return parentInStoreID;
36     case 6: return stateOfResources;
37     case 7: return totalCredits;
38     case 8: return latestUpdateMillis;
39     case 9: return latestResourceEventOccurredMillis;
40     case 10: return billingPeriodOutOfSyncResourceEventsCounter;
41     case 11: return billingYear;
42     case 12: return billingMonth;
43     case 13: return billingMonthDay;
44     case 14: return isFullBillingMonth;
45     case 15: return walletEntries;
46     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
47     }
48   }
49   // Used by DatumReader.  Applications should not call. 
50   @SuppressWarnings(value="unchecked")
51   public void put(int field$, java.lang.Object value$) {
52     switch (field$) {
53     case 0: originalID = (java.lang.String)value$; break;
54     case 1: inStoreID = (java.lang.String)value$; break;
55     case 2: userID = (java.lang.String)value$; break;
56     case 3: occurredMillis = (java.lang.Long)value$; break;
57     case 4: parentOriginalID = (java.lang.String)value$; break;
58     case 5: parentInStoreID = (java.lang.String)value$; break;
59     case 6: stateOfResources = (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg>)value$; break;
60     case 7: totalCredits = (java.lang.Double)value$; break;
61     case 8: latestUpdateMillis = (java.lang.Long)value$; break;
62     case 9: latestResourceEventOccurredMillis = (java.lang.Long)value$; break;
63     case 10: billingPeriodOutOfSyncResourceEventsCounter = (java.lang.Long)value$; break;
64     case 11: billingYear = (java.lang.Integer)value$; break;
65     case 12: billingMonth = (java.lang.Integer)value$; break;
66     case 13: billingMonthDay = (java.lang.Integer)value$; break;
67     case 14: isFullBillingMonth = (java.lang.Boolean)value$; break;
68     case 15: walletEntries = (java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg>)value$; break;
69     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
70     }
71   }
72
73   /**
74    * Gets the value of the 'originalID' field.
75    */
76   public java.lang.String getOriginalID() {
77     return originalID;
78   }
79
80   /**
81    * Sets the value of the 'originalID' field.
82    * @param value the value to set.
83    */
84   public void setOriginalID(java.lang.String value) {
85     this.originalID = value;
86   }
87
88   /**
89    * Gets the value of the 'inStoreID' field.
90    */
91   public java.lang.String getInStoreID() {
92     return inStoreID;
93   }
94
95   /**
96    * Sets the value of the 'inStoreID' field.
97    * @param value the value to set.
98    */
99   public void setInStoreID(java.lang.String value) {
100     this.inStoreID = value;
101   }
102
103   /**
104    * Gets the value of the 'userID' field.
105    */
106   public java.lang.String getUserID() {
107     return userID;
108   }
109
110   /**
111    * Sets the value of the 'userID' field.
112    * @param value the value to set.
113    */
114   public void setUserID(java.lang.String value) {
115     this.userID = value;
116   }
117
118   /**
119    * Gets the value of the 'occurredMillis' field.
120    */
121   public java.lang.Long getOccurredMillis() {
122     return occurredMillis;
123   }
124
125   /**
126    * Sets the value of the 'occurredMillis' field.
127    * @param value the value to set.
128    */
129   public void setOccurredMillis(java.lang.Long value) {
130     this.occurredMillis = value;
131   }
132
133   /**
134    * Gets the value of the 'parentOriginalID' field.
135    */
136   public java.lang.String getParentOriginalID() {
137     return parentOriginalID;
138   }
139
140   /**
141    * Sets the value of the 'parentOriginalID' field.
142    * @param value the value to set.
143    */
144   public void setParentOriginalID(java.lang.String value) {
145     this.parentOriginalID = value;
146   }
147
148   /**
149    * Gets the value of the 'parentInStoreID' field.
150    */
151   public java.lang.String getParentInStoreID() {
152     return parentInStoreID;
153   }
154
155   /**
156    * Sets the value of the 'parentInStoreID' field.
157    * @param value the value to set.
158    */
159   public void setParentInStoreID(java.lang.String value) {
160     this.parentInStoreID = value;
161   }
162
163   /**
164    * Gets the value of the 'stateOfResources' field.
165    */
166   public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> getStateOfResources() {
167     return stateOfResources;
168   }
169
170   /**
171    * Sets the value of the 'stateOfResources' field.
172    * @param value the value to set.
173    */
174   public void setStateOfResources(java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> value) {
175     this.stateOfResources = value;
176   }
177
178   /**
179    * Gets the value of the 'totalCredits' field.
180    */
181   public java.lang.Double getTotalCredits() {
182     return totalCredits;
183   }
184
185   /**
186    * Sets the value of the 'totalCredits' field.
187    * @param value the value to set.
188    */
189   public void setTotalCredits(java.lang.Double value) {
190     this.totalCredits = value;
191   }
192
193   /**
194    * Gets the value of the 'latestUpdateMillis' field.
195    */
196   public java.lang.Long getLatestUpdateMillis() {
197     return latestUpdateMillis;
198   }
199
200   /**
201    * Sets the value of the 'latestUpdateMillis' field.
202    * @param value the value to set.
203    */
204   public void setLatestUpdateMillis(java.lang.Long value) {
205     this.latestUpdateMillis = value;
206   }
207
208   /**
209    * Gets the value of the 'latestResourceEventOccurredMillis' field.
210    */
211   public java.lang.Long getLatestResourceEventOccurredMillis() {
212     return latestResourceEventOccurredMillis;
213   }
214
215   /**
216    * Sets the value of the 'latestResourceEventOccurredMillis' field.
217    * @param value the value to set.
218    */
219   public void setLatestResourceEventOccurredMillis(java.lang.Long value) {
220     this.latestResourceEventOccurredMillis = value;
221   }
222
223   /**
224    * Gets the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field.
225    */
226   public java.lang.Long getBillingPeriodOutOfSyncResourceEventsCounter() {
227     return billingPeriodOutOfSyncResourceEventsCounter;
228   }
229
230   /**
231    * Sets the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field.
232    * @param value the value to set.
233    */
234   public void setBillingPeriodOutOfSyncResourceEventsCounter(java.lang.Long value) {
235     this.billingPeriodOutOfSyncResourceEventsCounter = value;
236   }
237
238   /**
239    * Gets the value of the 'billingYear' field.
240    */
241   public java.lang.Integer getBillingYear() {
242     return billingYear;
243   }
244
245   /**
246    * Sets the value of the 'billingYear' field.
247    * @param value the value to set.
248    */
249   public void setBillingYear(java.lang.Integer value) {
250     this.billingYear = value;
251   }
252
253   /**
254    * Gets the value of the 'billingMonth' field.
255    */
256   public java.lang.Integer getBillingMonth() {
257     return billingMonth;
258   }
259
260   /**
261    * Sets the value of the 'billingMonth' field.
262    * @param value the value to set.
263    */
264   public void setBillingMonth(java.lang.Integer value) {
265     this.billingMonth = value;
266   }
267
268   /**
269    * Gets the value of the 'billingMonthDay' field.
270    */
271   public java.lang.Integer getBillingMonthDay() {
272     return billingMonthDay;
273   }
274
275   /**
276    * Sets the value of the 'billingMonthDay' field.
277    * @param value the value to set.
278    */
279   public void setBillingMonthDay(java.lang.Integer value) {
280     this.billingMonthDay = value;
281   }
282
283   /**
284    * Gets the value of the 'isFullBillingMonth' field.
285    */
286   public java.lang.Boolean getIsFullBillingMonth() {
287     return isFullBillingMonth;
288   }
289
290   /**
291    * Sets the value of the 'isFullBillingMonth' field.
292    * @param value the value to set.
293    */
294   public void setIsFullBillingMonth(java.lang.Boolean value) {
295     this.isFullBillingMonth = value;
296   }
297
298   /**
299    * Gets the value of the 'walletEntries' field.
300    */
301   public java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> getWalletEntries() {
302     return walletEntries;
303   }
304
305   /**
306    * Sets the value of the 'walletEntries' field.
307    * @param value the value to set.
308    */
309   public void setWalletEntries(java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> value) {
310     this.walletEntries = value;
311   }
312
313   /** Creates a new UserStateMsg RecordBuilder */
314   public static gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder newBuilder() {
315     return new gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder();
316   }
317   
318   /** Creates a new UserStateMsg RecordBuilder by copying an existing Builder */
319   public static gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder other) {
320     return new gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder(other);
321   }
322   
323   /** Creates a new UserStateMsg RecordBuilder by copying an existing UserStateMsg instance */
324   public static gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserStateMsg other) {
325     return new gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder(other);
326   }
327   
328   /**
329    * RecordBuilder for UserStateMsg instances.
330    */
331   public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<UserStateMsg>
332     implements org.apache.avro.data.RecordBuilder<UserStateMsg> {
333
334     private java.lang.String originalID;
335     private java.lang.String inStoreID;
336     private java.lang.String userID;
337     private long occurredMillis;
338     private java.lang.String parentOriginalID;
339     private java.lang.String parentInStoreID;
340     private java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> stateOfResources;
341     private double totalCredits;
342     private long latestUpdateMillis;
343     private long latestResourceEventOccurredMillis;
344     private long billingPeriodOutOfSyncResourceEventsCounter;
345     private int billingYear;
346     private int billingMonth;
347     private int billingMonthDay;
348     private boolean isFullBillingMonth;
349     private java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> walletEntries;
350
351     /** Creates a new Builder */
352     private Builder() {
353       super(gr.grnet.aquarium.message.avro.gen.UserStateMsg.SCHEMA$);
354     }
355     
356     /** Creates a Builder by copying an existing Builder */
357     private Builder(gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder other) {
358       super(other);
359     }
360     
361     /** Creates a Builder by copying an existing UserStateMsg instance */
362     private Builder(gr.grnet.aquarium.message.avro.gen.UserStateMsg other) {
363             super(gr.grnet.aquarium.message.avro.gen.UserStateMsg.SCHEMA$);
364       if (isValidValue(fields()[0], other.originalID)) {
365         this.originalID = (java.lang.String) data().deepCopy(fields()[0].schema(), other.originalID);
366         fieldSetFlags()[0] = true;
367       }
368       if (isValidValue(fields()[1], other.inStoreID)) {
369         this.inStoreID = (java.lang.String) data().deepCopy(fields()[1].schema(), other.inStoreID);
370         fieldSetFlags()[1] = true;
371       }
372       if (isValidValue(fields()[2], other.userID)) {
373         this.userID = (java.lang.String) data().deepCopy(fields()[2].schema(), other.userID);
374         fieldSetFlags()[2] = true;
375       }
376       if (isValidValue(fields()[3], other.occurredMillis)) {
377         this.occurredMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.occurredMillis);
378         fieldSetFlags()[3] = true;
379       }
380       if (isValidValue(fields()[4], other.parentOriginalID)) {
381         this.parentOriginalID = (java.lang.String) data().deepCopy(fields()[4].schema(), other.parentOriginalID);
382         fieldSetFlags()[4] = true;
383       }
384       if (isValidValue(fields()[5], other.parentInStoreID)) {
385         this.parentInStoreID = (java.lang.String) data().deepCopy(fields()[5].schema(), other.parentInStoreID);
386         fieldSetFlags()[5] = true;
387       }
388       if (isValidValue(fields()[6], other.stateOfResources)) {
389         this.stateOfResources = (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg>) data().deepCopy(fields()[6].schema(), other.stateOfResources);
390         fieldSetFlags()[6] = true;
391       }
392       if (isValidValue(fields()[7], other.totalCredits)) {
393         this.totalCredits = (java.lang.Double) data().deepCopy(fields()[7].schema(), other.totalCredits);
394         fieldSetFlags()[7] = true;
395       }
396       if (isValidValue(fields()[8], other.latestUpdateMillis)) {
397         this.latestUpdateMillis = (java.lang.Long) data().deepCopy(fields()[8].schema(), other.latestUpdateMillis);
398         fieldSetFlags()[8] = true;
399       }
400       if (isValidValue(fields()[9], other.latestResourceEventOccurredMillis)) {
401         this.latestResourceEventOccurredMillis = (java.lang.Long) data().deepCopy(fields()[9].schema(), other.latestResourceEventOccurredMillis);
402         fieldSetFlags()[9] = true;
403       }
404       if (isValidValue(fields()[10], other.billingPeriodOutOfSyncResourceEventsCounter)) {
405         this.billingPeriodOutOfSyncResourceEventsCounter = (java.lang.Long) data().deepCopy(fields()[10].schema(), other.billingPeriodOutOfSyncResourceEventsCounter);
406         fieldSetFlags()[10] = true;
407       }
408       if (isValidValue(fields()[11], other.billingYear)) {
409         this.billingYear = (java.lang.Integer) data().deepCopy(fields()[11].schema(), other.billingYear);
410         fieldSetFlags()[11] = true;
411       }
412       if (isValidValue(fields()[12], other.billingMonth)) {
413         this.billingMonth = (java.lang.Integer) data().deepCopy(fields()[12].schema(), other.billingMonth);
414         fieldSetFlags()[12] = true;
415       }
416       if (isValidValue(fields()[13], other.billingMonthDay)) {
417         this.billingMonthDay = (java.lang.Integer) data().deepCopy(fields()[13].schema(), other.billingMonthDay);
418         fieldSetFlags()[13] = true;
419       }
420       if (isValidValue(fields()[14], other.isFullBillingMonth)) {
421         this.isFullBillingMonth = (java.lang.Boolean) data().deepCopy(fields()[14].schema(), other.isFullBillingMonth);
422         fieldSetFlags()[14] = true;
423       }
424       if (isValidValue(fields()[15], other.walletEntries)) {
425         this.walletEntries = (java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg>) data().deepCopy(fields()[15].schema(), other.walletEntries);
426         fieldSetFlags()[15] = true;
427       }
428     }
429
430     /** Gets the value of the 'originalID' field */
431     public java.lang.String getOriginalID() {
432       return originalID;
433     }
434     
435     /** Sets the value of the 'originalID' field */
436     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setOriginalID(java.lang.String value) {
437       validate(fields()[0], value);
438       this.originalID = value;
439       fieldSetFlags()[0] = true;
440       return this; 
441     }
442     
443     /** Checks whether the 'originalID' field has been set */
444     public boolean hasOriginalID() {
445       return fieldSetFlags()[0];
446     }
447     
448     /** Clears the value of the 'originalID' field */
449     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearOriginalID() {
450       originalID = null;
451       fieldSetFlags()[0] = false;
452       return this;
453     }
454
455     /** Gets the value of the 'inStoreID' field */
456     public java.lang.String getInStoreID() {
457       return inStoreID;
458     }
459     
460     /** Sets the value of the 'inStoreID' field */
461     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setInStoreID(java.lang.String value) {
462       validate(fields()[1], value);
463       this.inStoreID = value;
464       fieldSetFlags()[1] = true;
465       return this; 
466     }
467     
468     /** Checks whether the 'inStoreID' field has been set */
469     public boolean hasInStoreID() {
470       return fieldSetFlags()[1];
471     }
472     
473     /** Clears the value of the 'inStoreID' field */
474     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearInStoreID() {
475       inStoreID = null;
476       fieldSetFlags()[1] = false;
477       return this;
478     }
479
480     /** Gets the value of the 'userID' field */
481     public java.lang.String getUserID() {
482       return userID;
483     }
484     
485     /** Sets the value of the 'userID' field */
486     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setUserID(java.lang.String value) {
487       validate(fields()[2], value);
488       this.userID = value;
489       fieldSetFlags()[2] = true;
490       return this; 
491     }
492     
493     /** Checks whether the 'userID' field has been set */
494     public boolean hasUserID() {
495       return fieldSetFlags()[2];
496     }
497     
498     /** Clears the value of the 'userID' field */
499     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearUserID() {
500       userID = null;
501       fieldSetFlags()[2] = false;
502       return this;
503     }
504
505     /** Gets the value of the 'occurredMillis' field */
506     public java.lang.Long getOccurredMillis() {
507       return occurredMillis;
508     }
509     
510     /** Sets the value of the 'occurredMillis' field */
511     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setOccurredMillis(long value) {
512       validate(fields()[3], value);
513       this.occurredMillis = value;
514       fieldSetFlags()[3] = true;
515       return this; 
516     }
517     
518     /** Checks whether the 'occurredMillis' field has been set */
519     public boolean hasOccurredMillis() {
520       return fieldSetFlags()[3];
521     }
522     
523     /** Clears the value of the 'occurredMillis' field */
524     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearOccurredMillis() {
525       fieldSetFlags()[3] = false;
526       return this;
527     }
528
529     /** Gets the value of the 'parentOriginalID' field */
530     public java.lang.String getParentOriginalID() {
531       return parentOriginalID;
532     }
533     
534     /** Sets the value of the 'parentOriginalID' field */
535     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setParentOriginalID(java.lang.String value) {
536       validate(fields()[4], value);
537       this.parentOriginalID = value;
538       fieldSetFlags()[4] = true;
539       return this; 
540     }
541     
542     /** Checks whether the 'parentOriginalID' field has been set */
543     public boolean hasParentOriginalID() {
544       return fieldSetFlags()[4];
545     }
546     
547     /** Clears the value of the 'parentOriginalID' field */
548     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearParentOriginalID() {
549       parentOriginalID = null;
550       fieldSetFlags()[4] = false;
551       return this;
552     }
553
554     /** Gets the value of the 'parentInStoreID' field */
555     public java.lang.String getParentInStoreID() {
556       return parentInStoreID;
557     }
558     
559     /** Sets the value of the 'parentInStoreID' field */
560     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setParentInStoreID(java.lang.String value) {
561       validate(fields()[5], value);
562       this.parentInStoreID = value;
563       fieldSetFlags()[5] = true;
564       return this; 
565     }
566     
567     /** Checks whether the 'parentInStoreID' field has been set */
568     public boolean hasParentInStoreID() {
569       return fieldSetFlags()[5];
570     }
571     
572     /** Clears the value of the 'parentInStoreID' field */
573     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearParentInStoreID() {
574       parentInStoreID = null;
575       fieldSetFlags()[5] = false;
576       return this;
577     }
578
579     /** Gets the value of the 'stateOfResources' field */
580     public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> getStateOfResources() {
581       return stateOfResources;
582     }
583     
584     /** Sets the value of the 'stateOfResources' field */
585     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setStateOfResources(java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> value) {
586       validate(fields()[6], value);
587       this.stateOfResources = value;
588       fieldSetFlags()[6] = true;
589       return this; 
590     }
591     
592     /** Checks whether the 'stateOfResources' field has been set */
593     public boolean hasStateOfResources() {
594       return fieldSetFlags()[6];
595     }
596     
597     /** Clears the value of the 'stateOfResources' field */
598     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearStateOfResources() {
599       stateOfResources = null;
600       fieldSetFlags()[6] = false;
601       return this;
602     }
603
604     /** Gets the value of the 'totalCredits' field */
605     public java.lang.Double getTotalCredits() {
606       return totalCredits;
607     }
608     
609     /** Sets the value of the 'totalCredits' field */
610     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setTotalCredits(double value) {
611       validate(fields()[7], value);
612       this.totalCredits = value;
613       fieldSetFlags()[7] = true;
614       return this; 
615     }
616     
617     /** Checks whether the 'totalCredits' field has been set */
618     public boolean hasTotalCredits() {
619       return fieldSetFlags()[7];
620     }
621     
622     /** Clears the value of the 'totalCredits' field */
623     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearTotalCredits() {
624       fieldSetFlags()[7] = false;
625       return this;
626     }
627
628     /** Gets the value of the 'latestUpdateMillis' field */
629     public java.lang.Long getLatestUpdateMillis() {
630       return latestUpdateMillis;
631     }
632     
633     /** Sets the value of the 'latestUpdateMillis' field */
634     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setLatestUpdateMillis(long value) {
635       validate(fields()[8], value);
636       this.latestUpdateMillis = value;
637       fieldSetFlags()[8] = true;
638       return this; 
639     }
640     
641     /** Checks whether the 'latestUpdateMillis' field has been set */
642     public boolean hasLatestUpdateMillis() {
643       return fieldSetFlags()[8];
644     }
645     
646     /** Clears the value of the 'latestUpdateMillis' field */
647     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearLatestUpdateMillis() {
648       fieldSetFlags()[8] = false;
649       return this;
650     }
651
652     /** Gets the value of the 'latestResourceEventOccurredMillis' field */
653     public java.lang.Long getLatestResourceEventOccurredMillis() {
654       return latestResourceEventOccurredMillis;
655     }
656     
657     /** Sets the value of the 'latestResourceEventOccurredMillis' field */
658     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setLatestResourceEventOccurredMillis(long value) {
659       validate(fields()[9], value);
660       this.latestResourceEventOccurredMillis = value;
661       fieldSetFlags()[9] = true;
662       return this; 
663     }
664     
665     /** Checks whether the 'latestResourceEventOccurredMillis' field has been set */
666     public boolean hasLatestResourceEventOccurredMillis() {
667       return fieldSetFlags()[9];
668     }
669     
670     /** Clears the value of the 'latestResourceEventOccurredMillis' field */
671     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearLatestResourceEventOccurredMillis() {
672       fieldSetFlags()[9] = false;
673       return this;
674     }
675
676     /** Gets the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field */
677     public java.lang.Long getBillingPeriodOutOfSyncResourceEventsCounter() {
678       return billingPeriodOutOfSyncResourceEventsCounter;
679     }
680     
681     /** Sets the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field */
682     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setBillingPeriodOutOfSyncResourceEventsCounter(long value) {
683       validate(fields()[10], value);
684       this.billingPeriodOutOfSyncResourceEventsCounter = value;
685       fieldSetFlags()[10] = true;
686       return this; 
687     }
688     
689     /** Checks whether the 'billingPeriodOutOfSyncResourceEventsCounter' field has been set */
690     public boolean hasBillingPeriodOutOfSyncResourceEventsCounter() {
691       return fieldSetFlags()[10];
692     }
693     
694     /** Clears the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field */
695     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearBillingPeriodOutOfSyncResourceEventsCounter() {
696       fieldSetFlags()[10] = false;
697       return this;
698     }
699
700     /** Gets the value of the 'billingYear' field */
701     public java.lang.Integer getBillingYear() {
702       return billingYear;
703     }
704     
705     /** Sets the value of the 'billingYear' field */
706     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setBillingYear(int value) {
707       validate(fields()[11], value);
708       this.billingYear = value;
709       fieldSetFlags()[11] = true;
710       return this; 
711     }
712     
713     /** Checks whether the 'billingYear' field has been set */
714     public boolean hasBillingYear() {
715       return fieldSetFlags()[11];
716     }
717     
718     /** Clears the value of the 'billingYear' field */
719     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearBillingYear() {
720       fieldSetFlags()[11] = false;
721       return this;
722     }
723
724     /** Gets the value of the 'billingMonth' field */
725     public java.lang.Integer getBillingMonth() {
726       return billingMonth;
727     }
728     
729     /** Sets the value of the 'billingMonth' field */
730     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setBillingMonth(int value) {
731       validate(fields()[12], value);
732       this.billingMonth = value;
733       fieldSetFlags()[12] = true;
734       return this; 
735     }
736     
737     /** Checks whether the 'billingMonth' field has been set */
738     public boolean hasBillingMonth() {
739       return fieldSetFlags()[12];
740     }
741     
742     /** Clears the value of the 'billingMonth' field */
743     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearBillingMonth() {
744       fieldSetFlags()[12] = false;
745       return this;
746     }
747
748     /** Gets the value of the 'billingMonthDay' field */
749     public java.lang.Integer getBillingMonthDay() {
750       return billingMonthDay;
751     }
752     
753     /** Sets the value of the 'billingMonthDay' field */
754     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setBillingMonthDay(int value) {
755       validate(fields()[13], value);
756       this.billingMonthDay = value;
757       fieldSetFlags()[13] = true;
758       return this; 
759     }
760     
761     /** Checks whether the 'billingMonthDay' field has been set */
762     public boolean hasBillingMonthDay() {
763       return fieldSetFlags()[13];
764     }
765     
766     /** Clears the value of the 'billingMonthDay' field */
767     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearBillingMonthDay() {
768       fieldSetFlags()[13] = false;
769       return this;
770     }
771
772     /** Gets the value of the 'isFullBillingMonth' field */
773     public java.lang.Boolean getIsFullBillingMonth() {
774       return isFullBillingMonth;
775     }
776     
777     /** Sets the value of the 'isFullBillingMonth' field */
778     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setIsFullBillingMonth(boolean value) {
779       validate(fields()[14], value);
780       this.isFullBillingMonth = value;
781       fieldSetFlags()[14] = true;
782       return this; 
783     }
784     
785     /** Checks whether the 'isFullBillingMonth' field has been set */
786     public boolean hasIsFullBillingMonth() {
787       return fieldSetFlags()[14];
788     }
789     
790     /** Clears the value of the 'isFullBillingMonth' field */
791     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearIsFullBillingMonth() {
792       fieldSetFlags()[14] = false;
793       return this;
794     }
795
796     /** Gets the value of the 'walletEntries' field */
797     public java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> getWalletEntries() {
798       return walletEntries;
799     }
800     
801     /** Sets the value of the 'walletEntries' field */
802     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setWalletEntries(java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> value) {
803       validate(fields()[15], value);
804       this.walletEntries = value;
805       fieldSetFlags()[15] = true;
806       return this; 
807     }
808     
809     /** Checks whether the 'walletEntries' field has been set */
810     public boolean hasWalletEntries() {
811       return fieldSetFlags()[15];
812     }
813     
814     /** Clears the value of the 'walletEntries' field */
815     public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearWalletEntries() {
816       walletEntries = null;
817       fieldSetFlags()[15] = false;
818       return this;
819     }
820
821     @Override
822     public UserStateMsg build() {
823       try {
824         UserStateMsg record = new UserStateMsg();
825         record.originalID = fieldSetFlags()[0] ? this.originalID : (java.lang.String) defaultValue(fields()[0]);
826         record.inStoreID = fieldSetFlags()[1] ? this.inStoreID : (java.lang.String) defaultValue(fields()[1]);
827         record.userID = fieldSetFlags()[2] ? this.userID : (java.lang.String) defaultValue(fields()[2]);
828         record.occurredMillis = fieldSetFlags()[3] ? this.occurredMillis : (java.lang.Long) defaultValue(fields()[3]);
829         record.parentOriginalID = fieldSetFlags()[4] ? this.parentOriginalID : (java.lang.String) defaultValue(fields()[4]);
830         record.parentInStoreID = fieldSetFlags()[5] ? this.parentInStoreID : (java.lang.String) defaultValue(fields()[5]);
831         record.stateOfResources = fieldSetFlags()[6] ? this.stateOfResources : (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg>) defaultValue(fields()[6]);
832         record.totalCredits = fieldSetFlags()[7] ? this.totalCredits : (java.lang.Double) defaultValue(fields()[7]);
833         record.latestUpdateMillis = fieldSetFlags()[8] ? this.latestUpdateMillis : (java.lang.Long) defaultValue(fields()[8]);
834         record.latestResourceEventOccurredMillis = fieldSetFlags()[9] ? this.latestResourceEventOccurredMillis : (java.lang.Long) defaultValue(fields()[9]);
835         record.billingPeriodOutOfSyncResourceEventsCounter = fieldSetFlags()[10] ? this.billingPeriodOutOfSyncResourceEventsCounter : (java.lang.Long) defaultValue(fields()[10]);
836         record.billingYear = fieldSetFlags()[11] ? this.billingYear : (java.lang.Integer) defaultValue(fields()[11]);
837         record.billingMonth = fieldSetFlags()[12] ? this.billingMonth : (java.lang.Integer) defaultValue(fields()[12]);
838         record.billingMonthDay = fieldSetFlags()[13] ? this.billingMonthDay : (java.lang.Integer) defaultValue(fields()[13]);
839         record.isFullBillingMonth = fieldSetFlags()[14] ? this.isFullBillingMonth : (java.lang.Boolean) defaultValue(fields()[14]);
840         record.walletEntries = fieldSetFlags()[15] ? this.walletEntries : (java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg>) defaultValue(fields()[15]);
841         return record;
842       } catch (Exception e) {
843         throw new org.apache.avro.AvroRuntimeException(e);
844       }
845     }
846   }
847 }