2 * Autogenerated by Avro
6 package gr.grnet.aquarium.message.avro.gen;
7 @SuppressWarnings("all")
8 public class _WorkingAgreementHistory 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\":\"_WorkingAgreementHistory\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"agreements\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"_UserAgreement\",\"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\":\"_FullPriceTable\",\"fields\":[{\"name\":\"perResource\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"_SelectorValue\",\"fields\":[{\"name\":\"selectorValue\",\"type\":[{\"type\":\"record\",\"name\":\"_EffectivePriceTable\",\"fields\":[{\"name\":\"priceOverrides\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"_EffectiveUnitPrice\",\"fields\":[{\"name\":\"unitPrice\",\"type\":\"double\"},{\"name\":\"when\",\"type\":[{\"type\":\"record\",\"name\":\"_CronSpecTuple\",\"fields\":[{\"name\":\"a\",\"type\":\"string\"},{\"name\":\"b\",\"type\":\"string\"}]},\"null\"]}]}}}]},{\"type\":\"map\",\"values\":\"_SelectorValue\"}]}]}}}}]},\"null\"]}]}}}]}");
10 @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen._UserAgreement> 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._UserAgreement>)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._UserAgreement> 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._UserAgreement> value) {
40 this.agreements = value;
43 /** Creates a new _WorkingAgreementHistory RecordBuilder */
44 public static gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder newBuilder() {
45 return new gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder();
48 /** Creates a new _WorkingAgreementHistory RecordBuilder by copying an existing Builder */
49 public static gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder other) {
50 return new gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder(other);
53 /** Creates a new _WorkingAgreementHistory RecordBuilder by copying an existing _WorkingAgreementHistory instance */
54 public static gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder newBuilder(gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory other) {
55 return new gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder(other);
59 * RecordBuilder for _WorkingAgreementHistory instances.
61 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<_WorkingAgreementHistory>
62 implements org.apache.avro.data.RecordBuilder<_WorkingAgreementHistory> {
64 private java.util.List<gr.grnet.aquarium.message.avro.gen._UserAgreement> agreements;
66 /** Creates a new Builder */
68 super(gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.SCHEMA$);
71 /** Creates a Builder by copying an existing Builder */
72 private Builder(gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder other) {
76 /** Creates a Builder by copying an existing _WorkingAgreementHistory instance */
77 private Builder(gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory other) {
78 super(gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.SCHEMA$);
79 if (isValidValue(fields()[0], other.agreements)) {
80 this.agreements = (java.util.List<gr.grnet.aquarium.message.avro.gen._UserAgreement>) 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._UserAgreement> getAgreements() {
90 /** Sets the value of the 'agreements' field */
91 public gr.grnet.aquarium.message.avro.gen._WorkingAgreementHistory.Builder setAgreements(java.util.List<gr.grnet.aquarium.message.avro.gen._UserAgreement> 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._WorkingAgreementHistory.Builder clearAgreements() {
106 fieldSetFlags()[0] = false;
111 public _WorkingAgreementHistory build() {
113 _WorkingAgreementHistory record = new _WorkingAgreementHistory();
114 record.agreements = fieldSetFlags()[0] ? this.agreements : (java.util.List<gr.grnet.aquarium.message.avro.gen._UserAgreement>) defaultValue(fields()[0]);
116 } catch (Exception e) {
117 throw new org.apache.avro.AvroRuntimeException(e);