2 * Autogenerated by Avro
6 package gr.grnet.aquarium.message.avro.gen;
7 @SuppressWarnings("all")
8 public class _ResourceEvent 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\":\"_ResourceEvent\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"id\",\"type\":\"string\",\"aliases\":[\"originalID\",\"ID\"]},{\"name\":\"idInStore\",\"type\":\"string\"},{\"name\":\"occurredMillis\",\"type\":\"long\"},{\"name\":\"receivedMillis\",\"type\":\"long\",\"default\":0},{\"name\":\"userID\",\"type\":\"string\"},{\"name\":\"clientID\",\"type\":\"string\"},{\"name\":\"eventVersion\",\"type\":\"string\",\"default\":\"1.0\"},{\"name\":\"resource\",\"type\":\"string\",\"aliases\":[\"resourceType\"]},{\"name\":\"instanceID\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"_AnyValue\",\"fields\":[{\"name\":\"anyValue\",\"type\":[\"null\",\"int\",\"long\",\"boolean\",\"double\",\"bytes\",\"string\"]}]}}}]}");
10 @Deprecated public java.lang.CharSequence id;
11 @Deprecated public java.lang.CharSequence idInStore;
12 @Deprecated public long occurredMillis;
13 @Deprecated public long receivedMillis;
14 @Deprecated public java.lang.CharSequence userID;
15 @Deprecated public java.lang.CharSequence clientID;
16 @Deprecated public java.lang.CharSequence eventVersion;
17 @Deprecated public java.lang.CharSequence resource;
18 @Deprecated public java.lang.CharSequence instanceID;
19 @Deprecated public java.lang.CharSequence value;
20 @Deprecated public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> details;
21 public org.apache.avro.Schema getSchema() { return SCHEMA$; }
22 // Used by DatumWriter. Applications should not call.
23 public java.lang.Object get(int field$) {
26 case 1: return idInStore;
27 case 2: return occurredMillis;
28 case 3: return receivedMillis;
29 case 4: return userID;
30 case 5: return clientID;
31 case 6: return eventVersion;
32 case 7: return resource;
33 case 8: return instanceID;
35 case 10: return details;
36 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
39 // Used by DatumReader. Applications should not call.
40 @SuppressWarnings(value="unchecked")
41 public void put(int field$, java.lang.Object value$) {
43 case 0: id = (java.lang.CharSequence)value$; break;
44 case 1: idInStore = (java.lang.CharSequence)value$; break;
45 case 2: occurredMillis = (java.lang.Long)value$; break;
46 case 3: receivedMillis = (java.lang.Long)value$; break;
47 case 4: userID = (java.lang.CharSequence)value$; break;
48 case 5: clientID = (java.lang.CharSequence)value$; break;
49 case 6: eventVersion = (java.lang.CharSequence)value$; break;
50 case 7: resource = (java.lang.CharSequence)value$; break;
51 case 8: instanceID = (java.lang.CharSequence)value$; break;
52 case 9: value = (java.lang.CharSequence)value$; break;
53 case 10: details = (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue>)value$; break;
54 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
59 * Gets the value of the 'id' field.
61 public java.lang.CharSequence getId() {
66 * Sets the value of the 'id' field.
67 * @param value the value to set.
69 public void setId(java.lang.CharSequence value) {
74 * Gets the value of the 'idInStore' field.
76 public java.lang.CharSequence getIdInStore() {
81 * Sets the value of the 'idInStore' field.
82 * @param value the value to set.
84 public void setIdInStore(java.lang.CharSequence value) {
85 this.idInStore = value;
89 * Gets the value of the 'occurredMillis' field.
91 public java.lang.Long getOccurredMillis() {
92 return occurredMillis;
96 * Sets the value of the 'occurredMillis' field.
97 * @param value the value to set.
99 public void setOccurredMillis(java.lang.Long value) {
100 this.occurredMillis = value;
104 * Gets the value of the 'receivedMillis' field.
106 public java.lang.Long getReceivedMillis() {
107 return receivedMillis;
111 * Sets the value of the 'receivedMillis' field.
112 * @param value the value to set.
114 public void setReceivedMillis(java.lang.Long value) {
115 this.receivedMillis = value;
119 * Gets the value of the 'userID' field.
121 public java.lang.CharSequence getUserID() {
126 * Sets the value of the 'userID' field.
127 * @param value the value to set.
129 public void setUserID(java.lang.CharSequence value) {
134 * Gets the value of the 'clientID' field.
136 public java.lang.CharSequence getClientID() {
141 * Sets the value of the 'clientID' field.
142 * @param value the value to set.
144 public void setClientID(java.lang.CharSequence value) {
145 this.clientID = value;
149 * Gets the value of the 'eventVersion' field.
151 public java.lang.CharSequence getEventVersion() {
156 * Sets the value of the 'eventVersion' field.
157 * @param value the value to set.
159 public void setEventVersion(java.lang.CharSequence value) {
160 this.eventVersion = value;
164 * Gets the value of the 'resource' field.
166 public java.lang.CharSequence getResource() {
171 * Sets the value of the 'resource' field.
172 * @param value the value to set.
174 public void setResource(java.lang.CharSequence value) {
175 this.resource = value;
179 * Gets the value of the 'instanceID' field.
181 public java.lang.CharSequence getInstanceID() {
186 * Sets the value of the 'instanceID' field.
187 * @param value the value to set.
189 public void setInstanceID(java.lang.CharSequence value) {
190 this.instanceID = value;
194 * Gets the value of the 'value' field.
196 public java.lang.CharSequence getValue() {
201 * Sets the value of the 'value' field.
202 * @param value the value to set.
204 public void setValue(java.lang.CharSequence value) {
209 * Gets the value of the 'details' field.
211 public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> getDetails() {
216 * Sets the value of the 'details' field.
217 * @param value the value to set.
219 public void setDetails(java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> value) {
220 this.details = value;
223 /** Creates a new _ResourceEvent RecordBuilder */
224 public static gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder newBuilder() {
225 return new gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder();
228 /** Creates a new _ResourceEvent RecordBuilder by copying an existing Builder */
229 public static gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder other) {
230 return new gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder(other);
233 /** Creates a new _ResourceEvent RecordBuilder by copying an existing _ResourceEvent instance */
234 public static gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._ResourceEvent other) {
235 return new gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder(other);
239 * RecordBuilder for _ResourceEvent instances.
241 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<_ResourceEvent>
242 implements org.apache.avro.data.RecordBuilder<_ResourceEvent> {
244 private java.lang.CharSequence id;
245 private java.lang.CharSequence idInStore;
246 private long occurredMillis;
247 private long receivedMillis;
248 private java.lang.CharSequence userID;
249 private java.lang.CharSequence clientID;
250 private java.lang.CharSequence eventVersion;
251 private java.lang.CharSequence resource;
252 private java.lang.CharSequence instanceID;
253 private java.lang.CharSequence value;
254 private java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> details;
256 /** Creates a new Builder */
258 super(gr.grnet.aquarium.message.avro.gen._ResourceEvent.SCHEMA$);
261 /** Creates a Builder by copying an existing Builder */
262 private Builder(gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder other) {
266 /** Creates a Builder by copying an existing _ResourceEvent instance */
267 private Builder(gr.grnet.aquarium.message.avro.gen._ResourceEvent other) {
268 super(gr.grnet.aquarium.message.avro.gen._ResourceEvent.SCHEMA$);
269 if (isValidValue(fields()[0], other.id)) {
270 this.id = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.id);
271 fieldSetFlags()[0] = true;
273 if (isValidValue(fields()[1], other.idInStore)) {
274 this.idInStore = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.idInStore);
275 fieldSetFlags()[1] = true;
277 if (isValidValue(fields()[2], other.occurredMillis)) {
278 this.occurredMillis = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.occurredMillis);
279 fieldSetFlags()[2] = true;
281 if (isValidValue(fields()[3], other.receivedMillis)) {
282 this.receivedMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.receivedMillis);
283 fieldSetFlags()[3] = true;
285 if (isValidValue(fields()[4], other.userID)) {
286 this.userID = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.userID);
287 fieldSetFlags()[4] = true;
289 if (isValidValue(fields()[5], other.clientID)) {
290 this.clientID = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.clientID);
291 fieldSetFlags()[5] = true;
293 if (isValidValue(fields()[6], other.eventVersion)) {
294 this.eventVersion = (java.lang.CharSequence) data().deepCopy(fields()[6].schema(), other.eventVersion);
295 fieldSetFlags()[6] = true;
297 if (isValidValue(fields()[7], other.resource)) {
298 this.resource = (java.lang.CharSequence) data().deepCopy(fields()[7].schema(), other.resource);
299 fieldSetFlags()[7] = true;
301 if (isValidValue(fields()[8], other.instanceID)) {
302 this.instanceID = (java.lang.CharSequence) data().deepCopy(fields()[8].schema(), other.instanceID);
303 fieldSetFlags()[8] = true;
305 if (isValidValue(fields()[9], other.value)) {
306 this.value = (java.lang.CharSequence) data().deepCopy(fields()[9].schema(), other.value);
307 fieldSetFlags()[9] = true;
309 if (isValidValue(fields()[10], other.details)) {
310 this.details = (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue>) data().deepCopy(fields()[10].schema(), other.details);
311 fieldSetFlags()[10] = true;
315 /** Gets the value of the 'id' field */
316 public java.lang.CharSequence getId() {
320 /** Sets the value of the 'id' field */
321 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setId(java.lang.CharSequence value) {
322 validate(fields()[0], value);
324 fieldSetFlags()[0] = true;
328 /** Checks whether the 'id' field has been set */
329 public boolean hasId() {
330 return fieldSetFlags()[0];
333 /** Clears the value of the 'id' field */
334 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearId() {
336 fieldSetFlags()[0] = false;
340 /** Gets the value of the 'idInStore' field */
341 public java.lang.CharSequence getIdInStore() {
345 /** Sets the value of the 'idInStore' field */
346 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setIdInStore(java.lang.CharSequence value) {
347 validate(fields()[1], value);
348 this.idInStore = value;
349 fieldSetFlags()[1] = true;
353 /** Checks whether the 'idInStore' field has been set */
354 public boolean hasIdInStore() {
355 return fieldSetFlags()[1];
358 /** Clears the value of the 'idInStore' field */
359 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearIdInStore() {
361 fieldSetFlags()[1] = 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._ResourceEvent.Builder setOccurredMillis(long value) {
372 validate(fields()[2], value);
373 this.occurredMillis = value;
374 fieldSetFlags()[2] = true;
378 /** Checks whether the 'occurredMillis' field has been set */
379 public boolean hasOccurredMillis() {
380 return fieldSetFlags()[2];
383 /** Clears the value of the 'occurredMillis' field */
384 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearOccurredMillis() {
385 fieldSetFlags()[2] = false;
389 /** Gets the value of the 'receivedMillis' field */
390 public java.lang.Long getReceivedMillis() {
391 return receivedMillis;
394 /** Sets the value of the 'receivedMillis' field */
395 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setReceivedMillis(long value) {
396 validate(fields()[3], value);
397 this.receivedMillis = value;
398 fieldSetFlags()[3] = true;
402 /** Checks whether the 'receivedMillis' field has been set */
403 public boolean hasReceivedMillis() {
404 return fieldSetFlags()[3];
407 /** Clears the value of the 'receivedMillis' field */
408 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearReceivedMillis() {
409 fieldSetFlags()[3] = false;
413 /** Gets the value of the 'userID' field */
414 public java.lang.CharSequence getUserID() {
418 /** Sets the value of the 'userID' field */
419 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setUserID(java.lang.CharSequence value) {
420 validate(fields()[4], value);
422 fieldSetFlags()[4] = true;
426 /** Checks whether the 'userID' field has been set */
427 public boolean hasUserID() {
428 return fieldSetFlags()[4];
431 /** Clears the value of the 'userID' field */
432 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearUserID() {
434 fieldSetFlags()[4] = false;
438 /** Gets the value of the 'clientID' field */
439 public java.lang.CharSequence getClientID() {
443 /** Sets the value of the 'clientID' field */
444 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setClientID(java.lang.CharSequence value) {
445 validate(fields()[5], value);
446 this.clientID = value;
447 fieldSetFlags()[5] = true;
451 /** Checks whether the 'clientID' field has been set */
452 public boolean hasClientID() {
453 return fieldSetFlags()[5];
456 /** Clears the value of the 'clientID' field */
457 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearClientID() {
459 fieldSetFlags()[5] = false;
463 /** Gets the value of the 'eventVersion' field */
464 public java.lang.CharSequence getEventVersion() {
468 /** Sets the value of the 'eventVersion' field */
469 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setEventVersion(java.lang.CharSequence value) {
470 validate(fields()[6], value);
471 this.eventVersion = value;
472 fieldSetFlags()[6] = true;
476 /** Checks whether the 'eventVersion' field has been set */
477 public boolean hasEventVersion() {
478 return fieldSetFlags()[6];
481 /** Clears the value of the 'eventVersion' field */
482 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearEventVersion() {
484 fieldSetFlags()[6] = false;
488 /** Gets the value of the 'resource' field */
489 public java.lang.CharSequence getResource() {
493 /** Sets the value of the 'resource' field */
494 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setResource(java.lang.CharSequence value) {
495 validate(fields()[7], value);
496 this.resource = value;
497 fieldSetFlags()[7] = true;
501 /** Checks whether the 'resource' field has been set */
502 public boolean hasResource() {
503 return fieldSetFlags()[7];
506 /** Clears the value of the 'resource' field */
507 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearResource() {
509 fieldSetFlags()[7] = false;
513 /** Gets the value of the 'instanceID' field */
514 public java.lang.CharSequence getInstanceID() {
518 /** Sets the value of the 'instanceID' field */
519 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setInstanceID(java.lang.CharSequence value) {
520 validate(fields()[8], value);
521 this.instanceID = value;
522 fieldSetFlags()[8] = true;
526 /** Checks whether the 'instanceID' field has been set */
527 public boolean hasInstanceID() {
528 return fieldSetFlags()[8];
531 /** Clears the value of the 'instanceID' field */
532 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearInstanceID() {
534 fieldSetFlags()[8] = false;
538 /** Gets the value of the 'value' field */
539 public java.lang.CharSequence getValue() {
543 /** Sets the value of the 'value' field */
544 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setValue(java.lang.CharSequence value) {
545 validate(fields()[9], value);
547 fieldSetFlags()[9] = true;
551 /** Checks whether the 'value' field has been set */
552 public boolean hasValue() {
553 return fieldSetFlags()[9];
556 /** Clears the value of the 'value' field */
557 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearValue() {
559 fieldSetFlags()[9] = false;
563 /** Gets the value of the 'details' field */
564 public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> getDetails() {
568 /** Sets the value of the 'details' field */
569 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder setDetails(java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> value) {
570 validate(fields()[10], value);
571 this.details = value;
572 fieldSetFlags()[10] = true;
576 /** Checks whether the 'details' field has been set */
577 public boolean hasDetails() {
578 return fieldSetFlags()[10];
581 /** Clears the value of the 'details' field */
582 public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearDetails() {
584 fieldSetFlags()[10] = false;
589 public _ResourceEvent build() {
591 _ResourceEvent record = new _ResourceEvent();
592 record.id = fieldSetFlags()[0] ? this.id : (java.lang.CharSequence) defaultValue(fields()[0]);
593 record.idInStore = fieldSetFlags()[1] ? this.idInStore : (java.lang.CharSequence) defaultValue(fields()[1]);
594 record.occurredMillis = fieldSetFlags()[2] ? this.occurredMillis : (java.lang.Long) defaultValue(fields()[2]);
595 record.receivedMillis = fieldSetFlags()[3] ? this.receivedMillis : (java.lang.Long) defaultValue(fields()[3]);
596 record.userID = fieldSetFlags()[4] ? this.userID : (java.lang.CharSequence) defaultValue(fields()[4]);
597 record.clientID = fieldSetFlags()[5] ? this.clientID : (java.lang.CharSequence) defaultValue(fields()[5]);
598 record.eventVersion = fieldSetFlags()[6] ? this.eventVersion : (java.lang.CharSequence) defaultValue(fields()[6]);
599 record.resource = fieldSetFlags()[7] ? this.resource : (java.lang.CharSequence) defaultValue(fields()[7]);
600 record.instanceID = fieldSetFlags()[8] ? this.instanceID : (java.lang.CharSequence) defaultValue(fields()[8]);
601 record.value = fieldSetFlags()[9] ? this.value : (java.lang.CharSequence) defaultValue(fields()[9]);
602 record.details = fieldSetFlags()[10] ? this.details : (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue>) defaultValue(fields()[10]);
604 } catch (Exception e) {
605 throw new org.apache.avro.AvroRuntimeException(e);