Rename all messages
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / ChargeEntryMsg.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 ChargeEntryMsg 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\":\"ChargeEntryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"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 id;
11   @Deprecated public java.lang.CharSequence unitPrice;
12   @Deprecated public java.lang.CharSequence startTime;
13   @Deprecated public java.lang.CharSequence endTime;
14   @Deprecated public java.lang.CharSequence ellapsedTime;
15   @Deprecated public java.lang.CharSequence credits;
16   public org.apache.avro.Schema getSchema() { return SCHEMA$; }
17   // Used by DatumWriter.  Applications should not call. 
18   public java.lang.Object get(int field$) {
19     switch (field$) {
20     case 0: return id;
21     case 1: return unitPrice;
22     case 2: return startTime;
23     case 3: return endTime;
24     case 4: return ellapsedTime;
25     case 5: return credits;
26     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
27     }
28   }
29   // Used by DatumReader.  Applications should not call. 
30   @SuppressWarnings(value="unchecked")
31   public void put(int field$, java.lang.Object value$) {
32     switch (field$) {
33     case 0: id = (java.lang.CharSequence)value$; break;
34     case 1: unitPrice = (java.lang.CharSequence)value$; break;
35     case 2: startTime = (java.lang.CharSequence)value$; break;
36     case 3: endTime = (java.lang.CharSequence)value$; break;
37     case 4: ellapsedTime = (java.lang.CharSequence)value$; break;
38     case 5: credits = (java.lang.CharSequence)value$; break;
39     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
40     }
41   }
42
43   /**
44    * Gets the value of the 'id' field.
45    */
46   public java.lang.CharSequence getId() {
47     return id;
48   }
49
50   /**
51    * Sets the value of the 'id' field.
52    * @param value the value to set.
53    */
54   public void setId(java.lang.CharSequence value) {
55     this.id = value;
56   }
57
58   /**
59    * Gets the value of the 'unitPrice' field.
60    */
61   public java.lang.CharSequence getUnitPrice() {
62     return unitPrice;
63   }
64
65   /**
66    * Sets the value of the 'unitPrice' field.
67    * @param value the value to set.
68    */
69   public void setUnitPrice(java.lang.CharSequence value) {
70     this.unitPrice = value;
71   }
72
73   /**
74    * Gets the value of the 'startTime' field.
75    */
76   public java.lang.CharSequence getStartTime() {
77     return startTime;
78   }
79
80   /**
81    * Sets the value of the 'startTime' field.
82    * @param value the value to set.
83    */
84   public void setStartTime(java.lang.CharSequence value) {
85     this.startTime = value;
86   }
87
88   /**
89    * Gets the value of the 'endTime' field.
90    */
91   public java.lang.CharSequence getEndTime() {
92     return endTime;
93   }
94
95   /**
96    * Sets the value of the 'endTime' field.
97    * @param value the value to set.
98    */
99   public void setEndTime(java.lang.CharSequence value) {
100     this.endTime = value;
101   }
102
103   /**
104    * Gets the value of the 'ellapsedTime' field.
105    */
106   public java.lang.CharSequence getEllapsedTime() {
107     return ellapsedTime;
108   }
109
110   /**
111    * Sets the value of the 'ellapsedTime' field.
112    * @param value the value to set.
113    */
114   public void setEllapsedTime(java.lang.CharSequence value) {
115     this.ellapsedTime = value;
116   }
117
118   /**
119    * Gets the value of the 'credits' field.
120    */
121   public java.lang.CharSequence getCredits() {
122     return credits;
123   }
124
125   /**
126    * Sets the value of the 'credits' field.
127    * @param value the value to set.
128    */
129   public void setCredits(java.lang.CharSequence value) {
130     this.credits = value;
131   }
132
133   /** Creates a new ChargeEntryMsg RecordBuilder */
134   public static gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder newBuilder() {
135     return new gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder();
136   }
137   
138   /** Creates a new ChargeEntryMsg RecordBuilder by copying an existing Builder */
139   public static gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder other) {
140     return new gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder(other);
141   }
142   
143   /** Creates a new ChargeEntryMsg RecordBuilder by copying an existing ChargeEntryMsg instance */
144   public static gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg other) {
145     return new gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder(other);
146   }
147   
148   /**
149    * RecordBuilder for ChargeEntryMsg instances.
150    */
151   public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<ChargeEntryMsg>
152     implements org.apache.avro.data.RecordBuilder<ChargeEntryMsg> {
153
154     private java.lang.CharSequence id;
155     private java.lang.CharSequence unitPrice;
156     private java.lang.CharSequence startTime;
157     private java.lang.CharSequence endTime;
158     private java.lang.CharSequence ellapsedTime;
159     private java.lang.CharSequence credits;
160
161     /** Creates a new Builder */
162     private Builder() {
163       super(gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.SCHEMA$);
164     }
165     
166     /** Creates a Builder by copying an existing Builder */
167     private Builder(gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder other) {
168       super(other);
169     }
170     
171     /** Creates a Builder by copying an existing ChargeEntryMsg instance */
172     private Builder(gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg other) {
173             super(gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.SCHEMA$);
174       if (isValidValue(fields()[0], other.id)) {
175         this.id = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.id);
176         fieldSetFlags()[0] = true;
177       }
178       if (isValidValue(fields()[1], other.unitPrice)) {
179         this.unitPrice = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.unitPrice);
180         fieldSetFlags()[1] = true;
181       }
182       if (isValidValue(fields()[2], other.startTime)) {
183         this.startTime = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.startTime);
184         fieldSetFlags()[2] = true;
185       }
186       if (isValidValue(fields()[3], other.endTime)) {
187         this.endTime = (java.lang.CharSequence) data().deepCopy(fields()[3].schema(), other.endTime);
188         fieldSetFlags()[3] = true;
189       }
190       if (isValidValue(fields()[4], other.ellapsedTime)) {
191         this.ellapsedTime = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.ellapsedTime);
192         fieldSetFlags()[4] = true;
193       }
194       if (isValidValue(fields()[5], other.credits)) {
195         this.credits = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.credits);
196         fieldSetFlags()[5] = true;
197       }
198     }
199
200     /** Gets the value of the 'id' field */
201     public java.lang.CharSequence getId() {
202       return id;
203     }
204     
205     /** Sets the value of the 'id' field */
206     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setId(java.lang.CharSequence value) {
207       validate(fields()[0], value);
208       this.id = value;
209       fieldSetFlags()[0] = true;
210       return this; 
211     }
212     
213     /** Checks whether the 'id' field has been set */
214     public boolean hasId() {
215       return fieldSetFlags()[0];
216     }
217     
218     /** Clears the value of the 'id' field */
219     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearId() {
220       id = null;
221       fieldSetFlags()[0] = false;
222       return this;
223     }
224
225     /** Gets the value of the 'unitPrice' field */
226     public java.lang.CharSequence getUnitPrice() {
227       return unitPrice;
228     }
229     
230     /** Sets the value of the 'unitPrice' field */
231     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setUnitPrice(java.lang.CharSequence value) {
232       validate(fields()[1], value);
233       this.unitPrice = value;
234       fieldSetFlags()[1] = true;
235       return this; 
236     }
237     
238     /** Checks whether the 'unitPrice' field has been set */
239     public boolean hasUnitPrice() {
240       return fieldSetFlags()[1];
241     }
242     
243     /** Clears the value of the 'unitPrice' field */
244     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearUnitPrice() {
245       unitPrice = null;
246       fieldSetFlags()[1] = false;
247       return this;
248     }
249
250     /** Gets the value of the 'startTime' field */
251     public java.lang.CharSequence getStartTime() {
252       return startTime;
253     }
254     
255     /** Sets the value of the 'startTime' field */
256     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setStartTime(java.lang.CharSequence value) {
257       validate(fields()[2], value);
258       this.startTime = value;
259       fieldSetFlags()[2] = true;
260       return this; 
261     }
262     
263     /** Checks whether the 'startTime' field has been set */
264     public boolean hasStartTime() {
265       return fieldSetFlags()[2];
266     }
267     
268     /** Clears the value of the 'startTime' field */
269     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearStartTime() {
270       startTime = null;
271       fieldSetFlags()[2] = false;
272       return this;
273     }
274
275     /** Gets the value of the 'endTime' field */
276     public java.lang.CharSequence getEndTime() {
277       return endTime;
278     }
279     
280     /** Sets the value of the 'endTime' field */
281     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setEndTime(java.lang.CharSequence value) {
282       validate(fields()[3], value);
283       this.endTime = value;
284       fieldSetFlags()[3] = true;
285       return this; 
286     }
287     
288     /** Checks whether the 'endTime' field has been set */
289     public boolean hasEndTime() {
290       return fieldSetFlags()[3];
291     }
292     
293     /** Clears the value of the 'endTime' field */
294     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearEndTime() {
295       endTime = null;
296       fieldSetFlags()[3] = false;
297       return this;
298     }
299
300     /** Gets the value of the 'ellapsedTime' field */
301     public java.lang.CharSequence getEllapsedTime() {
302       return ellapsedTime;
303     }
304     
305     /** Sets the value of the 'ellapsedTime' field */
306     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setEllapsedTime(java.lang.CharSequence value) {
307       validate(fields()[4], value);
308       this.ellapsedTime = value;
309       fieldSetFlags()[4] = true;
310       return this; 
311     }
312     
313     /** Checks whether the 'ellapsedTime' field has been set */
314     public boolean hasEllapsedTime() {
315       return fieldSetFlags()[4];
316     }
317     
318     /** Clears the value of the 'ellapsedTime' field */
319     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearEllapsedTime() {
320       ellapsedTime = null;
321       fieldSetFlags()[4] = false;
322       return this;
323     }
324
325     /** Gets the value of the 'credits' field */
326     public java.lang.CharSequence getCredits() {
327       return credits;
328     }
329     
330     /** Sets the value of the 'credits' field */
331     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder setCredits(java.lang.CharSequence value) {
332       validate(fields()[5], value);
333       this.credits = value;
334       fieldSetFlags()[5] = true;
335       return this; 
336     }
337     
338     /** Checks whether the 'credits' field has been set */
339     public boolean hasCredits() {
340       return fieldSetFlags()[5];
341     }
342     
343     /** Clears the value of the 'credits' field */
344     public gr.grnet.aquarium.message.avro.gen.ChargeEntryMsg.Builder clearCredits() {
345       credits = null;
346       fieldSetFlags()[5] = false;
347       return this;
348     }
349
350     @Override
351     public ChargeEntryMsg build() {
352       try {
353         ChargeEntryMsg record = new ChargeEntryMsg();
354         record.id = fieldSetFlags()[0] ? this.id : (java.lang.CharSequence) defaultValue(fields()[0]);
355         record.unitPrice = fieldSetFlags()[1] ? this.unitPrice : (java.lang.CharSequence) defaultValue(fields()[1]);
356         record.startTime = fieldSetFlags()[2] ? this.startTime : (java.lang.CharSequence) defaultValue(fields()[2]);
357         record.endTime = fieldSetFlags()[3] ? this.endTime : (java.lang.CharSequence) defaultValue(fields()[3]);
358         record.ellapsedTime = fieldSetFlags()[4] ? this.ellapsedTime : (java.lang.CharSequence) defaultValue(fields()[4]);
359         record.credits = fieldSetFlags()[5] ? this.credits : (java.lang.CharSequence) defaultValue(fields()[5]);
360         return record;
361       } catch (Exception e) {
362         throw new org.apache.avro.AvroRuntimeException(e);
363       }
364     }
365   }
366 }