2 * Autogenerated by Avro
6 package gr.grnet.aquarium.message.avro.gen;
7 @SuppressWarnings("all")
8 public class WorkingAgreementHistoryMsg 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\":\"WorkingAgreementHistoryMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"agreements\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"UserAgreementMsg\",\"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.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg> agreements;
11 public org.apache.avro.Schema getSchema() { return SCHEMA$; }
12 // Used by DatumWriter. Applications should not call.
13 public java.lang.Object get(int field$) {
15 case 0: return agreements;
16 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
19 // Used by DatumReader. Applications should not call.
20 @SuppressWarnings(value="unchecked")
21 public void put(int field$, java.lang.Object value$) {
23 case 0: agreements = (java.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg>)value$; break;
24 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
29 * Gets the value of the 'agreements' field.
31 public java.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg> getAgreements() {
36 * Sets the value of the 'agreements' field.
37 * @param value the value to set.
39 public void setAgreements(java.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg> value) {
40 this.agreements = value;
43 /** Creates a new WorkingAgreementHistoryMsg RecordBuilder */
44 public static gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder newBuilder() {
45 return new gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder();
48 /** Creates a new WorkingAgreementHistoryMsg RecordBuilder by copying an existing Builder */
49 public static gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder other) {
50 return new gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder(other);
53 /** Creates a new WorkingAgreementHistoryMsg RecordBuilder by copying an existing WorkingAgreementHistoryMsg instance */
54 public static gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg other) {
55 return new gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder(other);
59 * RecordBuilder for WorkingAgreementHistoryMsg instances.
61 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<WorkingAgreementHistoryMsg>
62 implements org.apache.avro.data.RecordBuilder<WorkingAgreementHistoryMsg> {
64 private java.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg> agreements;
66 /** Creates a new Builder */
68 super(gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.SCHEMA$);
71 /** Creates a Builder by copying an existing Builder */
72 private Builder(gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder other) {
76 /** Creates a Builder by copying an existing WorkingAgreementHistoryMsg instance */
77 private Builder(gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg other) {
78 super(gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.SCHEMA$);
79 if (isValidValue(fields()[0], other.agreements)) {
80 this.agreements = (java.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg>) data().deepCopy(fields()[0].schema(), other.agreements);
81 fieldSetFlags()[0] = true;
85 /** Gets the value of the 'agreements' field */
86 public java.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg> getAgreements() {
90 /** Sets the value of the 'agreements' field */
91 public gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder setAgreements(java.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg> value) {
92 validate(fields()[0], value);
93 this.agreements = value;
94 fieldSetFlags()[0] = true;
98 /** Checks whether the 'agreements' field has been set */
99 public boolean hasAgreements() {
100 return fieldSetFlags()[0];
103 /** Clears the value of the 'agreements' field */
104 public gr.grnet.aquarium.message.avro.gen.WorkingAgreementHistoryMsg.Builder clearAgreements() {
106 fieldSetFlags()[0] = false;
111 public WorkingAgreementHistoryMsg build() {
113 WorkingAgreementHistoryMsg record = new WorkingAgreementHistoryMsg();
114 record.agreements = fieldSetFlags()[0] ? this.agreements : (java.util.List<gr.grnet.aquarium.message.avro.gen.UserAgreementMsg>) defaultValue(fields()[0]);
116 } catch (Exception e) {
117 throw new org.apache.avro.AvroRuntimeException(e);