Rename conf to policy and make parentID optional (via null)
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / _ResourceEvent.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 _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$) {
24     switch (field$) {
25     case 0: return id;
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;
34     case 9: return value;
35     case 10: return details;
36     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
37     }
38   }
39   // Used by DatumReader.  Applications should not call. 
40   @SuppressWarnings(value="unchecked")
41   public void put(int field$, java.lang.Object value$) {
42     switch (field$) {
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");
55     }
56   }
57
58   /**
59    * Gets the value of the 'id' field.
60    */
61   public java.lang.CharSequence getId() {
62     return id;
63   }
64
65   /**
66    * Sets the value of the 'id' field.
67    * @param value the value to set.
68    */
69   public void setId(java.lang.CharSequence value) {
70     this.id = value;
71   }
72
73   /**
74    * Gets the value of the 'idInStore' field.
75    */
76   public java.lang.CharSequence getIdInStore() {
77     return idInStore;
78   }
79
80   /**
81    * Sets the value of the 'idInStore' field.
82    * @param value the value to set.
83    */
84   public void setIdInStore(java.lang.CharSequence value) {
85     this.idInStore = value;
86   }
87
88   /**
89    * Gets the value of the 'occurredMillis' field.
90    */
91   public java.lang.Long getOccurredMillis() {
92     return occurredMillis;
93   }
94
95   /**
96    * Sets the value of the 'occurredMillis' field.
97    * @param value the value to set.
98    */
99   public void setOccurredMillis(java.lang.Long value) {
100     this.occurredMillis = value;
101   }
102
103   /**
104    * Gets the value of the 'receivedMillis' field.
105    */
106   public java.lang.Long getReceivedMillis() {
107     return receivedMillis;
108   }
109
110   /**
111    * Sets the value of the 'receivedMillis' field.
112    * @param value the value to set.
113    */
114   public void setReceivedMillis(java.lang.Long value) {
115     this.receivedMillis = value;
116   }
117
118   /**
119    * Gets the value of the 'userID' field.
120    */
121   public java.lang.CharSequence getUserID() {
122     return userID;
123   }
124
125   /**
126    * Sets the value of the 'userID' field.
127    * @param value the value to set.
128    */
129   public void setUserID(java.lang.CharSequence value) {
130     this.userID = value;
131   }
132
133   /**
134    * Gets the value of the 'clientID' field.
135    */
136   public java.lang.CharSequence getClientID() {
137     return clientID;
138   }
139
140   /**
141    * Sets the value of the 'clientID' field.
142    * @param value the value to set.
143    */
144   public void setClientID(java.lang.CharSequence value) {
145     this.clientID = value;
146   }
147
148   /**
149    * Gets the value of the 'eventVersion' field.
150    */
151   public java.lang.CharSequence getEventVersion() {
152     return eventVersion;
153   }
154
155   /**
156    * Sets the value of the 'eventVersion' field.
157    * @param value the value to set.
158    */
159   public void setEventVersion(java.lang.CharSequence value) {
160     this.eventVersion = value;
161   }
162
163   /**
164    * Gets the value of the 'resource' field.
165    */
166   public java.lang.CharSequence getResource() {
167     return resource;
168   }
169
170   /**
171    * Sets the value of the 'resource' field.
172    * @param value the value to set.
173    */
174   public void setResource(java.lang.CharSequence value) {
175     this.resource = value;
176   }
177
178   /**
179    * Gets the value of the 'instanceID' field.
180    */
181   public java.lang.CharSequence getInstanceID() {
182     return instanceID;
183   }
184
185   /**
186    * Sets the value of the 'instanceID' field.
187    * @param value the value to set.
188    */
189   public void setInstanceID(java.lang.CharSequence value) {
190     this.instanceID = value;
191   }
192
193   /**
194    * Gets the value of the 'value' field.
195    */
196   public java.lang.CharSequence getValue() {
197     return value;
198   }
199
200   /**
201    * Sets the value of the 'value' field.
202    * @param value the value to set.
203    */
204   public void setValue(java.lang.CharSequence value) {
205     this.value = value;
206   }
207
208   /**
209    * Gets the value of the 'details' field.
210    */
211   public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> getDetails() {
212     return details;
213   }
214
215   /**
216    * Sets the value of the 'details' field.
217    * @param value the value to set.
218    */
219   public void setDetails(java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> value) {
220     this.details = value;
221   }
222
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();
226   }
227   
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);
231   }
232   
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);
236   }
237   
238   /**
239    * RecordBuilder for _ResourceEvent instances.
240    */
241   public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<_ResourceEvent>
242     implements org.apache.avro.data.RecordBuilder<_ResourceEvent> {
243
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;
255
256     /** Creates a new Builder */
257     private Builder() {
258       super(gr.grnet.aquarium.message.avro.gen._ResourceEvent.SCHEMA$);
259     }
260     
261     /** Creates a Builder by copying an existing Builder */
262     private Builder(gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder other) {
263       super(other);
264     }
265     
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;
272       }
273       if (isValidValue(fields()[1], other.idInStore)) {
274         this.idInStore = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.idInStore);
275         fieldSetFlags()[1] = true;
276       }
277       if (isValidValue(fields()[2], other.occurredMillis)) {
278         this.occurredMillis = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.occurredMillis);
279         fieldSetFlags()[2] = true;
280       }
281       if (isValidValue(fields()[3], other.receivedMillis)) {
282         this.receivedMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.receivedMillis);
283         fieldSetFlags()[3] = true;
284       }
285       if (isValidValue(fields()[4], other.userID)) {
286         this.userID = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.userID);
287         fieldSetFlags()[4] = true;
288       }
289       if (isValidValue(fields()[5], other.clientID)) {
290         this.clientID = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.clientID);
291         fieldSetFlags()[5] = true;
292       }
293       if (isValidValue(fields()[6], other.eventVersion)) {
294         this.eventVersion = (java.lang.CharSequence) data().deepCopy(fields()[6].schema(), other.eventVersion);
295         fieldSetFlags()[6] = true;
296       }
297       if (isValidValue(fields()[7], other.resource)) {
298         this.resource = (java.lang.CharSequence) data().deepCopy(fields()[7].schema(), other.resource);
299         fieldSetFlags()[7] = true;
300       }
301       if (isValidValue(fields()[8], other.instanceID)) {
302         this.instanceID = (java.lang.CharSequence) data().deepCopy(fields()[8].schema(), other.instanceID);
303         fieldSetFlags()[8] = true;
304       }
305       if (isValidValue(fields()[9], other.value)) {
306         this.value = (java.lang.CharSequence) data().deepCopy(fields()[9].schema(), other.value);
307         fieldSetFlags()[9] = true;
308       }
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;
312       }
313     }
314
315     /** Gets the value of the 'id' field */
316     public java.lang.CharSequence getId() {
317       return id;
318     }
319     
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);
323       this.id = value;
324       fieldSetFlags()[0] = true;
325       return this; 
326     }
327     
328     /** Checks whether the 'id' field has been set */
329     public boolean hasId() {
330       return fieldSetFlags()[0];
331     }
332     
333     /** Clears the value of the 'id' field */
334     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearId() {
335       id = null;
336       fieldSetFlags()[0] = false;
337       return this;
338     }
339
340     /** Gets the value of the 'idInStore' field */
341     public java.lang.CharSequence getIdInStore() {
342       return idInStore;
343     }
344     
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;
350       return this; 
351     }
352     
353     /** Checks whether the 'idInStore' field has been set */
354     public boolean hasIdInStore() {
355       return fieldSetFlags()[1];
356     }
357     
358     /** Clears the value of the 'idInStore' field */
359     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearIdInStore() {
360       idInStore = null;
361       fieldSetFlags()[1] = false;
362       return this;
363     }
364
365     /** Gets the value of the 'occurredMillis' field */
366     public java.lang.Long getOccurredMillis() {
367       return occurredMillis;
368     }
369     
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;
375       return this; 
376     }
377     
378     /** Checks whether the 'occurredMillis' field has been set */
379     public boolean hasOccurredMillis() {
380       return fieldSetFlags()[2];
381     }
382     
383     /** Clears the value of the 'occurredMillis' field */
384     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearOccurredMillis() {
385       fieldSetFlags()[2] = false;
386       return this;
387     }
388
389     /** Gets the value of the 'receivedMillis' field */
390     public java.lang.Long getReceivedMillis() {
391       return receivedMillis;
392     }
393     
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;
399       return this; 
400     }
401     
402     /** Checks whether the 'receivedMillis' field has been set */
403     public boolean hasReceivedMillis() {
404       return fieldSetFlags()[3];
405     }
406     
407     /** Clears the value of the 'receivedMillis' field */
408     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearReceivedMillis() {
409       fieldSetFlags()[3] = false;
410       return this;
411     }
412
413     /** Gets the value of the 'userID' field */
414     public java.lang.CharSequence getUserID() {
415       return userID;
416     }
417     
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);
421       this.userID = value;
422       fieldSetFlags()[4] = true;
423       return this; 
424     }
425     
426     /** Checks whether the 'userID' field has been set */
427     public boolean hasUserID() {
428       return fieldSetFlags()[4];
429     }
430     
431     /** Clears the value of the 'userID' field */
432     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearUserID() {
433       userID = null;
434       fieldSetFlags()[4] = false;
435       return this;
436     }
437
438     /** Gets the value of the 'clientID' field */
439     public java.lang.CharSequence getClientID() {
440       return clientID;
441     }
442     
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;
448       return this; 
449     }
450     
451     /** Checks whether the 'clientID' field has been set */
452     public boolean hasClientID() {
453       return fieldSetFlags()[5];
454     }
455     
456     /** Clears the value of the 'clientID' field */
457     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearClientID() {
458       clientID = null;
459       fieldSetFlags()[5] = false;
460       return this;
461     }
462
463     /** Gets the value of the 'eventVersion' field */
464     public java.lang.CharSequence getEventVersion() {
465       return eventVersion;
466     }
467     
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;
473       return this; 
474     }
475     
476     /** Checks whether the 'eventVersion' field has been set */
477     public boolean hasEventVersion() {
478       return fieldSetFlags()[6];
479     }
480     
481     /** Clears the value of the 'eventVersion' field */
482     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearEventVersion() {
483       eventVersion = null;
484       fieldSetFlags()[6] = false;
485       return this;
486     }
487
488     /** Gets the value of the 'resource' field */
489     public java.lang.CharSequence getResource() {
490       return resource;
491     }
492     
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;
498       return this; 
499     }
500     
501     /** Checks whether the 'resource' field has been set */
502     public boolean hasResource() {
503       return fieldSetFlags()[7];
504     }
505     
506     /** Clears the value of the 'resource' field */
507     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearResource() {
508       resource = null;
509       fieldSetFlags()[7] = false;
510       return this;
511     }
512
513     /** Gets the value of the 'instanceID' field */
514     public java.lang.CharSequence getInstanceID() {
515       return instanceID;
516     }
517     
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;
523       return this; 
524     }
525     
526     /** Checks whether the 'instanceID' field has been set */
527     public boolean hasInstanceID() {
528       return fieldSetFlags()[8];
529     }
530     
531     /** Clears the value of the 'instanceID' field */
532     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearInstanceID() {
533       instanceID = null;
534       fieldSetFlags()[8] = false;
535       return this;
536     }
537
538     /** Gets the value of the 'value' field */
539     public java.lang.CharSequence getValue() {
540       return value;
541     }
542     
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);
546       this.value = value;
547       fieldSetFlags()[9] = true;
548       return this; 
549     }
550     
551     /** Checks whether the 'value' field has been set */
552     public boolean hasValue() {
553       return fieldSetFlags()[9];
554     }
555     
556     /** Clears the value of the 'value' field */
557     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearValue() {
558       value = null;
559       fieldSetFlags()[9] = false;
560       return this;
561     }
562
563     /** Gets the value of the 'details' field */
564     public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.gen._AnyValue> getDetails() {
565       return details;
566     }
567     
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;
573       return this; 
574     }
575     
576     /** Checks whether the 'details' field has been set */
577     public boolean hasDetails() {
578       return fieldSetFlags()[10];
579     }
580     
581     /** Clears the value of the 'details' field */
582     public gr.grnet.aquarium.message.avro.gen._ResourceEvent.Builder clearDetails() {
583       details = null;
584       fieldSetFlags()[10] = false;
585       return this;
586     }
587
588     @Override
589     public _ResourceEvent build() {
590       try {
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]);
603         return record;
604       } catch (Exception e) {
605         throw new org.apache.avro.AvroRuntimeException(e);
606       }
607     }
608   }
609 }