2 * Autogenerated by Avro
6 package gr.grnet.aquarium.message.avro.gen;
7 @SuppressWarnings("all")
8 public class UserAgreementMsg 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\":\"UserAgreementMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"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\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"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\":{\"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\"}}]},\"null\"]}]}");
10 @Deprecated public java.lang.String id;
11 @Deprecated public java.lang.String relatedIMEventOriginalID;
12 @Deprecated public java.lang.String userID;
13 @Deprecated public long occurredMillis;
14 @Deprecated public long validFromMillis;
15 @Deprecated public long validToMillis;
16 @Deprecated public java.lang.String role;
17 @Deprecated public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg fullPriceTableRef;
18 @Deprecated public gr.grnet.aquarium.message.avro.gen.IMEventMsg relatedIMEventMsg;
21 * Default constructor.
23 public UserAgreementMsg() {}
26 * All-args constructor.
28 public UserAgreementMsg(java.lang.String id, java.lang.String relatedIMEventOriginalID, java.lang.String userID, java.lang.Long occurredMillis, java.lang.Long validFromMillis, java.lang.Long validToMillis, java.lang.String role, gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg fullPriceTableRef, gr.grnet.aquarium.message.avro.gen.IMEventMsg relatedIMEventMsg) {
30 this.relatedIMEventOriginalID = relatedIMEventOriginalID;
32 this.occurredMillis = occurredMillis;
33 this.validFromMillis = validFromMillis;
34 this.validToMillis = validToMillis;
36 this.fullPriceTableRef = fullPriceTableRef;
37 this.relatedIMEventMsg = relatedIMEventMsg;
40 public org.apache.avro.Schema getSchema() { return SCHEMA$; }
41 // Used by DatumWriter. Applications should not call.
42 public java.lang.Object get(int field$) {
45 case 1: return relatedIMEventOriginalID;
46 case 2: return userID;
47 case 3: return occurredMillis;
48 case 4: return validFromMillis;
49 case 5: return validToMillis;
51 case 7: return fullPriceTableRef;
52 case 8: return relatedIMEventMsg;
53 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
56 // Used by DatumReader. Applications should not call.
57 @SuppressWarnings(value="unchecked")
58 public void put(int field$, java.lang.Object value$) {
60 case 0: id = (java.lang.String)value$; break;
61 case 1: relatedIMEventOriginalID = (java.lang.String)value$; break;
62 case 2: userID = (java.lang.String)value$; break;
63 case 3: occurredMillis = (java.lang.Long)value$; break;
64 case 4: validFromMillis = (java.lang.Long)value$; break;
65 case 5: validToMillis = (java.lang.Long)value$; break;
66 case 6: role = (java.lang.String)value$; break;
67 case 7: fullPriceTableRef = (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg)value$; break;
68 case 8: relatedIMEventMsg = (gr.grnet.aquarium.message.avro.gen.IMEventMsg)value$; break;
69 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
74 * Gets the value of the 'id' field.
76 public java.lang.String getId() {
81 * Sets the value of the 'id' field.
82 * @param value the value to set.
84 public void setId(java.lang.String value) {
89 * Gets the value of the 'relatedIMEventOriginalID' field.
91 public java.lang.String getRelatedIMEventOriginalID() {
92 return relatedIMEventOriginalID;
96 * Sets the value of the 'relatedIMEventOriginalID' field.
97 * @param value the value to set.
99 public void setRelatedIMEventOriginalID(java.lang.String value) {
100 this.relatedIMEventOriginalID = value;
104 * Gets the value of the 'userID' field.
106 public java.lang.String getUserID() {
111 * Sets the value of the 'userID' field.
112 * @param value the value to set.
114 public void setUserID(java.lang.String value) {
119 * Gets the value of the 'occurredMillis' field.
121 public java.lang.Long getOccurredMillis() {
122 return occurredMillis;
126 * Sets the value of the 'occurredMillis' field.
127 * @param value the value to set.
129 public void setOccurredMillis(java.lang.Long value) {
130 this.occurredMillis = value;
134 * Gets the value of the 'validFromMillis' field.
136 public java.lang.Long getValidFromMillis() {
137 return validFromMillis;
141 * Sets the value of the 'validFromMillis' field.
142 * @param value the value to set.
144 public void setValidFromMillis(java.lang.Long value) {
145 this.validFromMillis = value;
149 * Gets the value of the 'validToMillis' field.
151 public java.lang.Long getValidToMillis() {
152 return validToMillis;
156 * Sets the value of the 'validToMillis' field.
157 * @param value the value to set.
159 public void setValidToMillis(java.lang.Long value) {
160 this.validToMillis = value;
164 * Gets the value of the 'role' field.
166 public java.lang.String getRole() {
171 * Sets the value of the 'role' field.
172 * @param value the value to set.
174 public void setRole(java.lang.String value) {
179 * Gets the value of the 'fullPriceTableRef' field.
181 public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg getFullPriceTableRef() {
182 return fullPriceTableRef;
186 * Sets the value of the 'fullPriceTableRef' field.
187 * @param value the value to set.
189 public void setFullPriceTableRef(gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg value) {
190 this.fullPriceTableRef = value;
194 * Gets the value of the 'relatedIMEventMsg' field.
196 public gr.grnet.aquarium.message.avro.gen.IMEventMsg getRelatedIMEventMsg() {
197 return relatedIMEventMsg;
201 * Sets the value of the 'relatedIMEventMsg' field.
202 * @param value the value to set.
204 public void setRelatedIMEventMsg(gr.grnet.aquarium.message.avro.gen.IMEventMsg value) {
205 this.relatedIMEventMsg = value;
208 /** Creates a new UserAgreementMsg RecordBuilder */
209 public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder() {
210 return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder();
213 /** Creates a new UserAgreementMsg RecordBuilder by copying an existing Builder */
214 public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder other) {
215 return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder(other);
218 /** Creates a new UserAgreementMsg RecordBuilder by copying an existing UserAgreementMsg instance */
219 public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg other) {
220 return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder(other);
224 * RecordBuilder for UserAgreementMsg instances.
226 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<UserAgreementMsg>
227 implements org.apache.avro.data.RecordBuilder<UserAgreementMsg> {
229 private java.lang.String id;
230 private java.lang.String relatedIMEventOriginalID;
231 private java.lang.String userID;
232 private long occurredMillis;
233 private long validFromMillis;
234 private long validToMillis;
235 private java.lang.String role;
236 private gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg fullPriceTableRef;
237 private gr.grnet.aquarium.message.avro.gen.IMEventMsg relatedIMEventMsg;
239 /** Creates a new Builder */
241 super(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.SCHEMA$);
244 /** Creates a Builder by copying an existing Builder */
245 private Builder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder other) {
249 /** Creates a Builder by copying an existing UserAgreementMsg instance */
250 private Builder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg other) {
251 super(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.SCHEMA$);
252 if (isValidValue(fields()[0], other.id)) {
253 this.id = (java.lang.String) data().deepCopy(fields()[0].schema(), other.id);
254 fieldSetFlags()[0] = true;
256 if (isValidValue(fields()[1], other.relatedIMEventOriginalID)) {
257 this.relatedIMEventOriginalID = (java.lang.String) data().deepCopy(fields()[1].schema(), other.relatedIMEventOriginalID);
258 fieldSetFlags()[1] = true;
260 if (isValidValue(fields()[2], other.userID)) {
261 this.userID = (java.lang.String) data().deepCopy(fields()[2].schema(), other.userID);
262 fieldSetFlags()[2] = true;
264 if (isValidValue(fields()[3], other.occurredMillis)) {
265 this.occurredMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.occurredMillis);
266 fieldSetFlags()[3] = true;
268 if (isValidValue(fields()[4], other.validFromMillis)) {
269 this.validFromMillis = (java.lang.Long) data().deepCopy(fields()[4].schema(), other.validFromMillis);
270 fieldSetFlags()[4] = true;
272 if (isValidValue(fields()[5], other.validToMillis)) {
273 this.validToMillis = (java.lang.Long) data().deepCopy(fields()[5].schema(), other.validToMillis);
274 fieldSetFlags()[5] = true;
276 if (isValidValue(fields()[6], other.role)) {
277 this.role = (java.lang.String) data().deepCopy(fields()[6].schema(), other.role);
278 fieldSetFlags()[6] = true;
280 if (isValidValue(fields()[7], other.fullPriceTableRef)) {
281 this.fullPriceTableRef = (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg) data().deepCopy(fields()[7].schema(), other.fullPriceTableRef);
282 fieldSetFlags()[7] = true;
284 if (isValidValue(fields()[8], other.relatedIMEventMsg)) {
285 this.relatedIMEventMsg = (gr.grnet.aquarium.message.avro.gen.IMEventMsg) data().deepCopy(fields()[8].schema(), other.relatedIMEventMsg);
286 fieldSetFlags()[8] = true;
290 /** Gets the value of the 'id' field */
291 public java.lang.String getId() {
295 /** Sets the value of the 'id' field */
296 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setId(java.lang.String value) {
297 validate(fields()[0], value);
299 fieldSetFlags()[0] = true;
303 /** Checks whether the 'id' field has been set */
304 public boolean hasId() {
305 return fieldSetFlags()[0];
308 /** Clears the value of the 'id' field */
309 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearId() {
311 fieldSetFlags()[0] = false;
315 /** Gets the value of the 'relatedIMEventOriginalID' field */
316 public java.lang.String getRelatedIMEventOriginalID() {
317 return relatedIMEventOriginalID;
320 /** Sets the value of the 'relatedIMEventOriginalID' field */
321 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRelatedIMEventOriginalID(java.lang.String value) {
322 validate(fields()[1], value);
323 this.relatedIMEventOriginalID = value;
324 fieldSetFlags()[1] = true;
328 /** Checks whether the 'relatedIMEventOriginalID' field has been set */
329 public boolean hasRelatedIMEventOriginalID() {
330 return fieldSetFlags()[1];
333 /** Clears the value of the 'relatedIMEventOriginalID' field */
334 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRelatedIMEventOriginalID() {
335 relatedIMEventOriginalID = null;
336 fieldSetFlags()[1] = false;
340 /** Gets the value of the 'userID' field */
341 public java.lang.String getUserID() {
345 /** Sets the value of the 'userID' field */
346 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setUserID(java.lang.String value) {
347 validate(fields()[2], value);
349 fieldSetFlags()[2] = true;
353 /** Checks whether the 'userID' field has been set */
354 public boolean hasUserID() {
355 return fieldSetFlags()[2];
358 /** Clears the value of the 'userID' field */
359 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearUserID() {
361 fieldSetFlags()[2] = false;
365 /** Gets the value of the 'occurredMillis' field */
366 public java.lang.Long getOccurredMillis() {
367 return occurredMillis;
370 /** Sets the value of the 'occurredMillis' field */
371 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setOccurredMillis(long value) {
372 validate(fields()[3], value);
373 this.occurredMillis = value;
374 fieldSetFlags()[3] = true;
378 /** Checks whether the 'occurredMillis' field has been set */
379 public boolean hasOccurredMillis() {
380 return fieldSetFlags()[3];
383 /** Clears the value of the 'occurredMillis' field */
384 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearOccurredMillis() {
385 fieldSetFlags()[3] = false;
389 /** Gets the value of the 'validFromMillis' field */
390 public java.lang.Long getValidFromMillis() {
391 return validFromMillis;
394 /** Sets the value of the 'validFromMillis' field */
395 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setValidFromMillis(long value) {
396 validate(fields()[4], value);
397 this.validFromMillis = value;
398 fieldSetFlags()[4] = true;
402 /** Checks whether the 'validFromMillis' field has been set */
403 public boolean hasValidFromMillis() {
404 return fieldSetFlags()[4];
407 /** Clears the value of the 'validFromMillis' field */
408 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearValidFromMillis() {
409 fieldSetFlags()[4] = false;
413 /** Gets the value of the 'validToMillis' field */
414 public java.lang.Long getValidToMillis() {
415 return validToMillis;
418 /** Sets the value of the 'validToMillis' field */
419 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setValidToMillis(long value) {
420 validate(fields()[5], value);
421 this.validToMillis = value;
422 fieldSetFlags()[5] = true;
426 /** Checks whether the 'validToMillis' field has been set */
427 public boolean hasValidToMillis() {
428 return fieldSetFlags()[5];
431 /** Clears the value of the 'validToMillis' field */
432 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearValidToMillis() {
433 fieldSetFlags()[5] = false;
437 /** Gets the value of the 'role' field */
438 public java.lang.String getRole() {
442 /** Sets the value of the 'role' field */
443 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRole(java.lang.String value) {
444 validate(fields()[6], value);
446 fieldSetFlags()[6] = true;
450 /** Checks whether the 'role' field has been set */
451 public boolean hasRole() {
452 return fieldSetFlags()[6];
455 /** Clears the value of the 'role' field */
456 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRole() {
458 fieldSetFlags()[6] = false;
462 /** Gets the value of the 'fullPriceTableRef' field */
463 public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg getFullPriceTableRef() {
464 return fullPriceTableRef;
467 /** Sets the value of the 'fullPriceTableRef' field */
468 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setFullPriceTableRef(gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg value) {
469 validate(fields()[7], value);
470 this.fullPriceTableRef = value;
471 fieldSetFlags()[7] = true;
475 /** Checks whether the 'fullPriceTableRef' field has been set */
476 public boolean hasFullPriceTableRef() {
477 return fieldSetFlags()[7];
480 /** Clears the value of the 'fullPriceTableRef' field */
481 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearFullPriceTableRef() {
482 fullPriceTableRef = null;
483 fieldSetFlags()[7] = false;
487 /** Gets the value of the 'relatedIMEventMsg' field */
488 public gr.grnet.aquarium.message.avro.gen.IMEventMsg getRelatedIMEventMsg() {
489 return relatedIMEventMsg;
492 /** Sets the value of the 'relatedIMEventMsg' field */
493 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRelatedIMEventMsg(gr.grnet.aquarium.message.avro.gen.IMEventMsg value) {
494 validate(fields()[8], value);
495 this.relatedIMEventMsg = value;
496 fieldSetFlags()[8] = true;
500 /** Checks whether the 'relatedIMEventMsg' field has been set */
501 public boolean hasRelatedIMEventMsg() {
502 return fieldSetFlags()[8];
505 /** Clears the value of the 'relatedIMEventMsg' field */
506 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRelatedIMEventMsg() {
507 relatedIMEventMsg = null;
508 fieldSetFlags()[8] = false;
513 public UserAgreementMsg build() {
515 UserAgreementMsg record = new UserAgreementMsg();
516 record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]);
517 record.relatedIMEventOriginalID = fieldSetFlags()[1] ? this.relatedIMEventOriginalID : (java.lang.String) defaultValue(fields()[1]);
518 record.userID = fieldSetFlags()[2] ? this.userID : (java.lang.String) defaultValue(fields()[2]);
519 record.occurredMillis = fieldSetFlags()[3] ? this.occurredMillis : (java.lang.Long) defaultValue(fields()[3]);
520 record.validFromMillis = fieldSetFlags()[4] ? this.validFromMillis : (java.lang.Long) defaultValue(fields()[4]);
521 record.validToMillis = fieldSetFlags()[5] ? this.validToMillis : (java.lang.Long) defaultValue(fields()[5]);
522 record.role = fieldSetFlags()[6] ? this.role : (java.lang.String) defaultValue(fields()[6]);
523 record.fullPriceTableRef = fieldSetFlags()[7] ? this.fullPriceTableRef : (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg) defaultValue(fields()[7]);
524 record.relatedIMEventMsg = fieldSetFlags()[8] ? this.relatedIMEventMsg : (gr.grnet.aquarium.message.avro.gen.IMEventMsg) defaultValue(fields()[8]);
526 } catch (Exception e) {
527 throw new org.apache.avro.AvroRuntimeException(e);