Rename all messages
[aquarium] / src / main / java / gr / grnet / aquarium / message / avro / gen / UserAgreementMsg.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 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\":\"string\"},{\"name\":\"relatedIMEventID\",\"type\":[\"string\",\"null\"]},{\"name\":\"validFromMillis\",\"type\":\"long\"},{\"name\":\"validToMillis\",\"type\":\"long\"},{\"name\":\"role\",\"type\":\"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\":\"double\"},{\"name\":\"when\",\"type\":[{\"type\":\"record\",\"name\":\"CronSpecTupleMsg\",\"fields\":[{\"name\":\"a\",\"type\":\"string\"},{\"name\":\"b\",\"type\":\"string\"}]},\"null\"]}]}}}]},{\"type\":\"map\",\"values\":\"SelectorValueMsg\"}]}]}}}}]},\"null\"]}]}");
10   @Deprecated public java.lang.CharSequence id;
11   @Deprecated public java.lang.CharSequence relatedIMEventID;
12   @Deprecated public long validFromMillis;
13   @Deprecated public long validToMillis;
14   @Deprecated public java.lang.CharSequence role;
15   @Deprecated public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg fullPriceTableRef;
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 relatedIMEventID;
22     case 2: return validFromMillis;
23     case 3: return validToMillis;
24     case 4: return role;
25     case 5: return fullPriceTableRef;
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: relatedIMEventID = (java.lang.CharSequence)value$; break;
35     case 2: validFromMillis = (java.lang.Long)value$; break;
36     case 3: validToMillis = (java.lang.Long)value$; break;
37     case 4: role = (java.lang.CharSequence)value$; break;
38     case 5: fullPriceTableRef = (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg)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 'relatedIMEventID' field.
60    */
61   public java.lang.CharSequence getRelatedIMEventID() {
62     return relatedIMEventID;
63   }
64
65   /**
66    * Sets the value of the 'relatedIMEventID' field.
67    * @param value the value to set.
68    */
69   public void setRelatedIMEventID(java.lang.CharSequence value) {
70     this.relatedIMEventID = value;
71   }
72
73   /**
74    * Gets the value of the 'validFromMillis' field.
75    */
76   public java.lang.Long getValidFromMillis() {
77     return validFromMillis;
78   }
79
80   /**
81    * Sets the value of the 'validFromMillis' field.
82    * @param value the value to set.
83    */
84   public void setValidFromMillis(java.lang.Long value) {
85     this.validFromMillis = value;
86   }
87
88   /**
89    * Gets the value of the 'validToMillis' field.
90    */
91   public java.lang.Long getValidToMillis() {
92     return validToMillis;
93   }
94
95   /**
96    * Sets the value of the 'validToMillis' field.
97    * @param value the value to set.
98    */
99   public void setValidToMillis(java.lang.Long value) {
100     this.validToMillis = value;
101   }
102
103   /**
104    * Gets the value of the 'role' field.
105    */
106   public java.lang.CharSequence getRole() {
107     return role;
108   }
109
110   /**
111    * Sets the value of the 'role' field.
112    * @param value the value to set.
113    */
114   public void setRole(java.lang.CharSequence value) {
115     this.role = value;
116   }
117
118   /**
119    * Gets the value of the 'fullPriceTableRef' field.
120    */
121   public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg getFullPriceTableRef() {
122     return fullPriceTableRef;
123   }
124
125   /**
126    * Sets the value of the 'fullPriceTableRef' field.
127    * @param value the value to set.
128    */
129   public void setFullPriceTableRef(gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg value) {
130     this.fullPriceTableRef = value;
131   }
132
133   /** Creates a new UserAgreementMsg RecordBuilder */
134   public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder() {
135     return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder();
136   }
137   
138   /** Creates a new UserAgreementMsg RecordBuilder by copying an existing Builder */
139   public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder other) {
140     return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder(other);
141   }
142   
143   /** Creates a new UserAgreementMsg RecordBuilder by copying an existing UserAgreementMsg instance */
144   public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg other) {
145     return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder(other);
146   }
147   
148   /**
149    * RecordBuilder for UserAgreementMsg instances.
150    */
151   public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<UserAgreementMsg>
152     implements org.apache.avro.data.RecordBuilder<UserAgreementMsg> {
153
154     private java.lang.CharSequence id;
155     private java.lang.CharSequence relatedIMEventID;
156     private long validFromMillis;
157     private long validToMillis;
158     private java.lang.CharSequence role;
159     private gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg fullPriceTableRef;
160
161     /** Creates a new Builder */
162     private Builder() {
163       super(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.SCHEMA$);
164     }
165     
166     /** Creates a Builder by copying an existing Builder */
167     private Builder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder other) {
168       super(other);
169     }
170     
171     /** Creates a Builder by copying an existing UserAgreementMsg instance */
172     private Builder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg other) {
173             super(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.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.relatedIMEventID)) {
179         this.relatedIMEventID = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.relatedIMEventID);
180         fieldSetFlags()[1] = true;
181       }
182       if (isValidValue(fields()[2], other.validFromMillis)) {
183         this.validFromMillis = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.validFromMillis);
184         fieldSetFlags()[2] = true;
185       }
186       if (isValidValue(fields()[3], other.validToMillis)) {
187         this.validToMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.validToMillis);
188         fieldSetFlags()[3] = true;
189       }
190       if (isValidValue(fields()[4], other.role)) {
191         this.role = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.role);
192         fieldSetFlags()[4] = true;
193       }
194       if (isValidValue(fields()[5], other.fullPriceTableRef)) {
195         this.fullPriceTableRef = (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg) data().deepCopy(fields()[5].schema(), other.fullPriceTableRef);
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.UserAgreementMsg.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.UserAgreementMsg.Builder clearId() {
220       id = null;
221       fieldSetFlags()[0] = false;
222       return this;
223     }
224
225     /** Gets the value of the 'relatedIMEventID' field */
226     public java.lang.CharSequence getRelatedIMEventID() {
227       return relatedIMEventID;
228     }
229     
230     /** Sets the value of the 'relatedIMEventID' field */
231     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRelatedIMEventID(java.lang.CharSequence value) {
232       validate(fields()[1], value);
233       this.relatedIMEventID = value;
234       fieldSetFlags()[1] = true;
235       return this; 
236     }
237     
238     /** Checks whether the 'relatedIMEventID' field has been set */
239     public boolean hasRelatedIMEventID() {
240       return fieldSetFlags()[1];
241     }
242     
243     /** Clears the value of the 'relatedIMEventID' field */
244     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRelatedIMEventID() {
245       relatedIMEventID = null;
246       fieldSetFlags()[1] = false;
247       return this;
248     }
249
250     /** Gets the value of the 'validFromMillis' field */
251     public java.lang.Long getValidFromMillis() {
252       return validFromMillis;
253     }
254     
255     /** Sets the value of the 'validFromMillis' field */
256     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setValidFromMillis(long value) {
257       validate(fields()[2], value);
258       this.validFromMillis = value;
259       fieldSetFlags()[2] = true;
260       return this; 
261     }
262     
263     /** Checks whether the 'validFromMillis' field has been set */
264     public boolean hasValidFromMillis() {
265       return fieldSetFlags()[2];
266     }
267     
268     /** Clears the value of the 'validFromMillis' field */
269     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearValidFromMillis() {
270       fieldSetFlags()[2] = false;
271       return this;
272     }
273
274     /** Gets the value of the 'validToMillis' field */
275     public java.lang.Long getValidToMillis() {
276       return validToMillis;
277     }
278     
279     /** Sets the value of the 'validToMillis' field */
280     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setValidToMillis(long value) {
281       validate(fields()[3], value);
282       this.validToMillis = value;
283       fieldSetFlags()[3] = true;
284       return this; 
285     }
286     
287     /** Checks whether the 'validToMillis' field has been set */
288     public boolean hasValidToMillis() {
289       return fieldSetFlags()[3];
290     }
291     
292     /** Clears the value of the 'validToMillis' field */
293     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearValidToMillis() {
294       fieldSetFlags()[3] = false;
295       return this;
296     }
297
298     /** Gets the value of the 'role' field */
299     public java.lang.CharSequence getRole() {
300       return role;
301     }
302     
303     /** Sets the value of the 'role' field */
304     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRole(java.lang.CharSequence value) {
305       validate(fields()[4], value);
306       this.role = value;
307       fieldSetFlags()[4] = true;
308       return this; 
309     }
310     
311     /** Checks whether the 'role' field has been set */
312     public boolean hasRole() {
313       return fieldSetFlags()[4];
314     }
315     
316     /** Clears the value of the 'role' field */
317     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRole() {
318       role = null;
319       fieldSetFlags()[4] = false;
320       return this;
321     }
322
323     /** Gets the value of the 'fullPriceTableRef' field */
324     public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg getFullPriceTableRef() {
325       return fullPriceTableRef;
326     }
327     
328     /** Sets the value of the 'fullPriceTableRef' field */
329     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setFullPriceTableRef(gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg value) {
330       validate(fields()[5], value);
331       this.fullPriceTableRef = value;
332       fieldSetFlags()[5] = true;
333       return this; 
334     }
335     
336     /** Checks whether the 'fullPriceTableRef' field has been set */
337     public boolean hasFullPriceTableRef() {
338       return fieldSetFlags()[5];
339     }
340     
341     /** Clears the value of the 'fullPriceTableRef' field */
342     public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearFullPriceTableRef() {
343       fullPriceTableRef = null;
344       fieldSetFlags()[5] = false;
345       return this;
346     }
347
348     @Override
349     public UserAgreementMsg build() {
350       try {
351         UserAgreementMsg record = new UserAgreementMsg();
352         record.id = fieldSetFlags()[0] ? this.id : (java.lang.CharSequence) defaultValue(fields()[0]);
353         record.relatedIMEventID = fieldSetFlags()[1] ? this.relatedIMEventID : (java.lang.CharSequence) defaultValue(fields()[1]);
354         record.validFromMillis = fieldSetFlags()[2] ? this.validFromMillis : (java.lang.Long) defaultValue(fields()[2]);
355         record.validToMillis = fieldSetFlags()[3] ? this.validToMillis : (java.lang.Long) defaultValue(fields()[3]);
356         record.role = fieldSetFlags()[4] ? this.role : (java.lang.CharSequence) defaultValue(fields()[4]);
357         record.fullPriceTableRef = fieldSetFlags()[5] ? this.fullPriceTableRef : (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg) defaultValue(fields()[5]);
358         return record;
359       } catch (Exception e) {
360         throw new org.apache.avro.AvroRuntimeException(e);
361       }
362     }
363   }
364 }