<artifactId>quartz-jboss</artifactId>
<version>2.1.5</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro-ipc</artifactId>
+ <version>1.7.1</version>
+ </dependency>
</dependencies>
<!--Build configuration-->
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro-maven-plugin</artifactId>
+ <version>1.7.1</version>
+ <executions>
+ <execution>
+ <id>schemas</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>schema</goal>
+ <goal>protocol</goal>
+ <goal>idl-protocol</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <exclude>**/mapred/tether/**</exclude>
+ </excludes>
+ <sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
+ <outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
+ <!--<outputDirectory>${project.build.directory}/generated-sources/java</outputDirectory>-->
+ <testSourceDirectory>${project.basedir}/src/test/avro/</testSourceDirectory>
+ <testOutputDirectory>${project.basedir}/src/test/java/</testOutputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<!--<plugin>-->
<!--<groupId>org.apache.maven.plugins</groupId>-->
<!--<artifactId>maven-shade-plugin</artifactId>-->
--- /dev/null
+/*
+ * Copyright 2011-2012 GRNET S.A. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and
+ * documentation are those of the authors and should not be
+ * interpreted as representing official policies, either expressed
+ * or implied, of GRNET S.A.
+ */
+
+@namespace("gr.grnet.aquarium.message.avro")
+protocol AquariumEvents {
+ enum EventVersion {
+ VERSION_1_0
+ }
+
+ record AnyValue {
+ union {
+ null,
+ int,
+ long,
+ boolean,
+ double,
+ bytes,
+ string
+ } anyValue;
+ }
+
+ record ResourceEvent {
+ string @aliases(["ID"]) originalID;
+ string @aliased(["_id, idInStore"]) inStoreID;
+ long occurredMillis;
+ long receivedMillis;
+ string userID;
+ string clientID;
+ EventVersion eventVersion;
+ string @aliases(["resource"]) resourceType;
+ string instanceID;
+ string value;
+ map<AnyValue> details;
+ }
+
+ record IMEvent {
+ string @aliases(["ID"]) originalID;
+ string @aliased(["_id, idInStore"]) inStoreID;
+ long occurredMillis;
+ long receivedMillis;
+ string userID;
+ string clientID;
+ EventVersion eventVersion;
+ boolean isActive;
+ string role;
+ map<AnyValue> details;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package gr.grnet.aquarium.message.avro;
+@SuppressWarnings("all")
+public class AnyValue extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AnyValue\",\"namespace\":\"gr.grnet.aquarium.message.avro\",\"fields\":[{\"name\":\"anyValue\",\"type\":[\"null\",\"int\",\"long\",\"boolean\",\"double\",\"bytes\",\"string\"]}]}");
+ @Deprecated public java.lang.Object anyValue;
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0: return anyValue;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value="unchecked")
+ public void put(int field$, java.lang.Object value$) {
+ switch (field$) {
+ case 0: anyValue = (java.lang.Object)value$; break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ /**
+ * Gets the value of the 'anyValue' field.
+ */
+ public java.lang.Object getAnyValue() {
+ return anyValue;
+ }
+
+ /**
+ * Sets the value of the 'anyValue' field.
+ * @param value the value to set.
+ */
+ public void setAnyValue(java.lang.Object value) {
+ this.anyValue = value;
+ }
+
+ /** Creates a new AnyValue RecordBuilder */
+ public static gr.grnet.aquarium.message.avro.AnyValue.Builder newBuilder() {
+ return new gr.grnet.aquarium.message.avro.AnyValue.Builder();
+ }
+
+ /** Creates a new AnyValue RecordBuilder by copying an existing Builder */
+ public static gr.grnet.aquarium.message.avro.AnyValue.Builder newBuilder(gr.grnet.aquarium.message.avro.AnyValue.Builder other) {
+ return new gr.grnet.aquarium.message.avro.AnyValue.Builder(other);
+ }
+
+ /** Creates a new AnyValue RecordBuilder by copying an existing AnyValue instance */
+ public static gr.grnet.aquarium.message.avro.AnyValue.Builder newBuilder(gr.grnet.aquarium.message.avro.AnyValue other) {
+ return new gr.grnet.aquarium.message.avro.AnyValue.Builder(other);
+ }
+
+ /**
+ * RecordBuilder for AnyValue instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<AnyValue>
+ implements org.apache.avro.data.RecordBuilder<AnyValue> {
+
+ private java.lang.Object anyValue;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(gr.grnet.aquarium.message.avro.AnyValue.SCHEMA$);
+ }
+
+ /** Creates a Builder by copying an existing Builder */
+ private Builder(gr.grnet.aquarium.message.avro.AnyValue.Builder other) {
+ super(other);
+ }
+
+ /** Creates a Builder by copying an existing AnyValue instance */
+ private Builder(gr.grnet.aquarium.message.avro.AnyValue other) {
+ super(gr.grnet.aquarium.message.avro.AnyValue.SCHEMA$);
+ if (isValidValue(fields()[0], other.anyValue)) {
+ this.anyValue = (java.lang.Object) data().deepCopy(fields()[0].schema(), other.anyValue);
+ fieldSetFlags()[0] = true;
+ }
+ }
+
+ /** Gets the value of the 'anyValue' field */
+ public java.lang.Object getAnyValue() {
+ return anyValue;
+ }
+
+ /** Sets the value of the 'anyValue' field */
+ public gr.grnet.aquarium.message.avro.AnyValue.Builder setAnyValue(java.lang.Object value) {
+ validate(fields()[0], value);
+ this.anyValue = value;
+ fieldSetFlags()[0] = true;
+ return this;
+ }
+
+ /** Checks whether the 'anyValue' field has been set */
+ public boolean hasAnyValue() {
+ return fieldSetFlags()[0];
+ }
+
+ /** Clears the value of the 'anyValue' field */
+ public gr.grnet.aquarium.message.avro.AnyValue.Builder clearAnyValue() {
+ anyValue = null;
+ fieldSetFlags()[0] = false;
+ return this;
+ }
+
+ @Override
+ public AnyValue build() {
+ try {
+ AnyValue record = new AnyValue();
+ record.anyValue = fieldSetFlags()[0] ? this.anyValue : (java.lang.Object) defaultValue(fields()[0]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
+ }
+}
--- /dev/null
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package gr.grnet.aquarium.message.avro;
+
+@SuppressWarnings("all")
+public interface AquariumEvents {
+ public static final org.apache.avro.Protocol PROTOCOL = org.apache.avro.Protocol.parse("{\"protocol\":\"AquariumEvents\",\"namespace\":\"gr.grnet.aquarium.message.avro\",\"types\":[{\"type\":\"enum\",\"name\":\"EventVersion\",\"symbols\":[\"VERSION_1_0\"]},{\"type\":\"record\",\"name\":\"AnyValue\",\"fields\":[{\"name\":\"anyValue\",\"type\":[\"null\",\"int\",\"long\",\"boolean\",\"double\",\"bytes\",\"string\"]}]},{\"type\":\"record\",\"name\":\"ResourceEvent\",\"fields\":[{\"name\":\"originalID\",\"type\":\"string\",\"aliases\":[\"ID\"]},{\"name\":\"inStoreID\",\"type\":\"string\"},{\"name\":\"occurredMillis\",\"type\":\"long\"},{\"name\":\"receivedMillis\",\"type\":\"long\"},{\"name\":\"userID\",\"type\":\"string\"},{\"name\":\"clientID\",\"type\":\"string\"},{\"name\":\"eventVersion\",\"type\":\"EventVersion\"},{\"name\":\"resourceType\",\"type\":\"string\",\"aliases\":[\"resource\"]},{\"name\":\"instanceID\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"map\",\"values\":\"AnyValue\"}}]},{\"type\":\"record\",\"name\":\"IMEvent\",\"fields\":[{\"name\":\"originalID\",\"type\":\"string\",\"aliases\":[\"ID\"]},{\"name\":\"inStoreID\",\"type\":\"string\"},{\"name\":\"occurredMillis\",\"type\":\"long\"},{\"name\":\"receivedMillis\",\"type\":\"long\"},{\"name\":\"userID\",\"type\":\"string\"},{\"name\":\"clientID\",\"type\":\"string\"},{\"name\":\"eventVersion\",\"type\":\"EventVersion\"},{\"name\":\"isActive\",\"type\":\"boolean\"},{\"name\":\"role\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"map\",\"values\":\"AnyValue\"}}]}],\"messages\":{}}");
+
+ @SuppressWarnings("all")
+ public interface Callback extends AquariumEvents {
+ public static final org.apache.avro.Protocol PROTOCOL = gr.grnet.aquarium.message.avro.AquariumEvents.PROTOCOL;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package gr.grnet.aquarium.message.avro;
+@SuppressWarnings("all")
+public enum EventVersion {
+ VERSION_1_0 ;
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"enum\",\"name\":\"EventVersion\",\"namespace\":\"gr.grnet.aquarium.message.avro\",\"symbols\":[\"VERSION_1_0\"]}");
+}
--- /dev/null
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package gr.grnet.aquarium.message.avro;
+@SuppressWarnings("all")
+public class IMEvent extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"IMEvent\",\"namespace\":\"gr.grnet.aquarium.message.avro\",\"fields\":[{\"name\":\"originalID\",\"type\":\"string\",\"aliases\":[\"ID\"]},{\"name\":\"inStoreID\",\"type\":\"string\"},{\"name\":\"occurredMillis\",\"type\":\"long\"},{\"name\":\"receivedMillis\",\"type\":\"long\"},{\"name\":\"userID\",\"type\":\"string\"},{\"name\":\"clientID\",\"type\":\"string\"},{\"name\":\"eventVersion\",\"type\":{\"type\":\"enum\",\"name\":\"EventVersion\",\"symbols\":[\"VERSION_1_0\"]}},{\"name\":\"isActive\",\"type\":\"boolean\"},{\"name\":\"role\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"AnyValue\",\"fields\":[{\"name\":\"anyValue\",\"type\":[\"null\",\"int\",\"long\",\"boolean\",\"double\",\"bytes\",\"string\"]}]}}}]}");
+ @Deprecated public java.lang.CharSequence originalID;
+ @Deprecated public java.lang.CharSequence inStoreID;
+ @Deprecated public long occurredMillis;
+ @Deprecated public long receivedMillis;
+ @Deprecated public java.lang.CharSequence userID;
+ @Deprecated public java.lang.CharSequence clientID;
+ @Deprecated public gr.grnet.aquarium.message.avro.EventVersion eventVersion;
+ @Deprecated public boolean isActive;
+ @Deprecated public java.lang.CharSequence role;
+ @Deprecated public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> details;
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0: return originalID;
+ case 1: return inStoreID;
+ case 2: return occurredMillis;
+ case 3: return receivedMillis;
+ case 4: return userID;
+ case 5: return clientID;
+ case 6: return eventVersion;
+ case 7: return isActive;
+ case 8: return role;
+ case 9: return details;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value="unchecked")
+ public void put(int field$, java.lang.Object value$) {
+ switch (field$) {
+ case 0: originalID = (java.lang.CharSequence)value$; break;
+ case 1: inStoreID = (java.lang.CharSequence)value$; break;
+ case 2: occurredMillis = (java.lang.Long)value$; break;
+ case 3: receivedMillis = (java.lang.Long)value$; break;
+ case 4: userID = (java.lang.CharSequence)value$; break;
+ case 5: clientID = (java.lang.CharSequence)value$; break;
+ case 6: eventVersion = (gr.grnet.aquarium.message.avro.EventVersion)value$; break;
+ case 7: isActive = (java.lang.Boolean)value$; break;
+ case 8: role = (java.lang.CharSequence)value$; break;
+ case 9: details = (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue>)value$; break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ /**
+ * Gets the value of the 'originalID' field.
+ */
+ public java.lang.CharSequence getOriginalID() {
+ return originalID;
+ }
+
+ /**
+ * Sets the value of the 'originalID' field.
+ * @param value the value to set.
+ */
+ public void setOriginalID(java.lang.CharSequence value) {
+ this.originalID = value;
+ }
+
+ /**
+ * Gets the value of the 'inStoreID' field.
+ */
+ public java.lang.CharSequence getInStoreID() {
+ return inStoreID;
+ }
+
+ /**
+ * Sets the value of the 'inStoreID' field.
+ * @param value the value to set.
+ */
+ public void setInStoreID(java.lang.CharSequence value) {
+ this.inStoreID = value;
+ }
+
+ /**
+ * Gets the value of the 'occurredMillis' field.
+ */
+ public java.lang.Long getOccurredMillis() {
+ return occurredMillis;
+ }
+
+ /**
+ * Sets the value of the 'occurredMillis' field.
+ * @param value the value to set.
+ */
+ public void setOccurredMillis(java.lang.Long value) {
+ this.occurredMillis = value;
+ }
+
+ /**
+ * Gets the value of the 'receivedMillis' field.
+ */
+ public java.lang.Long getReceivedMillis() {
+ return receivedMillis;
+ }
+
+ /**
+ * Sets the value of the 'receivedMillis' field.
+ * @param value the value to set.
+ */
+ public void setReceivedMillis(java.lang.Long value) {
+ this.receivedMillis = value;
+ }
+
+ /**
+ * Gets the value of the 'userID' field.
+ */
+ public java.lang.CharSequence getUserID() {
+ return userID;
+ }
+
+ /**
+ * Sets the value of the 'userID' field.
+ * @param value the value to set.
+ */
+ public void setUserID(java.lang.CharSequence value) {
+ this.userID = value;
+ }
+
+ /**
+ * Gets the value of the 'clientID' field.
+ */
+ public java.lang.CharSequence getClientID() {
+ return clientID;
+ }
+
+ /**
+ * Sets the value of the 'clientID' field.
+ * @param value the value to set.
+ */
+ public void setClientID(java.lang.CharSequence value) {
+ this.clientID = value;
+ }
+
+ /**
+ * Gets the value of the 'eventVersion' field.
+ */
+ public gr.grnet.aquarium.message.avro.EventVersion getEventVersion() {
+ return eventVersion;
+ }
+
+ /**
+ * Sets the value of the 'eventVersion' field.
+ * @param value the value to set.
+ */
+ public void setEventVersion(gr.grnet.aquarium.message.avro.EventVersion value) {
+ this.eventVersion = value;
+ }
+
+ /**
+ * Gets the value of the 'isActive' field.
+ */
+ public java.lang.Boolean getIsActive() {
+ return isActive;
+ }
+
+ /**
+ * Sets the value of the 'isActive' field.
+ * @param value the value to set.
+ */
+ public void setIsActive(java.lang.Boolean value) {
+ this.isActive = value;
+ }
+
+ /**
+ * Gets the value of the 'role' field.
+ */
+ public java.lang.CharSequence getRole() {
+ return role;
+ }
+
+ /**
+ * Sets the value of the 'role' field.
+ * @param value the value to set.
+ */
+ public void setRole(java.lang.CharSequence value) {
+ this.role = value;
+ }
+
+ /**
+ * Gets the value of the 'details' field.
+ */
+ public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> getDetails() {
+ return details;
+ }
+
+ /**
+ * Sets the value of the 'details' field.
+ * @param value the value to set.
+ */
+ public void setDetails(java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> value) {
+ this.details = value;
+ }
+
+ /** Creates a new IMEvent RecordBuilder */
+ public static gr.grnet.aquarium.message.avro.IMEvent.Builder newBuilder() {
+ return new gr.grnet.aquarium.message.avro.IMEvent.Builder();
+ }
+
+ /** Creates a new IMEvent RecordBuilder by copying an existing Builder */
+ public static gr.grnet.aquarium.message.avro.IMEvent.Builder newBuilder(gr.grnet.aquarium.message.avro.IMEvent.Builder other) {
+ return new gr.grnet.aquarium.message.avro.IMEvent.Builder(other);
+ }
+
+ /** Creates a new IMEvent RecordBuilder by copying an existing IMEvent instance */
+ public static gr.grnet.aquarium.message.avro.IMEvent.Builder newBuilder(gr.grnet.aquarium.message.avro.IMEvent other) {
+ return new gr.grnet.aquarium.message.avro.IMEvent.Builder(other);
+ }
+
+ /**
+ * RecordBuilder for IMEvent instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<IMEvent>
+ implements org.apache.avro.data.RecordBuilder<IMEvent> {
+
+ private java.lang.CharSequence originalID;
+ private java.lang.CharSequence inStoreID;
+ private long occurredMillis;
+ private long receivedMillis;
+ private java.lang.CharSequence userID;
+ private java.lang.CharSequence clientID;
+ private gr.grnet.aquarium.message.avro.EventVersion eventVersion;
+ private boolean isActive;
+ private java.lang.CharSequence role;
+ private java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> details;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(gr.grnet.aquarium.message.avro.IMEvent.SCHEMA$);
+ }
+
+ /** Creates a Builder by copying an existing Builder */
+ private Builder(gr.grnet.aquarium.message.avro.IMEvent.Builder other) {
+ super(other);
+ }
+
+ /** Creates a Builder by copying an existing IMEvent instance */
+ private Builder(gr.grnet.aquarium.message.avro.IMEvent other) {
+ super(gr.grnet.aquarium.message.avro.IMEvent.SCHEMA$);
+ if (isValidValue(fields()[0], other.originalID)) {
+ this.originalID = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.originalID);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.inStoreID)) {
+ this.inStoreID = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.inStoreID);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.occurredMillis)) {
+ this.occurredMillis = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.occurredMillis);
+ fieldSetFlags()[2] = true;
+ }
+ if (isValidValue(fields()[3], other.receivedMillis)) {
+ this.receivedMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.receivedMillis);
+ fieldSetFlags()[3] = true;
+ }
+ if (isValidValue(fields()[4], other.userID)) {
+ this.userID = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.userID);
+ fieldSetFlags()[4] = true;
+ }
+ if (isValidValue(fields()[5], other.clientID)) {
+ this.clientID = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.clientID);
+ fieldSetFlags()[5] = true;
+ }
+ if (isValidValue(fields()[6], other.eventVersion)) {
+ this.eventVersion = (gr.grnet.aquarium.message.avro.EventVersion) data().deepCopy(fields()[6].schema(), other.eventVersion);
+ fieldSetFlags()[6] = true;
+ }
+ if (isValidValue(fields()[7], other.isActive)) {
+ this.isActive = (java.lang.Boolean) data().deepCopy(fields()[7].schema(), other.isActive);
+ fieldSetFlags()[7] = true;
+ }
+ if (isValidValue(fields()[8], other.role)) {
+ this.role = (java.lang.CharSequence) data().deepCopy(fields()[8].schema(), other.role);
+ fieldSetFlags()[8] = true;
+ }
+ if (isValidValue(fields()[9], other.details)) {
+ this.details = (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue>) data().deepCopy(fields()[9].schema(), other.details);
+ fieldSetFlags()[9] = true;
+ }
+ }
+
+ /** Gets the value of the 'originalID' field */
+ public java.lang.CharSequence getOriginalID() {
+ return originalID;
+ }
+
+ /** Sets the value of the 'originalID' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setOriginalID(java.lang.CharSequence value) {
+ validate(fields()[0], value);
+ this.originalID = value;
+ fieldSetFlags()[0] = true;
+ return this;
+ }
+
+ /** Checks whether the 'originalID' field has been set */
+ public boolean hasOriginalID() {
+ return fieldSetFlags()[0];
+ }
+
+ /** Clears the value of the 'originalID' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearOriginalID() {
+ originalID = null;
+ fieldSetFlags()[0] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'inStoreID' field */
+ public java.lang.CharSequence getInStoreID() {
+ return inStoreID;
+ }
+
+ /** Sets the value of the 'inStoreID' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setInStoreID(java.lang.CharSequence value) {
+ validate(fields()[1], value);
+ this.inStoreID = value;
+ fieldSetFlags()[1] = true;
+ return this;
+ }
+
+ /** Checks whether the 'inStoreID' field has been set */
+ public boolean hasInStoreID() {
+ return fieldSetFlags()[1];
+ }
+
+ /** Clears the value of the 'inStoreID' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearInStoreID() {
+ inStoreID = null;
+ fieldSetFlags()[1] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'occurredMillis' field */
+ public java.lang.Long getOccurredMillis() {
+ return occurredMillis;
+ }
+
+ /** Sets the value of the 'occurredMillis' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setOccurredMillis(long value) {
+ validate(fields()[2], value);
+ this.occurredMillis = value;
+ fieldSetFlags()[2] = true;
+ return this;
+ }
+
+ /** Checks whether the 'occurredMillis' field has been set */
+ public boolean hasOccurredMillis() {
+ return fieldSetFlags()[2];
+ }
+
+ /** Clears the value of the 'occurredMillis' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearOccurredMillis() {
+ fieldSetFlags()[2] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'receivedMillis' field */
+ public java.lang.Long getReceivedMillis() {
+ return receivedMillis;
+ }
+
+ /** Sets the value of the 'receivedMillis' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setReceivedMillis(long value) {
+ validate(fields()[3], value);
+ this.receivedMillis = value;
+ fieldSetFlags()[3] = true;
+ return this;
+ }
+
+ /** Checks whether the 'receivedMillis' field has been set */
+ public boolean hasReceivedMillis() {
+ return fieldSetFlags()[3];
+ }
+
+ /** Clears the value of the 'receivedMillis' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearReceivedMillis() {
+ fieldSetFlags()[3] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'userID' field */
+ public java.lang.CharSequence getUserID() {
+ return userID;
+ }
+
+ /** Sets the value of the 'userID' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setUserID(java.lang.CharSequence value) {
+ validate(fields()[4], value);
+ this.userID = value;
+ fieldSetFlags()[4] = true;
+ return this;
+ }
+
+ /** Checks whether the 'userID' field has been set */
+ public boolean hasUserID() {
+ return fieldSetFlags()[4];
+ }
+
+ /** Clears the value of the 'userID' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearUserID() {
+ userID = null;
+ fieldSetFlags()[4] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'clientID' field */
+ public java.lang.CharSequence getClientID() {
+ return clientID;
+ }
+
+ /** Sets the value of the 'clientID' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setClientID(java.lang.CharSequence value) {
+ validate(fields()[5], value);
+ this.clientID = value;
+ fieldSetFlags()[5] = true;
+ return this;
+ }
+
+ /** Checks whether the 'clientID' field has been set */
+ public boolean hasClientID() {
+ return fieldSetFlags()[5];
+ }
+
+ /** Clears the value of the 'clientID' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearClientID() {
+ clientID = null;
+ fieldSetFlags()[5] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'eventVersion' field */
+ public gr.grnet.aquarium.message.avro.EventVersion getEventVersion() {
+ return eventVersion;
+ }
+
+ /** Sets the value of the 'eventVersion' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setEventVersion(gr.grnet.aquarium.message.avro.EventVersion value) {
+ validate(fields()[6], value);
+ this.eventVersion = value;
+ fieldSetFlags()[6] = true;
+ return this;
+ }
+
+ /** Checks whether the 'eventVersion' field has been set */
+ public boolean hasEventVersion() {
+ return fieldSetFlags()[6];
+ }
+
+ /** Clears the value of the 'eventVersion' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearEventVersion() {
+ eventVersion = null;
+ fieldSetFlags()[6] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'isActive' field */
+ public java.lang.Boolean getIsActive() {
+ return isActive;
+ }
+
+ /** Sets the value of the 'isActive' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setIsActive(boolean value) {
+ validate(fields()[7], value);
+ this.isActive = value;
+ fieldSetFlags()[7] = true;
+ return this;
+ }
+
+ /** Checks whether the 'isActive' field has been set */
+ public boolean hasIsActive() {
+ return fieldSetFlags()[7];
+ }
+
+ /** Clears the value of the 'isActive' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearIsActive() {
+ fieldSetFlags()[7] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'role' field */
+ public java.lang.CharSequence getRole() {
+ return role;
+ }
+
+ /** Sets the value of the 'role' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setRole(java.lang.CharSequence value) {
+ validate(fields()[8], value);
+ this.role = value;
+ fieldSetFlags()[8] = true;
+ return this;
+ }
+
+ /** Checks whether the 'role' field has been set */
+ public boolean hasRole() {
+ return fieldSetFlags()[8];
+ }
+
+ /** Clears the value of the 'role' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearRole() {
+ role = null;
+ fieldSetFlags()[8] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'details' field */
+ public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> getDetails() {
+ return details;
+ }
+
+ /** Sets the value of the 'details' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder setDetails(java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> value) {
+ validate(fields()[9], value);
+ this.details = value;
+ fieldSetFlags()[9] = true;
+ return this;
+ }
+
+ /** Checks whether the 'details' field has been set */
+ public boolean hasDetails() {
+ return fieldSetFlags()[9];
+ }
+
+ /** Clears the value of the 'details' field */
+ public gr.grnet.aquarium.message.avro.IMEvent.Builder clearDetails() {
+ details = null;
+ fieldSetFlags()[9] = false;
+ return this;
+ }
+
+ @Override
+ public IMEvent build() {
+ try {
+ IMEvent record = new IMEvent();
+ record.originalID = fieldSetFlags()[0] ? this.originalID : (java.lang.CharSequence) defaultValue(fields()[0]);
+ record.inStoreID = fieldSetFlags()[1] ? this.inStoreID : (java.lang.CharSequence) defaultValue(fields()[1]);
+ record.occurredMillis = fieldSetFlags()[2] ? this.occurredMillis : (java.lang.Long) defaultValue(fields()[2]);
+ record.receivedMillis = fieldSetFlags()[3] ? this.receivedMillis : (java.lang.Long) defaultValue(fields()[3]);
+ record.userID = fieldSetFlags()[4] ? this.userID : (java.lang.CharSequence) defaultValue(fields()[4]);
+ record.clientID = fieldSetFlags()[5] ? this.clientID : (java.lang.CharSequence) defaultValue(fields()[5]);
+ record.eventVersion = fieldSetFlags()[6] ? this.eventVersion : (gr.grnet.aquarium.message.avro.EventVersion) defaultValue(fields()[6]);
+ record.isActive = fieldSetFlags()[7] ? this.isActive : (java.lang.Boolean) defaultValue(fields()[7]);
+ record.role = fieldSetFlags()[8] ? this.role : (java.lang.CharSequence) defaultValue(fields()[8]);
+ record.details = fieldSetFlags()[9] ? this.details : (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue>) defaultValue(fields()[9]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
+ }
+}
--- /dev/null
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+package gr.grnet.aquarium.message.avro;
+@SuppressWarnings("all")
+public class ResourceEvent extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ResourceEvent\",\"namespace\":\"gr.grnet.aquarium.message.avro\",\"fields\":[{\"name\":\"originalID\",\"type\":\"string\",\"aliases\":[\"ID\"]},{\"name\":\"inStoreID\",\"type\":\"string\"},{\"name\":\"occurredMillis\",\"type\":\"long\"},{\"name\":\"receivedMillis\",\"type\":\"long\"},{\"name\":\"userID\",\"type\":\"string\"},{\"name\":\"clientID\",\"type\":\"string\"},{\"name\":\"eventVersion\",\"type\":{\"type\":\"enum\",\"name\":\"EventVersion\",\"symbols\":[\"VERSION_1_0\"]}},{\"name\":\"resourceType\",\"type\":\"string\",\"aliases\":[\"resource\"]},{\"name\":\"instanceID\",\"type\":\"string\"},{\"name\":\"value\",\"type\":\"string\"},{\"name\":\"details\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"AnyValue\",\"fields\":[{\"name\":\"anyValue\",\"type\":[\"null\",\"int\",\"long\",\"boolean\",\"double\",\"bytes\",\"string\"]}]}}}]}");
+ @Deprecated public java.lang.CharSequence originalID;
+ @Deprecated public java.lang.CharSequence inStoreID;
+ @Deprecated public long occurredMillis;
+ @Deprecated public long receivedMillis;
+ @Deprecated public java.lang.CharSequence userID;
+ @Deprecated public java.lang.CharSequence clientID;
+ @Deprecated public gr.grnet.aquarium.message.avro.EventVersion eventVersion;
+ @Deprecated public java.lang.CharSequence resourceType;
+ @Deprecated public java.lang.CharSequence instanceID;
+ @Deprecated public java.lang.CharSequence value;
+ @Deprecated public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> details;
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0: return originalID;
+ case 1: return inStoreID;
+ case 2: return occurredMillis;
+ case 3: return receivedMillis;
+ case 4: return userID;
+ case 5: return clientID;
+ case 6: return eventVersion;
+ case 7: return resourceType;
+ case 8: return instanceID;
+ case 9: return value;
+ case 10: return details;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value="unchecked")
+ public void put(int field$, java.lang.Object value$) {
+ switch (field$) {
+ case 0: originalID = (java.lang.CharSequence)value$; break;
+ case 1: inStoreID = (java.lang.CharSequence)value$; break;
+ case 2: occurredMillis = (java.lang.Long)value$; break;
+ case 3: receivedMillis = (java.lang.Long)value$; break;
+ case 4: userID = (java.lang.CharSequence)value$; break;
+ case 5: clientID = (java.lang.CharSequence)value$; break;
+ case 6: eventVersion = (gr.grnet.aquarium.message.avro.EventVersion)value$; break;
+ case 7: resourceType = (java.lang.CharSequence)value$; break;
+ case 8: instanceID = (java.lang.CharSequence)value$; break;
+ case 9: value = (java.lang.CharSequence)value$; break;
+ case 10: details = (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue>)value$; break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ /**
+ * Gets the value of the 'originalID' field.
+ */
+ public java.lang.CharSequence getOriginalID() {
+ return originalID;
+ }
+
+ /**
+ * Sets the value of the 'originalID' field.
+ * @param value the value to set.
+ */
+ public void setOriginalID(java.lang.CharSequence value) {
+ this.originalID = value;
+ }
+
+ /**
+ * Gets the value of the 'inStoreID' field.
+ */
+ public java.lang.CharSequence getInStoreID() {
+ return inStoreID;
+ }
+
+ /**
+ * Sets the value of the 'inStoreID' field.
+ * @param value the value to set.
+ */
+ public void setInStoreID(java.lang.CharSequence value) {
+ this.inStoreID = value;
+ }
+
+ /**
+ * Gets the value of the 'occurredMillis' field.
+ */
+ public java.lang.Long getOccurredMillis() {
+ return occurredMillis;
+ }
+
+ /**
+ * Sets the value of the 'occurredMillis' field.
+ * @param value the value to set.
+ */
+ public void setOccurredMillis(java.lang.Long value) {
+ this.occurredMillis = value;
+ }
+
+ /**
+ * Gets the value of the 'receivedMillis' field.
+ */
+ public java.lang.Long getReceivedMillis() {
+ return receivedMillis;
+ }
+
+ /**
+ * Sets the value of the 'receivedMillis' field.
+ * @param value the value to set.
+ */
+ public void setReceivedMillis(java.lang.Long value) {
+ this.receivedMillis = value;
+ }
+
+ /**
+ * Gets the value of the 'userID' field.
+ */
+ public java.lang.CharSequence getUserID() {
+ return userID;
+ }
+
+ /**
+ * Sets the value of the 'userID' field.
+ * @param value the value to set.
+ */
+ public void setUserID(java.lang.CharSequence value) {
+ this.userID = value;
+ }
+
+ /**
+ * Gets the value of the 'clientID' field.
+ */
+ public java.lang.CharSequence getClientID() {
+ return clientID;
+ }
+
+ /**
+ * Sets the value of the 'clientID' field.
+ * @param value the value to set.
+ */
+ public void setClientID(java.lang.CharSequence value) {
+ this.clientID = value;
+ }
+
+ /**
+ * Gets the value of the 'eventVersion' field.
+ */
+ public gr.grnet.aquarium.message.avro.EventVersion getEventVersion() {
+ return eventVersion;
+ }
+
+ /**
+ * Sets the value of the 'eventVersion' field.
+ * @param value the value to set.
+ */
+ public void setEventVersion(gr.grnet.aquarium.message.avro.EventVersion value) {
+ this.eventVersion = value;
+ }
+
+ /**
+ * Gets the value of the 'resourceType' field.
+ */
+ public java.lang.CharSequence getResourceType() {
+ return resourceType;
+ }
+
+ /**
+ * Sets the value of the 'resourceType' field.
+ * @param value the value to set.
+ */
+ public void setResourceType(java.lang.CharSequence value) {
+ this.resourceType = value;
+ }
+
+ /**
+ * Gets the value of the 'instanceID' field.
+ */
+ public java.lang.CharSequence getInstanceID() {
+ return instanceID;
+ }
+
+ /**
+ * Sets the value of the 'instanceID' field.
+ * @param value the value to set.
+ */
+ public void setInstanceID(java.lang.CharSequence value) {
+ this.instanceID = value;
+ }
+
+ /**
+ * Gets the value of the 'value' field.
+ */
+ public java.lang.CharSequence getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the 'value' field.
+ * @param value the value to set.
+ */
+ public void setValue(java.lang.CharSequence value) {
+ this.value = value;
+ }
+
+ /**
+ * Gets the value of the 'details' field.
+ */
+ public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> getDetails() {
+ return details;
+ }
+
+ /**
+ * Sets the value of the 'details' field.
+ * @param value the value to set.
+ */
+ public void setDetails(java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> value) {
+ this.details = value;
+ }
+
+ /** Creates a new ResourceEvent RecordBuilder */
+ public static gr.grnet.aquarium.message.avro.ResourceEvent.Builder newBuilder() {
+ return new gr.grnet.aquarium.message.avro.ResourceEvent.Builder();
+ }
+
+ /** Creates a new ResourceEvent RecordBuilder by copying an existing Builder */
+ public static gr.grnet.aquarium.message.avro.ResourceEvent.Builder newBuilder(gr.grnet.aquarium.message.avro.ResourceEvent.Builder other) {
+ return new gr.grnet.aquarium.message.avro.ResourceEvent.Builder(other);
+ }
+
+ /** Creates a new ResourceEvent RecordBuilder by copying an existing ResourceEvent instance */
+ public static gr.grnet.aquarium.message.avro.ResourceEvent.Builder newBuilder(gr.grnet.aquarium.message.avro.ResourceEvent other) {
+ return new gr.grnet.aquarium.message.avro.ResourceEvent.Builder(other);
+ }
+
+ /**
+ * RecordBuilder for ResourceEvent instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<ResourceEvent>
+ implements org.apache.avro.data.RecordBuilder<ResourceEvent> {
+
+ private java.lang.CharSequence originalID;
+ private java.lang.CharSequence inStoreID;
+ private long occurredMillis;
+ private long receivedMillis;
+ private java.lang.CharSequence userID;
+ private java.lang.CharSequence clientID;
+ private gr.grnet.aquarium.message.avro.EventVersion eventVersion;
+ private java.lang.CharSequence resourceType;
+ private java.lang.CharSequence instanceID;
+ private java.lang.CharSequence value;
+ private java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> details;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(gr.grnet.aquarium.message.avro.ResourceEvent.SCHEMA$);
+ }
+
+ /** Creates a Builder by copying an existing Builder */
+ private Builder(gr.grnet.aquarium.message.avro.ResourceEvent.Builder other) {
+ super(other);
+ }
+
+ /** Creates a Builder by copying an existing ResourceEvent instance */
+ private Builder(gr.grnet.aquarium.message.avro.ResourceEvent other) {
+ super(gr.grnet.aquarium.message.avro.ResourceEvent.SCHEMA$);
+ if (isValidValue(fields()[0], other.originalID)) {
+ this.originalID = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.originalID);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.inStoreID)) {
+ this.inStoreID = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.inStoreID);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.occurredMillis)) {
+ this.occurredMillis = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.occurredMillis);
+ fieldSetFlags()[2] = true;
+ }
+ if (isValidValue(fields()[3], other.receivedMillis)) {
+ this.receivedMillis = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.receivedMillis);
+ fieldSetFlags()[3] = true;
+ }
+ if (isValidValue(fields()[4], other.userID)) {
+ this.userID = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.userID);
+ fieldSetFlags()[4] = true;
+ }
+ if (isValidValue(fields()[5], other.clientID)) {
+ this.clientID = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.clientID);
+ fieldSetFlags()[5] = true;
+ }
+ if (isValidValue(fields()[6], other.eventVersion)) {
+ this.eventVersion = (gr.grnet.aquarium.message.avro.EventVersion) data().deepCopy(fields()[6].schema(), other.eventVersion);
+ fieldSetFlags()[6] = true;
+ }
+ if (isValidValue(fields()[7], other.resourceType)) {
+ this.resourceType = (java.lang.CharSequence) data().deepCopy(fields()[7].schema(), other.resourceType);
+ fieldSetFlags()[7] = true;
+ }
+ if (isValidValue(fields()[8], other.instanceID)) {
+ this.instanceID = (java.lang.CharSequence) data().deepCopy(fields()[8].schema(), other.instanceID);
+ fieldSetFlags()[8] = true;
+ }
+ if (isValidValue(fields()[9], other.value)) {
+ this.value = (java.lang.CharSequence) data().deepCopy(fields()[9].schema(), other.value);
+ fieldSetFlags()[9] = true;
+ }
+ if (isValidValue(fields()[10], other.details)) {
+ this.details = (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue>) data().deepCopy(fields()[10].schema(), other.details);
+ fieldSetFlags()[10] = true;
+ }
+ }
+
+ /** Gets the value of the 'originalID' field */
+ public java.lang.CharSequence getOriginalID() {
+ return originalID;
+ }
+
+ /** Sets the value of the 'originalID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setOriginalID(java.lang.CharSequence value) {
+ validate(fields()[0], value);
+ this.originalID = value;
+ fieldSetFlags()[0] = true;
+ return this;
+ }
+
+ /** Checks whether the 'originalID' field has been set */
+ public boolean hasOriginalID() {
+ return fieldSetFlags()[0];
+ }
+
+ /** Clears the value of the 'originalID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearOriginalID() {
+ originalID = null;
+ fieldSetFlags()[0] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'inStoreID' field */
+ public java.lang.CharSequence getInStoreID() {
+ return inStoreID;
+ }
+
+ /** Sets the value of the 'inStoreID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setInStoreID(java.lang.CharSequence value) {
+ validate(fields()[1], value);
+ this.inStoreID = value;
+ fieldSetFlags()[1] = true;
+ return this;
+ }
+
+ /** Checks whether the 'inStoreID' field has been set */
+ public boolean hasInStoreID() {
+ return fieldSetFlags()[1];
+ }
+
+ /** Clears the value of the 'inStoreID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearInStoreID() {
+ inStoreID = null;
+ fieldSetFlags()[1] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'occurredMillis' field */
+ public java.lang.Long getOccurredMillis() {
+ return occurredMillis;
+ }
+
+ /** Sets the value of the 'occurredMillis' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setOccurredMillis(long value) {
+ validate(fields()[2], value);
+ this.occurredMillis = value;
+ fieldSetFlags()[2] = true;
+ return this;
+ }
+
+ /** Checks whether the 'occurredMillis' field has been set */
+ public boolean hasOccurredMillis() {
+ return fieldSetFlags()[2];
+ }
+
+ /** Clears the value of the 'occurredMillis' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearOccurredMillis() {
+ fieldSetFlags()[2] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'receivedMillis' field */
+ public java.lang.Long getReceivedMillis() {
+ return receivedMillis;
+ }
+
+ /** Sets the value of the 'receivedMillis' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setReceivedMillis(long value) {
+ validate(fields()[3], value);
+ this.receivedMillis = value;
+ fieldSetFlags()[3] = true;
+ return this;
+ }
+
+ /** Checks whether the 'receivedMillis' field has been set */
+ public boolean hasReceivedMillis() {
+ return fieldSetFlags()[3];
+ }
+
+ /** Clears the value of the 'receivedMillis' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearReceivedMillis() {
+ fieldSetFlags()[3] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'userID' field */
+ public java.lang.CharSequence getUserID() {
+ return userID;
+ }
+
+ /** Sets the value of the 'userID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setUserID(java.lang.CharSequence value) {
+ validate(fields()[4], value);
+ this.userID = value;
+ fieldSetFlags()[4] = true;
+ return this;
+ }
+
+ /** Checks whether the 'userID' field has been set */
+ public boolean hasUserID() {
+ return fieldSetFlags()[4];
+ }
+
+ /** Clears the value of the 'userID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearUserID() {
+ userID = null;
+ fieldSetFlags()[4] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'clientID' field */
+ public java.lang.CharSequence getClientID() {
+ return clientID;
+ }
+
+ /** Sets the value of the 'clientID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setClientID(java.lang.CharSequence value) {
+ validate(fields()[5], value);
+ this.clientID = value;
+ fieldSetFlags()[5] = true;
+ return this;
+ }
+
+ /** Checks whether the 'clientID' field has been set */
+ public boolean hasClientID() {
+ return fieldSetFlags()[5];
+ }
+
+ /** Clears the value of the 'clientID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearClientID() {
+ clientID = null;
+ fieldSetFlags()[5] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'eventVersion' field */
+ public gr.grnet.aquarium.message.avro.EventVersion getEventVersion() {
+ return eventVersion;
+ }
+
+ /** Sets the value of the 'eventVersion' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setEventVersion(gr.grnet.aquarium.message.avro.EventVersion value) {
+ validate(fields()[6], value);
+ this.eventVersion = value;
+ fieldSetFlags()[6] = true;
+ return this;
+ }
+
+ /** Checks whether the 'eventVersion' field has been set */
+ public boolean hasEventVersion() {
+ return fieldSetFlags()[6];
+ }
+
+ /** Clears the value of the 'eventVersion' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearEventVersion() {
+ eventVersion = null;
+ fieldSetFlags()[6] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'resourceType' field */
+ public java.lang.CharSequence getResourceType() {
+ return resourceType;
+ }
+
+ /** Sets the value of the 'resourceType' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setResourceType(java.lang.CharSequence value) {
+ validate(fields()[7], value);
+ this.resourceType = value;
+ fieldSetFlags()[7] = true;
+ return this;
+ }
+
+ /** Checks whether the 'resourceType' field has been set */
+ public boolean hasResourceType() {
+ return fieldSetFlags()[7];
+ }
+
+ /** Clears the value of the 'resourceType' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearResourceType() {
+ resourceType = null;
+ fieldSetFlags()[7] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'instanceID' field */
+ public java.lang.CharSequence getInstanceID() {
+ return instanceID;
+ }
+
+ /** Sets the value of the 'instanceID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setInstanceID(java.lang.CharSequence value) {
+ validate(fields()[8], value);
+ this.instanceID = value;
+ fieldSetFlags()[8] = true;
+ return this;
+ }
+
+ /** Checks whether the 'instanceID' field has been set */
+ public boolean hasInstanceID() {
+ return fieldSetFlags()[8];
+ }
+
+ /** Clears the value of the 'instanceID' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearInstanceID() {
+ instanceID = null;
+ fieldSetFlags()[8] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'value' field */
+ public java.lang.CharSequence getValue() {
+ return value;
+ }
+
+ /** Sets the value of the 'value' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setValue(java.lang.CharSequence value) {
+ validate(fields()[9], value);
+ this.value = value;
+ fieldSetFlags()[9] = true;
+ return this;
+ }
+
+ /** Checks whether the 'value' field has been set */
+ public boolean hasValue() {
+ return fieldSetFlags()[9];
+ }
+
+ /** Clears the value of the 'value' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearValue() {
+ value = null;
+ fieldSetFlags()[9] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'details' field */
+ public java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> getDetails() {
+ return details;
+ }
+
+ /** Sets the value of the 'details' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder setDetails(java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue> value) {
+ validate(fields()[10], value);
+ this.details = value;
+ fieldSetFlags()[10] = true;
+ return this;
+ }
+
+ /** Checks whether the 'details' field has been set */
+ public boolean hasDetails() {
+ return fieldSetFlags()[10];
+ }
+
+ /** Clears the value of the 'details' field */
+ public gr.grnet.aquarium.message.avro.ResourceEvent.Builder clearDetails() {
+ details = null;
+ fieldSetFlags()[10] = false;
+ return this;
+ }
+
+ @Override
+ public ResourceEvent build() {
+ try {
+ ResourceEvent record = new ResourceEvent();
+ record.originalID = fieldSetFlags()[0] ? this.originalID : (java.lang.CharSequence) defaultValue(fields()[0]);
+ record.inStoreID = fieldSetFlags()[1] ? this.inStoreID : (java.lang.CharSequence) defaultValue(fields()[1]);
+ record.occurredMillis = fieldSetFlags()[2] ? this.occurredMillis : (java.lang.Long) defaultValue(fields()[2]);
+ record.receivedMillis = fieldSetFlags()[3] ? this.receivedMillis : (java.lang.Long) defaultValue(fields()[3]);
+ record.userID = fieldSetFlags()[4] ? this.userID : (java.lang.CharSequence) defaultValue(fields()[4]);
+ record.clientID = fieldSetFlags()[5] ? this.clientID : (java.lang.CharSequence) defaultValue(fields()[5]);
+ record.eventVersion = fieldSetFlags()[6] ? this.eventVersion : (gr.grnet.aquarium.message.avro.EventVersion) defaultValue(fields()[6]);
+ record.resourceType = fieldSetFlags()[7] ? this.resourceType : (java.lang.CharSequence) defaultValue(fields()[7]);
+ record.instanceID = fieldSetFlags()[8] ? this.instanceID : (java.lang.CharSequence) defaultValue(fields()[8]);
+ record.value = fieldSetFlags()[9] ? this.value : (java.lang.CharSequence) defaultValue(fields()[9]);
+ record.details = fieldSetFlags()[10] ? this.details : (java.util.Map<java.lang.CharSequence,gr.grnet.aquarium.message.avro.AnyValue>) defaultValue(fields()[10]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
+ }
+}