org.hyperledger.protos.EventsOuterClass Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-java-sdk Show documentation
Show all versions of fabric-java-sdk Show documentation
This is a fork of Hyperledger Fabric fabric-sdk-java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: events.proto
package org.hyperledger.protos;
public final class EventsOuterClass {
private EventsOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code protos.EventType}
*/
public enum EventType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* REGISTER = 0;
*/
REGISTER(0),
/**
* BLOCK = 1;
*/
BLOCK(1),
/**
* CHAINCODE = 2;
*/
CHAINCODE(2),
/**
* REJECTION = 3;
*/
REJECTION(3),
UNRECOGNIZED(-1),
;
/**
* REGISTER = 0;
*/
public static final int REGISTER_VALUE = 0;
/**
* BLOCK = 1;
*/
public static final int BLOCK_VALUE = 1;
/**
* CHAINCODE = 2;
*/
public static final int CHAINCODE_VALUE = 2;
/**
* REJECTION = 3;
*/
public static final int REJECTION_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EventType valueOf(int value) {
return forNumber(value);
}
public static EventType forNumber(int value) {
switch (value) {
case 0: return REGISTER;
case 1: return BLOCK;
case 2: return CHAINCODE;
case 3: return REJECTION;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
EventType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public EventType findValueByNumber(int number) {
return EventType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.getDescriptor().getEnumTypes().get(0);
}
private static final EventType[] VALUES = values();
public static EventType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private EventType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:protos.EventType)
}
public interface ChaincodeRegOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.ChaincodeReg)
com.google.protobuf.MessageOrBuilder {
/**
* optional string chaincodeID = 1;
*/
java.lang.String getChaincodeID();
/**
* optional string chaincodeID = 1;
*/
com.google.protobuf.ByteString
getChaincodeIDBytes();
/**
* optional string eventName = 2;
*/
java.lang.String getEventName();
/**
* optional string eventName = 2;
*/
com.google.protobuf.ByteString
getEventNameBytes();
}
/**
*
*ChaincodeReg is used for registering chaincode Interests
*when EventType is CHAINCODE
*
*
* Protobuf type {@code protos.ChaincodeReg}
*/
public static final class ChaincodeReg extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.ChaincodeReg)
ChaincodeRegOrBuilder {
// Use ChaincodeReg.newBuilder() to construct.
private ChaincodeReg(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ChaincodeReg() {
chaincodeID_ = "";
eventName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private ChaincodeReg(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
chaincodeID_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
eventName_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_ChaincodeReg_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_ChaincodeReg_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.ChaincodeReg.class, org.hyperledger.protos.EventsOuterClass.ChaincodeReg.Builder.class);
}
public static final int CHAINCODEID_FIELD_NUMBER = 1;
private volatile java.lang.Object chaincodeID_;
/**
* optional string chaincodeID = 1;
*/
public java.lang.String getChaincodeID() {
java.lang.Object ref = chaincodeID_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
chaincodeID_ = s;
return s;
}
}
/**
* optional string chaincodeID = 1;
*/
public com.google.protobuf.ByteString
getChaincodeIDBytes() {
java.lang.Object ref = chaincodeID_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
chaincodeID_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EVENTNAME_FIELD_NUMBER = 2;
private volatile java.lang.Object eventName_;
/**
* optional string eventName = 2;
*/
public java.lang.String getEventName() {
java.lang.Object ref = eventName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
eventName_ = s;
return s;
}
}
/**
* optional string eventName = 2;
*/
public com.google.protobuf.ByteString
getEventNameBytes() {
java.lang.Object ref = eventName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
eventName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getChaincodeIDBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, chaincodeID_);
}
if (!getEventNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, eventName_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getChaincodeIDBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, chaincodeID_);
}
if (!getEventNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, eventName_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.protos.EventsOuterClass.ChaincodeReg)) {
return super.equals(obj);
}
org.hyperledger.protos.EventsOuterClass.ChaincodeReg other = (org.hyperledger.protos.EventsOuterClass.ChaincodeReg) obj;
boolean result = true;
result = result && getChaincodeID()
.equals(other.getChaincodeID());
result = result && getEventName()
.equals(other.getEventName());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + CHAINCODEID_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeID().hashCode();
hash = (37 * hash) + EVENTNAME_FIELD_NUMBER;
hash = (53 * hash) + getEventName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.protos.EventsOuterClass.ChaincodeReg prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*ChaincodeReg is used for registering chaincode Interests
*when EventType is CHAINCODE
*
*
* Protobuf type {@code protos.ChaincodeReg}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.ChaincodeReg)
org.hyperledger.protos.EventsOuterClass.ChaincodeRegOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_ChaincodeReg_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_ChaincodeReg_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.ChaincodeReg.class, org.hyperledger.protos.EventsOuterClass.ChaincodeReg.Builder.class);
}
// Construct using org.hyperledger.protos.EventsOuterClass.ChaincodeReg.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
chaincodeID_ = "";
eventName_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_ChaincodeReg_descriptor;
}
public org.hyperledger.protos.EventsOuterClass.ChaincodeReg getDefaultInstanceForType() {
return org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance();
}
public org.hyperledger.protos.EventsOuterClass.ChaincodeReg build() {
org.hyperledger.protos.EventsOuterClass.ChaincodeReg result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.protos.EventsOuterClass.ChaincodeReg buildPartial() {
org.hyperledger.protos.EventsOuterClass.ChaincodeReg result = new org.hyperledger.protos.EventsOuterClass.ChaincodeReg(this);
result.chaincodeID_ = chaincodeID_;
result.eventName_ = eventName_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.protos.EventsOuterClass.ChaincodeReg) {
return mergeFrom((org.hyperledger.protos.EventsOuterClass.ChaincodeReg)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.protos.EventsOuterClass.ChaincodeReg other) {
if (other == org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance()) return this;
if (!other.getChaincodeID().isEmpty()) {
chaincodeID_ = other.chaincodeID_;
onChanged();
}
if (!other.getEventName().isEmpty()) {
eventName_ = other.eventName_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.protos.EventsOuterClass.ChaincodeReg parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.protos.EventsOuterClass.ChaincodeReg) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object chaincodeID_ = "";
/**
* optional string chaincodeID = 1;
*/
public java.lang.String getChaincodeID() {
java.lang.Object ref = chaincodeID_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
chaincodeID_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string chaincodeID = 1;
*/
public com.google.protobuf.ByteString
getChaincodeIDBytes() {
java.lang.Object ref = chaincodeID_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
chaincodeID_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string chaincodeID = 1;
*/
public Builder setChaincodeID(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
chaincodeID_ = value;
onChanged();
return this;
}
/**
* optional string chaincodeID = 1;
*/
public Builder clearChaincodeID() {
chaincodeID_ = getDefaultInstance().getChaincodeID();
onChanged();
return this;
}
/**
* optional string chaincodeID = 1;
*/
public Builder setChaincodeIDBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
chaincodeID_ = value;
onChanged();
return this;
}
private java.lang.Object eventName_ = "";
/**
* optional string eventName = 2;
*/
public java.lang.String getEventName() {
java.lang.Object ref = eventName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
eventName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string eventName = 2;
*/
public com.google.protobuf.ByteString
getEventNameBytes() {
java.lang.Object ref = eventName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
eventName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string eventName = 2;
*/
public Builder setEventName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
eventName_ = value;
onChanged();
return this;
}
/**
* optional string eventName = 2;
*/
public Builder clearEventName() {
eventName_ = getDefaultInstance().getEventName();
onChanged();
return this;
}
/**
* optional string eventName = 2;
*/
public Builder setEventNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
eventName_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.ChaincodeReg)
}
// @@protoc_insertion_point(class_scope:protos.ChaincodeReg)
private static final org.hyperledger.protos.EventsOuterClass.ChaincodeReg DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.protos.EventsOuterClass.ChaincodeReg();
}
public static org.hyperledger.protos.EventsOuterClass.ChaincodeReg getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ChaincodeReg parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ChaincodeReg(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.protos.EventsOuterClass.ChaincodeReg getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface InterestOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.Interest)
com.google.protobuf.MessageOrBuilder {
/**
* optional .protos.EventType eventType = 1;
*/
int getEventTypeValue();
/**
* optional .protos.EventType eventType = 1;
*/
org.hyperledger.protos.EventsOuterClass.EventType getEventType();
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
org.hyperledger.protos.EventsOuterClass.ChaincodeReg getChaincodeRegInfo();
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
org.hyperledger.protos.EventsOuterClass.ChaincodeRegOrBuilder getChaincodeRegInfoOrBuilder();
public org.hyperledger.protos.EventsOuterClass.Interest.RegInfoCase getRegInfoCase();
}
/**
* Protobuf type {@code protos.Interest}
*/
public static final class Interest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.Interest)
InterestOrBuilder {
// Use Interest.newBuilder() to construct.
private Interest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Interest() {
eventType_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Interest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
eventType_ = rawValue;
break;
}
case 18: {
org.hyperledger.protos.EventsOuterClass.ChaincodeReg.Builder subBuilder = null;
if (regInfoCase_ == 2) {
subBuilder = ((org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_).toBuilder();
}
regInfo_ =
input.readMessage(org.hyperledger.protos.EventsOuterClass.ChaincodeReg.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_);
regInfo_ = subBuilder.buildPartial();
}
regInfoCase_ = 2;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Interest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Interest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.Interest.class, org.hyperledger.protos.EventsOuterClass.Interest.Builder.class);
}
private int regInfoCase_ = 0;
private java.lang.Object regInfo_;
public enum RegInfoCase
implements com.google.protobuf.Internal.EnumLite {
CHAINCODEREGINFO(2),
REGINFO_NOT_SET(0);
private final int value;
private RegInfoCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static RegInfoCase valueOf(int value) {
return forNumber(value);
}
public static RegInfoCase forNumber(int value) {
switch (value) {
case 2: return CHAINCODEREGINFO;
case 0: return REGINFO_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public RegInfoCase
getRegInfoCase() {
return RegInfoCase.forNumber(
regInfoCase_);
}
public static final int EVENTTYPE_FIELD_NUMBER = 1;
private int eventType_;
/**
* optional .protos.EventType eventType = 1;
*/
public int getEventTypeValue() {
return eventType_;
}
/**
* optional .protos.EventType eventType = 1;
*/
public org.hyperledger.protos.EventsOuterClass.EventType getEventType() {
org.hyperledger.protos.EventsOuterClass.EventType result = org.hyperledger.protos.EventsOuterClass.EventType.valueOf(eventType_);
return result == null ? org.hyperledger.protos.EventsOuterClass.EventType.UNRECOGNIZED : result;
}
public static final int CHAINCODEREGINFO_FIELD_NUMBER = 2;
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public org.hyperledger.protos.EventsOuterClass.ChaincodeReg getChaincodeRegInfo() {
if (regInfoCase_ == 2) {
return (org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_;
}
return org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance();
}
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public org.hyperledger.protos.EventsOuterClass.ChaincodeRegOrBuilder getChaincodeRegInfoOrBuilder() {
if (regInfoCase_ == 2) {
return (org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_;
}
return org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (eventType_ != org.hyperledger.protos.EventsOuterClass.EventType.REGISTER.getNumber()) {
output.writeEnum(1, eventType_);
}
if (regInfoCase_ == 2) {
output.writeMessage(2, (org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (eventType_ != org.hyperledger.protos.EventsOuterClass.EventType.REGISTER.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, eventType_);
}
if (regInfoCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.protos.EventsOuterClass.Interest)) {
return super.equals(obj);
}
org.hyperledger.protos.EventsOuterClass.Interest other = (org.hyperledger.protos.EventsOuterClass.Interest) obj;
boolean result = true;
result = result && eventType_ == other.eventType_;
result = result && getRegInfoCase().equals(
other.getRegInfoCase());
if (!result) return false;
switch (regInfoCase_) {
case 2:
result = result && getChaincodeRegInfo()
.equals(other.getChaincodeRegInfo());
break;
case 0:
default:
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + EVENTTYPE_FIELD_NUMBER;
hash = (53 * hash) + eventType_;
switch (regInfoCase_) {
case 2:
hash = (37 * hash) + CHAINCODEREGINFO_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeRegInfo().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Interest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.protos.EventsOuterClass.Interest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protos.Interest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.Interest)
org.hyperledger.protos.EventsOuterClass.InterestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Interest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Interest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.Interest.class, org.hyperledger.protos.EventsOuterClass.Interest.Builder.class);
}
// Construct using org.hyperledger.protos.EventsOuterClass.Interest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
eventType_ = 0;
regInfoCase_ = 0;
regInfo_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Interest_descriptor;
}
public org.hyperledger.protos.EventsOuterClass.Interest getDefaultInstanceForType() {
return org.hyperledger.protos.EventsOuterClass.Interest.getDefaultInstance();
}
public org.hyperledger.protos.EventsOuterClass.Interest build() {
org.hyperledger.protos.EventsOuterClass.Interest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.protos.EventsOuterClass.Interest buildPartial() {
org.hyperledger.protos.EventsOuterClass.Interest result = new org.hyperledger.protos.EventsOuterClass.Interest(this);
result.eventType_ = eventType_;
if (regInfoCase_ == 2) {
if (chaincodeRegInfoBuilder_ == null) {
result.regInfo_ = regInfo_;
} else {
result.regInfo_ = chaincodeRegInfoBuilder_.build();
}
}
result.regInfoCase_ = regInfoCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.protos.EventsOuterClass.Interest) {
return mergeFrom((org.hyperledger.protos.EventsOuterClass.Interest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.protos.EventsOuterClass.Interest other) {
if (other == org.hyperledger.protos.EventsOuterClass.Interest.getDefaultInstance()) return this;
if (other.eventType_ != 0) {
setEventTypeValue(other.getEventTypeValue());
}
switch (other.getRegInfoCase()) {
case CHAINCODEREGINFO: {
mergeChaincodeRegInfo(other.getChaincodeRegInfo());
break;
}
case REGINFO_NOT_SET: {
break;
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.protos.EventsOuterClass.Interest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.protos.EventsOuterClass.Interest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int regInfoCase_ = 0;
private java.lang.Object regInfo_;
public RegInfoCase
getRegInfoCase() {
return RegInfoCase.forNumber(
regInfoCase_);
}
public Builder clearRegInfo() {
regInfoCase_ = 0;
regInfo_ = null;
onChanged();
return this;
}
private int eventType_ = 0;
/**
* optional .protos.EventType eventType = 1;
*/
public int getEventTypeValue() {
return eventType_;
}
/**
* optional .protos.EventType eventType = 1;
*/
public Builder setEventTypeValue(int value) {
eventType_ = value;
onChanged();
return this;
}
/**
* optional .protos.EventType eventType = 1;
*/
public org.hyperledger.protos.EventsOuterClass.EventType getEventType() {
org.hyperledger.protos.EventsOuterClass.EventType result = org.hyperledger.protos.EventsOuterClass.EventType.valueOf(eventType_);
return result == null ? org.hyperledger.protos.EventsOuterClass.EventType.UNRECOGNIZED : result;
}
/**
* optional .protos.EventType eventType = 1;
*/
public Builder setEventType(org.hyperledger.protos.EventsOuterClass.EventType value) {
if (value == null) {
throw new NullPointerException();
}
eventType_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .protos.EventType eventType = 1;
*/
public Builder clearEventType() {
eventType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.ChaincodeReg, org.hyperledger.protos.EventsOuterClass.ChaincodeReg.Builder, org.hyperledger.protos.EventsOuterClass.ChaincodeRegOrBuilder> chaincodeRegInfoBuilder_;
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public org.hyperledger.protos.EventsOuterClass.ChaincodeReg getChaincodeRegInfo() {
if (chaincodeRegInfoBuilder_ == null) {
if (regInfoCase_ == 2) {
return (org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_;
}
return org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance();
} else {
if (regInfoCase_ == 2) {
return chaincodeRegInfoBuilder_.getMessage();
}
return org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance();
}
}
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public Builder setChaincodeRegInfo(org.hyperledger.protos.EventsOuterClass.ChaincodeReg value) {
if (chaincodeRegInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
regInfo_ = value;
onChanged();
} else {
chaincodeRegInfoBuilder_.setMessage(value);
}
regInfoCase_ = 2;
return this;
}
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public Builder setChaincodeRegInfo(
org.hyperledger.protos.EventsOuterClass.ChaincodeReg.Builder builderForValue) {
if (chaincodeRegInfoBuilder_ == null) {
regInfo_ = builderForValue.build();
onChanged();
} else {
chaincodeRegInfoBuilder_.setMessage(builderForValue.build());
}
regInfoCase_ = 2;
return this;
}
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public Builder mergeChaincodeRegInfo(org.hyperledger.protos.EventsOuterClass.ChaincodeReg value) {
if (chaincodeRegInfoBuilder_ == null) {
if (regInfoCase_ == 2 &&
regInfo_ != org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance()) {
regInfo_ = org.hyperledger.protos.EventsOuterClass.ChaincodeReg.newBuilder((org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_)
.mergeFrom(value).buildPartial();
} else {
regInfo_ = value;
}
onChanged();
} else {
if (regInfoCase_ == 2) {
chaincodeRegInfoBuilder_.mergeFrom(value);
}
chaincodeRegInfoBuilder_.setMessage(value);
}
regInfoCase_ = 2;
return this;
}
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public Builder clearChaincodeRegInfo() {
if (chaincodeRegInfoBuilder_ == null) {
if (regInfoCase_ == 2) {
regInfoCase_ = 0;
regInfo_ = null;
onChanged();
}
} else {
if (regInfoCase_ == 2) {
regInfoCase_ = 0;
regInfo_ = null;
}
chaincodeRegInfoBuilder_.clear();
}
return this;
}
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public org.hyperledger.protos.EventsOuterClass.ChaincodeReg.Builder getChaincodeRegInfoBuilder() {
return getChaincodeRegInfoFieldBuilder().getBuilder();
}
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
public org.hyperledger.protos.EventsOuterClass.ChaincodeRegOrBuilder getChaincodeRegInfoOrBuilder() {
if ((regInfoCase_ == 2) && (chaincodeRegInfoBuilder_ != null)) {
return chaincodeRegInfoBuilder_.getMessageOrBuilder();
} else {
if (regInfoCase_ == 2) {
return (org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_;
}
return org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance();
}
}
/**
* optional .protos.ChaincodeReg chaincodeRegInfo = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.ChaincodeReg, org.hyperledger.protos.EventsOuterClass.ChaincodeReg.Builder, org.hyperledger.protos.EventsOuterClass.ChaincodeRegOrBuilder>
getChaincodeRegInfoFieldBuilder() {
if (chaincodeRegInfoBuilder_ == null) {
if (!(regInfoCase_ == 2)) {
regInfo_ = org.hyperledger.protos.EventsOuterClass.ChaincodeReg.getDefaultInstance();
}
chaincodeRegInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.ChaincodeReg, org.hyperledger.protos.EventsOuterClass.ChaincodeReg.Builder, org.hyperledger.protos.EventsOuterClass.ChaincodeRegOrBuilder>(
(org.hyperledger.protos.EventsOuterClass.ChaincodeReg) regInfo_,
getParentForChildren(),
isClean());
regInfo_ = null;
}
regInfoCase_ = 2;
onChanged();;
return chaincodeRegInfoBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.Interest)
}
// @@protoc_insertion_point(class_scope:protos.Interest)
private static final org.hyperledger.protos.EventsOuterClass.Interest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.protos.EventsOuterClass.Interest();
}
public static org.hyperledger.protos.EventsOuterClass.Interest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Interest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Interest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.protos.EventsOuterClass.Interest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RegisterOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.Register)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .protos.Interest events = 1;
*/
java.util.List
getEventsList();
/**
* repeated .protos.Interest events = 1;
*/
org.hyperledger.protos.EventsOuterClass.Interest getEvents(int index);
/**
* repeated .protos.Interest events = 1;
*/
int getEventsCount();
/**
* repeated .protos.Interest events = 1;
*/
java.util.List extends org.hyperledger.protos.EventsOuterClass.InterestOrBuilder>
getEventsOrBuilderList();
/**
* repeated .protos.Interest events = 1;
*/
org.hyperledger.protos.EventsOuterClass.InterestOrBuilder getEventsOrBuilder(
int index);
}
/**
*
*---------- consumer events ---------
*Register is sent by consumers for registering events
*string type - "register"
*
*
* Protobuf type {@code protos.Register}
*/
public static final class Register extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.Register)
RegisterOrBuilder {
// Use Register.newBuilder() to construct.
private Register(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Register() {
events_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Register(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
events_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
events_.add(
input.readMessage(org.hyperledger.protos.EventsOuterClass.Interest.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
events_ = java.util.Collections.unmodifiableList(events_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Register_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Register_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.Register.class, org.hyperledger.protos.EventsOuterClass.Register.Builder.class);
}
public static final int EVENTS_FIELD_NUMBER = 1;
private java.util.List events_;
/**
* repeated .protos.Interest events = 1;
*/
public java.util.List getEventsList() {
return events_;
}
/**
* repeated .protos.Interest events = 1;
*/
public java.util.List extends org.hyperledger.protos.EventsOuterClass.InterestOrBuilder>
getEventsOrBuilderList() {
return events_;
}
/**
* repeated .protos.Interest events = 1;
*/
public int getEventsCount() {
return events_.size();
}
/**
* repeated .protos.Interest events = 1;
*/
public org.hyperledger.protos.EventsOuterClass.Interest getEvents(int index) {
return events_.get(index);
}
/**
* repeated .protos.Interest events = 1;
*/
public org.hyperledger.protos.EventsOuterClass.InterestOrBuilder getEventsOrBuilder(
int index) {
return events_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < events_.size(); i++) {
output.writeMessage(1, events_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < events_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, events_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.protos.EventsOuterClass.Register)) {
return super.equals(obj);
}
org.hyperledger.protos.EventsOuterClass.Register other = (org.hyperledger.protos.EventsOuterClass.Register) obj;
boolean result = true;
result = result && getEventsList()
.equals(other.getEventsList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (getEventsCount() > 0) {
hash = (37 * hash) + EVENTS_FIELD_NUMBER;
hash = (53 * hash) + getEventsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.protos.EventsOuterClass.Register parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Register parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.protos.EventsOuterClass.Register prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*---------- consumer events ---------
*Register is sent by consumers for registering events
*string type - "register"
*
*
* Protobuf type {@code protos.Register}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.Register)
org.hyperledger.protos.EventsOuterClass.RegisterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Register_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Register_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.Register.class, org.hyperledger.protos.EventsOuterClass.Register.Builder.class);
}
// Construct using org.hyperledger.protos.EventsOuterClass.Register.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getEventsFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (eventsBuilder_ == null) {
events_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
eventsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Register_descriptor;
}
public org.hyperledger.protos.EventsOuterClass.Register getDefaultInstanceForType() {
return org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance();
}
public org.hyperledger.protos.EventsOuterClass.Register build() {
org.hyperledger.protos.EventsOuterClass.Register result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.protos.EventsOuterClass.Register buildPartial() {
org.hyperledger.protos.EventsOuterClass.Register result = new org.hyperledger.protos.EventsOuterClass.Register(this);
int from_bitField0_ = bitField0_;
if (eventsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
events_ = java.util.Collections.unmodifiableList(events_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.events_ = events_;
} else {
result.events_ = eventsBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.protos.EventsOuterClass.Register) {
return mergeFrom((org.hyperledger.protos.EventsOuterClass.Register)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.protos.EventsOuterClass.Register other) {
if (other == org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance()) return this;
if (eventsBuilder_ == null) {
if (!other.events_.isEmpty()) {
if (events_.isEmpty()) {
events_ = other.events_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureEventsIsMutable();
events_.addAll(other.events_);
}
onChanged();
}
} else {
if (!other.events_.isEmpty()) {
if (eventsBuilder_.isEmpty()) {
eventsBuilder_.dispose();
eventsBuilder_ = null;
events_ = other.events_;
bitField0_ = (bitField0_ & ~0x00000001);
eventsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEventsFieldBuilder() : null;
} else {
eventsBuilder_.addAllMessages(other.events_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.protos.EventsOuterClass.Register parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.protos.EventsOuterClass.Register) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List events_ =
java.util.Collections.emptyList();
private void ensureEventsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
events_ = new java.util.ArrayList(events_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Interest, org.hyperledger.protos.EventsOuterClass.Interest.Builder, org.hyperledger.protos.EventsOuterClass.InterestOrBuilder> eventsBuilder_;
/**
* repeated .protos.Interest events = 1;
*/
public java.util.List getEventsList() {
if (eventsBuilder_ == null) {
return java.util.Collections.unmodifiableList(events_);
} else {
return eventsBuilder_.getMessageList();
}
}
/**
* repeated .protos.Interest events = 1;
*/
public int getEventsCount() {
if (eventsBuilder_ == null) {
return events_.size();
} else {
return eventsBuilder_.getCount();
}
}
/**
* repeated .protos.Interest events = 1;
*/
public org.hyperledger.protos.EventsOuterClass.Interest getEvents(int index) {
if (eventsBuilder_ == null) {
return events_.get(index);
} else {
return eventsBuilder_.getMessage(index);
}
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder setEvents(
int index, org.hyperledger.protos.EventsOuterClass.Interest value) {
if (eventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEventsIsMutable();
events_.set(index, value);
onChanged();
} else {
eventsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder setEvents(
int index, org.hyperledger.protos.EventsOuterClass.Interest.Builder builderForValue) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
events_.set(index, builderForValue.build());
onChanged();
} else {
eventsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder addEvents(org.hyperledger.protos.EventsOuterClass.Interest value) {
if (eventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEventsIsMutable();
events_.add(value);
onChanged();
} else {
eventsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder addEvents(
int index, org.hyperledger.protos.EventsOuterClass.Interest value) {
if (eventsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEventsIsMutable();
events_.add(index, value);
onChanged();
} else {
eventsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder addEvents(
org.hyperledger.protos.EventsOuterClass.Interest.Builder builderForValue) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
events_.add(builderForValue.build());
onChanged();
} else {
eventsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder addEvents(
int index, org.hyperledger.protos.EventsOuterClass.Interest.Builder builderForValue) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
events_.add(index, builderForValue.build());
onChanged();
} else {
eventsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder addAllEvents(
java.lang.Iterable extends org.hyperledger.protos.EventsOuterClass.Interest> values) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, events_);
onChanged();
} else {
eventsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder clearEvents() {
if (eventsBuilder_ == null) {
events_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
eventsBuilder_.clear();
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public Builder removeEvents(int index) {
if (eventsBuilder_ == null) {
ensureEventsIsMutable();
events_.remove(index);
onChanged();
} else {
eventsBuilder_.remove(index);
}
return this;
}
/**
* repeated .protos.Interest events = 1;
*/
public org.hyperledger.protos.EventsOuterClass.Interest.Builder getEventsBuilder(
int index) {
return getEventsFieldBuilder().getBuilder(index);
}
/**
* repeated .protos.Interest events = 1;
*/
public org.hyperledger.protos.EventsOuterClass.InterestOrBuilder getEventsOrBuilder(
int index) {
if (eventsBuilder_ == null) {
return events_.get(index); } else {
return eventsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .protos.Interest events = 1;
*/
public java.util.List extends org.hyperledger.protos.EventsOuterClass.InterestOrBuilder>
getEventsOrBuilderList() {
if (eventsBuilder_ != null) {
return eventsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(events_);
}
}
/**
* repeated .protos.Interest events = 1;
*/
public org.hyperledger.protos.EventsOuterClass.Interest.Builder addEventsBuilder() {
return getEventsFieldBuilder().addBuilder(
org.hyperledger.protos.EventsOuterClass.Interest.getDefaultInstance());
}
/**
* repeated .protos.Interest events = 1;
*/
public org.hyperledger.protos.EventsOuterClass.Interest.Builder addEventsBuilder(
int index) {
return getEventsFieldBuilder().addBuilder(
index, org.hyperledger.protos.EventsOuterClass.Interest.getDefaultInstance());
}
/**
* repeated .protos.Interest events = 1;
*/
public java.util.List
getEventsBuilderList() {
return getEventsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Interest, org.hyperledger.protos.EventsOuterClass.Interest.Builder, org.hyperledger.protos.EventsOuterClass.InterestOrBuilder>
getEventsFieldBuilder() {
if (eventsBuilder_ == null) {
eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Interest, org.hyperledger.protos.EventsOuterClass.Interest.Builder, org.hyperledger.protos.EventsOuterClass.InterestOrBuilder>(
events_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
events_ = null;
}
return eventsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.Register)
}
// @@protoc_insertion_point(class_scope:protos.Register)
private static final org.hyperledger.protos.EventsOuterClass.Register DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.protos.EventsOuterClass.Register();
}
public static org.hyperledger.protos.EventsOuterClass.Register getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Register parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Register(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.protos.EventsOuterClass.Register getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RejectionOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.Rejection)
com.google.protobuf.MessageOrBuilder {
/**
* optional .protos.Transaction tx = 1;
*/
boolean hasTx();
/**
* optional .protos.Transaction tx = 1;
*/
org.hyperledger.protos.Fabric.Transaction getTx();
/**
* optional .protos.Transaction tx = 1;
*/
org.hyperledger.protos.Fabric.TransactionOrBuilder getTxOrBuilder();
/**
* optional string errorMsg = 2;
*/
java.lang.String getErrorMsg();
/**
* optional string errorMsg = 2;
*/
com.google.protobuf.ByteString
getErrorMsgBytes();
}
/**
*
*Rejection is sent by consumers for erroneous transaction rejection events
*string type - "rejection"
*
*
* Protobuf type {@code protos.Rejection}
*/
public static final class Rejection extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.Rejection)
RejectionOrBuilder {
// Use Rejection.newBuilder() to construct.
private Rejection(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Rejection() {
errorMsg_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Rejection(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
org.hyperledger.protos.Fabric.Transaction.Builder subBuilder = null;
if (tx_ != null) {
subBuilder = tx_.toBuilder();
}
tx_ = input.readMessage(org.hyperledger.protos.Fabric.Transaction.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tx_);
tx_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
errorMsg_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Rejection_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Rejection_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.Rejection.class, org.hyperledger.protos.EventsOuterClass.Rejection.Builder.class);
}
public static final int TX_FIELD_NUMBER = 1;
private org.hyperledger.protos.Fabric.Transaction tx_;
/**
* optional .protos.Transaction tx = 1;
*/
public boolean hasTx() {
return tx_ != null;
}
/**
* optional .protos.Transaction tx = 1;
*/
public org.hyperledger.protos.Fabric.Transaction getTx() {
return tx_ == null ? org.hyperledger.protos.Fabric.Transaction.getDefaultInstance() : tx_;
}
/**
* optional .protos.Transaction tx = 1;
*/
public org.hyperledger.protos.Fabric.TransactionOrBuilder getTxOrBuilder() {
return getTx();
}
public static final int ERRORMSG_FIELD_NUMBER = 2;
private volatile java.lang.Object errorMsg_;
/**
* optional string errorMsg = 2;
*/
public java.lang.String getErrorMsg() {
java.lang.Object ref = errorMsg_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
errorMsg_ = s;
return s;
}
}
/**
* optional string errorMsg = 2;
*/
public com.google.protobuf.ByteString
getErrorMsgBytes() {
java.lang.Object ref = errorMsg_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
errorMsg_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (tx_ != null) {
output.writeMessage(1, getTx());
}
if (!getErrorMsgBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMsg_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tx_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTx());
}
if (!getErrorMsgBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMsg_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.protos.EventsOuterClass.Rejection)) {
return super.equals(obj);
}
org.hyperledger.protos.EventsOuterClass.Rejection other = (org.hyperledger.protos.EventsOuterClass.Rejection) obj;
boolean result = true;
result = result && (hasTx() == other.hasTx());
if (hasTx()) {
result = result && getTx()
.equals(other.getTx());
}
result = result && getErrorMsg()
.equals(other.getErrorMsg());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (hasTx()) {
hash = (37 * hash) + TX_FIELD_NUMBER;
hash = (53 * hash) + getTx().hashCode();
}
hash = (37 * hash) + ERRORMSG_FIELD_NUMBER;
hash = (53 * hash) + getErrorMsg().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Rejection parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.protos.EventsOuterClass.Rejection prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*Rejection is sent by consumers for erroneous transaction rejection events
*string type - "rejection"
*
*
* Protobuf type {@code protos.Rejection}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.Rejection)
org.hyperledger.protos.EventsOuterClass.RejectionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Rejection_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Rejection_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.Rejection.class, org.hyperledger.protos.EventsOuterClass.Rejection.Builder.class);
}
// Construct using org.hyperledger.protos.EventsOuterClass.Rejection.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (txBuilder_ == null) {
tx_ = null;
} else {
tx_ = null;
txBuilder_ = null;
}
errorMsg_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Rejection_descriptor;
}
public org.hyperledger.protos.EventsOuterClass.Rejection getDefaultInstanceForType() {
return org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance();
}
public org.hyperledger.protos.EventsOuterClass.Rejection build() {
org.hyperledger.protos.EventsOuterClass.Rejection result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.protos.EventsOuterClass.Rejection buildPartial() {
org.hyperledger.protos.EventsOuterClass.Rejection result = new org.hyperledger.protos.EventsOuterClass.Rejection(this);
if (txBuilder_ == null) {
result.tx_ = tx_;
} else {
result.tx_ = txBuilder_.build();
}
result.errorMsg_ = errorMsg_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.protos.EventsOuterClass.Rejection) {
return mergeFrom((org.hyperledger.protos.EventsOuterClass.Rejection)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.protos.EventsOuterClass.Rejection other) {
if (other == org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance()) return this;
if (other.hasTx()) {
mergeTx(other.getTx());
}
if (!other.getErrorMsg().isEmpty()) {
errorMsg_ = other.errorMsg_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.protos.EventsOuterClass.Rejection parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.protos.EventsOuterClass.Rejection) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.hyperledger.protos.Fabric.Transaction tx_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Fabric.Transaction, org.hyperledger.protos.Fabric.Transaction.Builder, org.hyperledger.protos.Fabric.TransactionOrBuilder> txBuilder_;
/**
* optional .protos.Transaction tx = 1;
*/
public boolean hasTx() {
return txBuilder_ != null || tx_ != null;
}
/**
* optional .protos.Transaction tx = 1;
*/
public org.hyperledger.protos.Fabric.Transaction getTx() {
if (txBuilder_ == null) {
return tx_ == null ? org.hyperledger.protos.Fabric.Transaction.getDefaultInstance() : tx_;
} else {
return txBuilder_.getMessage();
}
}
/**
* optional .protos.Transaction tx = 1;
*/
public Builder setTx(org.hyperledger.protos.Fabric.Transaction value) {
if (txBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tx_ = value;
onChanged();
} else {
txBuilder_.setMessage(value);
}
return this;
}
/**
* optional .protos.Transaction tx = 1;
*/
public Builder setTx(
org.hyperledger.protos.Fabric.Transaction.Builder builderForValue) {
if (txBuilder_ == null) {
tx_ = builderForValue.build();
onChanged();
} else {
txBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* optional .protos.Transaction tx = 1;
*/
public Builder mergeTx(org.hyperledger.protos.Fabric.Transaction value) {
if (txBuilder_ == null) {
if (tx_ != null) {
tx_ =
org.hyperledger.protos.Fabric.Transaction.newBuilder(tx_).mergeFrom(value).buildPartial();
} else {
tx_ = value;
}
onChanged();
} else {
txBuilder_.mergeFrom(value);
}
return this;
}
/**
* optional .protos.Transaction tx = 1;
*/
public Builder clearTx() {
if (txBuilder_ == null) {
tx_ = null;
onChanged();
} else {
tx_ = null;
txBuilder_ = null;
}
return this;
}
/**
* optional .protos.Transaction tx = 1;
*/
public org.hyperledger.protos.Fabric.Transaction.Builder getTxBuilder() {
onChanged();
return getTxFieldBuilder().getBuilder();
}
/**
* optional .protos.Transaction tx = 1;
*/
public org.hyperledger.protos.Fabric.TransactionOrBuilder getTxOrBuilder() {
if (txBuilder_ != null) {
return txBuilder_.getMessageOrBuilder();
} else {
return tx_ == null ?
org.hyperledger.protos.Fabric.Transaction.getDefaultInstance() : tx_;
}
}
/**
* optional .protos.Transaction tx = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Fabric.Transaction, org.hyperledger.protos.Fabric.Transaction.Builder, org.hyperledger.protos.Fabric.TransactionOrBuilder>
getTxFieldBuilder() {
if (txBuilder_ == null) {
txBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Fabric.Transaction, org.hyperledger.protos.Fabric.Transaction.Builder, org.hyperledger.protos.Fabric.TransactionOrBuilder>(
getTx(),
getParentForChildren(),
isClean());
tx_ = null;
}
return txBuilder_;
}
private java.lang.Object errorMsg_ = "";
/**
* optional string errorMsg = 2;
*/
public java.lang.String getErrorMsg() {
java.lang.Object ref = errorMsg_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
errorMsg_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string errorMsg = 2;
*/
public com.google.protobuf.ByteString
getErrorMsgBytes() {
java.lang.Object ref = errorMsg_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
errorMsg_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string errorMsg = 2;
*/
public Builder setErrorMsg(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
errorMsg_ = value;
onChanged();
return this;
}
/**
* optional string errorMsg = 2;
*/
public Builder clearErrorMsg() {
errorMsg_ = getDefaultInstance().getErrorMsg();
onChanged();
return this;
}
/**
* optional string errorMsg = 2;
*/
public Builder setErrorMsgBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
errorMsg_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.Rejection)
}
// @@protoc_insertion_point(class_scope:protos.Rejection)
private static final org.hyperledger.protos.EventsOuterClass.Rejection DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.protos.EventsOuterClass.Rejection();
}
public static org.hyperledger.protos.EventsOuterClass.Rejection getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Rejection parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Rejection(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.protos.EventsOuterClass.Rejection getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EventOrBuilder extends
// @@protoc_insertion_point(interface_extends:protos.Event)
com.google.protobuf.MessageOrBuilder {
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
org.hyperledger.protos.EventsOuterClass.Register getRegister();
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
org.hyperledger.protos.EventsOuterClass.RegisterOrBuilder getRegisterOrBuilder();
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
org.hyperledger.protos.Fabric.Block getBlock();
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
org.hyperledger.protos.Fabric.BlockOrBuilder getBlockOrBuilder();
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
org.hyperledger.protos.Chaincodeevent.ChaincodeEvent getChaincodeEvent();
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
org.hyperledger.protos.Chaincodeevent.ChaincodeEventOrBuilder getChaincodeEventOrBuilder();
/**
* optional .protos.Rejection rejection = 4;
*/
org.hyperledger.protos.EventsOuterClass.Rejection getRejection();
/**
* optional .protos.Rejection rejection = 4;
*/
org.hyperledger.protos.EventsOuterClass.RejectionOrBuilder getRejectionOrBuilder();
public org.hyperledger.protos.EventsOuterClass.Event.EventCase getEventCase();
}
/**
*
*---------- producer events ---------
*Event is used by
* - consumers (adapters) to send Register
* - producer to advertise supported types and events
*
*
* Protobuf type {@code protos.Event}
*/
public static final class Event extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protos.Event)
EventOrBuilder {
// Use Event.newBuilder() to construct.
private Event(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Event() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Event(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
org.hyperledger.protos.EventsOuterClass.Register.Builder subBuilder = null;
if (eventCase_ == 1) {
subBuilder = ((org.hyperledger.protos.EventsOuterClass.Register) event_).toBuilder();
}
event_ =
input.readMessage(org.hyperledger.protos.EventsOuterClass.Register.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.protos.EventsOuterClass.Register) event_);
event_ = subBuilder.buildPartial();
}
eventCase_ = 1;
break;
}
case 18: {
org.hyperledger.protos.Fabric.Block.Builder subBuilder = null;
if (eventCase_ == 2) {
subBuilder = ((org.hyperledger.protos.Fabric.Block) event_).toBuilder();
}
event_ =
input.readMessage(org.hyperledger.protos.Fabric.Block.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.protos.Fabric.Block) event_);
event_ = subBuilder.buildPartial();
}
eventCase_ = 2;
break;
}
case 26: {
org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.Builder subBuilder = null;
if (eventCase_ == 3) {
subBuilder = ((org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_).toBuilder();
}
event_ =
input.readMessage(org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_);
event_ = subBuilder.buildPartial();
}
eventCase_ = 3;
break;
}
case 34: {
org.hyperledger.protos.EventsOuterClass.Rejection.Builder subBuilder = null;
if (eventCase_ == 4) {
subBuilder = ((org.hyperledger.protos.EventsOuterClass.Rejection) event_).toBuilder();
}
event_ =
input.readMessage(org.hyperledger.protos.EventsOuterClass.Rejection.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.protos.EventsOuterClass.Rejection) event_);
event_ = subBuilder.buildPartial();
}
eventCase_ = 4;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Event_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Event_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.Event.class, org.hyperledger.protos.EventsOuterClass.Event.Builder.class);
}
private int eventCase_ = 0;
private java.lang.Object event_;
public enum EventCase
implements com.google.protobuf.Internal.EnumLite {
REGISTER(1),
BLOCK(2),
CHAINCODEEVENT(3),
REJECTION(4),
EVENT_NOT_SET(0);
private final int value;
private EventCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EventCase valueOf(int value) {
return forNumber(value);
}
public static EventCase forNumber(int value) {
switch (value) {
case 1: return REGISTER;
case 2: return BLOCK;
case 3: return CHAINCODEEVENT;
case 4: return REJECTION;
case 0: return EVENT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public EventCase
getEventCase() {
return EventCase.forNumber(
eventCase_);
}
public static final int REGISTER_FIELD_NUMBER = 1;
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public org.hyperledger.protos.EventsOuterClass.Register getRegister() {
if (eventCase_ == 1) {
return (org.hyperledger.protos.EventsOuterClass.Register) event_;
}
return org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance();
}
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public org.hyperledger.protos.EventsOuterClass.RegisterOrBuilder getRegisterOrBuilder() {
if (eventCase_ == 1) {
return (org.hyperledger.protos.EventsOuterClass.Register) event_;
}
return org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance();
}
public static final int BLOCK_FIELD_NUMBER = 2;
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public org.hyperledger.protos.Fabric.Block getBlock() {
if (eventCase_ == 2) {
return (org.hyperledger.protos.Fabric.Block) event_;
}
return org.hyperledger.protos.Fabric.Block.getDefaultInstance();
}
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public org.hyperledger.protos.Fabric.BlockOrBuilder getBlockOrBuilder() {
if (eventCase_ == 2) {
return (org.hyperledger.protos.Fabric.Block) event_;
}
return org.hyperledger.protos.Fabric.Block.getDefaultInstance();
}
public static final int CHAINCODEEVENT_FIELD_NUMBER = 3;
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public org.hyperledger.protos.Chaincodeevent.ChaincodeEvent getChaincodeEvent() {
if (eventCase_ == 3) {
return (org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_;
}
return org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.getDefaultInstance();
}
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public org.hyperledger.protos.Chaincodeevent.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() {
if (eventCase_ == 3) {
return (org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_;
}
return org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.getDefaultInstance();
}
public static final int REJECTION_FIELD_NUMBER = 4;
/**
* optional .protos.Rejection rejection = 4;
*/
public org.hyperledger.protos.EventsOuterClass.Rejection getRejection() {
if (eventCase_ == 4) {
return (org.hyperledger.protos.EventsOuterClass.Rejection) event_;
}
return org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance();
}
/**
* optional .protos.Rejection rejection = 4;
*/
public org.hyperledger.protos.EventsOuterClass.RejectionOrBuilder getRejectionOrBuilder() {
if (eventCase_ == 4) {
return (org.hyperledger.protos.EventsOuterClass.Rejection) event_;
}
return org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (eventCase_ == 1) {
output.writeMessage(1, (org.hyperledger.protos.EventsOuterClass.Register) event_);
}
if (eventCase_ == 2) {
output.writeMessage(2, (org.hyperledger.protos.Fabric.Block) event_);
}
if (eventCase_ == 3) {
output.writeMessage(3, (org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_);
}
if (eventCase_ == 4) {
output.writeMessage(4, (org.hyperledger.protos.EventsOuterClass.Rejection) event_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (eventCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (org.hyperledger.protos.EventsOuterClass.Register) event_);
}
if (eventCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (org.hyperledger.protos.Fabric.Block) event_);
}
if (eventCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_);
}
if (eventCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (org.hyperledger.protos.EventsOuterClass.Rejection) event_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.protos.EventsOuterClass.Event)) {
return super.equals(obj);
}
org.hyperledger.protos.EventsOuterClass.Event other = (org.hyperledger.protos.EventsOuterClass.Event) obj;
boolean result = true;
result = result && getEventCase().equals(
other.getEventCase());
if (!result) return false;
switch (eventCase_) {
case 1:
result = result && getRegister()
.equals(other.getRegister());
break;
case 2:
result = result && getBlock()
.equals(other.getBlock());
break;
case 3:
result = result && getChaincodeEvent()
.equals(other.getChaincodeEvent());
break;
case 4:
result = result && getRejection()
.equals(other.getRejection());
break;
case 0:
default:
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
switch (eventCase_) {
case 1:
hash = (37 * hash) + REGISTER_FIELD_NUMBER;
hash = (53 * hash) + getRegister().hashCode();
break;
case 2:
hash = (37 * hash) + BLOCK_FIELD_NUMBER;
hash = (53 * hash) + getBlock().hashCode();
break;
case 3:
hash = (37 * hash) + CHAINCODEEVENT_FIELD_NUMBER;
hash = (53 * hash) + getChaincodeEvent().hashCode();
break;
case 4:
hash = (37 * hash) + REJECTION_FIELD_NUMBER;
hash = (53 * hash) + getRejection().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.protos.EventsOuterClass.Event parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.protos.EventsOuterClass.Event parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.protos.EventsOuterClass.Event prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*---------- producer events ---------
*Event is used by
* - consumers (adapters) to send Register
* - producer to advertise supported types and events
*
*
* Protobuf type {@code protos.Event}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protos.Event)
org.hyperledger.protos.EventsOuterClass.EventOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Event_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Event_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.protos.EventsOuterClass.Event.class, org.hyperledger.protos.EventsOuterClass.Event.Builder.class);
}
// Construct using org.hyperledger.protos.EventsOuterClass.Event.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
eventCase_ = 0;
event_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.protos.EventsOuterClass.internal_static_protos_Event_descriptor;
}
public org.hyperledger.protos.EventsOuterClass.Event getDefaultInstanceForType() {
return org.hyperledger.protos.EventsOuterClass.Event.getDefaultInstance();
}
public org.hyperledger.protos.EventsOuterClass.Event build() {
org.hyperledger.protos.EventsOuterClass.Event result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.hyperledger.protos.EventsOuterClass.Event buildPartial() {
org.hyperledger.protos.EventsOuterClass.Event result = new org.hyperledger.protos.EventsOuterClass.Event(this);
if (eventCase_ == 1) {
if (registerBuilder_ == null) {
result.event_ = event_;
} else {
result.event_ = registerBuilder_.build();
}
}
if (eventCase_ == 2) {
if (blockBuilder_ == null) {
result.event_ = event_;
} else {
result.event_ = blockBuilder_.build();
}
}
if (eventCase_ == 3) {
if (chaincodeEventBuilder_ == null) {
result.event_ = event_;
} else {
result.event_ = chaincodeEventBuilder_.build();
}
}
if (eventCase_ == 4) {
if (rejectionBuilder_ == null) {
result.event_ = event_;
} else {
result.event_ = rejectionBuilder_.build();
}
}
result.eventCase_ = eventCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.protos.EventsOuterClass.Event) {
return mergeFrom((org.hyperledger.protos.EventsOuterClass.Event)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.protos.EventsOuterClass.Event other) {
if (other == org.hyperledger.protos.EventsOuterClass.Event.getDefaultInstance()) return this;
switch (other.getEventCase()) {
case REGISTER: {
mergeRegister(other.getRegister());
break;
}
case BLOCK: {
mergeBlock(other.getBlock());
break;
}
case CHAINCODEEVENT: {
mergeChaincodeEvent(other.getChaincodeEvent());
break;
}
case REJECTION: {
mergeRejection(other.getRejection());
break;
}
case EVENT_NOT_SET: {
break;
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.protos.EventsOuterClass.Event parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.protos.EventsOuterClass.Event) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int eventCase_ = 0;
private java.lang.Object event_;
public EventCase
getEventCase() {
return EventCase.forNumber(
eventCase_);
}
public Builder clearEvent() {
eventCase_ = 0;
event_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Register, org.hyperledger.protos.EventsOuterClass.Register.Builder, org.hyperledger.protos.EventsOuterClass.RegisterOrBuilder> registerBuilder_;
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public org.hyperledger.protos.EventsOuterClass.Register getRegister() {
if (registerBuilder_ == null) {
if (eventCase_ == 1) {
return (org.hyperledger.protos.EventsOuterClass.Register) event_;
}
return org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance();
} else {
if (eventCase_ == 1) {
return registerBuilder_.getMessage();
}
return org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance();
}
}
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public Builder setRegister(org.hyperledger.protos.EventsOuterClass.Register value) {
if (registerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
event_ = value;
onChanged();
} else {
registerBuilder_.setMessage(value);
}
eventCase_ = 1;
return this;
}
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public Builder setRegister(
org.hyperledger.protos.EventsOuterClass.Register.Builder builderForValue) {
if (registerBuilder_ == null) {
event_ = builderForValue.build();
onChanged();
} else {
registerBuilder_.setMessage(builderForValue.build());
}
eventCase_ = 1;
return this;
}
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public Builder mergeRegister(org.hyperledger.protos.EventsOuterClass.Register value) {
if (registerBuilder_ == null) {
if (eventCase_ == 1 &&
event_ != org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance()) {
event_ = org.hyperledger.protos.EventsOuterClass.Register.newBuilder((org.hyperledger.protos.EventsOuterClass.Register) event_)
.mergeFrom(value).buildPartial();
} else {
event_ = value;
}
onChanged();
} else {
if (eventCase_ == 1) {
registerBuilder_.mergeFrom(value);
}
registerBuilder_.setMessage(value);
}
eventCase_ = 1;
return this;
}
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public Builder clearRegister() {
if (registerBuilder_ == null) {
if (eventCase_ == 1) {
eventCase_ = 0;
event_ = null;
onChanged();
}
} else {
if (eventCase_ == 1) {
eventCase_ = 0;
event_ = null;
}
registerBuilder_.clear();
}
return this;
}
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public org.hyperledger.protos.EventsOuterClass.Register.Builder getRegisterBuilder() {
return getRegisterFieldBuilder().getBuilder();
}
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
public org.hyperledger.protos.EventsOuterClass.RegisterOrBuilder getRegisterOrBuilder() {
if ((eventCase_ == 1) && (registerBuilder_ != null)) {
return registerBuilder_.getMessageOrBuilder();
} else {
if (eventCase_ == 1) {
return (org.hyperledger.protos.EventsOuterClass.Register) event_;
}
return org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance();
}
}
/**
*
*consumer events
*
*
* optional .protos.Register register = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Register, org.hyperledger.protos.EventsOuterClass.Register.Builder, org.hyperledger.protos.EventsOuterClass.RegisterOrBuilder>
getRegisterFieldBuilder() {
if (registerBuilder_ == null) {
if (!(eventCase_ == 1)) {
event_ = org.hyperledger.protos.EventsOuterClass.Register.getDefaultInstance();
}
registerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Register, org.hyperledger.protos.EventsOuterClass.Register.Builder, org.hyperledger.protos.EventsOuterClass.RegisterOrBuilder>(
(org.hyperledger.protos.EventsOuterClass.Register) event_,
getParentForChildren(),
isClean());
event_ = null;
}
eventCase_ = 1;
onChanged();;
return registerBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Fabric.Block, org.hyperledger.protos.Fabric.Block.Builder, org.hyperledger.protos.Fabric.BlockOrBuilder> blockBuilder_;
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public org.hyperledger.protos.Fabric.Block getBlock() {
if (blockBuilder_ == null) {
if (eventCase_ == 2) {
return (org.hyperledger.protos.Fabric.Block) event_;
}
return org.hyperledger.protos.Fabric.Block.getDefaultInstance();
} else {
if (eventCase_ == 2) {
return blockBuilder_.getMessage();
}
return org.hyperledger.protos.Fabric.Block.getDefaultInstance();
}
}
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public Builder setBlock(org.hyperledger.protos.Fabric.Block value) {
if (blockBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
event_ = value;
onChanged();
} else {
blockBuilder_.setMessage(value);
}
eventCase_ = 2;
return this;
}
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public Builder setBlock(
org.hyperledger.protos.Fabric.Block.Builder builderForValue) {
if (blockBuilder_ == null) {
event_ = builderForValue.build();
onChanged();
} else {
blockBuilder_.setMessage(builderForValue.build());
}
eventCase_ = 2;
return this;
}
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public Builder mergeBlock(org.hyperledger.protos.Fabric.Block value) {
if (blockBuilder_ == null) {
if (eventCase_ == 2 &&
event_ != org.hyperledger.protos.Fabric.Block.getDefaultInstance()) {
event_ = org.hyperledger.protos.Fabric.Block.newBuilder((org.hyperledger.protos.Fabric.Block) event_)
.mergeFrom(value).buildPartial();
} else {
event_ = value;
}
onChanged();
} else {
if (eventCase_ == 2) {
blockBuilder_.mergeFrom(value);
}
blockBuilder_.setMessage(value);
}
eventCase_ = 2;
return this;
}
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public Builder clearBlock() {
if (blockBuilder_ == null) {
if (eventCase_ == 2) {
eventCase_ = 0;
event_ = null;
onChanged();
}
} else {
if (eventCase_ == 2) {
eventCase_ = 0;
event_ = null;
}
blockBuilder_.clear();
}
return this;
}
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public org.hyperledger.protos.Fabric.Block.Builder getBlockBuilder() {
return getBlockFieldBuilder().getBuilder();
}
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
public org.hyperledger.protos.Fabric.BlockOrBuilder getBlockOrBuilder() {
if ((eventCase_ == 2) && (blockBuilder_ != null)) {
return blockBuilder_.getMessageOrBuilder();
} else {
if (eventCase_ == 2) {
return (org.hyperledger.protos.Fabric.Block) event_;
}
return org.hyperledger.protos.Fabric.Block.getDefaultInstance();
}
}
/**
*
*producer events
*
*
* optional .protos.Block block = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Fabric.Block, org.hyperledger.protos.Fabric.Block.Builder, org.hyperledger.protos.Fabric.BlockOrBuilder>
getBlockFieldBuilder() {
if (blockBuilder_ == null) {
if (!(eventCase_ == 2)) {
event_ = org.hyperledger.protos.Fabric.Block.getDefaultInstance();
}
blockBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Fabric.Block, org.hyperledger.protos.Fabric.Block.Builder, org.hyperledger.protos.Fabric.BlockOrBuilder>(
(org.hyperledger.protos.Fabric.Block) event_,
getParentForChildren(),
isClean());
event_ = null;
}
eventCase_ = 2;
onChanged();;
return blockBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Chaincodeevent.ChaincodeEvent, org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.Builder, org.hyperledger.protos.Chaincodeevent.ChaincodeEventOrBuilder> chaincodeEventBuilder_;
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public org.hyperledger.protos.Chaincodeevent.ChaincodeEvent getChaincodeEvent() {
if (chaincodeEventBuilder_ == null) {
if (eventCase_ == 3) {
return (org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_;
}
return org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.getDefaultInstance();
} else {
if (eventCase_ == 3) {
return chaincodeEventBuilder_.getMessage();
}
return org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.getDefaultInstance();
}
}
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public Builder setChaincodeEvent(org.hyperledger.protos.Chaincodeevent.ChaincodeEvent value) {
if (chaincodeEventBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
event_ = value;
onChanged();
} else {
chaincodeEventBuilder_.setMessage(value);
}
eventCase_ = 3;
return this;
}
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public Builder setChaincodeEvent(
org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.Builder builderForValue) {
if (chaincodeEventBuilder_ == null) {
event_ = builderForValue.build();
onChanged();
} else {
chaincodeEventBuilder_.setMessage(builderForValue.build());
}
eventCase_ = 3;
return this;
}
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public Builder mergeChaincodeEvent(org.hyperledger.protos.Chaincodeevent.ChaincodeEvent value) {
if (chaincodeEventBuilder_ == null) {
if (eventCase_ == 3 &&
event_ != org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.getDefaultInstance()) {
event_ = org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.newBuilder((org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_)
.mergeFrom(value).buildPartial();
} else {
event_ = value;
}
onChanged();
} else {
if (eventCase_ == 3) {
chaincodeEventBuilder_.mergeFrom(value);
}
chaincodeEventBuilder_.setMessage(value);
}
eventCase_ = 3;
return this;
}
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public Builder clearChaincodeEvent() {
if (chaincodeEventBuilder_ == null) {
if (eventCase_ == 3) {
eventCase_ = 0;
event_ = null;
onChanged();
}
} else {
if (eventCase_ == 3) {
eventCase_ = 0;
event_ = null;
}
chaincodeEventBuilder_.clear();
}
return this;
}
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.Builder getChaincodeEventBuilder() {
return getChaincodeEventFieldBuilder().getBuilder();
}
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
public org.hyperledger.protos.Chaincodeevent.ChaincodeEventOrBuilder getChaincodeEventOrBuilder() {
if ((eventCase_ == 3) && (chaincodeEventBuilder_ != null)) {
return chaincodeEventBuilder_.getMessageOrBuilder();
} else {
if (eventCase_ == 3) {
return (org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_;
}
return org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.getDefaultInstance();
}
}
/**
* optional .protos.ChaincodeEvent chaincodeEvent = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Chaincodeevent.ChaincodeEvent, org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.Builder, org.hyperledger.protos.Chaincodeevent.ChaincodeEventOrBuilder>
getChaincodeEventFieldBuilder() {
if (chaincodeEventBuilder_ == null) {
if (!(eventCase_ == 3)) {
event_ = org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.getDefaultInstance();
}
chaincodeEventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.Chaincodeevent.ChaincodeEvent, org.hyperledger.protos.Chaincodeevent.ChaincodeEvent.Builder, org.hyperledger.protos.Chaincodeevent.ChaincodeEventOrBuilder>(
(org.hyperledger.protos.Chaincodeevent.ChaincodeEvent) event_,
getParentForChildren(),
isClean());
event_ = null;
}
eventCase_ = 3;
onChanged();;
return chaincodeEventBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Rejection, org.hyperledger.protos.EventsOuterClass.Rejection.Builder, org.hyperledger.protos.EventsOuterClass.RejectionOrBuilder> rejectionBuilder_;
/**
* optional .protos.Rejection rejection = 4;
*/
public org.hyperledger.protos.EventsOuterClass.Rejection getRejection() {
if (rejectionBuilder_ == null) {
if (eventCase_ == 4) {
return (org.hyperledger.protos.EventsOuterClass.Rejection) event_;
}
return org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance();
} else {
if (eventCase_ == 4) {
return rejectionBuilder_.getMessage();
}
return org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance();
}
}
/**
* optional .protos.Rejection rejection = 4;
*/
public Builder setRejection(org.hyperledger.protos.EventsOuterClass.Rejection value) {
if (rejectionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
event_ = value;
onChanged();
} else {
rejectionBuilder_.setMessage(value);
}
eventCase_ = 4;
return this;
}
/**
* optional .protos.Rejection rejection = 4;
*/
public Builder setRejection(
org.hyperledger.protos.EventsOuterClass.Rejection.Builder builderForValue) {
if (rejectionBuilder_ == null) {
event_ = builderForValue.build();
onChanged();
} else {
rejectionBuilder_.setMessage(builderForValue.build());
}
eventCase_ = 4;
return this;
}
/**
* optional .protos.Rejection rejection = 4;
*/
public Builder mergeRejection(org.hyperledger.protos.EventsOuterClass.Rejection value) {
if (rejectionBuilder_ == null) {
if (eventCase_ == 4 &&
event_ != org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance()) {
event_ = org.hyperledger.protos.EventsOuterClass.Rejection.newBuilder((org.hyperledger.protos.EventsOuterClass.Rejection) event_)
.mergeFrom(value).buildPartial();
} else {
event_ = value;
}
onChanged();
} else {
if (eventCase_ == 4) {
rejectionBuilder_.mergeFrom(value);
}
rejectionBuilder_.setMessage(value);
}
eventCase_ = 4;
return this;
}
/**
* optional .protos.Rejection rejection = 4;
*/
public Builder clearRejection() {
if (rejectionBuilder_ == null) {
if (eventCase_ == 4) {
eventCase_ = 0;
event_ = null;
onChanged();
}
} else {
if (eventCase_ == 4) {
eventCase_ = 0;
event_ = null;
}
rejectionBuilder_.clear();
}
return this;
}
/**
* optional .protos.Rejection rejection = 4;
*/
public org.hyperledger.protos.EventsOuterClass.Rejection.Builder getRejectionBuilder() {
return getRejectionFieldBuilder().getBuilder();
}
/**
* optional .protos.Rejection rejection = 4;
*/
public org.hyperledger.protos.EventsOuterClass.RejectionOrBuilder getRejectionOrBuilder() {
if ((eventCase_ == 4) && (rejectionBuilder_ != null)) {
return rejectionBuilder_.getMessageOrBuilder();
} else {
if (eventCase_ == 4) {
return (org.hyperledger.protos.EventsOuterClass.Rejection) event_;
}
return org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance();
}
}
/**
* optional .protos.Rejection rejection = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Rejection, org.hyperledger.protos.EventsOuterClass.Rejection.Builder, org.hyperledger.protos.EventsOuterClass.RejectionOrBuilder>
getRejectionFieldBuilder() {
if (rejectionBuilder_ == null) {
if (!(eventCase_ == 4)) {
event_ = org.hyperledger.protos.EventsOuterClass.Rejection.getDefaultInstance();
}
rejectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.protos.EventsOuterClass.Rejection, org.hyperledger.protos.EventsOuterClass.Rejection.Builder, org.hyperledger.protos.EventsOuterClass.RejectionOrBuilder>(
(org.hyperledger.protos.EventsOuterClass.Rejection) event_,
getParentForChildren(),
isClean());
event_ = null;
}
eventCase_ = 4;
onChanged();;
return rejectionBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:protos.Event)
}
// @@protoc_insertion_point(class_scope:protos.Event)
private static final org.hyperledger.protos.EventsOuterClass.Event DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.protos.EventsOuterClass.Event();
}
public static org.hyperledger.protos.EventsOuterClass.Event getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Event parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Event(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.hyperledger.protos.EventsOuterClass.Event getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_ChaincodeReg_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_ChaincodeReg_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_Interest_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_Interest_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_Register_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_Register_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_Rejection_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_Rejection_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protos_Event_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protos_Event_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\014events.proto\022\006protos\032\024chaincodeevent.p" +
"roto\032\014fabric.proto\"6\n\014ChaincodeReg\022\023\n\013ch" +
"aincodeID\030\001 \001(\t\022\021\n\teventName\030\002 \001(\t\"m\n\010In" +
"terest\022$\n\teventType\030\001 \001(\0162\021.protos.Event" +
"Type\0220\n\020chaincodeRegInfo\030\002 \001(\0132\024.protos." +
"ChaincodeRegH\000B\t\n\007RegInfo\",\n\010Register\022 \n" +
"\006events\030\001 \003(\0132\020.protos.Interest\">\n\tRejec" +
"tion\022\037\n\002tx\030\001 \001(\0132\023.protos.Transaction\022\020\n" +
"\010errorMsg\030\002 \001(\t\"\260\001\n\005Event\022$\n\010register\030\001 " +
"\001(\0132\020.protos.RegisterH\000\022\036\n\005block\030\002 \001(\0132\r",
".protos.BlockH\000\0220\n\016chaincodeEvent\030\003 \001(\0132" +
"\026.protos.ChaincodeEventH\000\022&\n\trejection\030\004" +
" \001(\0132\021.protos.RejectionH\000B\007\n\005Event*B\n\tEv" +
"entType\022\014\n\010REGISTER\020\000\022\t\n\005BLOCK\020\001\022\r\n\tCHAI" +
"NCODE\020\002\022\r\n\tREJECTION\020\00324\n\006Events\022*\n\004Chat" +
"\022\r.protos.Event\032\r.protos.Event\"\000(\0010\001B\030\n\026" +
"org.hyperledger.protosb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
org.hyperledger.protos.Chaincodeevent.getDescriptor(),
org.hyperledger.protos.Fabric.getDescriptor(),
}, assigner);
internal_static_protos_ChaincodeReg_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_protos_ChaincodeReg_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_ChaincodeReg_descriptor,
new java.lang.String[] { "ChaincodeID", "EventName", });
internal_static_protos_Interest_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_protos_Interest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_Interest_descriptor,
new java.lang.String[] { "EventType", "ChaincodeRegInfo", "RegInfo", });
internal_static_protos_Register_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_protos_Register_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_Register_descriptor,
new java.lang.String[] { "Events", });
internal_static_protos_Rejection_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_protos_Rejection_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_Rejection_descriptor,
new java.lang.String[] { "Tx", "ErrorMsg", });
internal_static_protos_Event_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_protos_Event_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protos_Event_descriptor,
new java.lang.String[] { "Register", "Block", "ChaincodeEvent", "Rejection", "Event", });
org.hyperledger.protos.Chaincodeevent.getDescriptor();
org.hyperledger.protos.Fabric.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}