2 * Autogenerated by Avro
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$) {
21 case 1: return relatedIMEventID;
22 case 2: return validFromMillis;
23 case 3: return validToMillis;
25 case 5: return fullPriceTableRef;
26 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
29 // Used by DatumReader. Applications should not call.
30 @SuppressWarnings(value="unchecked")
31 public void put(int field$, java.lang.Object value$) {
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");
44 * Gets the value of the 'id' field.
46 public java.lang.CharSequence getId() {
51 * Sets the value of the 'id' field.
52 * @param value the value to set.
54 public void setId(java.lang.CharSequence value) {
59 * Gets the value of the 'relatedIMEventID' field.
61 public java.lang.CharSequence getRelatedIMEventID() {
62 return relatedIMEventID;
66 * Sets the value of the 'relatedIMEventID' field.
67 * @param value the value to set.
69 public void setRelatedIMEventID(java.lang.CharSequence value) {
70 this.relatedIMEventID = value;
74 * Gets the value of the 'validFromMillis' field.
76 public java.lang.Long getValidFromMillis() {
77 return validFromMillis;
81 * Sets the value of the 'validFromMillis' field.
82 * @param value the value to set.
84 public void setValidFromMillis(java.lang.Long value) {
85 this.validFromMillis = value;
89 * Gets the value of the 'validToMillis' field.
91 public java.lang.Long getValidToMillis() {
96 * Sets the value of the 'validToMillis' field.
97 * @param value the value to set.
99 public void setValidToMillis(java.lang.Long value) {
100 this.validToMillis = value;
104 * Gets the value of the 'role' field.
106 public java.lang.CharSequence getRole() {
111 * Sets the value of the 'role' field.
112 * @param value the value to set.
114 public void setRole(java.lang.CharSequence value) {
119 * Gets the value of the 'fullPriceTableRef' field.
121 public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg getFullPriceTableRef() {
122 return fullPriceTableRef;
126 * Sets the value of the 'fullPriceTableRef' field.
127 * @param value the value to set.
129 public void setFullPriceTableRef(gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg value) {
130 this.fullPriceTableRef = value;
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();
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);
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);
149 * RecordBuilder for UserAgreementMsg instances.
151 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<UserAgreementMsg>
152 implements org.apache.avro.data.RecordBuilder<UserAgreementMsg> {
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;
161 /** Creates a new Builder */
163 super(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.SCHEMA$);
166 /** Creates a Builder by copying an existing Builder */
167 private Builder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder other) {
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;
178 if (isValidValue(fields()[1], other.relatedIMEventID)) {
179 this.relatedIMEventID = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.relatedIMEventID);
180 fieldSetFlags()[1] = true;
182 if (isValidValue(fields()[2], other.validFromMillis)) {
183 this.validFromMillis = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.validFromMillis);
184 fieldSetFlags()[2] = true;
186 if (isValidValue(fields()[3], other.validToMillis)) {
187 this.validToMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.validToMillis);
188 fieldSetFlags()[3] = true;
190 if (isValidValue(fields()[4], other.role)) {
191 this.role = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.role);
192 fieldSetFlags()[4] = true;
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;
200 /** Gets the value of the 'id' field */
201 public java.lang.CharSequence getId() {
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);
209 fieldSetFlags()[0] = true;
213 /** Checks whether the 'id' field has been set */
214 public boolean hasId() {
215 return fieldSetFlags()[0];
218 /** Clears the value of the 'id' field */
219 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearId() {
221 fieldSetFlags()[0] = false;
225 /** Gets the value of the 'relatedIMEventID' field */
226 public java.lang.CharSequence getRelatedIMEventID() {
227 return relatedIMEventID;
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;
238 /** Checks whether the 'relatedIMEventID' field has been set */
239 public boolean hasRelatedIMEventID() {
240 return fieldSetFlags()[1];
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;
250 /** Gets the value of the 'validFromMillis' field */
251 public java.lang.Long getValidFromMillis() {
252 return validFromMillis;
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;
263 /** Checks whether the 'validFromMillis' field has been set */
264 public boolean hasValidFromMillis() {
265 return fieldSetFlags()[2];
268 /** Clears the value of the 'validFromMillis' field */
269 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearValidFromMillis() {
270 fieldSetFlags()[2] = false;
274 /** Gets the value of the 'validToMillis' field */
275 public java.lang.Long getValidToMillis() {
276 return validToMillis;
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;
287 /** Checks whether the 'validToMillis' field has been set */
288 public boolean hasValidToMillis() {
289 return fieldSetFlags()[3];
292 /** Clears the value of the 'validToMillis' field */
293 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearValidToMillis() {
294 fieldSetFlags()[3] = false;
298 /** Gets the value of the 'role' field */
299 public java.lang.CharSequence getRole() {
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);
307 fieldSetFlags()[4] = true;
311 /** Checks whether the 'role' field has been set */
312 public boolean hasRole() {
313 return fieldSetFlags()[4];
316 /** Clears the value of the 'role' field */
317 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRole() {
319 fieldSetFlags()[4] = false;
323 /** Gets the value of the 'fullPriceTableRef' field */
324 public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg getFullPriceTableRef() {
325 return fullPriceTableRef;
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;
336 /** Checks whether the 'fullPriceTableRef' field has been set */
337 public boolean hasFullPriceTableRef() {
338 return fieldSetFlags()[5];
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;
349 public UserAgreementMsg build() {
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]);
359 } catch (Exception e) {
360 throw new org.apache.avro.AvroRuntimeException(e);