2 * Autogenerated by Avro
6 package gr.grnet.aquarium.message.avro.gen;
7 @SuppressWarnings("all")
8 public class EffectivePriceTableMsg 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\":\"EffectivePriceTableMsg\",\"namespace\":\"gr.grnet.aquarium.message.avro.gen\",\"fields\":[{\"name\":\"priceOverrides\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"EffectiveUnitPriceMsg\",\"fields\":[{\"name\":\"unitPrice\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"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\"]}]}}}]}");
10 @Deprecated public java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg> priceOverrides;
13 * Default constructor.
15 public EffectivePriceTableMsg() {}
18 * All-args constructor.
20 public EffectivePriceTableMsg(java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg> priceOverrides) {
21 this.priceOverrides = priceOverrides;
24 public org.apache.avro.Schema getSchema() { return SCHEMA$; }
25 // Used by DatumWriter. Applications should not call.
26 public java.lang.Object get(int field$) {
28 case 0: return priceOverrides;
29 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
32 // Used by DatumReader. Applications should not call.
33 @SuppressWarnings(value="unchecked")
34 public void put(int field$, java.lang.Object value$) {
36 case 0: priceOverrides = (java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg>)value$; break;
37 default: throw new org.apache.avro.AvroRuntimeException("Bad index");
42 * Gets the value of the 'priceOverrides' field.
44 public java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg> getPriceOverrides() {
45 return priceOverrides;
49 * Sets the value of the 'priceOverrides' field.
50 * @param value the value to set.
52 public void setPriceOverrides(java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg> value) {
53 this.priceOverrides = value;
56 /** Creates a new EffectivePriceTableMsg RecordBuilder */
57 public static gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder newBuilder() {
58 return new gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder();
61 /** Creates a new EffectivePriceTableMsg RecordBuilder by copying an existing Builder */
62 public static gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder other) {
63 return new gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder(other);
66 /** Creates a new EffectivePriceTableMsg RecordBuilder by copying an existing EffectivePriceTableMsg instance */
67 public static gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder newBuilder(gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg other) {
68 return new gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder(other);
72 * RecordBuilder for EffectivePriceTableMsg instances.
74 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<EffectivePriceTableMsg>
75 implements org.apache.avro.data.RecordBuilder<EffectivePriceTableMsg> {
77 private java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg> priceOverrides;
79 /** Creates a new Builder */
81 super(gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.SCHEMA$);
84 /** Creates a Builder by copying an existing Builder */
85 private Builder(gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder other) {
89 /** Creates a Builder by copying an existing EffectivePriceTableMsg instance */
90 private Builder(gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg other) {
91 super(gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.SCHEMA$);
92 if (isValidValue(fields()[0], other.priceOverrides)) {
93 this.priceOverrides = (java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg>) data().deepCopy(fields()[0].schema(), other.priceOverrides);
94 fieldSetFlags()[0] = true;
98 /** Gets the value of the 'priceOverrides' field */
99 public java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg> getPriceOverrides() {
100 return priceOverrides;
103 /** Sets the value of the 'priceOverrides' field */
104 public gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder setPriceOverrides(java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg> value) {
105 validate(fields()[0], value);
106 this.priceOverrides = value;
107 fieldSetFlags()[0] = true;
111 /** Checks whether the 'priceOverrides' field has been set */
112 public boolean hasPriceOverrides() {
113 return fieldSetFlags()[0];
116 /** Clears the value of the 'priceOverrides' field */
117 public gr.grnet.aquarium.message.avro.gen.EffectivePriceTableMsg.Builder clearPriceOverrides() {
118 priceOverrides = null;
119 fieldSetFlags()[0] = false;
124 public EffectivePriceTableMsg build() {
126 EffectivePriceTableMsg record = new EffectivePriceTableMsg();
127 record.priceOverrides = fieldSetFlags()[0] ? this.priceOverrides : (java.util.List<gr.grnet.aquarium.message.avro.gen.EffectiveUnitPriceMsg>) defaultValue(fields()[0]);
129 } catch (Exception e) {
130 throw new org.apache.avro.AvroRuntimeException(e);