- * DO NOT EDIT DIRECTLY
- */
-package net.consensys.eventeum;
-
-import org.apache.avro.message.BinaryMessageDecoder;
-import org.apache.avro.message.BinaryMessageEncoder;
-import org.apache.avro.message.SchemaStore;
-import org.apache.avro.specific.SpecificData;
-
-@org.apache.avro.specific.AvroGenerated
-public class BlockDetails extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
- private static final long serialVersionUID = 6934724161586224901L;
- public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"BlockDetails\",\"namespace\":\"net.consensys.eventeum\",\"fields\":[{\"name\":\"number\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"},{\"name\":\"hash\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"timestamp\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"},{\"name\":\"nodeName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}");
-
- public static org.apache.avro.Schema getClassSchema() {
- return SCHEMA$;
- }
-
- private static SpecificData MODEL$ = new SpecificData();
-
- private static final BinaryMessageEncoder ENCODER =
- new BinaryMessageEncoder(MODEL$, SCHEMA$);
-
- private static final BinaryMessageDecoder DECODER =
- new BinaryMessageDecoder(MODEL$, SCHEMA$);
-
- /**
- * Return the BinaryMessageEncoder instance used by this class.
- * @return the message encoder used by this class
- */
- public static BinaryMessageEncoder getEncoder() {
- return ENCODER;
- }
-
- /**
- * Return the BinaryMessageDecoder instance used by this class.
- * @return the message decoder used by this class
- */
- public static BinaryMessageDecoder getDecoder() {
- return DECODER;
- }
-
- /**
- * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
- * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
- * @return a BinaryMessageDecoder instance for this class backed by the given SchemaStore
- */
- public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
- return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
- }
-
- /**
- * Serializes this BlockDetails to a ByteBuffer.
- * @return a buffer holding the serialized data for this instance
- * @throws java.io.IOException if this instance could not be serialized
- */
- public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
- return ENCODER.encode(this);
- }
-
- /**
- * Deserializes a BlockDetails from a ByteBuffer.
- * @param b a byte buffer holding serialized data for an instance of this class
- * @return a BlockDetails instance decoded from the given buffer
- * @throws java.io.IOException if the given bytes could not be deserialized into an instance of this class
- */
- public static BlockDetails fromByteBuffer(
- java.nio.ByteBuffer b) throws java.io.IOException {
- return DECODER.decode(b);
- }
-
- @Deprecated
- public String number;
- @Deprecated
- public String hash;
- @Deprecated
- public String timestamp;
- @Deprecated
- public String nodeName;
-
- /**
- * Default constructor. Note that this does not initialize fields
- * to their default values from the schema. If that is desired then
- * one should use newBuilder().
- */
- public BlockDetails() {
- }
-
- /**
- * All-args constructor.
- * @param number The new value for number
- * @param hash The new value for hash
- * @param timestamp The new value for timestamp
- * @param nodeName The new value for nodeName
- */
- public BlockDetails(String number, String hash, String timestamp, String nodeName) {
- this.number = number;
- this.hash = hash;
- this.timestamp = timestamp;
- this.nodeName = nodeName;
- }
-
- public org.apache.avro.specific.SpecificData getSpecificData() {
- return MODEL$;
- }
-
- public org.apache.avro.Schema getSchema() {
- return SCHEMA$;
- }
-
- // Used by DatumWriter. Applications should not call.
- public Object get(int field$) {
- switch (field$) {
- case 0:
- return number;
- case 1:
- return hash;
- case 2:
- return timestamp;
- case 3:
- return nodeName;
- default:
- throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- // Used by DatumReader. Applications should not call.
- @SuppressWarnings(value = "unchecked")
- public void put(int field$, Object value$) {
- switch (field$) {
- case 0:
- number = (String) value$;
- break;
- case 1:
- hash = (String) value$;
- break;
- case 2:
- timestamp = (String) value$;
- break;
- case 3:
- nodeName = (String) value$;
- break;
- default:
- throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- /**
- * Gets the value of the 'number' field.
- * @return The value of the 'number' field.
- */
- public String getNumber() {
- return number;
- }
-
-
- /**
- * Sets the value of the 'number' field.
- * @param value the value to set.
- */
- public void setNumber(String value) {
- this.number = value;
- }
-
- /**
- * Gets the value of the 'hash' field.
- * @return The value of the 'hash' field.
- */
- public String getHash() {
- return hash;
- }
-
-
- /**
- * Sets the value of the 'hash' field.
- * @param value the value to set.
- */
- public void setHash(String value) {
- this.hash = value;
- }
-
- /**
- * Gets the value of the 'timestamp' field.
- * @return The value of the 'timestamp' field.
- */
- public String getTimestamp() {
- return timestamp;
- }
-
-
- /**
- * Sets the value of the 'timestamp' field.
- * @param value the value to set.
- */
- public void setTimestamp(String value) {
- this.timestamp = value;
- }
-
- /**
- * Gets the value of the 'nodeName' field.
- * @return The value of the 'nodeName' field.
- */
- public String getNodeName() {
- return nodeName;
- }
-
-
- /**
- * Sets the value of the 'nodeName' field.
- * @param value the value to set.
- */
- public void setNodeName(String value) {
- this.nodeName = value;
- }
-
- /**
- * Creates a new BlockDetails RecordBuilder.
- * @return A new BlockDetails RecordBuilder
- */
- public static net.consensys.eventeum.BlockDetails.Builder newBuilder() {
- return new net.consensys.eventeum.BlockDetails.Builder();
- }
-
- /**
- * Creates a new BlockDetails RecordBuilder by copying an existing Builder.
- * @param other The existing builder to copy.
- * @return A new BlockDetails RecordBuilder
- */
- public static net.consensys.eventeum.BlockDetails.Builder newBuilder(net.consensys.eventeum.BlockDetails.Builder other) {
- if (other == null) {
- return new net.consensys.eventeum.BlockDetails.Builder();
- } else {
- return new net.consensys.eventeum.BlockDetails.Builder(other);
- }
- }
-
- /**
- * Creates a new BlockDetails RecordBuilder by copying an existing BlockDetails instance.
- * @param other The existing instance to copy.
- * @return A new BlockDetails RecordBuilder
- */
- public static net.consensys.eventeum.BlockDetails.Builder newBuilder(net.consensys.eventeum.BlockDetails other) {
- if (other == null) {
- return new net.consensys.eventeum.BlockDetails.Builder();
- } else {
- return new net.consensys.eventeum.BlockDetails.Builder(other);
- }
- }
-
- /**
- * RecordBuilder for BlockDetails instances.
- */
- public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
- implements org.apache.avro.data.RecordBuilder {
-
- private String number;
- private String hash;
- private String timestamp;
- private String nodeName;
-
- /** Creates a new Builder */
- private Builder() {
- super(SCHEMA$);
- }
-
- /**
- * Creates a Builder by copying an existing Builder.
- * @param other The existing Builder to copy.
- */
- private Builder(net.consensys.eventeum.BlockDetails.Builder other) {
- super(other);
- if (isValidValue(fields()[0], other.number)) {
- this.number = data().deepCopy(fields()[0].schema(), other.number);
- fieldSetFlags()[0] = other.fieldSetFlags()[0];
- }
- if (isValidValue(fields()[1], other.hash)) {
- this.hash = data().deepCopy(fields()[1].schema(), other.hash);
- fieldSetFlags()[1] = other.fieldSetFlags()[1];
- }
- if (isValidValue(fields()[2], other.timestamp)) {
- this.timestamp = data().deepCopy(fields()[2].schema(), other.timestamp);
- fieldSetFlags()[2] = other.fieldSetFlags()[2];
- }
- if (isValidValue(fields()[3], other.nodeName)) {
- this.nodeName = data().deepCopy(fields()[3].schema(), other.nodeName);
- fieldSetFlags()[3] = other.fieldSetFlags()[3];
- }
- }
-
- /**
- * Creates a Builder by copying an existing BlockDetails instance
- * @param other The existing instance to copy.
- */
- private Builder(net.consensys.eventeum.BlockDetails other) {
- super(SCHEMA$);
- if (isValidValue(fields()[0], other.number)) {
- this.number = data().deepCopy(fields()[0].schema(), other.number);
- fieldSetFlags()[0] = true;
- }
- if (isValidValue(fields()[1], other.hash)) {
- this.hash = data().deepCopy(fields()[1].schema(), other.hash);
- fieldSetFlags()[1] = true;
- }
- if (isValidValue(fields()[2], other.timestamp)) {
- this.timestamp = data().deepCopy(fields()[2].schema(), other.timestamp);
- fieldSetFlags()[2] = true;
- }
- if (isValidValue(fields()[3], other.nodeName)) {
- this.nodeName = data().deepCopy(fields()[3].schema(), other.nodeName);
- fieldSetFlags()[3] = true;
- }
- }
-
- /**
- * Gets the value of the 'number' field.
- * @return The value.
- */
- public String getNumber() {
- return number;
- }
-
-
- /**
- * Sets the value of the 'number' field.
- * @param value The value of 'number'.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder setNumber(String value) {
- validate(fields()[0], value);
- this.number = value;
- fieldSetFlags()[0] = true;
- return this;
- }
-
- /**
- * Checks whether the 'number' field has been set.
- * @return True if the 'number' field has been set, false otherwise.
- */
- public boolean hasNumber() {
- return fieldSetFlags()[0];
- }
-
-
- /**
- * Clears the value of the 'number' field.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder clearNumber() {
- number = null;
- fieldSetFlags()[0] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'hash' field.
- * @return The value.
- */
- public String getHash() {
- return hash;
- }
-
-
- /**
- * Sets the value of the 'hash' field.
- * @param value The value of 'hash'.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder setHash(String value) {
- validate(fields()[1], value);
- this.hash = value;
- fieldSetFlags()[1] = true;
- return this;
- }
-
- /**
- * Checks whether the 'hash' field has been set.
- * @return True if the 'hash' field has been set, false otherwise.
- */
- public boolean hasHash() {
- return fieldSetFlags()[1];
- }
-
-
- /**
- * Clears the value of the 'hash' field.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder clearHash() {
- hash = null;
- fieldSetFlags()[1] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'timestamp' field.
- * @return The value.
- */
- public String getTimestamp() {
- return timestamp;
- }
-
-
- /**
- * Sets the value of the 'timestamp' field.
- * @param value The value of 'timestamp'.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder setTimestamp(String value) {
- validate(fields()[2], value);
- this.timestamp = value;
- fieldSetFlags()[2] = true;
- return this;
- }
-
- /**
- * Checks whether the 'timestamp' field has been set.
- * @return True if the 'timestamp' field has been set, false otherwise.
- */
- public boolean hasTimestamp() {
- return fieldSetFlags()[2];
- }
-
-
- /**
- * Clears the value of the 'timestamp' field.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder clearTimestamp() {
- timestamp = null;
- fieldSetFlags()[2] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'nodeName' field.
- * @return The value.
- */
- public String getNodeName() {
- return nodeName;
- }
-
-
- /**
- * Sets the value of the 'nodeName' field.
- * @param value The value of 'nodeName'.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder setNodeName(String value) {
- validate(fields()[3], value);
- this.nodeName = value;
- fieldSetFlags()[3] = true;
- return this;
- }
-
- /**
- * Checks whether the 'nodeName' field has been set.
- * @return True if the 'nodeName' field has been set, false otherwise.
- */
- public boolean hasNodeName() {
- return fieldSetFlags()[3];
- }
-
-
- /**
- * Clears the value of the 'nodeName' field.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder clearNodeName() {
- nodeName = null;
- fieldSetFlags()[3] = false;
- return this;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public BlockDetails build() {
- try {
- BlockDetails record = new BlockDetails();
- record.number = fieldSetFlags()[0] ? this.number : (String) defaultValue(fields()[0]);
- record.hash = fieldSetFlags()[1] ? this.hash : (String) defaultValue(fields()[1]);
- record.timestamp = fieldSetFlags()[2] ? this.timestamp : (String) defaultValue(fields()[2]);
- record.nodeName = fieldSetFlags()[3] ? this.nodeName : (String) defaultValue(fields()[3]);
- return record;
- } catch (org.apache.avro.AvroMissingFieldException e) {
- throw e;
- } catch (Exception e) {
- throw new org.apache.avro.AvroRuntimeException(e);
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- private static final org.apache.avro.io.DatumWriter
- WRITER$ = (org.apache.avro.io.DatumWriter) MODEL$.createDatumWriter(SCHEMA$);
-
- @Override
- public void writeExternal(java.io.ObjectOutput out)
- throws java.io.IOException {
- WRITER$.write(this, SpecificData.getEncoder(out));
- }
-
- @SuppressWarnings("unchecked")
- private static final org.apache.avro.io.DatumReader
- READER$ = (org.apache.avro.io.DatumReader) MODEL$.createDatumReader(SCHEMA$);
-
- @Override
- public void readExternal(java.io.ObjectInput in)
- throws java.io.IOException {
- READER$.read(this, SpecificData.getDecoder(in));
- }
-
- @Override
- protected boolean hasCustomCoders() {
- return true;
- }
-
- @Override
- public void customEncode(org.apache.avro.io.Encoder out)
- throws java.io.IOException {
- out.writeString(this.number);
-
- out.writeString(this.hash);
-
- out.writeString(this.timestamp);
-
- out.writeString(this.nodeName);
-
- }
-
- @Override
- public void customDecode(org.apache.avro.io.ResolvingDecoder in)
- throws java.io.IOException {
- org.apache.avro.Schema.Field[] fieldOrder = in.readFieldOrderIfDiff();
- if (fieldOrder == null) {
- this.number = in.readString();
-
- this.hash = in.readString();
-
- this.timestamp = in.readString();
-
- this.nodeName = in.readString();
-
- } else {
- for (int i = 0; i < 4; i++) {
- switch (fieldOrder[i].pos()) {
- case 0:
- this.number = in.readString();
- break;
-
- case 1:
- this.hash = in.readString();
- break;
-
- case 2:
- this.timestamp = in.readString();
- break;
-
- case 3:
- this.nodeName = in.readString();
- break;
-
- default:
- throw new java.io.IOException("Corrupt ResolvingDecoder.");
- }
- }
- }
- }
-}
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/net/consensys/eventeum/BlockEvent.java b/src/main/java/net/consensys/eventeum/BlockEvent.java
deleted file mode 100644
index abf00de..0000000
--- a/src/main/java/net/consensys/eventeum/BlockEvent.java
+++ /dev/null
@@ -1,635 +0,0 @@
-/**
- * Autogenerated by Avro
- *
- * DO NOT EDIT DIRECTLY
- */
-package net.consensys.eventeum;
-
-import org.apache.avro.message.BinaryMessageDecoder;
-import org.apache.avro.message.BinaryMessageEncoder;
-import org.apache.avro.message.SchemaStore;
-import org.apache.avro.specific.SpecificData;
-
-@org.apache.avro.specific.AvroGenerated
-public class BlockEvent extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
- private static final long serialVersionUID = -4269460057361371108L;
- public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"BlockEvent\",\"namespace\":\"net.consensys.eventeum\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"type\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"record\",\"name\":\"BlockDetails\",\"fields\":[{\"name\":\"number\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"},{\"name\":\"hash\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"timestamp\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"},{\"name\":\"nodeName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}},{\"name\":\"retries\",\"type\":\"int\"}]}");
-
- public static org.apache.avro.Schema getClassSchema() {
- return SCHEMA$;
- }
-
- private static SpecificData MODEL$ = new SpecificData();
-
- private static final BinaryMessageEncoder ENCODER =
- new BinaryMessageEncoder(MODEL$, SCHEMA$);
-
- private static final BinaryMessageDecoder DECODER =
- new BinaryMessageDecoder(MODEL$, SCHEMA$);
-
- /**
- * Return the BinaryMessageEncoder instance used by this class.
- * @return the message encoder used by this class
- */
- public static BinaryMessageEncoder getEncoder() {
- return ENCODER;
- }
-
- /**
- * Return the BinaryMessageDecoder instance used by this class.
- * @return the message decoder used by this class
- */
- public static BinaryMessageDecoder getDecoder() {
- return DECODER;
- }
-
- /**
- * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
- * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
- * @return a BinaryMessageDecoder instance for this class backed by the given SchemaStore
- */
- public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
- return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
- }
-
- /**
- * Serializes this BlockEvent to a ByteBuffer.
- * @return a buffer holding the serialized data for this instance
- * @throws java.io.IOException if this instance could not be serialized
- */
- public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
- return ENCODER.encode(this);
- }
-
- /**
- * Deserializes a BlockEvent from a ByteBuffer.
- * @param b a byte buffer holding serialized data for an instance of this class
- * @return a BlockEvent instance decoded from the given buffer
- * @throws java.io.IOException if the given bytes could not be deserialized into an instance of this class
- */
- public static BlockEvent fromByteBuffer(
- java.nio.ByteBuffer b) throws java.io.IOException {
- return DECODER.decode(b);
- }
-
- @Deprecated
- public String id;
- @Deprecated
- public String type;
- @Deprecated
- public net.consensys.eventeum.BlockDetails details;
- @Deprecated
- public int retries;
-
- /**
- * Default constructor. Note that this does not initialize fields
- * to their default values from the schema. If that is desired then
- * one should use newBuilder().
- */
- public BlockEvent() {
- }
-
- /**
- * All-args constructor.
- * @param id The new value for id
- * @param type The new value for type
- * @param details The new value for details
- * @param retries The new value for retries
- */
- public BlockEvent(String id, String type, net.consensys.eventeum.BlockDetails details, Integer retries) {
- this.id = id;
- this.type = type;
- this.details = details;
- this.retries = retries;
- }
-
- public org.apache.avro.specific.SpecificData getSpecificData() {
- return MODEL$;
- }
-
- public org.apache.avro.Schema getSchema() {
- return SCHEMA$;
- }
-
- // Used by DatumWriter. Applications should not call.
- public Object get(int field$) {
- switch (field$) {
- case 0:
- return id;
- case 1:
- return type;
- case 2:
- return details;
- case 3:
- return retries;
- default:
- throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- // Used by DatumReader. Applications should not call.
- @SuppressWarnings(value = "unchecked")
- public void put(int field$, Object value$) {
- switch (field$) {
- case 0:
- id = (String) value$;
- break;
- case 1:
- type = (String) value$;
- break;
- case 2:
- details = (net.consensys.eventeum.BlockDetails) value$;
- break;
- case 3:
- retries = (Integer) value$;
- break;
- default:
- throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- /**
- * Gets the value of the 'id' field.
- * @return The value of the 'id' field.
- */
- public String getId() {
- return id;
- }
-
-
- /**
- * Sets the value of the 'id' field.
- * @param value the value to set.
- */
- public void setId(String value) {
- this.id = value;
- }
-
- /**
- * Gets the value of the 'type' field.
- * @return The value of the 'type' field.
- */
- public String getType() {
- return type;
- }
-
-
- /**
- * Sets the value of the 'type' field.
- * @param value the value to set.
- */
- public void setType(String value) {
- this.type = value;
- }
-
- /**
- * Gets the value of the 'details' field.
- * @return The value of the 'details' field.
- */
- public net.consensys.eventeum.BlockDetails getDetails() {
- return details;
- }
-
-
- /**
- * Sets the value of the 'details' field.
- * @param value the value to set.
- */
- public void setDetails(net.consensys.eventeum.BlockDetails value) {
- this.details = value;
- }
-
- /**
- * Gets the value of the 'retries' field.
- * @return The value of the 'retries' field.
- */
- public int getRetries() {
- return retries;
- }
-
-
- /**
- * Sets the value of the 'retries' field.
- * @param value the value to set.
- */
- public void setRetries(int value) {
- this.retries = value;
- }
-
- /**
- * Creates a new BlockEvent RecordBuilder.
- * @return A new BlockEvent RecordBuilder
- */
- public static net.consensys.eventeum.BlockEvent.Builder newBuilder() {
- return new net.consensys.eventeum.BlockEvent.Builder();
- }
-
- /**
- * Creates a new BlockEvent RecordBuilder by copying an existing Builder.
- * @param other The existing builder to copy.
- * @return A new BlockEvent RecordBuilder
- */
- public static net.consensys.eventeum.BlockEvent.Builder newBuilder(net.consensys.eventeum.BlockEvent.Builder other) {
- if (other == null) {
- return new net.consensys.eventeum.BlockEvent.Builder();
- } else {
- return new net.consensys.eventeum.BlockEvent.Builder(other);
- }
- }
-
- /**
- * Creates a new BlockEvent RecordBuilder by copying an existing BlockEvent instance.
- * @param other The existing instance to copy.
- * @return A new BlockEvent RecordBuilder
- */
- public static net.consensys.eventeum.BlockEvent.Builder newBuilder(net.consensys.eventeum.BlockEvent other) {
- if (other == null) {
- return new net.consensys.eventeum.BlockEvent.Builder();
- } else {
- return new net.consensys.eventeum.BlockEvent.Builder(other);
- }
- }
-
- /**
- * RecordBuilder for BlockEvent instances.
- */
- public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
- implements org.apache.avro.data.RecordBuilder {
-
- private String id;
- private String type;
- private net.consensys.eventeum.BlockDetails details;
- private net.consensys.eventeum.BlockDetails.Builder detailsBuilder;
- private int retries;
-
- /** Creates a new Builder */
- private Builder() {
- super(SCHEMA$);
- }
-
- /**
- * Creates a Builder by copying an existing Builder.
- * @param other The existing Builder to copy.
- */
- private Builder(net.consensys.eventeum.BlockEvent.Builder other) {
- super(other);
- if (isValidValue(fields()[0], other.id)) {
- this.id = data().deepCopy(fields()[0].schema(), other.id);
- fieldSetFlags()[0] = other.fieldSetFlags()[0];
- }
- if (isValidValue(fields()[1], other.type)) {
- this.type = data().deepCopy(fields()[1].schema(), other.type);
- fieldSetFlags()[1] = other.fieldSetFlags()[1];
- }
- if (isValidValue(fields()[2], other.details)) {
- this.details = data().deepCopy(fields()[2].schema(), other.details);
- fieldSetFlags()[2] = other.fieldSetFlags()[2];
- }
- if (other.hasDetailsBuilder()) {
- this.detailsBuilder = net.consensys.eventeum.BlockDetails.newBuilder(other.getDetailsBuilder());
- }
- if (isValidValue(fields()[3], other.retries)) {
- this.retries = data().deepCopy(fields()[3].schema(), other.retries);
- fieldSetFlags()[3] = other.fieldSetFlags()[3];
- }
- }
-
- /**
- * Creates a Builder by copying an existing BlockEvent instance
- * @param other The existing instance to copy.
- */
- private Builder(net.consensys.eventeum.BlockEvent other) {
- super(SCHEMA$);
- if (isValidValue(fields()[0], other.id)) {
- this.id = data().deepCopy(fields()[0].schema(), other.id);
- fieldSetFlags()[0] = true;
- }
- if (isValidValue(fields()[1], other.type)) {
- this.type = data().deepCopy(fields()[1].schema(), other.type);
- fieldSetFlags()[1] = true;
- }
- if (isValidValue(fields()[2], other.details)) {
- this.details = data().deepCopy(fields()[2].schema(), other.details);
- fieldSetFlags()[2] = true;
- }
- this.detailsBuilder = null;
- if (isValidValue(fields()[3], other.retries)) {
- this.retries = data().deepCopy(fields()[3].schema(), other.retries);
- fieldSetFlags()[3] = true;
- }
- }
-
- /**
- * Gets the value of the 'id' field.
- * @return The value.
- */
- public String getId() {
- return id;
- }
-
-
- /**
- * Sets the value of the 'id' field.
- * @param value The value of 'id'.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder setId(String value) {
- validate(fields()[0], value);
- this.id = value;
- fieldSetFlags()[0] = true;
- return this;
- }
-
- /**
- * Checks whether the 'id' field has been set.
- * @return True if the 'id' field has been set, false otherwise.
- */
- public boolean hasId() {
- return fieldSetFlags()[0];
- }
-
-
- /**
- * Clears the value of the 'id' field.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder clearId() {
- id = null;
- fieldSetFlags()[0] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'type' field.
- * @return The value.
- */
- public String getType() {
- return type;
- }
-
-
- /**
- * Sets the value of the 'type' field.
- * @param value The value of 'type'.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder setType(String value) {
- validate(fields()[1], value);
- this.type = value;
- fieldSetFlags()[1] = true;
- return this;
- }
-
- /**
- * Checks whether the 'type' field has been set.
- * @return True if the 'type' field has been set, false otherwise.
- */
- public boolean hasType() {
- return fieldSetFlags()[1];
- }
-
-
- /**
- * Clears the value of the 'type' field.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder clearType() {
- type = null;
- fieldSetFlags()[1] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'details' field.
- * @return The value.
- */
- public net.consensys.eventeum.BlockDetails getDetails() {
- return details;
- }
-
-
- /**
- * Sets the value of the 'details' field.
- * @param value The value of 'details'.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder setDetails(net.consensys.eventeum.BlockDetails value) {
- validate(fields()[2], value);
- this.detailsBuilder = null;
- this.details = value;
- fieldSetFlags()[2] = true;
- return this;
- }
-
- /**
- * Checks whether the 'details' field has been set.
- * @return True if the 'details' field has been set, false otherwise.
- */
- public boolean hasDetails() {
- return fieldSetFlags()[2];
- }
-
- /**
- * Gets the Builder instance for the 'details' field and creates one if it doesn't exist yet.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockDetails.Builder getDetailsBuilder() {
- if (detailsBuilder == null) {
- if (hasDetails()) {
- setDetailsBuilder(net.consensys.eventeum.BlockDetails.newBuilder(details));
- } else {
- setDetailsBuilder(net.consensys.eventeum.BlockDetails.newBuilder());
- }
- }
- return detailsBuilder;
- }
-
- /**
- * Sets the Builder instance for the 'details' field
- * @param value The builder instance that must be set.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder setDetailsBuilder(net.consensys.eventeum.BlockDetails.Builder value) {
- clearDetails();
- detailsBuilder = value;
- return this;
- }
-
- /**
- * Checks whether the 'details' field has an active Builder instance
- * @return True if the 'details' field has an active Builder instance
- */
- public boolean hasDetailsBuilder() {
- return detailsBuilder != null;
- }
-
- /**
- * Clears the value of the 'details' field.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder clearDetails() {
- details = null;
- detailsBuilder = null;
- fieldSetFlags()[2] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'retries' field.
- * @return The value.
- */
- public int getRetries() {
- return retries;
- }
-
-
- /**
- * Sets the value of the 'retries' field.
- * @param value The value of 'retries'.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder setRetries(int value) {
- validate(fields()[3], value);
- this.retries = value;
- fieldSetFlags()[3] = true;
- return this;
- }
-
- /**
- * Checks whether the 'retries' field has been set.
- * @return True if the 'retries' field has been set, false otherwise.
- */
- public boolean hasRetries() {
- return fieldSetFlags()[3];
- }
-
-
- /**
- * Clears the value of the 'retries' field.
- * @return This builder.
- */
- public net.consensys.eventeum.BlockEvent.Builder clearRetries() {
- fieldSetFlags()[3] = false;
- return this;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public BlockEvent build() {
- try {
- BlockEvent record = new BlockEvent();
- record.id = fieldSetFlags()[0] ? this.id : (String) defaultValue(fields()[0]);
- record.type = fieldSetFlags()[1] ? this.type : (String) defaultValue(fields()[1]);
- if (detailsBuilder != null) {
- try {
- record.details = this.detailsBuilder.build();
- } catch (org.apache.avro.AvroMissingFieldException e) {
- e.addParentField(record.getSchema().getField("details"));
- throw e;
- }
- } else {
- record.details = fieldSetFlags()[2] ? this.details : (net.consensys.eventeum.BlockDetails) defaultValue(fields()[2]);
- }
- record.retries = fieldSetFlags()[3] ? this.retries : (Integer) defaultValue(fields()[3]);
- return record;
- } catch (org.apache.avro.AvroMissingFieldException e) {
- throw e;
- } catch (Exception e) {
- throw new org.apache.avro.AvroRuntimeException(e);
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- private static final org.apache.avro.io.DatumWriter
- WRITER$ = (org.apache.avro.io.DatumWriter) MODEL$.createDatumWriter(SCHEMA$);
-
- @Override
- public void writeExternal(java.io.ObjectOutput out)
- throws java.io.IOException {
- WRITER$.write(this, SpecificData.getEncoder(out));
- }
-
- @SuppressWarnings("unchecked")
- private static final org.apache.avro.io.DatumReader
- READER$ = (org.apache.avro.io.DatumReader) MODEL$.createDatumReader(SCHEMA$);
-
- @Override
- public void readExternal(java.io.ObjectInput in)
- throws java.io.IOException {
- READER$.read(this, SpecificData.getDecoder(in));
- }
-
- @Override
- protected boolean hasCustomCoders() {
- return true;
- }
-
- @Override
- public void customEncode(org.apache.avro.io.Encoder out)
- throws java.io.IOException {
- out.writeString(this.id);
-
- out.writeString(this.type);
-
- this.details.customEncode(out);
-
- out.writeInt(this.retries);
-
- }
-
- @Override
- public void customDecode(org.apache.avro.io.ResolvingDecoder in)
- throws java.io.IOException {
- org.apache.avro.Schema.Field[] fieldOrder = in.readFieldOrderIfDiff();
- if (fieldOrder == null) {
- this.id = in.readString();
-
- this.type = in.readString();
-
- if (this.details == null) {
- this.details = new net.consensys.eventeum.BlockDetails();
- }
- this.details.customDecode(in);
-
- this.retries = in.readInt();
-
- } else {
- for (int i = 0; i < 4; i++) {
- switch (fieldOrder[i].pos()) {
- case 0:
- this.id = in.readString();
- break;
-
- case 1:
- this.type = in.readString();
- break;
-
- case 2:
- if (this.details == null) {
- this.details = new net.consensys.eventeum.BlockDetails();
- }
- this.details.customDecode(in);
- break;
-
- case 3:
- this.retries = in.readInt();
- break;
-
- default:
- throw new java.io.IOException("Corrupt ResolvingDecoder.");
- }
- }
- }
- }
-}
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/net/consensys/eventeum/ContractEvent.java b/src/main/java/net/consensys/eventeum/ContractEvent.java
deleted file mode 100644
index 6fd5087..0000000
--- a/src/main/java/net/consensys/eventeum/ContractEvent.java
+++ /dev/null
@@ -1,573 +0,0 @@
-/**
- * Autogenerated by Avro
- *
- * DO NOT EDIT DIRECTLY
- */
-package net.consensys.eventeum;
-
-import org.apache.avro.message.BinaryMessageDecoder;
-import org.apache.avro.message.BinaryMessageEncoder;
-import org.apache.avro.message.SchemaStore;
-import org.apache.avro.specific.SpecificData;
-
-@org.apache.avro.specific.AvroGenerated
-public class ContractEvent extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
- private static final long serialVersionUID = -7300114330920817296L;
- public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ContractEvent\",\"namespace\":\"net.consensys.eventeum\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"type\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"details\",\"type\":{\"type\":\"record\",\"name\":\"ContractEventDetails\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"filterId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"nodeName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"indexedParameters\",\"type\":{\"type\":\"array\",\"items\":[{\"type\":\"record\",\"name\":\"StringParameter\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"type\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"value\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"type\":\"record\",\"name\":\"NumberParameter\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"type\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"value\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"}]}]}},{\"name\":\"nonIndexedParameters\",\"type\":{\"type\":\"array\",\"items\":[\"StringParameter\",\"NumberParameter\"]}},{\"name\":\"transactionHash\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"logIndex\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"},{\"name\":\"blockNumber\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"},{\"name\":\"blockHash\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"address\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"status\",\"type\":{\"type\":\"enum\",\"name\":\"ContractEventStatus\",\"symbols\":[\"UNCONFIRMED\",\"CONFIRMED\",\"INVALIDATED\"]}},{\"name\":\"eventSpecificationSignature\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"networkName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}},{\"name\":\"retries\",\"type\":\"int\"}]}");
-
- public static org.apache.avro.Schema getClassSchema() {
- return SCHEMA$;
- }
-
- private static SpecificData MODEL$ = new SpecificData();
-
- private static final BinaryMessageEncoder ENCODER =
- new BinaryMessageEncoder(MODEL$, SCHEMA$);
-
- private static final BinaryMessageDecoder DECODER =
- new BinaryMessageDecoder(MODEL$, SCHEMA$);
-
- /**
- * Return the BinaryMessageEncoder instance used by this class.
- * @return the message encoder used by this class
- */
- public static BinaryMessageEncoder getEncoder() {
- return ENCODER;
- }
-
- /**
- * Return the BinaryMessageDecoder instance used by this class.
- * @return the message decoder used by this class
- */
- public static BinaryMessageDecoder getDecoder() {
- return DECODER;
- }
-
- /**
- * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
- * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
- * @return a BinaryMessageDecoder instance for this class backed by the given SchemaStore
- */
- public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
- return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
- }
-
- /**
- * Serializes this ContractEvent to a ByteBuffer.
- * @return a buffer holding the serialized data for this instance
- * @throws java.io.IOException if this instance could not be serialized
- */
- public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
- return ENCODER.encode(this);
- }
-
- /**
- * Deserializes a ContractEvent from a ByteBuffer.
- * @param b a byte buffer holding serialized data for an instance of this class
- * @return a ContractEvent instance decoded from the given buffer
- * @throws java.io.IOException if the given bytes could not be deserialized into an instance of this class
- */
- public static ContractEvent fromByteBuffer(
- java.nio.ByteBuffer b) throws java.io.IOException {
- return DECODER.decode(b);
- }
-
- @Deprecated
- public String id;
- @Deprecated
- public String type;
- @Deprecated
- public net.consensys.eventeum.ContractEventDetails details;
- @Deprecated
- public int retries;
-
- /**
- * Default constructor. Note that this does not initialize fields
- * to their default values from the schema. If that is desired then
- * one should use newBuilder().
- */
- public ContractEvent() {
- }
-
- /**
- * All-args constructor.
- * @param id The new value for id
- * @param type The new value for type
- * @param details The new value for details
- * @param retries The new value for retries
- */
- public ContractEvent(String id, String type, net.consensys.eventeum.ContractEventDetails details, Integer retries) {
- this.id = id;
- this.type = type;
- this.details = details;
- this.retries = retries;
- }
-
- public org.apache.avro.specific.SpecificData getSpecificData() {
- return MODEL$;
- }
-
- public org.apache.avro.Schema getSchema() {
- return SCHEMA$;
- }
-
- // Used by DatumWriter. Applications should not call.
- public Object get(int field$) {
- switch (field$) {
- case 0:
- return id;
- case 1:
- return type;
- case 2:
- return details;
- case 3:
- return retries;
- default:
- throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- // Used by DatumReader. Applications should not call.
- @SuppressWarnings(value = "unchecked")
- public void put(int field$, Object value$) {
- switch (field$) {
- case 0:
- id = (String) value$;
- break;
- case 1:
- type = (String) value$;
- break;
- case 2:
- details = (net.consensys.eventeum.ContractEventDetails) value$;
- break;
- case 3:
- retries = (Integer) value$;
- break;
- default:
- throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- /**
- * Gets the value of the 'id' field.
- * @return The value of the 'id' field.
- */
- public String getId() {
- return id;
- }
-
-
- /**
- * Sets the value of the 'id' field.
- * @param value the value to set.
- */
- public void setId(String value) {
- this.id = value;
- }
-
- /**
- * Gets the value of the 'type' field.
- * @return The value of the 'type' field.
- */
- public String getType() {
- return type;
- }
-
-
- /**
- * Sets the value of the 'type' field.
- * @param value the value to set.
- */
- public void setType(String value) {
- this.type = value;
- }
-
- /**
- * Gets the value of the 'details' field.
- * @return The value of the 'details' field.
- */
- public net.consensys.eventeum.ContractEventDetails getDetails() {
- return details;
- }
-
-
- /**
- * Sets the value of the 'details' field.
- * @param value the value to set.
- */
- public void setDetails(net.consensys.eventeum.ContractEventDetails value) {
- this.details = value;
- }
-
- /**
- * Gets the value of the 'retries' field.
- * @return The value of the 'retries' field.
- */
- public int getRetries() {
- return retries;
- }
-
-
- /**
- * Sets the value of the 'retries' field.
- * @param value the value to set.
- */
- public void setRetries(int value) {
- this.retries = value;
- }
-
- /**
- * Creates a new ContractEvent RecordBuilder.
- * @return A new ContractEvent RecordBuilder
- */
- public static net.consensys.eventeum.ContractEvent.Builder newBuilder() {
- return new net.consensys.eventeum.ContractEvent.Builder();
- }
-
- /**
- * Creates a new ContractEvent RecordBuilder by copying an existing Builder.
- * @param other The existing builder to copy.
- * @return A new ContractEvent RecordBuilder
- */
- public static net.consensys.eventeum.ContractEvent.Builder newBuilder(net.consensys.eventeum.ContractEvent.Builder other) {
- if (other == null) {
- return new net.consensys.eventeum.ContractEvent.Builder();
- } else {
- return new net.consensys.eventeum.ContractEvent.Builder(other);
- }
- }
-
- /**
- * Creates a new ContractEvent RecordBuilder by copying an existing ContractEvent instance.
- * @param other The existing instance to copy.
- * @return A new ContractEvent RecordBuilder
- */
- public static net.consensys.eventeum.ContractEvent.Builder newBuilder(net.consensys.eventeum.ContractEvent other) {
- if (other == null) {
- return new net.consensys.eventeum.ContractEvent.Builder();
- } else {
- return new net.consensys.eventeum.ContractEvent.Builder(other);
- }
- }
-
- /**
- * RecordBuilder for ContractEvent instances.
- */
- public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
- implements org.apache.avro.data.RecordBuilder {
-
- private String id;
- private String type;
- private net.consensys.eventeum.ContractEventDetails details;
- private net.consensys.eventeum.ContractEventDetails.Builder detailsBuilder;
- private int retries;
-
- /** Creates a new Builder */
- private Builder() {
- super(SCHEMA$);
- }
-
- /**
- * Creates a Builder by copying an existing Builder.
- * @param other The existing Builder to copy.
- */
- private Builder(net.consensys.eventeum.ContractEvent.Builder other) {
- super(other);
- if (isValidValue(fields()[0], other.id)) {
- this.id = data().deepCopy(fields()[0].schema(), other.id);
- fieldSetFlags()[0] = other.fieldSetFlags()[0];
- }
- if (isValidValue(fields()[1], other.type)) {
- this.type = data().deepCopy(fields()[1].schema(), other.type);
- fieldSetFlags()[1] = other.fieldSetFlags()[1];
- }
- if (isValidValue(fields()[2], other.details)) {
- this.details = data().deepCopy(fields()[2].schema(), other.details);
- fieldSetFlags()[2] = other.fieldSetFlags()[2];
- }
- if (other.hasDetailsBuilder()) {
- this.detailsBuilder = net.consensys.eventeum.ContractEventDetails.newBuilder(other.getDetailsBuilder());
- }
- if (isValidValue(fields()[3], other.retries)) {
- this.retries = data().deepCopy(fields()[3].schema(), other.retries);
- fieldSetFlags()[3] = other.fieldSetFlags()[3];
- }
- }
-
- /**
- * Creates a Builder by copying an existing ContractEvent instance
- * @param other The existing instance to copy.
- */
- private Builder(net.consensys.eventeum.ContractEvent other) {
- super(SCHEMA$);
- if (isValidValue(fields()[0], other.id)) {
- this.id = data().deepCopy(fields()[0].schema(), other.id);
- fieldSetFlags()[0] = true;
- }
- if (isValidValue(fields()[1], other.type)) {
- this.type = data().deepCopy(fields()[1].schema(), other.type);
- fieldSetFlags()[1] = true;
- }
- if (isValidValue(fields()[2], other.details)) {
- this.details = data().deepCopy(fields()[2].schema(), other.details);
- fieldSetFlags()[2] = true;
- }
- this.detailsBuilder = null;
- if (isValidValue(fields()[3], other.retries)) {
- this.retries = data().deepCopy(fields()[3].schema(), other.retries);
- fieldSetFlags()[3] = true;
- }
- }
-
- /**
- * Gets the value of the 'id' field.
- * @return The value.
- */
- public String getId() {
- return id;
- }
-
-
- /**
- * Sets the value of the 'id' field.
- * @param value The value of 'id'.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder setId(String value) {
- validate(fields()[0], value);
- this.id = value;
- fieldSetFlags()[0] = true;
- return this;
- }
-
- /**
- * Checks whether the 'id' field has been set.
- * @return True if the 'id' field has been set, false otherwise.
- */
- public boolean hasId() {
- return fieldSetFlags()[0];
- }
-
-
- /**
- * Clears the value of the 'id' field.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder clearId() {
- id = null;
- fieldSetFlags()[0] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'type' field.
- * @return The value.
- */
- public String getType() {
- return type;
- }
-
-
- /**
- * Sets the value of the 'type' field.
- * @param value The value of 'type'.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder setType(String value) {
- validate(fields()[1], value);
- this.type = value;
- fieldSetFlags()[1] = true;
- return this;
- }
-
- /**
- * Checks whether the 'type' field has been set.
- * @return True if the 'type' field has been set, false otherwise.
- */
- public boolean hasType() {
- return fieldSetFlags()[1];
- }
-
-
- /**
- * Clears the value of the 'type' field.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder clearType() {
- type = null;
- fieldSetFlags()[1] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'details' field.
- * @return The value.
- */
- public net.consensys.eventeum.ContractEventDetails getDetails() {
- return details;
- }
-
-
- /**
- * Sets the value of the 'details' field.
- * @param value The value of 'details'.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder setDetails(net.consensys.eventeum.ContractEventDetails value) {
- validate(fields()[2], value);
- this.detailsBuilder = null;
- this.details = value;
- fieldSetFlags()[2] = true;
- return this;
- }
-
- /**
- * Checks whether the 'details' field has been set.
- * @return True if the 'details' field has been set, false otherwise.
- */
- public boolean hasDetails() {
- return fieldSetFlags()[2];
- }
-
- /**
- * Gets the Builder instance for the 'details' field and creates one if it doesn't exist yet.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEventDetails.Builder getDetailsBuilder() {
- if (detailsBuilder == null) {
- if (hasDetails()) {
- setDetailsBuilder(net.consensys.eventeum.ContractEventDetails.newBuilder(details));
- } else {
- setDetailsBuilder(net.consensys.eventeum.ContractEventDetails.newBuilder());
- }
- }
- return detailsBuilder;
- }
-
- /**
- * Sets the Builder instance for the 'details' field
- * @param value The builder instance that must be set.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder setDetailsBuilder(net.consensys.eventeum.ContractEventDetails.Builder value) {
- clearDetails();
- detailsBuilder = value;
- return this;
- }
-
- /**
- * Checks whether the 'details' field has an active Builder instance
- * @return True if the 'details' field has an active Builder instance
- */
- public boolean hasDetailsBuilder() {
- return detailsBuilder != null;
- }
-
- /**
- * Clears the value of the 'details' field.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder clearDetails() {
- details = null;
- detailsBuilder = null;
- fieldSetFlags()[2] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'retries' field.
- * @return The value.
- */
- public int getRetries() {
- return retries;
- }
-
-
- /**
- * Sets the value of the 'retries' field.
- * @param value The value of 'retries'.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder setRetries(int value) {
- validate(fields()[3], value);
- this.retries = value;
- fieldSetFlags()[3] = true;
- return this;
- }
-
- /**
- * Checks whether the 'retries' field has been set.
- * @return True if the 'retries' field has been set, false otherwise.
- */
- public boolean hasRetries() {
- return fieldSetFlags()[3];
- }
-
-
- /**
- * Clears the value of the 'retries' field.
- * @return This builder.
- */
- public net.consensys.eventeum.ContractEvent.Builder clearRetries() {
- fieldSetFlags()[3] = false;
- return this;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public ContractEvent build() {
- try {
- ContractEvent record = new ContractEvent();
- record.id = fieldSetFlags()[0] ? this.id : (String) defaultValue(fields()[0]);
- record.type = fieldSetFlags()[1] ? this.type : (String) defaultValue(fields()[1]);
- if (detailsBuilder != null) {
- try {
- record.details = this.detailsBuilder.build();
- } catch (org.apache.avro.AvroMissingFieldException e) {
- e.addParentField(record.getSchema().getField("details"));
- throw e;
- }
- } else {
- record.details = fieldSetFlags()[2] ? this.details : (net.consensys.eventeum.ContractEventDetails) defaultValue(fields()[2]);
- }
- record.retries = fieldSetFlags()[3] ? this.retries : (Integer) defaultValue(fields()[3]);
- return record;
- } catch (org.apache.avro.AvroMissingFieldException e) {
- throw e;
- } catch (Exception e) {
- throw new org.apache.avro.AvroRuntimeException(e);
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- private static final org.apache.avro.io.DatumWriter
- WRITER$ = (org.apache.avro.io.DatumWriter) MODEL$.createDatumWriter(SCHEMA$);
-
- @Override
- public void writeExternal(java.io.ObjectOutput out)
- throws java.io.IOException {
- WRITER$.write(this, SpecificData.getEncoder(out));
- }
-
- @SuppressWarnings("unchecked")
- private static final org.apache.avro.io.DatumReader
- READER$ = (org.apache.avro.io.DatumReader) MODEL$.createDatumReader(SCHEMA$);
-
- @Override
- public void readExternal(java.io.ObjectInput in)
- throws java.io.IOException {
- READER$.read(this, SpecificData.getDecoder(in));
- }
-
-}
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/java/net/consensys/eventeum/ContractEventDetails.java b/src/main/java/net/consensys/eventeum/ContractEventDetails.java
deleted file mode 100644
index b4e8bc1..0000000
--- a/src/main/java/net/consensys/eventeum/ContractEventDetails.java
+++ /dev/null
@@ -1,1285 +0,0 @@
-/**
- * Autogenerated by Avro
- *
- * DO NOT EDIT DIRECTLY
- */
-package net.consensys.eventeum;
-
-import org.apache.avro.message.BinaryMessageDecoder;
-import org.apache.avro.message.BinaryMessageEncoder;
-import org.apache.avro.message.SchemaStore;
-import org.apache.avro.specific.SpecificData;
-
-@org.apache.avro.specific.AvroGenerated
-public class ContractEventDetails extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
- private static final long serialVersionUID = -3223974792905382143L;
- public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ContractEventDetails\",\"namespace\":\"net.consensys.eventeum\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"filterId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"nodeName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"indexedParameters\",\"type\":{\"type\":\"array\",\"items\":[{\"type\":\"record\",\"name\":\"StringParameter\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"type\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"value\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]},{\"type\":\"record\",\"name\":\"NumberParameter\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"type\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"value\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"}]}]}},{\"name\":\"nonIndexedParameters\",\"type\":{\"type\":\"array\",\"items\":[\"StringParameter\",\"NumberParameter\"]}},{\"name\":\"transactionHash\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"logIndex\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"},{\"name\":\"blockNumber\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"java-class\":\"java.math.BigInteger\"},{\"name\":\"blockHash\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"address\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"status\",\"type\":{\"type\":\"enum\",\"name\":\"ContractEventStatus\",\"symbols\":[\"UNCONFIRMED\",\"CONFIRMED\",\"INVALIDATED\"]}},{\"name\":\"eventSpecificationSignature\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"networkName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}");
-
- public static org.apache.avro.Schema getClassSchema() {
- return SCHEMA$;
- }
-
- private static SpecificData MODEL$ = new SpecificData();
-
- private static final BinaryMessageEncoder ENCODER =
- new BinaryMessageEncoder(MODEL$, SCHEMA$);
-
- private static final BinaryMessageDecoder DECODER =
- new BinaryMessageDecoder(MODEL$, SCHEMA$);
-
- /**
- * Return the BinaryMessageEncoder instance used by this class.
- * @return the message encoder used by this class
- */
- public static BinaryMessageEncoder getEncoder() {
- return ENCODER;
- }
-
- /**
- * Return the BinaryMessageDecoder instance used by this class.
- * @return the message decoder used by this class
- */
- public static BinaryMessageDecoder getDecoder() {
- return DECODER;
- }
-
- /**
- * Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
- * @param resolver a {@link SchemaStore} used to find schemas by fingerprint
- * @return a BinaryMessageDecoder instance for this class backed by the given SchemaStore
- */
- public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
- return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
- }
-
- /**
- * Serializes this ContractEventDetails to a ByteBuffer.
- * @return a buffer holding the serialized data for this instance
- * @throws java.io.IOException if this instance could not be serialized
- */
- public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
- return ENCODER.encode(this);
- }
-
- /**
- * Deserializes a ContractEventDetails from a ByteBuffer.
- * @param b a byte buffer holding serialized data for an instance of this class
- * @return a ContractEventDetails instance decoded from the given buffer
- * @throws java.io.IOException if the given bytes could not be deserialized into an instance of this class
- */
- public static ContractEventDetails fromByteBuffer(
- java.nio.ByteBuffer b) throws java.io.IOException {
- return DECODER.decode(b);
- }
-
- @Deprecated
- public String name;
- @Deprecated
- public String filterId;
- @Deprecated
- public String nodeName;
- @Deprecated
- public java.util.List