2 * Autogenerated by Avro
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\":\"resourceTypesMap\",\"type\":{\"type\":\"map\",\"values\":{\"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\"}}]},\"avro.java.string\":\"String\"}},{\"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\":\"agreementHistory\",\"type\":{\"type\":\"record\",\"name\":\"UserAgreementHistoryMsg\",\"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\":\"latestOccurredMillis\",\"type\":\"long\"},{\"name\":\"latestValidFromMillis\",\"type\":\"long\"},{\"name\":\"agreements\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"UserAgreementMsg\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"relatedIMEventOriginalID\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"occurredMillis\",\"type\":\"long\",\"default\":0},{\"name\":\"validFromMillis\",\"type\":\"long\"},{\"name\":\"validToMillis\",\"type\":\"long\"},{\"name\":\"role\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"fullPriceTableRef\",\"type\":[{\"type\":\"record\",\"name\":\"FullPriceTableMsg\",\"fields\":[{\"name\":\"perResource\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"SelectorValueMsg\",\"fields\":[{\"name\":\"selectorValue\",\"type\":[{\"type\":\"record\",\"name\":\"EffectivePriceTableMsg\",\"fields\":[{\"name\":\"priceOverrides\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"EffectiveUnitPriceMsg\",\"fields\":[{\"name\":\"unitPrice\",\"type\":\"double\"},{\"name\":\"when\",\"type\":[{\"type\":\"record\",\"name\":\"CronSpecTupleMsg\",\"fields\":[{\"name\":\"a\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"b\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},\"null\"]}]}}}]},{\"type\":\"map\",\"values\":\"SelectorValueMsg\",\"avro.java.string\":\"String\"}]}]},\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}}]},\"null\"]},{\"name\":\"relatedIMEventMsg\",\"type\":[{\"type\":\"record\",\"name\":\"IMEventMsg\",\"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\":\"eventType\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"isActive\",\"type\":\"boolean\"},{\"name\":\"role\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"isSynthetic\",\"type\":\"boolean\",\"default\":false},{\"name\":\"details\",\"type\":{\"type\":\"map\",\"values\":\"AnyValueMsg\",\"avro.java.string\":\"String\"}}]},\"null\"]}]}}}]}},{\"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\":\"ResourceTypeMsg\"},{\"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.ResourceTypeMsg> resourceTypesMap;
17 @Deprecated public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> stateOfResources;
18 @Deprecated public double totalCredits;
19 @Deprecated public gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg agreementHistory;
20 @Deprecated public long latestUpdateMillis;
21 @Deprecated public long latestResourceEventOccurredMillis;
22 @Deprecated public long billingPeriodOutOfSyncResourceEventsCounter;
23 @Deprecated public int billingYear;
24 @Deprecated public int billingMonth;
25 @Deprecated public int billingMonthDay;
26 @Deprecated public boolean isFullBillingMonth;
27 @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> walletEntries;
28 public org.apache.avro.Schema getSchema() { return SCHEMA$; }
29 // Used by DatumWriter. Applications should not call.
30 public java.lang.Object get(int field$) {
32 case 0: return originalID;
33 case 1: return inStoreID;
34 case 2: return userID;
35 case 3: return occurredMillis;
36 case 4: return parentOriginalID;
37 case 5: return parentInStoreID;
38 case 6: return resourceTypesMap;
39 case 7: return stateOfResources;
40 case 8: return totalCredits;
41 case 9: return agreementHistory;
42 case 10: return latestUpdateMillis;
43 case 11: return latestResourceEventOccurredMillis;
44 case 12: return billingPeriodOutOfSyncResourceEventsCounter;
45 case 13: return billingYear;
46 case 14: return billingMonth;
47 case 15: return billingMonthDay;
48 case 16: return isFullBillingMonth;
49 case 17: return walletEntries;
50 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
53 // Used by DatumReader. Applications should not call.
54 @SuppressWarnings(value="unchecked")
55 public void put(int field$, java.lang.Object value$) {
57 case 0: originalID = (java.lang.String)value$; break;
58 case 1: inStoreID = (java.lang.String)value$; break;
59 case 2: userID = (java.lang.String)value$; break;
60 case 3: occurredMillis = (java.lang.Long)value$; break;
61 case 4: parentOriginalID = (java.lang.String)value$; break;
62 case 5: parentInStoreID = (java.lang.String)value$; break;
63 case 6: resourceTypesMap = (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourceTypeMsg>)value$; break;
64 case 7: stateOfResources = (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg>)value$; break;
65 case 8: totalCredits = (java.lang.Double)value$; break;
66 case 9: agreementHistory = (gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg)value$; break;
67 case 10: latestUpdateMillis = (java.lang.Long)value$; break;
68 case 11: latestResourceEventOccurredMillis = (java.lang.Long)value$; break;
69 case 12: billingPeriodOutOfSyncResourceEventsCounter = (java.lang.Long)value$; break;
70 case 13: billingYear = (java.lang.Integer)value$; break;
71 case 14: billingMonth = (java.lang.Integer)value$; break;
72 case 15: billingMonthDay = (java.lang.Integer)value$; break;
73 case 16: isFullBillingMonth = (java.lang.Boolean)value$; break;
74 case 17: walletEntries = (java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg>)value$; break;
75 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
80 * Gets the value of the 'originalID' field.
82 public java.lang.String getOriginalID() {
87 * Sets the value of the 'originalID' field.
88 * @param value the value to set.
90 public void setOriginalID(java.lang.String value) {
91 this.originalID = value;
95 * Gets the value of the 'inStoreID' field.
97 public java.lang.String getInStoreID() {
102 * Sets the value of the 'inStoreID' field.
103 * @param value the value to set.
105 public void setInStoreID(java.lang.String value) {
106 this.inStoreID = value;
110 * Gets the value of the 'userID' field.
112 public java.lang.String getUserID() {
117 * Sets the value of the 'userID' field.
118 * @param value the value to set.
120 public void setUserID(java.lang.String value) {
125 * Gets the value of the 'occurredMillis' field.
127 public java.lang.Long getOccurredMillis() {
128 return occurredMillis;
132 * Sets the value of the 'occurredMillis' field.
133 * @param value the value to set.
135 public void setOccurredMillis(java.lang.Long value) {
136 this.occurredMillis = value;
140 * Gets the value of the 'parentOriginalID' field.
142 public java.lang.String getParentOriginalID() {
143 return parentOriginalID;
147 * Sets the value of the 'parentOriginalID' field.
148 * @param value the value to set.
150 public void setParentOriginalID(java.lang.String value) {
151 this.parentOriginalID = value;
155 * Gets the value of the 'parentInStoreID' field.
157 public java.lang.String getParentInStoreID() {
158 return parentInStoreID;
162 * Sets the value of the 'parentInStoreID' field.
163 * @param value the value to set.
165 public void setParentInStoreID(java.lang.String value) {
166 this.parentInStoreID = value;
170 * Gets the value of the 'resourceTypesMap' field.
172 public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourceTypeMsg> getResourceTypesMap() {
173 return resourceTypesMap;
177 * Sets the value of the 'resourceTypesMap' field.
178 * @param value the value to set.
180 public void setResourceTypesMap(java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourceTypeMsg> value) {
181 this.resourceTypesMap = value;
185 * Gets the value of the 'stateOfResources' field.
187 public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> getStateOfResources() {
188 return stateOfResources;
192 * Sets the value of the 'stateOfResources' field.
193 * @param value the value to set.
195 public void setStateOfResources(java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> value) {
196 this.stateOfResources = value;
200 * Gets the value of the 'totalCredits' field.
202 public java.lang.Double getTotalCredits() {
207 * Sets the value of the 'totalCredits' field.
208 * @param value the value to set.
210 public void setTotalCredits(java.lang.Double value) {
211 this.totalCredits = value;
215 * Gets the value of the 'agreementHistory' field.
217 public gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg getAgreementHistory() {
218 return agreementHistory;
222 * Sets the value of the 'agreementHistory' field.
223 * @param value the value to set.
225 public void setAgreementHistory(gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg value) {
226 this.agreementHistory = value;
230 * Gets the value of the 'latestUpdateMillis' field.
232 public java.lang.Long getLatestUpdateMillis() {
233 return latestUpdateMillis;
237 * Sets the value of the 'latestUpdateMillis' field.
238 * @param value the value to set.
240 public void setLatestUpdateMillis(java.lang.Long value) {
241 this.latestUpdateMillis = value;
245 * Gets the value of the 'latestResourceEventOccurredMillis' field.
247 public java.lang.Long getLatestResourceEventOccurredMillis() {
248 return latestResourceEventOccurredMillis;
252 * Sets the value of the 'latestResourceEventOccurredMillis' field.
253 * @param value the value to set.
255 public void setLatestResourceEventOccurredMillis(java.lang.Long value) {
256 this.latestResourceEventOccurredMillis = value;
260 * Gets the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field.
262 public java.lang.Long getBillingPeriodOutOfSyncResourceEventsCounter() {
263 return billingPeriodOutOfSyncResourceEventsCounter;
267 * Sets the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field.
268 * @param value the value to set.
270 public void setBillingPeriodOutOfSyncResourceEventsCounter(java.lang.Long value) {
271 this.billingPeriodOutOfSyncResourceEventsCounter = value;
275 * Gets the value of the 'billingYear' field.
277 public java.lang.Integer getBillingYear() {
282 * Sets the value of the 'billingYear' field.
283 * @param value the value to set.
285 public void setBillingYear(java.lang.Integer value) {
286 this.billingYear = value;
290 * Gets the value of the 'billingMonth' field.
292 public java.lang.Integer getBillingMonth() {
297 * Sets the value of the 'billingMonth' field.
298 * @param value the value to set.
300 public void setBillingMonth(java.lang.Integer value) {
301 this.billingMonth = value;
305 * Gets the value of the 'billingMonthDay' field.
307 public java.lang.Integer getBillingMonthDay() {
308 return billingMonthDay;
312 * Sets the value of the 'billingMonthDay' field.
313 * @param value the value to set.
315 public void setBillingMonthDay(java.lang.Integer value) {
316 this.billingMonthDay = value;
320 * Gets the value of the 'isFullBillingMonth' field.
322 public java.lang.Boolean getIsFullBillingMonth() {
323 return isFullBillingMonth;
327 * Sets the value of the 'isFullBillingMonth' field.
328 * @param value the value to set.
330 public void setIsFullBillingMonth(java.lang.Boolean value) {
331 this.isFullBillingMonth = value;
335 * Gets the value of the 'walletEntries' field.
337 public java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> getWalletEntries() {
338 return walletEntries;
342 * Sets the value of the 'walletEntries' field.
343 * @param value the value to set.
345 public void setWalletEntries(java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> value) {
346 this.walletEntries = value;
349 /** Creates a new UserStateMsg RecordBuilder */
350 public static gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder newBuilder() {
351 return new gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder();
354 /** Creates a new UserStateMsg RecordBuilder by copying an existing Builder */
355 public static gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder other) {
356 return new gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder(other);
359 /** Creates a new UserStateMsg RecordBuilder by copying an existing UserStateMsg instance */
360 public static gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserStateMsg other) {
361 return new gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder(other);
365 * RecordBuilder for UserStateMsg instances.
367 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<UserStateMsg>
368 implements org.apache.avro.data.RecordBuilder<UserStateMsg> {
370 private java.lang.String originalID;
371 private java.lang.String inStoreID;
372 private java.lang.String userID;
373 private long occurredMillis;
374 private java.lang.String parentOriginalID;
375 private java.lang.String parentInStoreID;
376 private java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourceTypeMsg> resourceTypesMap;
377 private java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> stateOfResources;
378 private double totalCredits;
379 private gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg agreementHistory;
380 private long latestUpdateMillis;
381 private long latestResourceEventOccurredMillis;
382 private long billingPeriodOutOfSyncResourceEventsCounter;
383 private int billingYear;
384 private int billingMonth;
385 private int billingMonthDay;
386 private boolean isFullBillingMonth;
387 private java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> walletEntries;
389 /** Creates a new Builder */
391 super(gr.grnet.aquarium.message.avro.gen.UserStateMsg.SCHEMA$);
394 /** Creates a Builder by copying an existing Builder */
395 private Builder(gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder other) {
399 /** Creates a Builder by copying an existing UserStateMsg instance */
400 private Builder(gr.grnet.aquarium.message.avro.gen.UserStateMsg other) {
401 super(gr.grnet.aquarium.message.avro.gen.UserStateMsg.SCHEMA$);
402 if (isValidValue(fields()[0], other.originalID)) {
403 this.originalID = (java.lang.String) data().deepCopy(fields()[0].schema(), other.originalID);
404 fieldSetFlags()[0] = true;
406 if (isValidValue(fields()[1], other.inStoreID)) {
407 this.inStoreID = (java.lang.String) data().deepCopy(fields()[1].schema(), other.inStoreID);
408 fieldSetFlags()[1] = true;
410 if (isValidValue(fields()[2], other.userID)) {
411 this.userID = (java.lang.String) data().deepCopy(fields()[2].schema(), other.userID);
412 fieldSetFlags()[2] = true;
414 if (isValidValue(fields()[3], other.occurredMillis)) {
415 this.occurredMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.occurredMillis);
416 fieldSetFlags()[3] = true;
418 if (isValidValue(fields()[4], other.parentOriginalID)) {
419 this.parentOriginalID = (java.lang.String) data().deepCopy(fields()[4].schema(), other.parentOriginalID);
420 fieldSetFlags()[4] = true;
422 if (isValidValue(fields()[5], other.parentInStoreID)) {
423 this.parentInStoreID = (java.lang.String) data().deepCopy(fields()[5].schema(), other.parentInStoreID);
424 fieldSetFlags()[5] = true;
426 if (isValidValue(fields()[6], other.resourceTypesMap)) {
427 this.resourceTypesMap = (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourceTypeMsg>) data().deepCopy(fields()[6].schema(), other.resourceTypesMap);
428 fieldSetFlags()[6] = true;
430 if (isValidValue(fields()[7], other.stateOfResources)) {
431 this.stateOfResources = (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg>) data().deepCopy(fields()[7].schema(), other.stateOfResources);
432 fieldSetFlags()[7] = true;
434 if (isValidValue(fields()[8], other.totalCredits)) {
435 this.totalCredits = (java.lang.Double) data().deepCopy(fields()[8].schema(), other.totalCredits);
436 fieldSetFlags()[8] = true;
438 if (isValidValue(fields()[9], other.agreementHistory)) {
439 this.agreementHistory = (gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg) data().deepCopy(fields()[9].schema(), other.agreementHistory);
440 fieldSetFlags()[9] = true;
442 if (isValidValue(fields()[10], other.latestUpdateMillis)) {
443 this.latestUpdateMillis = (java.lang.Long) data().deepCopy(fields()[10].schema(), other.latestUpdateMillis);
444 fieldSetFlags()[10] = true;
446 if (isValidValue(fields()[11], other.latestResourceEventOccurredMillis)) {
447 this.latestResourceEventOccurredMillis = (java.lang.Long) data().deepCopy(fields()[11].schema(), other.latestResourceEventOccurredMillis);
448 fieldSetFlags()[11] = true;
450 if (isValidValue(fields()[12], other.billingPeriodOutOfSyncResourceEventsCounter)) {
451 this.billingPeriodOutOfSyncResourceEventsCounter = (java.lang.Long) data().deepCopy(fields()[12].schema(), other.billingPeriodOutOfSyncResourceEventsCounter);
452 fieldSetFlags()[12] = true;
454 if (isValidValue(fields()[13], other.billingYear)) {
455 this.billingYear = (java.lang.Integer) data().deepCopy(fields()[13].schema(), other.billingYear);
456 fieldSetFlags()[13] = true;
458 if (isValidValue(fields()[14], other.billingMonth)) {
459 this.billingMonth = (java.lang.Integer) data().deepCopy(fields()[14].schema(), other.billingMonth);
460 fieldSetFlags()[14] = true;
462 if (isValidValue(fields()[15], other.billingMonthDay)) {
463 this.billingMonthDay = (java.lang.Integer) data().deepCopy(fields()[15].schema(), other.billingMonthDay);
464 fieldSetFlags()[15] = true;
466 if (isValidValue(fields()[16], other.isFullBillingMonth)) {
467 this.isFullBillingMonth = (java.lang.Boolean) data().deepCopy(fields()[16].schema(), other.isFullBillingMonth);
468 fieldSetFlags()[16] = true;
470 if (isValidValue(fields()[17], other.walletEntries)) {
471 this.walletEntries = (java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg>) data().deepCopy(fields()[17].schema(), other.walletEntries);
472 fieldSetFlags()[17] = true;
476 /** Gets the value of the 'originalID' field */
477 public java.lang.String getOriginalID() {
481 /** Sets the value of the 'originalID' field */
482 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setOriginalID(java.lang.String value) {
483 validate(fields()[0], value);
484 this.originalID = value;
485 fieldSetFlags()[0] = true;
489 /** Checks whether the 'originalID' field has been set */
490 public boolean hasOriginalID() {
491 return fieldSetFlags()[0];
494 /** Clears the value of the 'originalID' field */
495 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearOriginalID() {
497 fieldSetFlags()[0] = false;
501 /** Gets the value of the 'inStoreID' field */
502 public java.lang.String getInStoreID() {
506 /** Sets the value of the 'inStoreID' field */
507 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setInStoreID(java.lang.String value) {
508 validate(fields()[1], value);
509 this.inStoreID = value;
510 fieldSetFlags()[1] = true;
514 /** Checks whether the 'inStoreID' field has been set */
515 public boolean hasInStoreID() {
516 return fieldSetFlags()[1];
519 /** Clears the value of the 'inStoreID' field */
520 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearInStoreID() {
522 fieldSetFlags()[1] = false;
526 /** Gets the value of the 'userID' field */
527 public java.lang.String getUserID() {
531 /** Sets the value of the 'userID' field */
532 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setUserID(java.lang.String value) {
533 validate(fields()[2], value);
535 fieldSetFlags()[2] = true;
539 /** Checks whether the 'userID' field has been set */
540 public boolean hasUserID() {
541 return fieldSetFlags()[2];
544 /** Clears the value of the 'userID' field */
545 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearUserID() {
547 fieldSetFlags()[2] = false;
551 /** Gets the value of the 'occurredMillis' field */
552 public java.lang.Long getOccurredMillis() {
553 return occurredMillis;
556 /** Sets the value of the 'occurredMillis' field */
557 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setOccurredMillis(long value) {
558 validate(fields()[3], value);
559 this.occurredMillis = value;
560 fieldSetFlags()[3] = true;
564 /** Checks whether the 'occurredMillis' field has been set */
565 public boolean hasOccurredMillis() {
566 return fieldSetFlags()[3];
569 /** Clears the value of the 'occurredMillis' field */
570 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearOccurredMillis() {
571 fieldSetFlags()[3] = false;
575 /** Gets the value of the 'parentOriginalID' field */
576 public java.lang.String getParentOriginalID() {
577 return parentOriginalID;
580 /** Sets the value of the 'parentOriginalID' field */
581 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setParentOriginalID(java.lang.String value) {
582 validate(fields()[4], value);
583 this.parentOriginalID = value;
584 fieldSetFlags()[4] = true;
588 /** Checks whether the 'parentOriginalID' field has been set */
589 public boolean hasParentOriginalID() {
590 return fieldSetFlags()[4];
593 /** Clears the value of the 'parentOriginalID' field */
594 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearParentOriginalID() {
595 parentOriginalID = null;
596 fieldSetFlags()[4] = false;
600 /** Gets the value of the 'parentInStoreID' field */
601 public java.lang.String getParentInStoreID() {
602 return parentInStoreID;
605 /** Sets the value of the 'parentInStoreID' field */
606 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setParentInStoreID(java.lang.String value) {
607 validate(fields()[5], value);
608 this.parentInStoreID = value;
609 fieldSetFlags()[5] = true;
613 /** Checks whether the 'parentInStoreID' field has been set */
614 public boolean hasParentInStoreID() {
615 return fieldSetFlags()[5];
618 /** Clears the value of the 'parentInStoreID' field */
619 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearParentInStoreID() {
620 parentInStoreID = null;
621 fieldSetFlags()[5] = false;
625 /** Gets the value of the 'resourceTypesMap' field */
626 public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourceTypeMsg> getResourceTypesMap() {
627 return resourceTypesMap;
630 /** Sets the value of the 'resourceTypesMap' field */
631 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setResourceTypesMap(java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourceTypeMsg> value) {
632 validate(fields()[6], value);
633 this.resourceTypesMap = value;
634 fieldSetFlags()[6] = true;
638 /** Checks whether the 'resourceTypesMap' field has been set */
639 public boolean hasResourceTypesMap() {
640 return fieldSetFlags()[6];
643 /** Clears the value of the 'resourceTypesMap' field */
644 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearResourceTypesMap() {
645 resourceTypesMap = null;
646 fieldSetFlags()[6] = false;
650 /** Gets the value of the 'stateOfResources' field */
651 public java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> getStateOfResources() {
652 return stateOfResources;
655 /** Sets the value of the 'stateOfResources' field */
656 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setStateOfResources(java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg> value) {
657 validate(fields()[7], value);
658 this.stateOfResources = value;
659 fieldSetFlags()[7] = true;
663 /** Checks whether the 'stateOfResources' field has been set */
664 public boolean hasStateOfResources() {
665 return fieldSetFlags()[7];
668 /** Clears the value of the 'stateOfResources' field */
669 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearStateOfResources() {
670 stateOfResources = null;
671 fieldSetFlags()[7] = false;
675 /** Gets the value of the 'totalCredits' field */
676 public java.lang.Double getTotalCredits() {
680 /** Sets the value of the 'totalCredits' field */
681 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setTotalCredits(double value) {
682 validate(fields()[8], value);
683 this.totalCredits = value;
684 fieldSetFlags()[8] = true;
688 /** Checks whether the 'totalCredits' field has been set */
689 public boolean hasTotalCredits() {
690 return fieldSetFlags()[8];
693 /** Clears the value of the 'totalCredits' field */
694 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearTotalCredits() {
695 fieldSetFlags()[8] = false;
699 /** Gets the value of the 'agreementHistory' field */
700 public gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg getAgreementHistory() {
701 return agreementHistory;
704 /** Sets the value of the 'agreementHistory' field */
705 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setAgreementHistory(gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg value) {
706 validate(fields()[9], value);
707 this.agreementHistory = value;
708 fieldSetFlags()[9] = true;
712 /** Checks whether the 'agreementHistory' field has been set */
713 public boolean hasAgreementHistory() {
714 return fieldSetFlags()[9];
717 /** Clears the value of the 'agreementHistory' field */
718 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearAgreementHistory() {
719 agreementHistory = null;
720 fieldSetFlags()[9] = false;
724 /** Gets the value of the 'latestUpdateMillis' field */
725 public java.lang.Long getLatestUpdateMillis() {
726 return latestUpdateMillis;
729 /** Sets the value of the 'latestUpdateMillis' field */
730 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setLatestUpdateMillis(long value) {
731 validate(fields()[10], value);
732 this.latestUpdateMillis = value;
733 fieldSetFlags()[10] = true;
737 /** Checks whether the 'latestUpdateMillis' field has been set */
738 public boolean hasLatestUpdateMillis() {
739 return fieldSetFlags()[10];
742 /** Clears the value of the 'latestUpdateMillis' field */
743 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearLatestUpdateMillis() {
744 fieldSetFlags()[10] = false;
748 /** Gets the value of the 'latestResourceEventOccurredMillis' field */
749 public java.lang.Long getLatestResourceEventOccurredMillis() {
750 return latestResourceEventOccurredMillis;
753 /** Sets the value of the 'latestResourceEventOccurredMillis' field */
754 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setLatestResourceEventOccurredMillis(long value) {
755 validate(fields()[11], value);
756 this.latestResourceEventOccurredMillis = value;
757 fieldSetFlags()[11] = true;
761 /** Checks whether the 'latestResourceEventOccurredMillis' field has been set */
762 public boolean hasLatestResourceEventOccurredMillis() {
763 return fieldSetFlags()[11];
766 /** Clears the value of the 'latestResourceEventOccurredMillis' field */
767 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearLatestResourceEventOccurredMillis() {
768 fieldSetFlags()[11] = false;
772 /** Gets the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field */
773 public java.lang.Long getBillingPeriodOutOfSyncResourceEventsCounter() {
774 return billingPeriodOutOfSyncResourceEventsCounter;
777 /** Sets the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field */
778 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setBillingPeriodOutOfSyncResourceEventsCounter(long value) {
779 validate(fields()[12], value);
780 this.billingPeriodOutOfSyncResourceEventsCounter = value;
781 fieldSetFlags()[12] = true;
785 /** Checks whether the 'billingPeriodOutOfSyncResourceEventsCounter' field has been set */
786 public boolean hasBillingPeriodOutOfSyncResourceEventsCounter() {
787 return fieldSetFlags()[12];
790 /** Clears the value of the 'billingPeriodOutOfSyncResourceEventsCounter' field */
791 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearBillingPeriodOutOfSyncResourceEventsCounter() {
792 fieldSetFlags()[12] = false;
796 /** Gets the value of the 'billingYear' field */
797 public java.lang.Integer getBillingYear() {
801 /** Sets the value of the 'billingYear' field */
802 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setBillingYear(int value) {
803 validate(fields()[13], value);
804 this.billingYear = value;
805 fieldSetFlags()[13] = true;
809 /** Checks whether the 'billingYear' field has been set */
810 public boolean hasBillingYear() {
811 return fieldSetFlags()[13];
814 /** Clears the value of the 'billingYear' field */
815 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearBillingYear() {
816 fieldSetFlags()[13] = false;
820 /** Gets the value of the 'billingMonth' field */
821 public java.lang.Integer getBillingMonth() {
825 /** Sets the value of the 'billingMonth' field */
826 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setBillingMonth(int value) {
827 validate(fields()[14], value);
828 this.billingMonth = value;
829 fieldSetFlags()[14] = true;
833 /** Checks whether the 'billingMonth' field has been set */
834 public boolean hasBillingMonth() {
835 return fieldSetFlags()[14];
838 /** Clears the value of the 'billingMonth' field */
839 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearBillingMonth() {
840 fieldSetFlags()[14] = false;
844 /** Gets the value of the 'billingMonthDay' field */
845 public java.lang.Integer getBillingMonthDay() {
846 return billingMonthDay;
849 /** Sets the value of the 'billingMonthDay' field */
850 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setBillingMonthDay(int value) {
851 validate(fields()[15], value);
852 this.billingMonthDay = value;
853 fieldSetFlags()[15] = true;
857 /** Checks whether the 'billingMonthDay' field has been set */
858 public boolean hasBillingMonthDay() {
859 return fieldSetFlags()[15];
862 /** Clears the value of the 'billingMonthDay' field */
863 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearBillingMonthDay() {
864 fieldSetFlags()[15] = false;
868 /** Gets the value of the 'isFullBillingMonth' field */
869 public java.lang.Boolean getIsFullBillingMonth() {
870 return isFullBillingMonth;
873 /** Sets the value of the 'isFullBillingMonth' field */
874 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setIsFullBillingMonth(boolean value) {
875 validate(fields()[16], value);
876 this.isFullBillingMonth = value;
877 fieldSetFlags()[16] = true;
881 /** Checks whether the 'isFullBillingMonth' field has been set */
882 public boolean hasIsFullBillingMonth() {
883 return fieldSetFlags()[16];
886 /** Clears the value of the 'isFullBillingMonth' field */
887 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearIsFullBillingMonth() {
888 fieldSetFlags()[16] = false;
892 /** Gets the value of the 'walletEntries' field */
893 public java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> getWalletEntries() {
894 return walletEntries;
897 /** Sets the value of the 'walletEntries' field */
898 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder setWalletEntries(java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg> value) {
899 validate(fields()[17], value);
900 this.walletEntries = value;
901 fieldSetFlags()[17] = true;
905 /** Checks whether the 'walletEntries' field has been set */
906 public boolean hasWalletEntries() {
907 return fieldSetFlags()[17];
910 /** Clears the value of the 'walletEntries' field */
911 public gr.grnet.aquarium.message.avro.gen.UserStateMsg.Builder clearWalletEntries() {
912 walletEntries = null;
913 fieldSetFlags()[17] = false;
918 public UserStateMsg build() {
920 UserStateMsg record = new UserStateMsg();
921 record.originalID = fieldSetFlags()[0] ? this.originalID : (java.lang.String) defaultValue(fields()[0]);
922 record.inStoreID = fieldSetFlags()[1] ? this.inStoreID : (java.lang.String) defaultValue(fields()[1]);
923 record.userID = fieldSetFlags()[2] ? this.userID : (java.lang.String) defaultValue(fields()[2]);
924 record.occurredMillis = fieldSetFlags()[3] ? this.occurredMillis : (java.lang.Long) defaultValue(fields()[3]);
925 record.parentOriginalID = fieldSetFlags()[4] ? this.parentOriginalID : (java.lang.String) defaultValue(fields()[4]);
926 record.parentInStoreID = fieldSetFlags()[5] ? this.parentInStoreID : (java.lang.String) defaultValue(fields()[5]);
927 record.resourceTypesMap = fieldSetFlags()[6] ? this.resourceTypesMap : (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourceTypeMsg>) defaultValue(fields()[6]);
928 record.stateOfResources = fieldSetFlags()[7] ? this.stateOfResources : (java.util.Map<java.lang.String,gr.grnet.aquarium.message.avro.gen.ResourcesChargingStateMsg>) defaultValue(fields()[7]);
929 record.totalCredits = fieldSetFlags()[8] ? this.totalCredits : (java.lang.Double) defaultValue(fields()[8]);
930 record.agreementHistory = fieldSetFlags()[9] ? this.agreementHistory : (gr.grnet.aquarium.message.avro.gen.UserAgreementHistoryMsg) defaultValue(fields()[9]);
931 record.latestUpdateMillis = fieldSetFlags()[10] ? this.latestUpdateMillis : (java.lang.Long) defaultValue(fields()[10]);
932 record.latestResourceEventOccurredMillis = fieldSetFlags()[11] ? this.latestResourceEventOccurredMillis : (java.lang.Long) defaultValue(fields()[11]);
933 record.billingPeriodOutOfSyncResourceEventsCounter = fieldSetFlags()[12] ? this.billingPeriodOutOfSyncResourceEventsCounter : (java.lang.Long) defaultValue(fields()[12]);
934 record.billingYear = fieldSetFlags()[13] ? this.billingYear : (java.lang.Integer) defaultValue(fields()[13]);
935 record.billingMonth = fieldSetFlags()[14] ? this.billingMonth : (java.lang.Integer) defaultValue(fields()[14]);
936 record.billingMonthDay = fieldSetFlags()[15] ? this.billingMonthDay : (java.lang.Integer) defaultValue(fields()[15]);
937 record.isFullBillingMonth = fieldSetFlags()[16] ? this.isFullBillingMonth : (java.lang.Boolean) defaultValue(fields()[16]);
938 record.walletEntries = fieldSetFlags()[17] ? this.walletEntries : (java.util.List<gr.grnet.aquarium.message.avro.gen.WalletEntryMsg>) defaultValue(fields()[17]);
940 } catch (Exception e) {
941 throw new org.apache.avro.AvroRuntimeException(e);