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\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"relatedIMEventOriginalID\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"userID\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"validFromMillis\",\"type\":\"long\"},{\"name\":\"validToMillis\",\"type\":\"long\"},{\"name\":\"role\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"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\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"b\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},\"null\"]}]}}}]},{\"type\":\"map\",\"values\":\"SelectorValueMsg\",\"avro.java.string\":\"String\"}]}]},\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}}]},\"null\"]}]}");
10 @Deprecated public java.lang.String id;
11 @Deprecated public java.lang.String relatedIMEventOriginalID;
12 @Deprecated public java.lang.String userID;
13 @Deprecated public long validFromMillis;
14 @Deprecated public long validToMillis;
15 @Deprecated public java.lang.String role;
16 @Deprecated public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg fullPriceTableRef;
17 public org.apache.avro.Schema getSchema() { return SCHEMA$; }
18 // Used by DatumWriter. Applications should not call.
19 public java.lang.Object get(int field$) {
22 case 1: return relatedIMEventOriginalID;
23 case 2: return userID;
24 case 3: return validFromMillis;
25 case 4: return validToMillis;
27 case 6: return fullPriceTableRef;
28 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
31 // Used by DatumReader. Applications should not call.
32 @SuppressWarnings(value="unchecked")
33 public void put(int field$, java.lang.Object value$) {
35 case 0: id = (java.lang.String)value$; break;
36 case 1: relatedIMEventOriginalID = (java.lang.String)value$; break;
37 case 2: userID = (java.lang.String)value$; break;
38 case 3: validFromMillis = (java.lang.Long)value$; break;
39 case 4: validToMillis = (java.lang.Long)value$; break;
40 case 5: role = (java.lang.String)value$; break;
41 case 6: fullPriceTableRef = (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg)value$; break;
42 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
47 * Gets the value of the 'id' field.
49 public java.lang.String getId() {
54 * Sets the value of the 'id' field.
55 * @param value the value to set.
57 public void setId(java.lang.String value) {
62 * Gets the value of the 'relatedIMEventOriginalID' field.
64 public java.lang.String getRelatedIMEventOriginalID() {
65 return relatedIMEventOriginalID;
69 * Sets the value of the 'relatedIMEventOriginalID' field.
70 * @param value the value to set.
72 public void setRelatedIMEventOriginalID(java.lang.String value) {
73 this.relatedIMEventOriginalID = value;
77 * Gets the value of the 'userID' field.
79 public java.lang.String getUserID() {
84 * Sets the value of the 'userID' field.
85 * @param value the value to set.
87 public void setUserID(java.lang.String value) {
92 * Gets the value of the 'validFromMillis' field.
94 public java.lang.Long getValidFromMillis() {
95 return validFromMillis;
99 * Sets the value of the 'validFromMillis' field.
100 * @param value the value to set.
102 public void setValidFromMillis(java.lang.Long value) {
103 this.validFromMillis = value;
107 * Gets the value of the 'validToMillis' field.
109 public java.lang.Long getValidToMillis() {
110 return validToMillis;
114 * Sets the value of the 'validToMillis' field.
115 * @param value the value to set.
117 public void setValidToMillis(java.lang.Long value) {
118 this.validToMillis = value;
122 * Gets the value of the 'role' field.
124 public java.lang.String getRole() {
129 * Sets the value of the 'role' field.
130 * @param value the value to set.
132 public void setRole(java.lang.String value) {
137 * Gets the value of the 'fullPriceTableRef' field.
139 public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg getFullPriceTableRef() {
140 return fullPriceTableRef;
144 * Sets the value of the 'fullPriceTableRef' field.
145 * @param value the value to set.
147 public void setFullPriceTableRef(gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg value) {
148 this.fullPriceTableRef = value;
151 /** Creates a new UserAgreementMsg RecordBuilder */
152 public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder() {
153 return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder();
156 /** Creates a new UserAgreementMsg RecordBuilder by copying an existing Builder */
157 public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder other) {
158 return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder(other);
161 /** Creates a new UserAgreementMsg RecordBuilder by copying an existing UserAgreementMsg instance */
162 public static gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg other) {
163 return new gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder(other);
167 * RecordBuilder for UserAgreementMsg instances.
169 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<UserAgreementMsg>
170 implements org.apache.avro.data.RecordBuilder<UserAgreementMsg> {
172 private java.lang.String id;
173 private java.lang.String relatedIMEventOriginalID;
174 private java.lang.String userID;
175 private long validFromMillis;
176 private long validToMillis;
177 private java.lang.String role;
178 private gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg fullPriceTableRef;
180 /** Creates a new Builder */
182 super(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.SCHEMA$);
185 /** Creates a Builder by copying an existing Builder */
186 private Builder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder other) {
190 /** Creates a Builder by copying an existing UserAgreementMsg instance */
191 private Builder(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg other) {
192 super(gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.SCHEMA$);
193 if (isValidValue(fields()[0], other.id)) {
194 this.id = (java.lang.String) data().deepCopy(fields()[0].schema(), other.id);
195 fieldSetFlags()[0] = true;
197 if (isValidValue(fields()[1], other.relatedIMEventOriginalID)) {
198 this.relatedIMEventOriginalID = (java.lang.String) data().deepCopy(fields()[1].schema(), other.relatedIMEventOriginalID);
199 fieldSetFlags()[1] = true;
201 if (isValidValue(fields()[2], other.userID)) {
202 this.userID = (java.lang.String) data().deepCopy(fields()[2].schema(), other.userID);
203 fieldSetFlags()[2] = true;
205 if (isValidValue(fields()[3], other.validFromMillis)) {
206 this.validFromMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.validFromMillis);
207 fieldSetFlags()[3] = true;
209 if (isValidValue(fields()[4], other.validToMillis)) {
210 this.validToMillis = (java.lang.Long) data().deepCopy(fields()[4].schema(), other.validToMillis);
211 fieldSetFlags()[4] = true;
213 if (isValidValue(fields()[5], other.role)) {
214 this.role = (java.lang.String) data().deepCopy(fields()[5].schema(), other.role);
215 fieldSetFlags()[5] = true;
217 if (isValidValue(fields()[6], other.fullPriceTableRef)) {
218 this.fullPriceTableRef = (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg) data().deepCopy(fields()[6].schema(), other.fullPriceTableRef);
219 fieldSetFlags()[6] = true;
223 /** Gets the value of the 'id' field */
224 public java.lang.String getId() {
228 /** Sets the value of the 'id' field */
229 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setId(java.lang.String value) {
230 validate(fields()[0], value);
232 fieldSetFlags()[0] = true;
236 /** Checks whether the 'id' field has been set */
237 public boolean hasId() {
238 return fieldSetFlags()[0];
241 /** Clears the value of the 'id' field */
242 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearId() {
244 fieldSetFlags()[0] = false;
248 /** Gets the value of the 'relatedIMEventOriginalID' field */
249 public java.lang.String getRelatedIMEventOriginalID() {
250 return relatedIMEventOriginalID;
253 /** Sets the value of the 'relatedIMEventOriginalID' field */
254 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRelatedIMEventOriginalID(java.lang.String value) {
255 validate(fields()[1], value);
256 this.relatedIMEventOriginalID = value;
257 fieldSetFlags()[1] = true;
261 /** Checks whether the 'relatedIMEventOriginalID' field has been set */
262 public boolean hasRelatedIMEventOriginalID() {
263 return fieldSetFlags()[1];
266 /** Clears the value of the 'relatedIMEventOriginalID' field */
267 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRelatedIMEventOriginalID() {
268 relatedIMEventOriginalID = null;
269 fieldSetFlags()[1] = false;
273 /** Gets the value of the 'userID' field */
274 public java.lang.String getUserID() {
278 /** Sets the value of the 'userID' field */
279 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setUserID(java.lang.String value) {
280 validate(fields()[2], value);
282 fieldSetFlags()[2] = true;
286 /** Checks whether the 'userID' field has been set */
287 public boolean hasUserID() {
288 return fieldSetFlags()[2];
291 /** Clears the value of the 'userID' field */
292 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearUserID() {
294 fieldSetFlags()[2] = false;
298 /** Gets the value of the 'validFromMillis' field */
299 public java.lang.Long getValidFromMillis() {
300 return validFromMillis;
303 /** Sets the value of the 'validFromMillis' field */
304 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setValidFromMillis(long value) {
305 validate(fields()[3], value);
306 this.validFromMillis = value;
307 fieldSetFlags()[3] = true;
311 /** Checks whether the 'validFromMillis' field has been set */
312 public boolean hasValidFromMillis() {
313 return fieldSetFlags()[3];
316 /** Clears the value of the 'validFromMillis' field */
317 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearValidFromMillis() {
318 fieldSetFlags()[3] = false;
322 /** Gets the value of the 'validToMillis' field */
323 public java.lang.Long getValidToMillis() {
324 return validToMillis;
327 /** Sets the value of the 'validToMillis' field */
328 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setValidToMillis(long value) {
329 validate(fields()[4], value);
330 this.validToMillis = value;
331 fieldSetFlags()[4] = true;
335 /** Checks whether the 'validToMillis' field has been set */
336 public boolean hasValidToMillis() {
337 return fieldSetFlags()[4];
340 /** Clears the value of the 'validToMillis' field */
341 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearValidToMillis() {
342 fieldSetFlags()[4] = false;
346 /** Gets the value of the 'role' field */
347 public java.lang.String getRole() {
351 /** Sets the value of the 'role' field */
352 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRole(java.lang.String value) {
353 validate(fields()[5], value);
355 fieldSetFlags()[5] = true;
359 /** Checks whether the 'role' field has been set */
360 public boolean hasRole() {
361 return fieldSetFlags()[5];
364 /** Clears the value of the 'role' field */
365 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRole() {
367 fieldSetFlags()[5] = false;
371 /** Gets the value of the 'fullPriceTableRef' field */
372 public gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg getFullPriceTableRef() {
373 return fullPriceTableRef;
376 /** Sets the value of the 'fullPriceTableRef' field */
377 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setFullPriceTableRef(gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg value) {
378 validate(fields()[6], value);
379 this.fullPriceTableRef = value;
380 fieldSetFlags()[6] = true;
384 /** Checks whether the 'fullPriceTableRef' field has been set */
385 public boolean hasFullPriceTableRef() {
386 return fieldSetFlags()[6];
389 /** Clears the value of the 'fullPriceTableRef' field */
390 public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearFullPriceTableRef() {
391 fullPriceTableRef = null;
392 fieldSetFlags()[6] = false;
397 public UserAgreementMsg build() {
399 UserAgreementMsg record = new UserAgreementMsg();
400 record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]);
401 record.relatedIMEventOriginalID = fieldSetFlags()[1] ? this.relatedIMEventOriginalID : (java.lang.String) defaultValue(fields()[1]);
402 record.userID = fieldSetFlags()[2] ? this.userID : (java.lang.String) defaultValue(fields()[2]);
403 record.validFromMillis = fieldSetFlags()[3] ? this.validFromMillis : (java.lang.Long) defaultValue(fields()[3]);
404 record.validToMillis = fieldSetFlags()[4] ? this.validToMillis : (java.lang.Long) defaultValue(fields()[4]);
405 record.role = fieldSetFlags()[5] ? this.role : (java.lang.String) defaultValue(fields()[5]);
406 record.fullPriceTableRef = fieldSetFlags()[6] ? this.fullPriceTableRef : (gr.grnet.aquarium.message.avro.gen.FullPriceTableMsg) defaultValue(fields()[6]);
408 } catch (Exception e) {
409 throw new org.apache.avro.AvroRuntimeException(e);