Rename conf to policy and make parentID optional (via null)
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / _EventEntry.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 _EventEntry 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\":\"_EventEntry\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"eventType\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"_ChargeEntry\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"unitPrice\",\"type\":\"string\"},{\"name\":\"startTime\",\"type\":\"string\"},{\"name\":\"endTime\",\"type\":\"string\"},{\"name\":\"ellapsedTime\",\"type\":\"string\"},{\"name\":\"credits\",\"type\":\"string\"}]}}}]}");
10   @Deprecated public java.lang.CharSequence eventType;
11   @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry> details;
12   public org.apache.avro.Schema getSchema() { return SCHEMA$; }
13   // Used by DatumWriter.  Applications should not call. 
14   public java.lang.Object get(int field$) {
15     switch (field$) {
16     case 0: return eventType;
17     case 1: return details;
18     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
19     }
20   }
21   // Used by DatumReader.  Applications should not call. 
22   @SuppressWarnings(value="unchecked")
23   public void put(int field$, java.lang.Object value$) {
24     switch (field$) {
25     case 0: eventType = (java.lang.CharSequence)value$; break;
26     case 1: details = (java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry>)value$; break;
27     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
28     }
29   }
30
31   /**
32    * Gets the value of the 'eventType' field.
33    */
34   public java.lang.CharSequence getEventType() {
35     return eventType;
36   }
37
38   /**
39    * Sets the value of the 'eventType' field.
40    * @param value the value to set.
41    */
42   public void setEventType(java.lang.CharSequence value) {
43     this.eventType = value;
44   }
45
46   /**
47    * Gets the value of the 'details' field.
48    */
49   public java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry> getDetails() {
50     return details;
51   }
52
53   /**
54    * Sets the value of the 'details' field.
55    * @param value the value to set.
56    */
57   public void setDetails(java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry> value) {
58     this.details = value;
59   }
60
61   /** Creates a new _EventEntry RecordBuilder */
62   public static gr.grnet.aquarium.message.avro.gen._EventEntry.Builder newBuilder() {
63     return new gr.grnet.aquarium.message.avro.gen._EventEntry.Builder();
64   }
65   
66   /** Creates a new _EventEntry RecordBuilder by copying an existing Builder */
67   public static gr.grnet.aquarium.message.avro.gen._EventEntry.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._EventEntry.Builder other) {
68     return new gr.grnet.aquarium.message.avro.gen._EventEntry.Builder(other);
69   }
70   
71   /** Creates a new _EventEntry RecordBuilder by copying an existing _EventEntry instance */
72   public static gr.grnet.aquarium.message.avro.gen._EventEntry.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._EventEntry other) {
73     return new gr.grnet.aquarium.message.avro.gen._EventEntry.Builder(other);
74   }
75   
76   /**
77    * RecordBuilder for _EventEntry instances.
78    */
79   public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<_EventEntry>
80     implements org.apache.avro.data.RecordBuilder<_EventEntry> {
81
82     private java.lang.CharSequence eventType;
83     private java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry> details;
84
85     /** Creates a new Builder */
86     private Builder() {
87       super(gr.grnet.aquarium.message.avro.gen._EventEntry.SCHEMA$);
88     }
89     
90     /** Creates a Builder by copying an existing Builder */
91     private Builder(gr.grnet.aquarium.message.avro.gen._EventEntry.Builder other) {
92       super(other);
93     }
94     
95     /** Creates a Builder by copying an existing _EventEntry instance */
96     private Builder(gr.grnet.aquarium.message.avro.gen._EventEntry other) {
97             super(gr.grnet.aquarium.message.avro.gen._EventEntry.SCHEMA$);
98       if (isValidValue(fields()[0], other.eventType)) {
99         this.eventType = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.eventType);
100         fieldSetFlags()[0] = true;
101       }
102       if (isValidValue(fields()[1], other.details)) {
103         this.details = (java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry>) data().deepCopy(fields()[1].schema(), other.details);
104         fieldSetFlags()[1] = true;
105       }
106     }
107
108     /** Gets the value of the 'eventType' field */
109     public java.lang.CharSequence getEventType() {
110       return eventType;
111     }
112     
113     /** Sets the value of the 'eventType' field */
114     public gr.grnet.aquarium.message.avro.gen._EventEntry.Builder setEventType(java.lang.CharSequence value) {
115       validate(fields()[0], value);
116       this.eventType = value;
117       fieldSetFlags()[0] = true;
118       return this; 
119     }
120     
121     /** Checks whether the 'eventType' field has been set */
122     public boolean hasEventType() {
123       return fieldSetFlags()[0];
124     }
125     
126     /** Clears the value of the 'eventType' field */
127     public gr.grnet.aquarium.message.avro.gen._EventEntry.Builder clearEventType() {
128       eventType = null;
129       fieldSetFlags()[0] = false;
130       return this;
131     }
132
133     /** Gets the value of the 'details' field */
134     public java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry> getDetails() {
135       return details;
136     }
137     
138     /** Sets the value of the 'details' field */
139     public gr.grnet.aquarium.message.avro.gen._EventEntry.Builder setDetails(java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry> value) {
140       validate(fields()[1], value);
141       this.details = value;
142       fieldSetFlags()[1] = true;
143       return this; 
144     }
145     
146     /** Checks whether the 'details' field has been set */
147     public boolean hasDetails() {
148       return fieldSetFlags()[1];
149     }
150     
151     /** Clears the value of the 'details' field */
152     public gr.grnet.aquarium.message.avro.gen._EventEntry.Builder clearDetails() {
153       details = null;
154       fieldSetFlags()[1] = false;
155       return this;
156     }
157
158     @Override
159     public _EventEntry build() {
160       try {
161         _EventEntry record = new _EventEntry();
162         record.eventType = fieldSetFlags()[0] ? this.eventType : (java.lang.CharSequence) defaultValue(fields()[0]);
163         record.details = fieldSetFlags()[1] ? this.details : (java.util.List<gr.grnet.aquarium.message.avro.gen._ChargeEntry>) defaultValue(fields()[1]);
164         return record;
165       } catch (Exception e) {
166         throw new org.apache.avro.AvroRuntimeException(e);
167       }
168     }
169   }
170 }