Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: gossip/message.proto
package org.hyperledger.fabric.protos.gossip;
public final class Message {
private Message() {}
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 gossip.PullMsgType}
*/
public enum PullMsgType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNDEFINED = 0;
*/
UNDEFINED(0),
/**
* BLOCK_MSG = 1;
*/
BLOCK_MSG(1),
/**
* IDENTITY_MSG = 2;
*/
IDENTITY_MSG(2),
UNRECOGNIZED(-1),
;
/**
* UNDEFINED = 0;
*/
public static final int UNDEFINED_VALUE = 0;
/**
* BLOCK_MSG = 1;
*/
public static final int BLOCK_MSG_VALUE = 1;
/**
* IDENTITY_MSG = 2;
*/
public static final int IDENTITY_MSG_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PullMsgType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static PullMsgType forNumber(int value) {
switch (value) {
case 0: return UNDEFINED;
case 1: return BLOCK_MSG;
case 2: return IDENTITY_MSG;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PullMsgType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PullMsgType findValueByNumber(int number) {
return PullMsgType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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.fabric.protos.gossip.Message.getDescriptor().getEnumTypes().get(0);
}
private static final PullMsgType[] VALUES = values();
public static PullMsgType 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 PullMsgType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:gossip.PullMsgType)
}
public interface EnvelopeOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.Envelope)
com.google.protobuf.MessageOrBuilder {
/**
* bytes payload = 1;
* @return The payload.
*/
com.google.protobuf.ByteString getPayload();
/**
* bytes signature = 2;
* @return The signature.
*/
com.google.protobuf.ByteString getSignature();
/**
* .gossip.SecretEnvelope secret_envelope = 3;
* @return Whether the secretEnvelope field is set.
*/
boolean hasSecretEnvelope();
/**
* .gossip.SecretEnvelope secret_envelope = 3;
* @return The secretEnvelope.
*/
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope getSecretEnvelope();
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelopeOrBuilder getSecretEnvelopeOrBuilder();
}
/**
*
* Envelope contains a marshalled
* GossipMessage and a signature over it.
* It may also contain a SecretEnvelope
* which is a marshalled Secret
*
*
* Protobuf type {@code gossip.Envelope}
*/
public static final class Envelope extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.Envelope)
EnvelopeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Envelope.newBuilder() to construct.
private Envelope(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Envelope() {
payload_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Envelope();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Envelope(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
payload_ = input.readBytes();
break;
}
case 18: {
signature_ = input.readBytes();
break;
}
case 26: {
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.Builder subBuilder = null;
if (secretEnvelope_ != null) {
subBuilder = secretEnvelope_.toBuilder();
}
secretEnvelope_ = input.readMessage(org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(secretEnvelope_);
secretEnvelope_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Envelope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Envelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.Envelope.class, org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder.class);
}
public static final int PAYLOAD_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString payload_;
/**
* bytes payload = 1;
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int SIGNATURE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString signature_;
/**
* bytes signature = 2;
* @return The signature.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
public static final int SECRET_ENVELOPE_FIELD_NUMBER = 3;
private org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope secretEnvelope_;
/**
* .gossip.SecretEnvelope secret_envelope = 3;
* @return Whether the secretEnvelope field is set.
*/
@java.lang.Override
public boolean hasSecretEnvelope() {
return secretEnvelope_ != null;
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
* @return The secretEnvelope.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope getSecretEnvelope() {
return secretEnvelope_ == null ? org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.getDefaultInstance() : secretEnvelope_;
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelopeOrBuilder getSecretEnvelopeOrBuilder() {
return getSecretEnvelope();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!payload_.isEmpty()) {
output.writeBytes(1, payload_);
}
if (!signature_.isEmpty()) {
output.writeBytes(2, signature_);
}
if (secretEnvelope_ != null) {
output.writeMessage(3, getSecretEnvelope());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!payload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, payload_);
}
if (!signature_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, signature_);
}
if (secretEnvelope_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getSecretEnvelope());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.Envelope)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.Envelope other = (org.hyperledger.fabric.protos.gossip.Message.Envelope) obj;
if (!getPayload()
.equals(other.getPayload())) return false;
if (!getSignature()
.equals(other.getSignature())) return false;
if (hasSecretEnvelope() != other.hasSecretEnvelope()) return false;
if (hasSecretEnvelope()) {
if (!getSecretEnvelope()
.equals(other.getSecretEnvelope())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;
hash = (53 * hash) + getSignature().hashCode();
if (hasSecretEnvelope()) {
hash = (37 * hash) + SECRET_ENVELOPE_FIELD_NUMBER;
hash = (53 * hash) + getSecretEnvelope().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope 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.fabric.protos.gossip.Message.Envelope parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope 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.fabric.protos.gossip.Message.Envelope parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope 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.fabric.protos.gossip.Message.Envelope parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.Envelope prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* Envelope contains a marshalled
* GossipMessage and a signature over it.
* It may also contain a SecretEnvelope
* which is a marshalled Secret
*
*
* Protobuf type {@code gossip.Envelope}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.Envelope)
org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Envelope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Envelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.Envelope.class, org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.Envelope.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
payload_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
if (secretEnvelopeBuilder_ == null) {
secretEnvelope_ = null;
} else {
secretEnvelope_ = null;
secretEnvelopeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Envelope_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Envelope getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.Envelope.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Envelope build() {
org.hyperledger.fabric.protos.gossip.Message.Envelope result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Envelope buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.Envelope result = new org.hyperledger.fabric.protos.gossip.Message.Envelope(this);
result.payload_ = payload_;
result.signature_ = signature_;
if (secretEnvelopeBuilder_ == null) {
result.secretEnvelope_ = secretEnvelope_;
} else {
result.secretEnvelope_ = secretEnvelopeBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.Envelope) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.Envelope)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.Envelope other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.Envelope.getDefaultInstance()) return this;
if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
setPayload(other.getPayload());
}
if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) {
setSignature(other.getSignature());
}
if (other.hasSecretEnvelope()) {
mergeSecretEnvelope(other.getSecretEnvelope());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.Envelope parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.Envelope) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes payload = 1;
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
* bytes payload = 1;
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
* bytes payload = 1;
* @return This builder for chaining.
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes signature = 2;
* @return The signature.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
/**
* bytes signature = 2;
* @param value The signature to set.
* @return This builder for chaining.
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
signature_ = value;
onChanged();
return this;
}
/**
* bytes signature = 2;
* @return This builder for chaining.
*/
public Builder clearSignature() {
signature_ = getDefaultInstance().getSignature();
onChanged();
return this;
}
private org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope secretEnvelope_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope, org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.Builder, org.hyperledger.fabric.protos.gossip.Message.SecretEnvelopeOrBuilder> secretEnvelopeBuilder_;
/**
* .gossip.SecretEnvelope secret_envelope = 3;
* @return Whether the secretEnvelope field is set.
*/
public boolean hasSecretEnvelope() {
return secretEnvelopeBuilder_ != null || secretEnvelope_ != null;
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
* @return The secretEnvelope.
*/
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope getSecretEnvelope() {
if (secretEnvelopeBuilder_ == null) {
return secretEnvelope_ == null ? org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.getDefaultInstance() : secretEnvelope_;
} else {
return secretEnvelopeBuilder_.getMessage();
}
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
public Builder setSecretEnvelope(org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope value) {
if (secretEnvelopeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
secretEnvelope_ = value;
onChanged();
} else {
secretEnvelopeBuilder_.setMessage(value);
}
return this;
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
public Builder setSecretEnvelope(
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.Builder builderForValue) {
if (secretEnvelopeBuilder_ == null) {
secretEnvelope_ = builderForValue.build();
onChanged();
} else {
secretEnvelopeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
public Builder mergeSecretEnvelope(org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope value) {
if (secretEnvelopeBuilder_ == null) {
if (secretEnvelope_ != null) {
secretEnvelope_ =
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.newBuilder(secretEnvelope_).mergeFrom(value).buildPartial();
} else {
secretEnvelope_ = value;
}
onChanged();
} else {
secretEnvelopeBuilder_.mergeFrom(value);
}
return this;
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
public Builder clearSecretEnvelope() {
if (secretEnvelopeBuilder_ == null) {
secretEnvelope_ = null;
onChanged();
} else {
secretEnvelope_ = null;
secretEnvelopeBuilder_ = null;
}
return this;
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.Builder getSecretEnvelopeBuilder() {
onChanged();
return getSecretEnvelopeFieldBuilder().getBuilder();
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelopeOrBuilder getSecretEnvelopeOrBuilder() {
if (secretEnvelopeBuilder_ != null) {
return secretEnvelopeBuilder_.getMessageOrBuilder();
} else {
return secretEnvelope_ == null ?
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.getDefaultInstance() : secretEnvelope_;
}
}
/**
* .gossip.SecretEnvelope secret_envelope = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope, org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.Builder, org.hyperledger.fabric.protos.gossip.Message.SecretEnvelopeOrBuilder>
getSecretEnvelopeFieldBuilder() {
if (secretEnvelopeBuilder_ == null) {
secretEnvelopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope, org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.Builder, org.hyperledger.fabric.protos.gossip.Message.SecretEnvelopeOrBuilder>(
getSecretEnvelope(),
getParentForChildren(),
isClean());
secretEnvelope_ = null;
}
return secretEnvelopeBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.Envelope)
}
// @@protoc_insertion_point(class_scope:gossip.Envelope)
private static final org.hyperledger.fabric.protos.gossip.Message.Envelope DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.Envelope();
}
public static org.hyperledger.fabric.protos.gossip.Message.Envelope getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Envelope parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Envelope(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Envelope getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SecretEnvelopeOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.SecretEnvelope)
com.google.protobuf.MessageOrBuilder {
/**
* bytes payload = 1;
* @return The payload.
*/
com.google.protobuf.ByteString getPayload();
/**
* bytes signature = 2;
* @return The signature.
*/
com.google.protobuf.ByteString getSignature();
}
/**
*
* SecretEnvelope is a marshalled Secret
* and a signature over it.
* The signature should be validated by the peer
* that signed the Envelope the SecretEnvelope
* came with
*
*
* Protobuf type {@code gossip.SecretEnvelope}
*/
public static final class SecretEnvelope extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.SecretEnvelope)
SecretEnvelopeOrBuilder {
private static final long serialVersionUID = 0L;
// Use SecretEnvelope.newBuilder() to construct.
private SecretEnvelope(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SecretEnvelope() {
payload_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SecretEnvelope();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SecretEnvelope(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
payload_ = input.readBytes();
break;
}
case 18: {
signature_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_SecretEnvelope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_SecretEnvelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.class, org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.Builder.class);
}
public static final int PAYLOAD_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString payload_;
/**
* bytes payload = 1;
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
public static final int SIGNATURE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString signature_;
/**
* bytes signature = 2;
* @return The signature.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!payload_.isEmpty()) {
output.writeBytes(1, payload_);
}
if (!signature_.isEmpty()) {
output.writeBytes(2, signature_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!payload_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, payload_);
}
if (!signature_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, signature_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope other = (org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope) obj;
if (!getPayload()
.equals(other.getPayload())) return false;
if (!getSignature()
.equals(other.getSignature())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;
hash = (53 * hash) + getSignature().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope 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.fabric.protos.gossip.Message.SecretEnvelope parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope 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.fabric.protos.gossip.Message.SecretEnvelope parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope 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.fabric.protos.gossip.Message.SecretEnvelope parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* SecretEnvelope is a marshalled Secret
* and a signature over it.
* The signature should be validated by the peer
* that signed the Envelope the SecretEnvelope
* came with
*
*
* Protobuf type {@code gossip.SecretEnvelope}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.SecretEnvelope)
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelopeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_SecretEnvelope_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_SecretEnvelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.class, org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
payload_ = com.google.protobuf.ByteString.EMPTY;
signature_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_SecretEnvelope_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope build() {
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope result = new org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope(this);
result.payload_ = payload_;
result.signature_ = signature_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope.getDefaultInstance()) return this;
if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) {
setPayload(other.getPayload());
}
if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) {
setSignature(other.getSignature());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes payload = 1;
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
* bytes payload = 1;
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
* bytes payload = 1;
* @return This builder for chaining.
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes signature = 2;
* @return The signature.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSignature() {
return signature_;
}
/**
* bytes signature = 2;
* @param value The signature to set.
* @return This builder for chaining.
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
signature_ = value;
onChanged();
return this;
}
/**
* bytes signature = 2;
* @return This builder for chaining.
*/
public Builder clearSignature() {
signature_ = getDefaultInstance().getSignature();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.SecretEnvelope)
}
// @@protoc_insertion_point(class_scope:gossip.SecretEnvelope)
private static final org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope();
}
public static org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SecretEnvelope parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SecretEnvelope(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.SecretEnvelope getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SecretOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.Secret)
com.google.protobuf.MessageOrBuilder {
/**
* string internalEndpoint = 1;
* @return The internalEndpoint.
*/
java.lang.String getInternalEndpoint();
/**
* string internalEndpoint = 1;
* @return The bytes for internalEndpoint.
*/
com.google.protobuf.ByteString
getInternalEndpointBytes();
public org.hyperledger.fabric.protos.gossip.Message.Secret.ContentCase getContentCase();
}
/**
*
* Secret is an entity that might be omitted
* from an Envelope when the remote peer that is receiving
* the Envelope shouldn't know the secret's content.
*
*
* Protobuf type {@code gossip.Secret}
*/
public static final class Secret extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.Secret)
SecretOrBuilder {
private static final long serialVersionUID = 0L;
// Use Secret.newBuilder() to construct.
private Secret(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Secret() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Secret();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Secret(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
contentCase_ = 1;
content_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Secret_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Secret_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.Secret.class, org.hyperledger.fabric.protos.gossip.Message.Secret.Builder.class);
}
private int contentCase_ = 0;
private java.lang.Object content_;
public enum ContentCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INTERNALENDPOINT(1),
CONTENT_NOT_SET(0);
private final int value;
private ContentCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ContentCase valueOf(int value) {
return forNumber(value);
}
public static ContentCase forNumber(int value) {
switch (value) {
case 1: return INTERNALENDPOINT;
case 0: return CONTENT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ContentCase
getContentCase() {
return ContentCase.forNumber(
contentCase_);
}
public static final int INTERNALENDPOINT_FIELD_NUMBER = 1;
/**
* string internalEndpoint = 1;
* @return The internalEndpoint.
*/
public java.lang.String getInternalEndpoint() {
java.lang.Object ref = "";
if (contentCase_ == 1) {
ref = content_;
}
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();
if (contentCase_ == 1) {
content_ = s;
}
return s;
}
}
/**
* string internalEndpoint = 1;
* @return The bytes for internalEndpoint.
*/
public com.google.protobuf.ByteString
getInternalEndpointBytes() {
java.lang.Object ref = "";
if (contentCase_ == 1) {
ref = content_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (contentCase_ == 1) {
content_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (contentCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (contentCase_ == 1) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.Secret)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.Secret other = (org.hyperledger.fabric.protos.gossip.Message.Secret) obj;
if (!getContentCase().equals(other.getContentCase())) return false;
switch (contentCase_) {
case 1:
if (!getInternalEndpoint()
.equals(other.getInternalEndpoint())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (contentCase_) {
case 1:
hash = (37 * hash) + INTERNALENDPOINT_FIELD_NUMBER;
hash = (53 * hash) + getInternalEndpoint().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret 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.fabric.protos.gossip.Message.Secret parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret 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.fabric.protos.gossip.Message.Secret parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret 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.fabric.protos.gossip.Message.Secret parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.Secret prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* Secret is an entity that might be omitted
* from an Envelope when the remote peer that is receiving
* the Envelope shouldn't know the secret's content.
*
*
* Protobuf type {@code gossip.Secret}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.Secret)
org.hyperledger.fabric.protos.gossip.Message.SecretOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Secret_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Secret_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.Secret.class, org.hyperledger.fabric.protos.gossip.Message.Secret.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.Secret.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
contentCase_ = 0;
content_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Secret_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Secret getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.Secret.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Secret build() {
org.hyperledger.fabric.protos.gossip.Message.Secret result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Secret buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.Secret result = new org.hyperledger.fabric.protos.gossip.Message.Secret(this);
if (contentCase_ == 1) {
result.content_ = content_;
}
result.contentCase_ = contentCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.Secret) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.Secret)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.Secret other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.Secret.getDefaultInstance()) return this;
switch (other.getContentCase()) {
case INTERNALENDPOINT: {
contentCase_ = 1;
content_ = other.content_;
onChanged();
break;
}
case CONTENT_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.Secret parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.Secret) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int contentCase_ = 0;
private java.lang.Object content_;
public ContentCase
getContentCase() {
return ContentCase.forNumber(
contentCase_);
}
public Builder clearContent() {
contentCase_ = 0;
content_ = null;
onChanged();
return this;
}
/**
* string internalEndpoint = 1;
* @return The internalEndpoint.
*/
@java.lang.Override
public java.lang.String getInternalEndpoint() {
java.lang.Object ref = "";
if (contentCase_ == 1) {
ref = content_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (contentCase_ == 1) {
content_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string internalEndpoint = 1;
* @return The bytes for internalEndpoint.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getInternalEndpointBytes() {
java.lang.Object ref = "";
if (contentCase_ == 1) {
ref = content_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (contentCase_ == 1) {
content_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string internalEndpoint = 1;
* @param value The internalEndpoint to set.
* @return This builder for chaining.
*/
public Builder setInternalEndpoint(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentCase_ = 1;
content_ = value;
onChanged();
return this;
}
/**
* string internalEndpoint = 1;
* @return This builder for chaining.
*/
public Builder clearInternalEndpoint() {
if (contentCase_ == 1) {
contentCase_ = 0;
content_ = null;
onChanged();
}
return this;
}
/**
* string internalEndpoint = 1;
* @param value The bytes for internalEndpoint to set.
* @return This builder for chaining.
*/
public Builder setInternalEndpointBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentCase_ = 1;
content_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.Secret)
}
// @@protoc_insertion_point(class_scope:gossip.Secret)
private static final org.hyperledger.fabric.protos.gossip.Message.Secret DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.Secret();
}
public static org.hyperledger.fabric.protos.gossip.Message.Secret getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Secret parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Secret(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Secret getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface GossipMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.GossipMessage)
com.google.protobuf.MessageOrBuilder {
/**
*
* used mainly for testing, but will might be used in the future
* for ensuring message delivery by acking
*
*
* uint64 nonce = 1;
* @return The nonce.
*/
long getNonce();
/**
*
* The channel of the message.
* Some GossipMessages may set this to nil, because
* they are cross-channels but some may not
*
* GossipMessage defines the message sent in a gossip network
*
*
* Protobuf type {@code gossip.GossipMessage}
*/
public static final class GossipMessage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.GossipMessage)
GossipMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use GossipMessage.newBuilder() to construct.
private GossipMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GossipMessage() {
channel_ = com.google.protobuf.ByteString.EMPTY;
tag_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GossipMessage();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GossipMessage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
nonce_ = input.readUInt64();
break;
}
case 18: {
channel_ = input.readBytes();
break;
}
case 24: {
int rawValue = input.readEnum();
tag_ = rawValue;
break;
}
case 42: {
org.hyperledger.fabric.protos.gossip.Message.AliveMessage.Builder subBuilder = null;
if (contentCase_ == 5) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.AliveMessage) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.AliveMessage.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.AliveMessage) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 5;
break;
}
case 50: {
org.hyperledger.fabric.protos.gossip.Message.MembershipRequest.Builder subBuilder = null;
if (contentCase_ == 6) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.MembershipRequest) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.MembershipRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.MembershipRequest) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 6;
break;
}
case 58: {
org.hyperledger.fabric.protos.gossip.Message.MembershipResponse.Builder subBuilder = null;
if (contentCase_ == 7) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.MembershipResponse) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.MembershipResponse.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.MembershipResponse) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 7;
break;
}
case 66: {
org.hyperledger.fabric.protos.gossip.Message.DataMessage.Builder subBuilder = null;
if (contentCase_ == 8) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.DataMessage) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.DataMessage.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.DataMessage) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 8;
break;
}
case 74: {
org.hyperledger.fabric.protos.gossip.Message.GossipHello.Builder subBuilder = null;
if (contentCase_ == 9) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.GossipHello) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.GossipHello.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.GossipHello) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 9;
break;
}
case 82: {
org.hyperledger.fabric.protos.gossip.Message.DataDigest.Builder subBuilder = null;
if (contentCase_ == 10) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.DataDigest) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.DataDigest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.DataDigest) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 10;
break;
}
case 90: {
org.hyperledger.fabric.protos.gossip.Message.DataRequest.Builder subBuilder = null;
if (contentCase_ == 11) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.DataRequest) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.DataRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.DataRequest) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 11;
break;
}
case 98: {
org.hyperledger.fabric.protos.gossip.Message.DataUpdate.Builder subBuilder = null;
if (contentCase_ == 12) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.DataUpdate) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.DataUpdate.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.DataUpdate) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 12;
break;
}
case 106: {
org.hyperledger.fabric.protos.gossip.Message.Empty.Builder subBuilder = null;
if (contentCase_ == 13) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.Empty) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.Empty.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.Empty) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 13;
break;
}
case 114: {
org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.Builder subBuilder = null;
if (contentCase_ == 14) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 14;
break;
}
case 122: {
org.hyperledger.fabric.protos.gossip.Message.StateInfo.Builder subBuilder = null;
if (contentCase_ == 15) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.StateInfo) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.StateInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.StateInfo) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 15;
break;
}
case 130: {
org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot.Builder subBuilder = null;
if (contentCase_ == 16) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 16;
break;
}
case 138: {
org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest.Builder subBuilder = null;
if (contentCase_ == 17) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 17;
break;
}
case 146: {
org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest.Builder subBuilder = null;
if (contentCase_ == 18) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 18;
break;
}
case 154: {
org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse.Builder subBuilder = null;
if (contentCase_ == 19) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 19;
break;
}
case 162: {
org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage.Builder subBuilder = null;
if (contentCase_ == 20) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 20;
break;
}
case 170: {
org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.Builder subBuilder = null;
if (contentCase_ == 21) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 21;
break;
}
case 178: {
org.hyperledger.fabric.protos.gossip.Message.Acknowledgement.Builder subBuilder = null;
if (contentCase_ == 22) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.Acknowledgement) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.Acknowledgement.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.Acknowledgement) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 22;
break;
}
case 186: {
org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest.Builder subBuilder = null;
if (contentCase_ == 23) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 23;
break;
}
case 194: {
org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse.Builder subBuilder = null;
if (contentCase_ == 24) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 24;
break;
}
case 202: {
org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.Builder subBuilder = null;
if (contentCase_ == 25) {
subBuilder = ((org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) content_).toBuilder();
}
content_ =
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) content_);
content_ = subBuilder.buildPartial();
}
contentCase_ = 25;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.GossipMessage.class, org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Builder.class);
}
/**
* Protobuf enum {@code gossip.GossipMessage.Tag}
*/
public enum Tag
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNDEFINED = 0;
*/
UNDEFINED(0),
/**
* EMPTY = 1;
*/
EMPTY(1),
/**
* ORG_ONLY = 2;
*/
ORG_ONLY(2),
/**
* CHAN_ONLY = 3;
*/
CHAN_ONLY(3),
/**
* CHAN_AND_ORG = 4;
*/
CHAN_AND_ORG(4),
/**
* CHAN_OR_ORG = 5;
*/
CHAN_OR_ORG(5),
UNRECOGNIZED(-1),
;
/**
* UNDEFINED = 0;
*/
public static final int UNDEFINED_VALUE = 0;
/**
* EMPTY = 1;
*/
public static final int EMPTY_VALUE = 1;
/**
* ORG_ONLY = 2;
*/
public static final int ORG_ONLY_VALUE = 2;
/**
* CHAN_ONLY = 3;
*/
public static final int CHAN_ONLY_VALUE = 3;
/**
* CHAN_AND_ORG = 4;
*/
public static final int CHAN_AND_ORG_VALUE = 4;
/**
* CHAN_OR_ORG = 5;
*/
public static final int CHAN_OR_ORG_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Tag valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Tag forNumber(int value) {
switch (value) {
case 0: return UNDEFINED;
case 1: return EMPTY;
case 2: return ORG_ONLY;
case 3: return CHAN_ONLY;
case 4: return CHAN_AND_ORG;
case 5: return CHAN_OR_ORG;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Tag> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Tag findValueByNumber(int number) {
return Tag.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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.fabric.protos.gossip.Message.GossipMessage.getDescriptor().getEnumTypes().get(0);
}
private static final Tag[] VALUES = values();
public static Tag 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 Tag(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:gossip.GossipMessage.Tag)
}
private int contentCase_ = 0;
private java.lang.Object content_;
public enum ContentCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ALIVE_MSG(5),
MEM_REQ(6),
MEM_RES(7),
DATA_MSG(8),
HELLO(9),
DATA_DIG(10),
DATA_REQ(11),
DATA_UPDATE(12),
EMPTY(13),
CONN(14),
STATE_INFO(15),
STATE_SNAPSHOT(16),
STATE_INFO_PULL_REQ(17),
STATE_REQUEST(18),
STATE_RESPONSE(19),
LEADERSHIP_MSG(20),
PEER_IDENTITY(21),
ACK(22),
PRIVATEREQ(23),
PRIVATERES(24),
PRIVATE_DATA(25),
CONTENT_NOT_SET(0);
private final int value;
private ContentCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ContentCase valueOf(int value) {
return forNumber(value);
}
public static ContentCase forNumber(int value) {
switch (value) {
case 5: return ALIVE_MSG;
case 6: return MEM_REQ;
case 7: return MEM_RES;
case 8: return DATA_MSG;
case 9: return HELLO;
case 10: return DATA_DIG;
case 11: return DATA_REQ;
case 12: return DATA_UPDATE;
case 13: return EMPTY;
case 14: return CONN;
case 15: return STATE_INFO;
case 16: return STATE_SNAPSHOT;
case 17: return STATE_INFO_PULL_REQ;
case 18: return STATE_REQUEST;
case 19: return STATE_RESPONSE;
case 20: return LEADERSHIP_MSG;
case 21: return PEER_IDENTITY;
case 22: return ACK;
case 23: return PRIVATEREQ;
case 24: return PRIVATERES;
case 25: return PRIVATE_DATA;
case 0: return CONTENT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ContentCase
getContentCase() {
return ContentCase.forNumber(
contentCase_);
}
public static final int NONCE_FIELD_NUMBER = 1;
private long nonce_;
/**
*
* used mainly for testing, but will might be used in the future
* for ensuring message delivery by acking
*
*
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
public static final int CHANNEL_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString channel_;
/**
*
* The channel of the message.
* Some GossipMessages may set this to nil, because
* they are cross-channels but some may not
*
*
* bytes channel = 2;
* @return The channel.
*/
@java.lang.Override
public com.google.protobuf.ByteString getChannel() {
return channel_;
}
public static final int TAG_FIELD_NUMBER = 3;
private int tag_;
/**
*
* determines to which peers it is allowed
* to forward the message
*
*
* .gossip.GossipMessage.Tag tag = 3;
* @return The enum numeric value on the wire for tag.
*/
@java.lang.Override public int getTagValue() {
return tag_;
}
/**
*
* determines to which peers it is allowed
* to forward the message
*
*
* .gossip.GossipMessage.Tag tag = 3;
* @return The tag.
*/
@java.lang.Override public org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag getTag() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag result = org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag.valueOf(tag_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag.UNRECOGNIZED : result;
}
public static final int ALIVE_MSG_FIELD_NUMBER = 5;
/**
*
* Membership
*
*
* .gossip.AliveMessage alive_msg = 5;
* @return Whether the aliveMsg field is set.
*/
@java.lang.Override
public boolean hasAliveMsg() {
return contentCase_ == 5;
}
/**
*
* Membership
*
*
* .gossip.AliveMessage alive_msg = 5;
* @return The aliveMsg.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.AliveMessage getAliveMsg() {
if (contentCase_ == 5) {
return (org.hyperledger.fabric.protos.gossip.Message.AliveMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.AliveMessage.getDefaultInstance();
}
/**
*
* Membership
*
*
* .gossip.AliveMessage alive_msg = 5;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.AliveMessageOrBuilder getAliveMsgOrBuilder() {
if (contentCase_ == 5) {
return (org.hyperledger.fabric.protos.gossip.Message.AliveMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.AliveMessage.getDefaultInstance();
}
public static final int MEM_REQ_FIELD_NUMBER = 6;
/**
* .gossip.MembershipRequest mem_req = 6;
* @return Whether the memReq field is set.
*/
@java.lang.Override
public boolean hasMemReq() {
return contentCase_ == 6;
}
/**
* .gossip.MembershipRequest mem_req = 6;
* @return The memReq.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.MembershipRequest getMemReq() {
if (contentCase_ == 6) {
return (org.hyperledger.fabric.protos.gossip.Message.MembershipRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.MembershipRequest.getDefaultInstance();
}
/**
* .gossip.MembershipRequest mem_req = 6;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.MembershipRequestOrBuilder getMemReqOrBuilder() {
if (contentCase_ == 6) {
return (org.hyperledger.fabric.protos.gossip.Message.MembershipRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.MembershipRequest.getDefaultInstance();
}
public static final int MEM_RES_FIELD_NUMBER = 7;
/**
* .gossip.MembershipResponse mem_res = 7;
* @return Whether the memRes field is set.
*/
@java.lang.Override
public boolean hasMemRes() {
return contentCase_ == 7;
}
/**
* .gossip.MembershipResponse mem_res = 7;
* @return The memRes.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.MembershipResponse getMemRes() {
if (contentCase_ == 7) {
return (org.hyperledger.fabric.protos.gossip.Message.MembershipResponse) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.MembershipResponse.getDefaultInstance();
}
/**
* .gossip.MembershipResponse mem_res = 7;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.MembershipResponseOrBuilder getMemResOrBuilder() {
if (contentCase_ == 7) {
return (org.hyperledger.fabric.protos.gossip.Message.MembershipResponse) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.MembershipResponse.getDefaultInstance();
}
public static final int DATA_MSG_FIELD_NUMBER = 8;
/**
*
* Contains a ledger block
*
*
* .gossip.DataMessage data_msg = 8;
* @return Whether the dataMsg field is set.
*/
@java.lang.Override
public boolean hasDataMsg() {
return contentCase_ == 8;
}
/**
*
* Contains a ledger block
*
*
* .gossip.DataMessage data_msg = 8;
* @return The dataMsg.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataMessage getDataMsg() {
if (contentCase_ == 8) {
return (org.hyperledger.fabric.protos.gossip.Message.DataMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.DataMessage.getDefaultInstance();
}
/**
*
* Contains a ledger block
*
*
* .gossip.DataMessage data_msg = 8;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataMessageOrBuilder getDataMsgOrBuilder() {
if (contentCase_ == 8) {
return (org.hyperledger.fabric.protos.gossip.Message.DataMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.DataMessage.getDefaultInstance();
}
public static final int HELLO_FIELD_NUMBER = 9;
/**
*
* Used for push&pull
*
*
* .gossip.GossipHello hello = 9;
* @return Whether the hello field is set.
*/
@java.lang.Override
public boolean hasHello() {
return contentCase_ == 9;
}
/**
*
* Used for push&pull
*
*
* .gossip.GossipHello hello = 9;
* @return The hello.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipHello getHello() {
if (contentCase_ == 9) {
return (org.hyperledger.fabric.protos.gossip.Message.GossipHello) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.GossipHello.getDefaultInstance();
}
/**
*
* Used for push&pull
*
*
* .gossip.GossipHello hello = 9;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipHelloOrBuilder getHelloOrBuilder() {
if (contentCase_ == 9) {
return (org.hyperledger.fabric.protos.gossip.Message.GossipHello) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.GossipHello.getDefaultInstance();
}
public static final int DATA_DIG_FIELD_NUMBER = 10;
/**
* .gossip.DataDigest data_dig = 10;
* @return Whether the dataDig field is set.
*/
@java.lang.Override
public boolean hasDataDig() {
return contentCase_ == 10;
}
/**
* .gossip.DataDigest data_dig = 10;
* @return The dataDig.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataDigest getDataDig() {
if (contentCase_ == 10) {
return (org.hyperledger.fabric.protos.gossip.Message.DataDigest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.DataDigest.getDefaultInstance();
}
/**
* .gossip.DataDigest data_dig = 10;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataDigestOrBuilder getDataDigOrBuilder() {
if (contentCase_ == 10) {
return (org.hyperledger.fabric.protos.gossip.Message.DataDigest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.DataDigest.getDefaultInstance();
}
public static final int DATA_REQ_FIELD_NUMBER = 11;
/**
* .gossip.DataRequest data_req = 11;
* @return Whether the dataReq field is set.
*/
@java.lang.Override
public boolean hasDataReq() {
return contentCase_ == 11;
}
/**
* .gossip.DataRequest data_req = 11;
* @return The dataReq.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataRequest getDataReq() {
if (contentCase_ == 11) {
return (org.hyperledger.fabric.protos.gossip.Message.DataRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.DataRequest.getDefaultInstance();
}
/**
* .gossip.DataRequest data_req = 11;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataRequestOrBuilder getDataReqOrBuilder() {
if (contentCase_ == 11) {
return (org.hyperledger.fabric.protos.gossip.Message.DataRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.DataRequest.getDefaultInstance();
}
public static final int DATA_UPDATE_FIELD_NUMBER = 12;
/**
* .gossip.DataUpdate data_update = 12;
* @return Whether the dataUpdate field is set.
*/
@java.lang.Override
public boolean hasDataUpdate() {
return contentCase_ == 12;
}
/**
* .gossip.DataUpdate data_update = 12;
* @return The dataUpdate.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataUpdate getDataUpdate() {
if (contentCase_ == 12) {
return (org.hyperledger.fabric.protos.gossip.Message.DataUpdate) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.DataUpdate.getDefaultInstance();
}
/**
* .gossip.DataUpdate data_update = 12;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataUpdateOrBuilder getDataUpdateOrBuilder() {
if (contentCase_ == 12) {
return (org.hyperledger.fabric.protos.gossip.Message.DataUpdate) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.DataUpdate.getDefaultInstance();
}
public static final int EMPTY_FIELD_NUMBER = 13;
/**
*
* Empty message, used for pinging
*
*
* .gossip.Empty empty = 13;
* @return Whether the empty field is set.
*/
@java.lang.Override
public boolean hasEmpty() {
return contentCase_ == 13;
}
/**
*
* Empty message, used for pinging
*
*
* .gossip.Empty empty = 13;
* @return The empty.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Empty getEmpty() {
if (contentCase_ == 13) {
return (org.hyperledger.fabric.protos.gossip.Message.Empty) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.Empty.getDefaultInstance();
}
/**
*
* Empty message, used for pinging
*
*
* .gossip.Empty empty = 13;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.EmptyOrBuilder getEmptyOrBuilder() {
if (contentCase_ == 13) {
return (org.hyperledger.fabric.protos.gossip.Message.Empty) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.Empty.getDefaultInstance();
}
public static final int CONN_FIELD_NUMBER = 14;
/**
*
* ConnEstablish, used for establishing a connection
*
*
* .gossip.ConnEstablish conn = 14;
* @return Whether the conn field is set.
*/
@java.lang.Override
public boolean hasConn() {
return contentCase_ == 14;
}
/**
*
* ConnEstablish, used for establishing a connection
*
*
* .gossip.ConnEstablish conn = 14;
* @return The conn.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.ConnEstablish getConn() {
if (contentCase_ == 14) {
return (org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.getDefaultInstance();
}
/**
*
* ConnEstablish, used for establishing a connection
*
*
* .gossip.ConnEstablish conn = 14;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.ConnEstablishOrBuilder getConnOrBuilder() {
if (contentCase_ == 14) {
return (org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.getDefaultInstance();
}
public static final int STATE_INFO_FIELD_NUMBER = 15;
/**
*
* Used for relaying information
* about state
*
*
* .gossip.StateInfo state_info = 15;
* @return Whether the stateInfo field is set.
*/
@java.lang.Override
public boolean hasStateInfo() {
return contentCase_ == 15;
}
/**
*
* Used for relaying information
* about state
*
*
* .gossip.StateInfo state_info = 15;
* @return The stateInfo.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.StateInfo getStateInfo() {
if (contentCase_ == 15) {
return (org.hyperledger.fabric.protos.gossip.Message.StateInfo) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.StateInfo.getDefaultInstance();
}
/**
*
* Used for relaying information
* about state
*
*
* .gossip.StateInfo state_info = 15;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.StateInfoOrBuilder getStateInfoOrBuilder() {
if (contentCase_ == 15) {
return (org.hyperledger.fabric.protos.gossip.Message.StateInfo) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.StateInfo.getDefaultInstance();
}
public static final int STATE_SNAPSHOT_FIELD_NUMBER = 16;
/**
*
* Used for sending sets of StateInfo messages
*
*
* .gossip.StateInfoSnapshot state_snapshot = 16;
* @return Whether the stateSnapshot field is set.
*/
@java.lang.Override
public boolean hasStateSnapshot() {
return contentCase_ == 16;
}
/**
*
* Used for sending sets of StateInfo messages
*
*
* .gossip.StateInfoSnapshot state_snapshot = 16;
* @return The stateSnapshot.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot getStateSnapshot() {
if (contentCase_ == 16) {
return (org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot.getDefaultInstance();
}
/**
*
* Used for sending sets of StateInfo messages
*
*
* .gossip.StateInfoSnapshot state_snapshot = 16;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshotOrBuilder getStateSnapshotOrBuilder() {
if (contentCase_ == 16) {
return (org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot.getDefaultInstance();
}
public static final int STATE_INFO_PULL_REQ_FIELD_NUMBER = 17;
/**
*
* Used for asking for StateInfoSnapshots
*
*
* .gossip.StateInfoPullRequest state_info_pull_req = 17;
* @return Whether the stateInfoPullReq field is set.
*/
@java.lang.Override
public boolean hasStateInfoPullReq() {
return contentCase_ == 17;
}
/**
*
* Used for asking for StateInfoSnapshots
*
*
* .gossip.StateInfoPullRequest state_info_pull_req = 17;
* @return The stateInfoPullReq.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest getStateInfoPullReq() {
if (contentCase_ == 17) {
return (org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest.getDefaultInstance();
}
/**
*
* Used for asking for StateInfoSnapshots
*
*
* .gossip.StateInfoPullRequest state_info_pull_req = 17;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequestOrBuilder getStateInfoPullReqOrBuilder() {
if (contentCase_ == 17) {
return (org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest.getDefaultInstance();
}
public static final int STATE_REQUEST_FIELD_NUMBER = 18;
/**
*
* Used to ask from a remote peer a set of blocks
*
*
* .gossip.RemoteStateRequest state_request = 18;
* @return Whether the stateRequest field is set.
*/
@java.lang.Override
public boolean hasStateRequest() {
return contentCase_ == 18;
}
/**
*
* Used to ask from a remote peer a set of blocks
*
*
* .gossip.RemoteStateRequest state_request = 18;
* @return The stateRequest.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest getStateRequest() {
if (contentCase_ == 18) {
return (org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest.getDefaultInstance();
}
/**
*
* Used to ask from a remote peer a set of blocks
*
*
* .gossip.RemoteStateRequest state_request = 18;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequestOrBuilder getStateRequestOrBuilder() {
if (contentCase_ == 18) {
return (org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest.getDefaultInstance();
}
public static final int STATE_RESPONSE_FIELD_NUMBER = 19;
/**
*
* Used to send a set of blocks to a remote peer
*
*
* .gossip.RemoteStateResponse state_response = 19;
* @return Whether the stateResponse field is set.
*/
@java.lang.Override
public boolean hasStateResponse() {
return contentCase_ == 19;
}
/**
*
* Used to send a set of blocks to a remote peer
*
*
* .gossip.RemoteStateResponse state_response = 19;
* @return The stateResponse.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse getStateResponse() {
if (contentCase_ == 19) {
return (org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse.getDefaultInstance();
}
/**
*
* Used to send a set of blocks to a remote peer
*
*
* .gossip.RemoteStateResponse state_response = 19;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponseOrBuilder getStateResponseOrBuilder() {
if (contentCase_ == 19) {
return (org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse.getDefaultInstance();
}
public static final int LEADERSHIP_MSG_FIELD_NUMBER = 20;
/**
*
* Used to indicate intent of peer to become leader
*
*
* .gossip.LeadershipMessage leadership_msg = 20;
* @return Whether the leadershipMsg field is set.
*/
@java.lang.Override
public boolean hasLeadershipMsg() {
return contentCase_ == 20;
}
/**
*
* Used to indicate intent of peer to become leader
*
*
* .gossip.LeadershipMessage leadership_msg = 20;
* @return The leadershipMsg.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage getLeadershipMsg() {
if (contentCase_ == 20) {
return (org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage.getDefaultInstance();
}
/**
*
* Used to indicate intent of peer to become leader
*
*
* .gossip.LeadershipMessage leadership_msg = 20;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.LeadershipMessageOrBuilder getLeadershipMsgOrBuilder() {
if (contentCase_ == 20) {
return (org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage.getDefaultInstance();
}
public static final int PEER_IDENTITY_FIELD_NUMBER = 21;
/**
*
* Used to learn of a peer's certificate
*
*
* .gossip.PeerIdentity peer_identity = 21;
* @return Whether the peerIdentity field is set.
*/
@java.lang.Override
public boolean hasPeerIdentity() {
return contentCase_ == 21;
}
/**
*
* Used to learn of a peer's certificate
*
*
* .gossip.PeerIdentity peer_identity = 21;
* @return The peerIdentity.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PeerIdentity getPeerIdentity() {
if (contentCase_ == 21) {
return (org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.getDefaultInstance();
}
/**
*
* Used to learn of a peer's certificate
*
*
* .gossip.PeerIdentity peer_identity = 21;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PeerIdentityOrBuilder getPeerIdentityOrBuilder() {
if (contentCase_ == 21) {
return (org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.getDefaultInstance();
}
public static final int ACK_FIELD_NUMBER = 22;
/**
* .gossip.Acknowledgement ack = 22;
* @return Whether the ack field is set.
*/
@java.lang.Override
public boolean hasAck() {
return contentCase_ == 22;
}
/**
* .gossip.Acknowledgement ack = 22;
* @return The ack.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Acknowledgement getAck() {
if (contentCase_ == 22) {
return (org.hyperledger.fabric.protos.gossip.Message.Acknowledgement) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.Acknowledgement.getDefaultInstance();
}
/**
* .gossip.Acknowledgement ack = 22;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.AcknowledgementOrBuilder getAckOrBuilder() {
if (contentCase_ == 22) {
return (org.hyperledger.fabric.protos.gossip.Message.Acknowledgement) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.Acknowledgement.getDefaultInstance();
}
public static final int PRIVATEREQ_FIELD_NUMBER = 23;
/**
*
* Used to request private data
*
*
* .gossip.RemotePvtDataRequest privateReq = 23;
* @return Whether the privateReq field is set.
*/
@java.lang.Override
public boolean hasPrivateReq() {
return contentCase_ == 23;
}
/**
*
* Used to request private data
*
*
* .gossip.RemotePvtDataRequest privateReq = 23;
* @return The privateReq.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest getPrivateReq() {
if (contentCase_ == 23) {
return (org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest.getDefaultInstance();
}
/**
*
* Used to request private data
*
*
* .gossip.RemotePvtDataRequest privateReq = 23;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequestOrBuilder getPrivateReqOrBuilder() {
if (contentCase_ == 23) {
return (org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest.getDefaultInstance();
}
public static final int PRIVATERES_FIELD_NUMBER = 24;
/**
*
* Used to respond to private data requests
*
*
* .gossip.RemotePvtDataResponse privateRes = 24;
* @return Whether the privateRes field is set.
*/
@java.lang.Override
public boolean hasPrivateRes() {
return contentCase_ == 24;
}
/**
*
* Used to respond to private data requests
*
*
* .gossip.RemotePvtDataResponse privateRes = 24;
* @return The privateRes.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse getPrivateRes() {
if (contentCase_ == 24) {
return (org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse.getDefaultInstance();
}
/**
*
* Used to respond to private data requests
*
*
* .gossip.RemotePvtDataResponse privateRes = 24;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponseOrBuilder getPrivateResOrBuilder() {
if (contentCase_ == 24) {
return (org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse.getDefaultInstance();
}
public static final int PRIVATE_DATA_FIELD_NUMBER = 25;
/**
*
* Encapsulates private data used to distribute
* private rwset after the endorsement
*
*
* .gossip.PrivateDataMessage private_data = 25;
* @return Whether the privateData field is set.
*/
@java.lang.Override
public boolean hasPrivateData() {
return contentCase_ == 25;
}
/**
*
* Encapsulates private data used to distribute
* private rwset after the endorsement
*
*
* .gossip.PrivateDataMessage private_data = 25;
* @return The privateData.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage getPrivateData() {
if (contentCase_ == 25) {
return (org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.getDefaultInstance();
}
/**
*
* Encapsulates private data used to distribute
* private rwset after the endorsement
*
*
* .gossip.PrivateDataMessage private_data = 25;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessageOrBuilder getPrivateDataOrBuilder() {
if (contentCase_ == 25) {
return (org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (nonce_ != 0L) {
output.writeUInt64(1, nonce_);
}
if (!channel_.isEmpty()) {
output.writeBytes(2, channel_);
}
if (tag_ != org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag.UNDEFINED.getNumber()) {
output.writeEnum(3, tag_);
}
if (contentCase_ == 5) {
output.writeMessage(5, (org.hyperledger.fabric.protos.gossip.Message.AliveMessage) content_);
}
if (contentCase_ == 6) {
output.writeMessage(6, (org.hyperledger.fabric.protos.gossip.Message.MembershipRequest) content_);
}
if (contentCase_ == 7) {
output.writeMessage(7, (org.hyperledger.fabric.protos.gossip.Message.MembershipResponse) content_);
}
if (contentCase_ == 8) {
output.writeMessage(8, (org.hyperledger.fabric.protos.gossip.Message.DataMessage) content_);
}
if (contentCase_ == 9) {
output.writeMessage(9, (org.hyperledger.fabric.protos.gossip.Message.GossipHello) content_);
}
if (contentCase_ == 10) {
output.writeMessage(10, (org.hyperledger.fabric.protos.gossip.Message.DataDigest) content_);
}
if (contentCase_ == 11) {
output.writeMessage(11, (org.hyperledger.fabric.protos.gossip.Message.DataRequest) content_);
}
if (contentCase_ == 12) {
output.writeMessage(12, (org.hyperledger.fabric.protos.gossip.Message.DataUpdate) content_);
}
if (contentCase_ == 13) {
output.writeMessage(13, (org.hyperledger.fabric.protos.gossip.Message.Empty) content_);
}
if (contentCase_ == 14) {
output.writeMessage(14, (org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) content_);
}
if (contentCase_ == 15) {
output.writeMessage(15, (org.hyperledger.fabric.protos.gossip.Message.StateInfo) content_);
}
if (contentCase_ == 16) {
output.writeMessage(16, (org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot) content_);
}
if (contentCase_ == 17) {
output.writeMessage(17, (org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest) content_);
}
if (contentCase_ == 18) {
output.writeMessage(18, (org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest) content_);
}
if (contentCase_ == 19) {
output.writeMessage(19, (org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse) content_);
}
if (contentCase_ == 20) {
output.writeMessage(20, (org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage) content_);
}
if (contentCase_ == 21) {
output.writeMessage(21, (org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) content_);
}
if (contentCase_ == 22) {
output.writeMessage(22, (org.hyperledger.fabric.protos.gossip.Message.Acknowledgement) content_);
}
if (contentCase_ == 23) {
output.writeMessage(23, (org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest) content_);
}
if (contentCase_ == 24) {
output.writeMessage(24, (org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse) content_);
}
if (contentCase_ == 25) {
output.writeMessage(25, (org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) content_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (nonce_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, nonce_);
}
if (!channel_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, channel_);
}
if (tag_ != org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag.UNDEFINED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, tag_);
}
if (contentCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (org.hyperledger.fabric.protos.gossip.Message.AliveMessage) content_);
}
if (contentCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (org.hyperledger.fabric.protos.gossip.Message.MembershipRequest) content_);
}
if (contentCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (org.hyperledger.fabric.protos.gossip.Message.MembershipResponse) content_);
}
if (contentCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (org.hyperledger.fabric.protos.gossip.Message.DataMessage) content_);
}
if (contentCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, (org.hyperledger.fabric.protos.gossip.Message.GossipHello) content_);
}
if (contentCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (org.hyperledger.fabric.protos.gossip.Message.DataDigest) content_);
}
if (contentCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, (org.hyperledger.fabric.protos.gossip.Message.DataRequest) content_);
}
if (contentCase_ == 12) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, (org.hyperledger.fabric.protos.gossip.Message.DataUpdate) content_);
}
if (contentCase_ == 13) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, (org.hyperledger.fabric.protos.gossip.Message.Empty) content_);
}
if (contentCase_ == 14) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, (org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) content_);
}
if (contentCase_ == 15) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, (org.hyperledger.fabric.protos.gossip.Message.StateInfo) content_);
}
if (contentCase_ == 16) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, (org.hyperledger.fabric.protos.gossip.Message.StateInfoSnapshot) content_);
}
if (contentCase_ == 17) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, (org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest) content_);
}
if (contentCase_ == 18) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(18, (org.hyperledger.fabric.protos.gossip.Message.RemoteStateRequest) content_);
}
if (contentCase_ == 19) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(19, (org.hyperledger.fabric.protos.gossip.Message.RemoteStateResponse) content_);
}
if (contentCase_ == 20) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(20, (org.hyperledger.fabric.protos.gossip.Message.LeadershipMessage) content_);
}
if (contentCase_ == 21) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(21, (org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) content_);
}
if (contentCase_ == 22) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(22, (org.hyperledger.fabric.protos.gossip.Message.Acknowledgement) content_);
}
if (contentCase_ == 23) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(23, (org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataRequest) content_);
}
if (contentCase_ == 24) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(24, (org.hyperledger.fabric.protos.gossip.Message.RemotePvtDataResponse) content_);
}
if (contentCase_ == 25) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(25, (org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) content_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.GossipMessage)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.GossipMessage other = (org.hyperledger.fabric.protos.gossip.Message.GossipMessage) obj;
if (getNonce()
!= other.getNonce()) return false;
if (!getChannel()
.equals(other.getChannel())) return false;
if (tag_ != other.tag_) return false;
if (!getContentCase().equals(other.getContentCase())) return false;
switch (contentCase_) {
case 5:
if (!getAliveMsg()
.equals(other.getAliveMsg())) return false;
break;
case 6:
if (!getMemReq()
.equals(other.getMemReq())) return false;
break;
case 7:
if (!getMemRes()
.equals(other.getMemRes())) return false;
break;
case 8:
if (!getDataMsg()
.equals(other.getDataMsg())) return false;
break;
case 9:
if (!getHello()
.equals(other.getHello())) return false;
break;
case 10:
if (!getDataDig()
.equals(other.getDataDig())) return false;
break;
case 11:
if (!getDataReq()
.equals(other.getDataReq())) return false;
break;
case 12:
if (!getDataUpdate()
.equals(other.getDataUpdate())) return false;
break;
case 13:
if (!getEmpty()
.equals(other.getEmpty())) return false;
break;
case 14:
if (!getConn()
.equals(other.getConn())) return false;
break;
case 15:
if (!getStateInfo()
.equals(other.getStateInfo())) return false;
break;
case 16:
if (!getStateSnapshot()
.equals(other.getStateSnapshot())) return false;
break;
case 17:
if (!getStateInfoPullReq()
.equals(other.getStateInfoPullReq())) return false;
break;
case 18:
if (!getStateRequest()
.equals(other.getStateRequest())) return false;
break;
case 19:
if (!getStateResponse()
.equals(other.getStateResponse())) return false;
break;
case 20:
if (!getLeadershipMsg()
.equals(other.getLeadershipMsg())) return false;
break;
case 21:
if (!getPeerIdentity()
.equals(other.getPeerIdentity())) return false;
break;
case 22:
if (!getAck()
.equals(other.getAck())) return false;
break;
case 23:
if (!getPrivateReq()
.equals(other.getPrivateReq())) return false;
break;
case 24:
if (!getPrivateRes()
.equals(other.getPrivateRes())) return false;
break;
case 25:
if (!getPrivateData()
.equals(other.getPrivateData())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NONCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNonce());
hash = (37 * hash) + CHANNEL_FIELD_NUMBER;
hash = (53 * hash) + getChannel().hashCode();
hash = (37 * hash) + TAG_FIELD_NUMBER;
hash = (53 * hash) + tag_;
switch (contentCase_) {
case 5:
hash = (37 * hash) + ALIVE_MSG_FIELD_NUMBER;
hash = (53 * hash) + getAliveMsg().hashCode();
break;
case 6:
hash = (37 * hash) + MEM_REQ_FIELD_NUMBER;
hash = (53 * hash) + getMemReq().hashCode();
break;
case 7:
hash = (37 * hash) + MEM_RES_FIELD_NUMBER;
hash = (53 * hash) + getMemRes().hashCode();
break;
case 8:
hash = (37 * hash) + DATA_MSG_FIELD_NUMBER;
hash = (53 * hash) + getDataMsg().hashCode();
break;
case 9:
hash = (37 * hash) + HELLO_FIELD_NUMBER;
hash = (53 * hash) + getHello().hashCode();
break;
case 10:
hash = (37 * hash) + DATA_DIG_FIELD_NUMBER;
hash = (53 * hash) + getDataDig().hashCode();
break;
case 11:
hash = (37 * hash) + DATA_REQ_FIELD_NUMBER;
hash = (53 * hash) + getDataReq().hashCode();
break;
case 12:
hash = (37 * hash) + DATA_UPDATE_FIELD_NUMBER;
hash = (53 * hash) + getDataUpdate().hashCode();
break;
case 13:
hash = (37 * hash) + EMPTY_FIELD_NUMBER;
hash = (53 * hash) + getEmpty().hashCode();
break;
case 14:
hash = (37 * hash) + CONN_FIELD_NUMBER;
hash = (53 * hash) + getConn().hashCode();
break;
case 15:
hash = (37 * hash) + STATE_INFO_FIELD_NUMBER;
hash = (53 * hash) + getStateInfo().hashCode();
break;
case 16:
hash = (37 * hash) + STATE_SNAPSHOT_FIELD_NUMBER;
hash = (53 * hash) + getStateSnapshot().hashCode();
break;
case 17:
hash = (37 * hash) + STATE_INFO_PULL_REQ_FIELD_NUMBER;
hash = (53 * hash) + getStateInfoPullReq().hashCode();
break;
case 18:
hash = (37 * hash) + STATE_REQUEST_FIELD_NUMBER;
hash = (53 * hash) + getStateRequest().hashCode();
break;
case 19:
hash = (37 * hash) + STATE_RESPONSE_FIELD_NUMBER;
hash = (53 * hash) + getStateResponse().hashCode();
break;
case 20:
hash = (37 * hash) + LEADERSHIP_MSG_FIELD_NUMBER;
hash = (53 * hash) + getLeadershipMsg().hashCode();
break;
case 21:
hash = (37 * hash) + PEER_IDENTITY_FIELD_NUMBER;
hash = (53 * hash) + getPeerIdentity().hashCode();
break;
case 22:
hash = (37 * hash) + ACK_FIELD_NUMBER;
hash = (53 * hash) + getAck().hashCode();
break;
case 23:
hash = (37 * hash) + PRIVATEREQ_FIELD_NUMBER;
hash = (53 * hash) + getPrivateReq().hashCode();
break;
case 24:
hash = (37 * hash) + PRIVATERES_FIELD_NUMBER;
hash = (53 * hash) + getPrivateRes().hashCode();
break;
case 25:
hash = (37 * hash) + PRIVATE_DATA_FIELD_NUMBER;
hash = (53 * hash) + getPrivateData().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage 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.fabric.protos.gossip.Message.GossipMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage 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.fabric.protos.gossip.Message.GossipMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage 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.fabric.protos.gossip.Message.GossipMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.GossipMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* GossipMessage defines the message sent in a gossip network
*
*
* Protobuf type {@code gossip.GossipMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.GossipMessage)
org.hyperledger.fabric.protos.gossip.Message.GossipMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.GossipMessage.class, org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.GossipMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
nonce_ = 0L;
channel_ = com.google.protobuf.ByteString.EMPTY;
tag_ = 0;
contentCase_ = 0;
content_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipMessage_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipMessage getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.GossipMessage.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipMessage build() {
org.hyperledger.fabric.protos.gossip.Message.GossipMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipMessage buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.GossipMessage result = new org.hyperledger.fabric.protos.gossip.Message.GossipMessage(this);
result.nonce_ = nonce_;
result.channel_ = channel_;
result.tag_ = tag_;
if (contentCase_ == 5) {
if (aliveMsgBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = aliveMsgBuilder_.build();
}
}
if (contentCase_ == 6) {
if (memReqBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = memReqBuilder_.build();
}
}
if (contentCase_ == 7) {
if (memResBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = memResBuilder_.build();
}
}
if (contentCase_ == 8) {
if (dataMsgBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = dataMsgBuilder_.build();
}
}
if (contentCase_ == 9) {
if (helloBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = helloBuilder_.build();
}
}
if (contentCase_ == 10) {
if (dataDigBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = dataDigBuilder_.build();
}
}
if (contentCase_ == 11) {
if (dataReqBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = dataReqBuilder_.build();
}
}
if (contentCase_ == 12) {
if (dataUpdateBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = dataUpdateBuilder_.build();
}
}
if (contentCase_ == 13) {
if (emptyBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = emptyBuilder_.build();
}
}
if (contentCase_ == 14) {
if (connBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = connBuilder_.build();
}
}
if (contentCase_ == 15) {
if (stateInfoBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = stateInfoBuilder_.build();
}
}
if (contentCase_ == 16) {
if (stateSnapshotBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = stateSnapshotBuilder_.build();
}
}
if (contentCase_ == 17) {
if (stateInfoPullReqBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = stateInfoPullReqBuilder_.build();
}
}
if (contentCase_ == 18) {
if (stateRequestBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = stateRequestBuilder_.build();
}
}
if (contentCase_ == 19) {
if (stateResponseBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = stateResponseBuilder_.build();
}
}
if (contentCase_ == 20) {
if (leadershipMsgBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = leadershipMsgBuilder_.build();
}
}
if (contentCase_ == 21) {
if (peerIdentityBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = peerIdentityBuilder_.build();
}
}
if (contentCase_ == 22) {
if (ackBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = ackBuilder_.build();
}
}
if (contentCase_ == 23) {
if (privateReqBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = privateReqBuilder_.build();
}
}
if (contentCase_ == 24) {
if (privateResBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = privateResBuilder_.build();
}
}
if (contentCase_ == 25) {
if (privateDataBuilder_ == null) {
result.content_ = content_;
} else {
result.content_ = privateDataBuilder_.build();
}
}
result.contentCase_ = contentCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.GossipMessage) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.GossipMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.GossipMessage other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.GossipMessage.getDefaultInstance()) return this;
if (other.getNonce() != 0L) {
setNonce(other.getNonce());
}
if (other.getChannel() != com.google.protobuf.ByteString.EMPTY) {
setChannel(other.getChannel());
}
if (other.tag_ != 0) {
setTagValue(other.getTagValue());
}
switch (other.getContentCase()) {
case ALIVE_MSG: {
mergeAliveMsg(other.getAliveMsg());
break;
}
case MEM_REQ: {
mergeMemReq(other.getMemReq());
break;
}
case MEM_RES: {
mergeMemRes(other.getMemRes());
break;
}
case DATA_MSG: {
mergeDataMsg(other.getDataMsg());
break;
}
case HELLO: {
mergeHello(other.getHello());
break;
}
case DATA_DIG: {
mergeDataDig(other.getDataDig());
break;
}
case DATA_REQ: {
mergeDataReq(other.getDataReq());
break;
}
case DATA_UPDATE: {
mergeDataUpdate(other.getDataUpdate());
break;
}
case EMPTY: {
mergeEmpty(other.getEmpty());
break;
}
case CONN: {
mergeConn(other.getConn());
break;
}
case STATE_INFO: {
mergeStateInfo(other.getStateInfo());
break;
}
case STATE_SNAPSHOT: {
mergeStateSnapshot(other.getStateSnapshot());
break;
}
case STATE_INFO_PULL_REQ: {
mergeStateInfoPullReq(other.getStateInfoPullReq());
break;
}
case STATE_REQUEST: {
mergeStateRequest(other.getStateRequest());
break;
}
case STATE_RESPONSE: {
mergeStateResponse(other.getStateResponse());
break;
}
case LEADERSHIP_MSG: {
mergeLeadershipMsg(other.getLeadershipMsg());
break;
}
case PEER_IDENTITY: {
mergePeerIdentity(other.getPeerIdentity());
break;
}
case ACK: {
mergeAck(other.getAck());
break;
}
case PRIVATEREQ: {
mergePrivateReq(other.getPrivateReq());
break;
}
case PRIVATERES: {
mergePrivateRes(other.getPrivateRes());
break;
}
case PRIVATE_DATA: {
mergePrivateData(other.getPrivateData());
break;
}
case CONTENT_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.GossipMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.GossipMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int contentCase_ = 0;
private java.lang.Object content_;
public ContentCase
getContentCase() {
return ContentCase.forNumber(
contentCase_);
}
public Builder clearContent() {
contentCase_ = 0;
content_ = null;
onChanged();
return this;
}
private long nonce_ ;
/**
*
* used mainly for testing, but will might be used in the future
* for ensuring message delivery by acking
*
*
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
/**
*
* used mainly for testing, but will might be used in the future
* for ensuring message delivery by acking
*
*
* uint64 nonce = 1;
* @param value The nonce to set.
* @return This builder for chaining.
*/
public Builder setNonce(long value) {
nonce_ = value;
onChanged();
return this;
}
/**
*
* used mainly for testing, but will might be used in the future
* for ensuring message delivery by acking
*
* The channel of the message.
* Some GossipMessages may set this to nil, because
* they are cross-channels but some may not
*
*
* bytes channel = 2;
* @param value The channel to set.
* @return This builder for chaining.
*/
public Builder setChannel(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
channel_ = value;
onChanged();
return this;
}
/**
*
* The channel of the message.
* Some GossipMessages may set this to nil, because
* they are cross-channels but some may not
*
*
* bytes channel = 2;
* @return This builder for chaining.
*/
public Builder clearChannel() {
channel_ = getDefaultInstance().getChannel();
onChanged();
return this;
}
private int tag_ = 0;
/**
*
* determines to which peers it is allowed
* to forward the message
*
*
* .gossip.GossipMessage.Tag tag = 3;
* @return The enum numeric value on the wire for tag.
*/
@java.lang.Override public int getTagValue() {
return tag_;
}
/**
*
* determines to which peers it is allowed
* to forward the message
*
*
* .gossip.GossipMessage.Tag tag = 3;
* @param value The enum numeric value on the wire for tag to set.
* @return This builder for chaining.
*/
public Builder setTagValue(int value) {
tag_ = value;
onChanged();
return this;
}
/**
*
* determines to which peers it is allowed
* to forward the message
*
*
* .gossip.GossipMessage.Tag tag = 3;
* @return The tag.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag getTag() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag result = org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag.valueOf(tag_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag.UNRECOGNIZED : result;
}
/**
*
* determines to which peers it is allowed
* to forward the message
*
*
* .gossip.GossipMessage.Tag tag = 3;
* @param value The tag to set.
* @return This builder for chaining.
*/
public Builder setTag(org.hyperledger.fabric.protos.gossip.Message.GossipMessage.Tag value) {
if (value == null) {
throw new NullPointerException();
}
tag_ = value.getNumber();
onChanged();
return this;
}
/**
*
* determines to which peers it is allowed
* to forward the message
*
*
* .gossip.GossipMessage.Tag tag = 3;
* @return This builder for chaining.
*/
public Builder clearTag() {
tag_ = 0;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.AliveMessage, org.hyperledger.fabric.protos.gossip.Message.AliveMessage.Builder, org.hyperledger.fabric.protos.gossip.Message.AliveMessageOrBuilder> aliveMsgBuilder_;
/**
*
* Membership
*
*
* .gossip.AliveMessage alive_msg = 5;
* @return Whether the aliveMsg field is set.
*/
@java.lang.Override
public boolean hasAliveMsg() {
return contentCase_ == 5;
}
/**
*
* Membership
*
*
* .gossip.AliveMessage alive_msg = 5;
* @return The aliveMsg.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.AliveMessage getAliveMsg() {
if (aliveMsgBuilder_ == null) {
if (contentCase_ == 5) {
return (org.hyperledger.fabric.protos.gossip.Message.AliveMessage) content_;
}
return org.hyperledger.fabric.protos.gossip.Message.AliveMessage.getDefaultInstance();
} else {
if (contentCase_ == 5) {
return aliveMsgBuilder_.getMessage();
}
return org.hyperledger.fabric.protos.gossip.Message.AliveMessage.getDefaultInstance();
}
}
/**
*
* channel_MAC is an authentication code that proves
* that the peer that sent this message knows
* the name of the channel.
*
*
* bytes channel_MAC = 1;
* @param value The channelMAC to set.
* @return This builder for chaining.
*/
public Builder setChannelMAC(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
channelMAC_ = value;
onChanged();
return this;
}
/**
*
* channel_MAC is an authentication code that proves
* that the peer that sent this message knows
* the name of the channel.
*
*
* bytes channel_MAC = 1;
* @return This builder for chaining.
*/
public Builder clearChannelMAC() {
channelMAC_ = getDefaultInstance().getChannelMAC();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.StateInfoPullRequest)
}
// @@protoc_insertion_point(class_scope:gossip.StateInfoPullRequest)
private static final org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest();
}
public static org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StateInfoPullRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StateInfoPullRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.StateInfoPullRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ConnEstablishOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.ConnEstablish)
com.google.protobuf.MessageOrBuilder {
/**
* bytes pki_id = 1;
* @return The pkiId.
*/
com.google.protobuf.ByteString getPkiId();
/**
* bytes identity = 2;
* @return The identity.
*/
com.google.protobuf.ByteString getIdentity();
/**
* bytes tls_cert_hash = 3;
* @return The tlsCertHash.
*/
com.google.protobuf.ByteString getTlsCertHash();
}
/**
*
* ConnEstablish is the message used for the gossip handshake
* Whenever a peer connects to another peer, it handshakes
* with it by sending this message that proves its identity
*
*
* Protobuf type {@code gossip.ConnEstablish}
*/
public static final class ConnEstablish extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.ConnEstablish)
ConnEstablishOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConnEstablish.newBuilder() to construct.
private ConnEstablish(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConnEstablish() {
pkiId_ = com.google.protobuf.ByteString.EMPTY;
identity_ = com.google.protobuf.ByteString.EMPTY;
tlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConnEstablish();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConnEstablish(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
pkiId_ = input.readBytes();
break;
}
case 18: {
identity_ = input.readBytes();
break;
}
case 26: {
tlsCertHash_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_ConnEstablish_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_ConnEstablish_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.class, org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.Builder.class);
}
public static final int PKI_ID_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString pkiId_;
/**
* bytes pki_id = 1;
* @return The pkiId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPkiId() {
return pkiId_;
}
public static final int IDENTITY_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString identity_;
/**
* bytes identity = 2;
* @return The identity.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIdentity() {
return identity_;
}
public static final int TLS_CERT_HASH_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString tlsCertHash_;
/**
* bytes tls_cert_hash = 3;
* @return The tlsCertHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTlsCertHash() {
return tlsCertHash_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!pkiId_.isEmpty()) {
output.writeBytes(1, pkiId_);
}
if (!identity_.isEmpty()) {
output.writeBytes(2, identity_);
}
if (!tlsCertHash_.isEmpty()) {
output.writeBytes(3, tlsCertHash_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!pkiId_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, pkiId_);
}
if (!identity_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, identity_);
}
if (!tlsCertHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, tlsCertHash_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.ConnEstablish)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.ConnEstablish other = (org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) obj;
if (!getPkiId()
.equals(other.getPkiId())) return false;
if (!getIdentity()
.equals(other.getIdentity())) return false;
if (!getTlsCertHash()
.equals(other.getTlsCertHash())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PKI_ID_FIELD_NUMBER;
hash = (53 * hash) + getPkiId().hashCode();
hash = (37 * hash) + IDENTITY_FIELD_NUMBER;
hash = (53 * hash) + getIdentity().hashCode();
hash = (37 * hash) + TLS_CERT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getTlsCertHash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish 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.fabric.protos.gossip.Message.ConnEstablish parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish 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.fabric.protos.gossip.Message.ConnEstablish parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish 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.fabric.protos.gossip.Message.ConnEstablish parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.ConnEstablish prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* ConnEstablish is the message used for the gossip handshake
* Whenever a peer connects to another peer, it handshakes
* with it by sending this message that proves its identity
*
*
* Protobuf type {@code gossip.ConnEstablish}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.ConnEstablish)
org.hyperledger.fabric.protos.gossip.Message.ConnEstablishOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_ConnEstablish_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_ConnEstablish_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.class, org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
pkiId_ = com.google.protobuf.ByteString.EMPTY;
identity_ = com.google.protobuf.ByteString.EMPTY;
tlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_ConnEstablish_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.ConnEstablish getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.ConnEstablish build() {
org.hyperledger.fabric.protos.gossip.Message.ConnEstablish result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.ConnEstablish buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.ConnEstablish result = new org.hyperledger.fabric.protos.gossip.Message.ConnEstablish(this);
result.pkiId_ = pkiId_;
result.identity_ = identity_;
result.tlsCertHash_ = tlsCertHash_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.ConnEstablish)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.ConnEstablish other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.ConnEstablish.getDefaultInstance()) return this;
if (other.getPkiId() != com.google.protobuf.ByteString.EMPTY) {
setPkiId(other.getPkiId());
}
if (other.getIdentity() != com.google.protobuf.ByteString.EMPTY) {
setIdentity(other.getIdentity());
}
if (other.getTlsCertHash() != com.google.protobuf.ByteString.EMPTY) {
setTlsCertHash(other.getTlsCertHash());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.ConnEstablish parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.ConnEstablish) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString pkiId_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes pki_id = 1;
* @return The pkiId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPkiId() {
return pkiId_;
}
/**
* bytes pki_id = 1;
* @param value The pkiId to set.
* @return This builder for chaining.
*/
public Builder setPkiId(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
pkiId_ = value;
onChanged();
return this;
}
/**
* bytes pki_id = 1;
* @return This builder for chaining.
*/
public Builder clearPkiId() {
pkiId_ = getDefaultInstance().getPkiId();
onChanged();
return this;
}
private com.google.protobuf.ByteString identity_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes identity = 2;
* @return The identity.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIdentity() {
return identity_;
}
/**
* bytes identity = 2;
* @param value The identity to set.
* @return This builder for chaining.
*/
public Builder setIdentity(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
identity_ = value;
onChanged();
return this;
}
/**
* bytes identity = 2;
* @return This builder for chaining.
*/
public Builder clearIdentity() {
identity_ = getDefaultInstance().getIdentity();
onChanged();
return this;
}
private com.google.protobuf.ByteString tlsCertHash_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes tls_cert_hash = 3;
* @return The tlsCertHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTlsCertHash() {
return tlsCertHash_;
}
/**
* bytes tls_cert_hash = 3;
* @param value The tlsCertHash to set.
* @return This builder for chaining.
*/
public Builder setTlsCertHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
tlsCertHash_ = value;
onChanged();
return this;
}
/**
* bytes tls_cert_hash = 3;
* @return This builder for chaining.
*/
public Builder clearTlsCertHash() {
tlsCertHash_ = getDefaultInstance().getTlsCertHash();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.ConnEstablish)
}
// @@protoc_insertion_point(class_scope:gossip.ConnEstablish)
private static final org.hyperledger.fabric.protos.gossip.Message.ConnEstablish DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.ConnEstablish();
}
public static org.hyperledger.fabric.protos.gossip.Message.ConnEstablish getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConnEstablish parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConnEstablish(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.ConnEstablish getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PeerIdentityOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.PeerIdentity)
com.google.protobuf.MessageOrBuilder {
/**
* bytes pki_id = 1;
* @return The pkiId.
*/
com.google.protobuf.ByteString getPkiId();
/**
* bytes cert = 2;
* @return The cert.
*/
com.google.protobuf.ByteString getCert();
/**
* bytes metadata = 3;
* @return The metadata.
*/
com.google.protobuf.ByteString getMetadata();
}
/**
*
* PeerIdentity defines the identity of the peer
* Used to make other peers learn of the identity
* of a certain peer
*
*
* Protobuf type {@code gossip.PeerIdentity}
*/
public static final class PeerIdentity extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.PeerIdentity)
PeerIdentityOrBuilder {
private static final long serialVersionUID = 0L;
// Use PeerIdentity.newBuilder() to construct.
private PeerIdentity(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PeerIdentity() {
pkiId_ = com.google.protobuf.ByteString.EMPTY;
cert_ = com.google.protobuf.ByteString.EMPTY;
metadata_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PeerIdentity();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PeerIdentity(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
pkiId_ = input.readBytes();
break;
}
case 18: {
cert_ = input.readBytes();
break;
}
case 26: {
metadata_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PeerIdentity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PeerIdentity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.class, org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.Builder.class);
}
public static final int PKI_ID_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString pkiId_;
/**
* bytes pki_id = 1;
* @return The pkiId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPkiId() {
return pkiId_;
}
public static final int CERT_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString cert_;
/**
* bytes cert = 2;
* @return The cert.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCert() {
return cert_;
}
public static final int METADATA_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString metadata_;
/**
* bytes metadata = 3;
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!pkiId_.isEmpty()) {
output.writeBytes(1, pkiId_);
}
if (!cert_.isEmpty()) {
output.writeBytes(2, cert_);
}
if (!metadata_.isEmpty()) {
output.writeBytes(3, metadata_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!pkiId_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, pkiId_);
}
if (!cert_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, cert_);
}
if (!metadata_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, metadata_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.PeerIdentity)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.PeerIdentity other = (org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) obj;
if (!getPkiId()
.equals(other.getPkiId())) return false;
if (!getCert()
.equals(other.getCert())) return false;
if (!getMetadata()
.equals(other.getMetadata())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PKI_ID_FIELD_NUMBER;
hash = (53 * hash) + getPkiId().hashCode();
hash = (37 * hash) + CERT_FIELD_NUMBER;
hash = (53 * hash) + getCert().hashCode();
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity 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.fabric.protos.gossip.Message.PeerIdentity parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity 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.fabric.protos.gossip.Message.PeerIdentity parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity 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.fabric.protos.gossip.Message.PeerIdentity parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.PeerIdentity prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* PeerIdentity defines the identity of the peer
* Used to make other peers learn of the identity
* of a certain peer
*
*
* Protobuf type {@code gossip.PeerIdentity}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.PeerIdentity)
org.hyperledger.fabric.protos.gossip.Message.PeerIdentityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PeerIdentity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PeerIdentity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.class, org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
pkiId_ = com.google.protobuf.ByteString.EMPTY;
cert_ = com.google.protobuf.ByteString.EMPTY;
metadata_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PeerIdentity_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PeerIdentity getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PeerIdentity build() {
org.hyperledger.fabric.protos.gossip.Message.PeerIdentity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PeerIdentity buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.PeerIdentity result = new org.hyperledger.fabric.protos.gossip.Message.PeerIdentity(this);
result.pkiId_ = pkiId_;
result.cert_ = cert_;
result.metadata_ = metadata_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.PeerIdentity)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.PeerIdentity other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.PeerIdentity.getDefaultInstance()) return this;
if (other.getPkiId() != com.google.protobuf.ByteString.EMPTY) {
setPkiId(other.getPkiId());
}
if (other.getCert() != com.google.protobuf.ByteString.EMPTY) {
setCert(other.getCert());
}
if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
setMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.PeerIdentity parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.PeerIdentity) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString pkiId_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes pki_id = 1;
* @return The pkiId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPkiId() {
return pkiId_;
}
/**
* bytes pki_id = 1;
* @param value The pkiId to set.
* @return This builder for chaining.
*/
public Builder setPkiId(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
pkiId_ = value;
onChanged();
return this;
}
/**
* bytes pki_id = 1;
* @return This builder for chaining.
*/
public Builder clearPkiId() {
pkiId_ = getDefaultInstance().getPkiId();
onChanged();
return this;
}
private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes cert = 2;
* @return The cert.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCert() {
return cert_;
}
/**
* bytes cert = 2;
* @param value The cert to set.
* @return This builder for chaining.
*/
public Builder setCert(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
cert_ = value;
onChanged();
return this;
}
/**
* bytes cert = 2;
* @return This builder for chaining.
*/
public Builder clearCert() {
cert_ = getDefaultInstance().getCert();
onChanged();
return this;
}
private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 3;
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
/**
* bytes metadata = 3;
* @param value The metadata to set.
* @return This builder for chaining.
*/
public Builder setMetadata(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
return this;
}
/**
* bytes metadata = 3;
* @return This builder for chaining.
*/
public Builder clearMetadata() {
metadata_ = getDefaultInstance().getMetadata();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.PeerIdentity)
}
// @@protoc_insertion_point(class_scope:gossip.PeerIdentity)
private static final org.hyperledger.fabric.protos.gossip.Message.PeerIdentity DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.PeerIdentity();
}
public static org.hyperledger.fabric.protos.gossip.Message.PeerIdentity getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PeerIdentity parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PeerIdentity(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PeerIdentity getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DataRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.DataRequest)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 nonce = 1;
* @return The nonce.
*/
long getNonce();
/**
* repeated bytes digests = 2;
* @return A list containing the digests.
*/
java.util.List getDigestsList();
/**
* repeated bytes digests = 2;
* @return The count of digests.
*/
int getDigestsCount();
/**
* repeated bytes digests = 2;
* @param index The index of the element to return.
* @return The digests at the given index.
*/
com.google.protobuf.ByteString getDigests(int index);
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
int getMsgTypeValue();
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType();
}
/**
*
* DataRequest is a message used for a peer to request
* certain data blocks from a remote peer
*
*
* Protobuf type {@code gossip.DataRequest}
*/
public static final class DataRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.DataRequest)
DataRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataRequest.newBuilder() to construct.
private DataRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DataRequest() {
digests_ = java.util.Collections.emptyList();
msgType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DataRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DataRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
nonce_ = input.readUInt64();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
digests_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
digests_.add(input.readBytes());
break;
}
case 24: {
int rawValue = input.readEnum();
msgType_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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) != 0)) {
digests_ = java.util.Collections.unmodifiableList(digests_); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.DataRequest.class, org.hyperledger.fabric.protos.gossip.Message.DataRequest.Builder.class);
}
public static final int NONCE_FIELD_NUMBER = 1;
private long nonce_;
/**
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
public static final int DIGESTS_FIELD_NUMBER = 2;
private java.util.List digests_;
/**
* repeated bytes digests = 2;
* @return A list containing the digests.
*/
@java.lang.Override
public java.util.List
getDigestsList() {
return digests_;
}
/**
* repeated bytes digests = 2;
* @return The count of digests.
*/
public int getDigestsCount() {
return digests_.size();
}
/**
* repeated bytes digests = 2;
* @param index The index of the element to return.
* @return The digests at the given index.
*/
public com.google.protobuf.ByteString getDigests(int index) {
return digests_.get(index);
}
public static final int MSG_TYPE_FIELD_NUMBER = 3;
private int msgType_;
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
@java.lang.Override public int getMsgTypeValue() {
return msgType_;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
@java.lang.Override public org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.PullMsgType result = org.hyperledger.fabric.protos.gossip.Message.PullMsgType.valueOf(msgType_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (nonce_ != 0L) {
output.writeUInt64(1, nonce_);
}
for (int i = 0; i < digests_.size(); i++) {
output.writeBytes(2, digests_.get(i));
}
if (msgType_ != org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNDEFINED.getNumber()) {
output.writeEnum(3, msgType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (nonce_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, nonce_);
}
{
int dataSize = 0;
for (int i = 0; i < digests_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(digests_.get(i));
}
size += dataSize;
size += 1 * getDigestsList().size();
}
if (msgType_ != org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNDEFINED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, msgType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.DataRequest)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.DataRequest other = (org.hyperledger.fabric.protos.gossip.Message.DataRequest) obj;
if (getNonce()
!= other.getNonce()) return false;
if (!getDigestsList()
.equals(other.getDigestsList())) return false;
if (msgType_ != other.msgType_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NONCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNonce());
if (getDigestsCount() > 0) {
hash = (37 * hash) + DIGESTS_FIELD_NUMBER;
hash = (53 * hash) + getDigestsList().hashCode();
}
hash = (37 * hash) + MSG_TYPE_FIELD_NUMBER;
hash = (53 * hash) + msgType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest 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.fabric.protos.gossip.Message.DataRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest 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.fabric.protos.gossip.Message.DataRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest 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.fabric.protos.gossip.Message.DataRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.DataRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* DataRequest is a message used for a peer to request
* certain data blocks from a remote peer
*
*
* Protobuf type {@code gossip.DataRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.DataRequest)
org.hyperledger.fabric.protos.gossip.Message.DataRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.DataRequest.class, org.hyperledger.fabric.protos.gossip.Message.DataRequest.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.DataRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
nonce_ = 0L;
digests_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
msgType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataRequest_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataRequest getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.DataRequest.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataRequest build() {
org.hyperledger.fabric.protos.gossip.Message.DataRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataRequest buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.DataRequest result = new org.hyperledger.fabric.protos.gossip.Message.DataRequest(this);
int from_bitField0_ = bitField0_;
result.nonce_ = nonce_;
if (((bitField0_ & 0x00000001) != 0)) {
digests_ = java.util.Collections.unmodifiableList(digests_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.digests_ = digests_;
result.msgType_ = msgType_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.DataRequest) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.DataRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.DataRequest other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.DataRequest.getDefaultInstance()) return this;
if (other.getNonce() != 0L) {
setNonce(other.getNonce());
}
if (!other.digests_.isEmpty()) {
if (digests_.isEmpty()) {
digests_ = other.digests_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDigestsIsMutable();
digests_.addAll(other.digests_);
}
onChanged();
}
if (other.msgType_ != 0) {
setMsgTypeValue(other.getMsgTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.DataRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.DataRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long nonce_ ;
/**
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
/**
* uint64 nonce = 1;
* @param value The nonce to set.
* @return This builder for chaining.
*/
public Builder setNonce(long value) {
nonce_ = value;
onChanged();
return this;
}
/**
* uint64 nonce = 1;
* @return This builder for chaining.
*/
public Builder clearNonce() {
nonce_ = 0L;
onChanged();
return this;
}
private java.util.List digests_ = java.util.Collections.emptyList();
private void ensureDigestsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
digests_ = new java.util.ArrayList(digests_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated bytes digests = 2;
* @return A list containing the digests.
*/
public java.util.List
getDigestsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(digests_) : digests_;
}
/**
* repeated bytes digests = 2;
* @return The count of digests.
*/
public int getDigestsCount() {
return digests_.size();
}
/**
* repeated bytes digests = 2;
* @param index The index of the element to return.
* @return The digests at the given index.
*/
public com.google.protobuf.ByteString getDigests(int index) {
return digests_.get(index);
}
/**
* repeated bytes digests = 2;
* @param index The index to set the value at.
* @param value The digests to set.
* @return This builder for chaining.
*/
public Builder setDigests(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureDigestsIsMutable();
digests_.set(index, value);
onChanged();
return this;
}
/**
* repeated bytes digests = 2;
* @param value The digests to add.
* @return This builder for chaining.
*/
public Builder addDigests(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureDigestsIsMutable();
digests_.add(value);
onChanged();
return this;
}
/**
* repeated bytes digests = 2;
* @param values The digests to add.
* @return This builder for chaining.
*/
public Builder addAllDigests(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureDigestsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, digests_);
onChanged();
return this;
}
/**
* repeated bytes digests = 2;
* @return This builder for chaining.
*/
public Builder clearDigests() {
digests_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private int msgType_ = 0;
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
@java.lang.Override public int getMsgTypeValue() {
return msgType_;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @param value The enum numeric value on the wire for msgType to set.
* @return This builder for chaining.
*/
public Builder setMsgTypeValue(int value) {
msgType_ = value;
onChanged();
return this;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.PullMsgType result = org.hyperledger.fabric.protos.gossip.Message.PullMsgType.valueOf(msgType_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNRECOGNIZED : result;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @param value The msgType to set.
* @return This builder for chaining.
*/
public Builder setMsgType(org.hyperledger.fabric.protos.gossip.Message.PullMsgType value) {
if (value == null) {
throw new NullPointerException();
}
msgType_ = value.getNumber();
onChanged();
return this;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return This builder for chaining.
*/
public Builder clearMsgType() {
msgType_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.DataRequest)
}
// @@protoc_insertion_point(class_scope:gossip.DataRequest)
private static final org.hyperledger.fabric.protos.gossip.Message.DataRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.DataRequest();
}
public static org.hyperledger.fabric.protos.gossip.Message.DataRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DataRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DataRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface GossipHelloOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.GossipHello)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 nonce = 1;
* @return The nonce.
*/
long getNonce();
/**
* bytes metadata = 2;
* @return The metadata.
*/
com.google.protobuf.ByteString getMetadata();
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
int getMsgTypeValue();
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType();
}
/**
*
* GossipHello is the message that is used for the peer to initiate
* a pull round with another peer
*
*
* Protobuf type {@code gossip.GossipHello}
*/
public static final class GossipHello extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.GossipHello)
GossipHelloOrBuilder {
private static final long serialVersionUID = 0L;
// Use GossipHello.newBuilder() to construct.
private GossipHello(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GossipHello() {
metadata_ = com.google.protobuf.ByteString.EMPTY;
msgType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GossipHello();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GossipHello(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
nonce_ = input.readUInt64();
break;
}
case 18: {
metadata_ = input.readBytes();
break;
}
case 24: {
int rawValue = input.readEnum();
msgType_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipHello_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipHello_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.GossipHello.class, org.hyperledger.fabric.protos.gossip.Message.GossipHello.Builder.class);
}
public static final int NONCE_FIELD_NUMBER = 1;
private long nonce_;
/**
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
public static final int METADATA_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString metadata_;
/**
* bytes metadata = 2;
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
public static final int MSG_TYPE_FIELD_NUMBER = 3;
private int msgType_;
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
@java.lang.Override public int getMsgTypeValue() {
return msgType_;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
@java.lang.Override public org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.PullMsgType result = org.hyperledger.fabric.protos.gossip.Message.PullMsgType.valueOf(msgType_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (nonce_ != 0L) {
output.writeUInt64(1, nonce_);
}
if (!metadata_.isEmpty()) {
output.writeBytes(2, metadata_);
}
if (msgType_ != org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNDEFINED.getNumber()) {
output.writeEnum(3, msgType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (nonce_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, nonce_);
}
if (!metadata_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, metadata_);
}
if (msgType_ != org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNDEFINED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, msgType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.GossipHello)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.GossipHello other = (org.hyperledger.fabric.protos.gossip.Message.GossipHello) obj;
if (getNonce()
!= other.getNonce()) return false;
if (!getMetadata()
.equals(other.getMetadata())) return false;
if (msgType_ != other.msgType_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NONCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNonce());
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
hash = (37 * hash) + MSG_TYPE_FIELD_NUMBER;
hash = (53 * hash) + msgType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello 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.fabric.protos.gossip.Message.GossipHello parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello 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.fabric.protos.gossip.Message.GossipHello parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello 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.fabric.protos.gossip.Message.GossipHello parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.GossipHello prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* GossipHello is the message that is used for the peer to initiate
* a pull round with another peer
*
*
* Protobuf type {@code gossip.GossipHello}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.GossipHello)
org.hyperledger.fabric.protos.gossip.Message.GossipHelloOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipHello_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipHello_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.GossipHello.class, org.hyperledger.fabric.protos.gossip.Message.GossipHello.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.GossipHello.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
nonce_ = 0L;
metadata_ = com.google.protobuf.ByteString.EMPTY;
msgType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_GossipHello_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipHello getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.GossipHello.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipHello build() {
org.hyperledger.fabric.protos.gossip.Message.GossipHello result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipHello buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.GossipHello result = new org.hyperledger.fabric.protos.gossip.Message.GossipHello(this);
result.nonce_ = nonce_;
result.metadata_ = metadata_;
result.msgType_ = msgType_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.GossipHello) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.GossipHello)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.GossipHello other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.GossipHello.getDefaultInstance()) return this;
if (other.getNonce() != 0L) {
setNonce(other.getNonce());
}
if (other.getMetadata() != com.google.protobuf.ByteString.EMPTY) {
setMetadata(other.getMetadata());
}
if (other.msgType_ != 0) {
setMsgTypeValue(other.getMsgTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.GossipHello parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.GossipHello) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long nonce_ ;
/**
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
/**
* uint64 nonce = 1;
* @param value The nonce to set.
* @return This builder for chaining.
*/
public Builder setNonce(long value) {
nonce_ = value;
onChanged();
return this;
}
/**
* uint64 nonce = 1;
* @return This builder for chaining.
*/
public Builder clearNonce() {
nonce_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString metadata_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes metadata = 2;
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMetadata() {
return metadata_;
}
/**
* bytes metadata = 2;
* @param value The metadata to set.
* @return This builder for chaining.
*/
public Builder setMetadata(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
return this;
}
/**
* bytes metadata = 2;
* @return This builder for chaining.
*/
public Builder clearMetadata() {
metadata_ = getDefaultInstance().getMetadata();
onChanged();
return this;
}
private int msgType_ = 0;
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
@java.lang.Override public int getMsgTypeValue() {
return msgType_;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @param value The enum numeric value on the wire for msgType to set.
* @return This builder for chaining.
*/
public Builder setMsgTypeValue(int value) {
msgType_ = value;
onChanged();
return this;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.PullMsgType result = org.hyperledger.fabric.protos.gossip.Message.PullMsgType.valueOf(msgType_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNRECOGNIZED : result;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @param value The msgType to set.
* @return This builder for chaining.
*/
public Builder setMsgType(org.hyperledger.fabric.protos.gossip.Message.PullMsgType value) {
if (value == null) {
throw new NullPointerException();
}
msgType_ = value.getNumber();
onChanged();
return this;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return This builder for chaining.
*/
public Builder clearMsgType() {
msgType_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.GossipHello)
}
// @@protoc_insertion_point(class_scope:gossip.GossipHello)
private static final org.hyperledger.fabric.protos.gossip.Message.GossipHello DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.GossipHello();
}
public static org.hyperledger.fabric.protos.gossip.Message.GossipHello getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public GossipHello parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GossipHello(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.GossipHello getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DataUpdateOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.DataUpdate)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 nonce = 1;
* @return The nonce.
*/
long getNonce();
/**
* repeated .gossip.Envelope data = 2;
*/
java.util.List
getDataList();
/**
* repeated .gossip.Envelope data = 2;
*/
org.hyperledger.fabric.protos.gossip.Message.Envelope getData(int index);
/**
* repeated .gossip.Envelope data = 2;
*/
int getDataCount();
/**
* repeated .gossip.Envelope data = 2;
*/
java.util.List extends org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder>
getDataOrBuilderList();
/**
* repeated .gossip.Envelope data = 2;
*/
org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder getDataOrBuilder(
int index);
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
int getMsgTypeValue();
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType();
}
/**
*
* DataUpdate is the final message in the pull phase
* sent from the receiver to the initiator
*
*
* Protobuf type {@code gossip.DataUpdate}
*/
public static final class DataUpdate extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.DataUpdate)
DataUpdateOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataUpdate.newBuilder() to construct.
private DataUpdate(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DataUpdate() {
data_ = java.util.Collections.emptyList();
msgType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DataUpdate();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DataUpdate(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
nonce_ = input.readUInt64();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
data_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
data_.add(
input.readMessage(org.hyperledger.fabric.protos.gossip.Message.Envelope.parser(), extensionRegistry));
break;
}
case 24: {
int rawValue = input.readEnum();
msgType_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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) != 0)) {
data_ = java.util.Collections.unmodifiableList(data_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.DataUpdate.class, org.hyperledger.fabric.protos.gossip.Message.DataUpdate.Builder.class);
}
public static final int NONCE_FIELD_NUMBER = 1;
private long nonce_;
/**
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
public static final int DATA_FIELD_NUMBER = 2;
private java.util.List data_;
/**
* repeated .gossip.Envelope data = 2;
*/
@java.lang.Override
public java.util.List getDataList() {
return data_;
}
/**
* repeated .gossip.Envelope data = 2;
*/
@java.lang.Override
public java.util.List extends org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder>
getDataOrBuilderList() {
return data_;
}
/**
* repeated .gossip.Envelope data = 2;
*/
@java.lang.Override
public int getDataCount() {
return data_.size();
}
/**
* repeated .gossip.Envelope data = 2;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Envelope getData(int index) {
return data_.get(index);
}
/**
* repeated .gossip.Envelope data = 2;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder getDataOrBuilder(
int index) {
return data_.get(index);
}
public static final int MSG_TYPE_FIELD_NUMBER = 3;
private int msgType_;
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
@java.lang.Override public int getMsgTypeValue() {
return msgType_;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
@java.lang.Override public org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.PullMsgType result = org.hyperledger.fabric.protos.gossip.Message.PullMsgType.valueOf(msgType_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (nonce_ != 0L) {
output.writeUInt64(1, nonce_);
}
for (int i = 0; i < data_.size(); i++) {
output.writeMessage(2, data_.get(i));
}
if (msgType_ != org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNDEFINED.getNumber()) {
output.writeEnum(3, msgType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (nonce_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, nonce_);
}
for (int i = 0; i < data_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, data_.get(i));
}
if (msgType_ != org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNDEFINED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, msgType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.DataUpdate)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.DataUpdate other = (org.hyperledger.fabric.protos.gossip.Message.DataUpdate) obj;
if (getNonce()
!= other.getNonce()) return false;
if (!getDataList()
.equals(other.getDataList())) return false;
if (msgType_ != other.msgType_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NONCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNonce());
if (getDataCount() > 0) {
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getDataList().hashCode();
}
hash = (37 * hash) + MSG_TYPE_FIELD_NUMBER;
hash = (53 * hash) + msgType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate 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.fabric.protos.gossip.Message.DataUpdate parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate 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.fabric.protos.gossip.Message.DataUpdate parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate 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.fabric.protos.gossip.Message.DataUpdate parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.DataUpdate prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* DataUpdate is the final message in the pull phase
* sent from the receiver to the initiator
*
*
* Protobuf type {@code gossip.DataUpdate}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.DataUpdate)
org.hyperledger.fabric.protos.gossip.Message.DataUpdateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.DataUpdate.class, org.hyperledger.fabric.protos.gossip.Message.DataUpdate.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.DataUpdate.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDataFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
nonce_ = 0L;
if (dataBuilder_ == null) {
data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
dataBuilder_.clear();
}
msgType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataUpdate_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataUpdate getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.DataUpdate.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataUpdate build() {
org.hyperledger.fabric.protos.gossip.Message.DataUpdate result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataUpdate buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.DataUpdate result = new org.hyperledger.fabric.protos.gossip.Message.DataUpdate(this);
int from_bitField0_ = bitField0_;
result.nonce_ = nonce_;
if (dataBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
data_ = java.util.Collections.unmodifiableList(data_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.data_ = data_;
} else {
result.data_ = dataBuilder_.build();
}
result.msgType_ = msgType_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.DataUpdate) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.DataUpdate)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.DataUpdate other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.DataUpdate.getDefaultInstance()) return this;
if (other.getNonce() != 0L) {
setNonce(other.getNonce());
}
if (dataBuilder_ == null) {
if (!other.data_.isEmpty()) {
if (data_.isEmpty()) {
data_ = other.data_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDataIsMutable();
data_.addAll(other.data_);
}
onChanged();
}
} else {
if (!other.data_.isEmpty()) {
if (dataBuilder_.isEmpty()) {
dataBuilder_.dispose();
dataBuilder_ = null;
data_ = other.data_;
bitField0_ = (bitField0_ & ~0x00000001);
dataBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDataFieldBuilder() : null;
} else {
dataBuilder_.addAllMessages(other.data_);
}
}
}
if (other.msgType_ != 0) {
setMsgTypeValue(other.getMsgTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.DataUpdate parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.DataUpdate) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long nonce_ ;
/**
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
/**
* uint64 nonce = 1;
* @param value The nonce to set.
* @return This builder for chaining.
*/
public Builder setNonce(long value) {
nonce_ = value;
onChanged();
return this;
}
/**
* uint64 nonce = 1;
* @return This builder for chaining.
*/
public Builder clearNonce() {
nonce_ = 0L;
onChanged();
return this;
}
private java.util.List data_ =
java.util.Collections.emptyList();
private void ensureDataIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
data_ = new java.util.ArrayList(data_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.Envelope, org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder, org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder> dataBuilder_;
/**
* repeated .gossip.Envelope data = 2;
*/
public java.util.List getDataList() {
if (dataBuilder_ == null) {
return java.util.Collections.unmodifiableList(data_);
} else {
return dataBuilder_.getMessageList();
}
}
/**
* repeated .gossip.Envelope data = 2;
*/
public int getDataCount() {
if (dataBuilder_ == null) {
return data_.size();
} else {
return dataBuilder_.getCount();
}
}
/**
* repeated .gossip.Envelope data = 2;
*/
public org.hyperledger.fabric.protos.gossip.Message.Envelope getData(int index) {
if (dataBuilder_ == null) {
return data_.get(index);
} else {
return dataBuilder_.getMessage(index);
}
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder setData(
int index, org.hyperledger.fabric.protos.gossip.Message.Envelope value) {
if (dataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataIsMutable();
data_.set(index, value);
onChanged();
} else {
dataBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder setData(
int index, org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder builderForValue) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
data_.set(index, builderForValue.build());
onChanged();
} else {
dataBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder addData(org.hyperledger.fabric.protos.gossip.Message.Envelope value) {
if (dataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataIsMutable();
data_.add(value);
onChanged();
} else {
dataBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder addData(
int index, org.hyperledger.fabric.protos.gossip.Message.Envelope value) {
if (dataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDataIsMutable();
data_.add(index, value);
onChanged();
} else {
dataBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder addData(
org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder builderForValue) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
data_.add(builderForValue.build());
onChanged();
} else {
dataBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder addData(
int index, org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder builderForValue) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
data_.add(index, builderForValue.build());
onChanged();
} else {
dataBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder addAllData(
java.lang.Iterable extends org.hyperledger.fabric.protos.gossip.Message.Envelope> values) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, data_);
onChanged();
} else {
dataBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder clearData() {
if (dataBuilder_ == null) {
data_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
dataBuilder_.clear();
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public Builder removeData(int index) {
if (dataBuilder_ == null) {
ensureDataIsMutable();
data_.remove(index);
onChanged();
} else {
dataBuilder_.remove(index);
}
return this;
}
/**
* repeated .gossip.Envelope data = 2;
*/
public org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder getDataBuilder(
int index) {
return getDataFieldBuilder().getBuilder(index);
}
/**
* repeated .gossip.Envelope data = 2;
*/
public org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder getDataOrBuilder(
int index) {
if (dataBuilder_ == null) {
return data_.get(index); } else {
return dataBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .gossip.Envelope data = 2;
*/
public java.util.List extends org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder>
getDataOrBuilderList() {
if (dataBuilder_ != null) {
return dataBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(data_);
}
}
/**
* repeated .gossip.Envelope data = 2;
*/
public org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder addDataBuilder() {
return getDataFieldBuilder().addBuilder(
org.hyperledger.fabric.protos.gossip.Message.Envelope.getDefaultInstance());
}
/**
* repeated .gossip.Envelope data = 2;
*/
public org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder addDataBuilder(
int index) {
return getDataFieldBuilder().addBuilder(
index, org.hyperledger.fabric.protos.gossip.Message.Envelope.getDefaultInstance());
}
/**
* repeated .gossip.Envelope data = 2;
*/
public java.util.List
getDataBuilderList() {
return getDataFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.Envelope, org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder, org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder>
getDataFieldBuilder() {
if (dataBuilder_ == null) {
dataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.Envelope, org.hyperledger.fabric.protos.gossip.Message.Envelope.Builder, org.hyperledger.fabric.protos.gossip.Message.EnvelopeOrBuilder>(
data_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
data_ = null;
}
return dataBuilder_;
}
private int msgType_ = 0;
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
@java.lang.Override public int getMsgTypeValue() {
return msgType_;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @param value The enum numeric value on the wire for msgType to set.
* @return This builder for chaining.
*/
public Builder setMsgTypeValue(int value) {
msgType_ = value;
onChanged();
return this;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.PullMsgType result = org.hyperledger.fabric.protos.gossip.Message.PullMsgType.valueOf(msgType_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNRECOGNIZED : result;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @param value The msgType to set.
* @return This builder for chaining.
*/
public Builder setMsgType(org.hyperledger.fabric.protos.gossip.Message.PullMsgType value) {
if (value == null) {
throw new NullPointerException();
}
msgType_ = value.getNumber();
onChanged();
return this;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return This builder for chaining.
*/
public Builder clearMsgType() {
msgType_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.DataUpdate)
}
// @@protoc_insertion_point(class_scope:gossip.DataUpdate)
private static final org.hyperledger.fabric.protos.gossip.Message.DataUpdate DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.DataUpdate();
}
public static org.hyperledger.fabric.protos.gossip.Message.DataUpdate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DataUpdate parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DataUpdate(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataUpdate getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DataDigestOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.DataDigest)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 nonce = 1;
* @return The nonce.
*/
long getNonce();
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @return A list containing the digests.
*/
java.util.List getDigestsList();
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @return The count of digests.
*/
int getDigestsCount();
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @param index The index of the element to return.
* @return The digests at the given index.
*/
com.google.protobuf.ByteString getDigests(int index);
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
int getMsgTypeValue();
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType();
}
/**
*
* DataDigest is the message sent from the receiver peer
* to the initator peer and contains the data items it has
*
*
* Protobuf type {@code gossip.DataDigest}
*/
public static final class DataDigest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.DataDigest)
DataDigestOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataDigest.newBuilder() to construct.
private DataDigest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DataDigest() {
digests_ = java.util.Collections.emptyList();
msgType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DataDigest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DataDigest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
nonce_ = input.readUInt64();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
digests_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
digests_.add(input.readBytes());
break;
}
case 24: {
int rawValue = input.readEnum();
msgType_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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) != 0)) {
digests_ = java.util.Collections.unmodifiableList(digests_); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataDigest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataDigest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.DataDigest.class, org.hyperledger.fabric.protos.gossip.Message.DataDigest.Builder.class);
}
public static final int NONCE_FIELD_NUMBER = 1;
private long nonce_;
/**
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
public static final int DIGESTS_FIELD_NUMBER = 2;
private java.util.List digests_;
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @return A list containing the digests.
*/
@java.lang.Override
public java.util.List
getDigestsList() {
return digests_;
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @return The count of digests.
*/
public int getDigestsCount() {
return digests_.size();
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @param index The index of the element to return.
* @return The digests at the given index.
*/
public com.google.protobuf.ByteString getDigests(int index) {
return digests_.get(index);
}
public static final int MSG_TYPE_FIELD_NUMBER = 3;
private int msgType_;
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
@java.lang.Override public int getMsgTypeValue() {
return msgType_;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
@java.lang.Override public org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.PullMsgType result = org.hyperledger.fabric.protos.gossip.Message.PullMsgType.valueOf(msgType_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (nonce_ != 0L) {
output.writeUInt64(1, nonce_);
}
for (int i = 0; i < digests_.size(); i++) {
output.writeBytes(2, digests_.get(i));
}
if (msgType_ != org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNDEFINED.getNumber()) {
output.writeEnum(3, msgType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (nonce_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, nonce_);
}
{
int dataSize = 0;
for (int i = 0; i < digests_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(digests_.get(i));
}
size += dataSize;
size += 1 * getDigestsList().size();
}
if (msgType_ != org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNDEFINED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, msgType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.DataDigest)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.DataDigest other = (org.hyperledger.fabric.protos.gossip.Message.DataDigest) obj;
if (getNonce()
!= other.getNonce()) return false;
if (!getDigestsList()
.equals(other.getDigestsList())) return false;
if (msgType_ != other.msgType_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NONCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNonce());
if (getDigestsCount() > 0) {
hash = (37 * hash) + DIGESTS_FIELD_NUMBER;
hash = (53 * hash) + getDigestsList().hashCode();
}
hash = (37 * hash) + MSG_TYPE_FIELD_NUMBER;
hash = (53 * hash) + msgType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest 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.fabric.protos.gossip.Message.DataDigest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest 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.fabric.protos.gossip.Message.DataDigest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest 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.fabric.protos.gossip.Message.DataDigest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.DataDigest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* DataDigest is the message sent from the receiver peer
* to the initator peer and contains the data items it has
*
*
* Protobuf type {@code gossip.DataDigest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.DataDigest)
org.hyperledger.fabric.protos.gossip.Message.DataDigestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataDigest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataDigest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.DataDigest.class, org.hyperledger.fabric.protos.gossip.Message.DataDigest.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.DataDigest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
nonce_ = 0L;
digests_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
msgType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataDigest_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataDigest getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.DataDigest.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataDigest build() {
org.hyperledger.fabric.protos.gossip.Message.DataDigest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataDigest buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.DataDigest result = new org.hyperledger.fabric.protos.gossip.Message.DataDigest(this);
int from_bitField0_ = bitField0_;
result.nonce_ = nonce_;
if (((bitField0_ & 0x00000001) != 0)) {
digests_ = java.util.Collections.unmodifiableList(digests_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.digests_ = digests_;
result.msgType_ = msgType_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.DataDigest) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.DataDigest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.DataDigest other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.DataDigest.getDefaultInstance()) return this;
if (other.getNonce() != 0L) {
setNonce(other.getNonce());
}
if (!other.digests_.isEmpty()) {
if (digests_.isEmpty()) {
digests_ = other.digests_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDigestsIsMutable();
digests_.addAll(other.digests_);
}
onChanged();
}
if (other.msgType_ != 0) {
setMsgTypeValue(other.getMsgTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.DataDigest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.DataDigest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long nonce_ ;
/**
* uint64 nonce = 1;
* @return The nonce.
*/
@java.lang.Override
public long getNonce() {
return nonce_;
}
/**
* uint64 nonce = 1;
* @param value The nonce to set.
* @return This builder for chaining.
*/
public Builder setNonce(long value) {
nonce_ = value;
onChanged();
return this;
}
/**
* uint64 nonce = 1;
* @return This builder for chaining.
*/
public Builder clearNonce() {
nonce_ = 0L;
onChanged();
return this;
}
private java.util.List digests_ = java.util.Collections.emptyList();
private void ensureDigestsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
digests_ = new java.util.ArrayList(digests_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @return A list containing the digests.
*/
public java.util.List
getDigestsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(digests_) : digests_;
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @return The count of digests.
*/
public int getDigestsCount() {
return digests_.size();
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @param index The index of the element to return.
* @return The digests at the given index.
*/
public com.google.protobuf.ByteString getDigests(int index) {
return digests_.get(index);
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @param index The index to set the value at.
* @param value The digests to set.
* @return This builder for chaining.
*/
public Builder setDigests(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureDigestsIsMutable();
digests_.set(index, value);
onChanged();
return this;
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @param value The digests to add.
* @return This builder for chaining.
*/
public Builder addDigests(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureDigestsIsMutable();
digests_.add(value);
onChanged();
return this;
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @param values The digests to add.
* @return This builder for chaining.
*/
public Builder addAllDigests(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureDigestsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, digests_);
onChanged();
return this;
}
/**
*
* Maybe change this to bitmap later on
*
*
* repeated bytes digests = 2;
* @return This builder for chaining.
*/
public Builder clearDigests() {
digests_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private int msgType_ = 0;
/**
* .gossip.PullMsgType msg_type = 3;
* @return The enum numeric value on the wire for msgType.
*/
@java.lang.Override public int getMsgTypeValue() {
return msgType_;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @param value The enum numeric value on the wire for msgType to set.
* @return This builder for chaining.
*/
public Builder setMsgTypeValue(int value) {
msgType_ = value;
onChanged();
return this;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return The msgType.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PullMsgType getMsgType() {
@SuppressWarnings("deprecation")
org.hyperledger.fabric.protos.gossip.Message.PullMsgType result = org.hyperledger.fabric.protos.gossip.Message.PullMsgType.valueOf(msgType_);
return result == null ? org.hyperledger.fabric.protos.gossip.Message.PullMsgType.UNRECOGNIZED : result;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @param value The msgType to set.
* @return This builder for chaining.
*/
public Builder setMsgType(org.hyperledger.fabric.protos.gossip.Message.PullMsgType value) {
if (value == null) {
throw new NullPointerException();
}
msgType_ = value.getNumber();
onChanged();
return this;
}
/**
* .gossip.PullMsgType msg_type = 3;
* @return This builder for chaining.
*/
public Builder clearMsgType() {
msgType_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.DataDigest)
}
// @@protoc_insertion_point(class_scope:gossip.DataDigest)
private static final org.hyperledger.fabric.protos.gossip.Message.DataDigest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.DataDigest();
}
public static org.hyperledger.fabric.protos.gossip.Message.DataDigest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DataDigest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DataDigest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataDigest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DataMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.DataMessage)
com.google.protobuf.MessageOrBuilder {
/**
* .gossip.Payload payload = 1;
* @return Whether the payload field is set.
*/
boolean hasPayload();
/**
* .gossip.Payload payload = 1;
* @return The payload.
*/
org.hyperledger.fabric.protos.gossip.Message.Payload getPayload();
/**
* .gossip.Payload payload = 1;
*/
org.hyperledger.fabric.protos.gossip.Message.PayloadOrBuilder getPayloadOrBuilder();
}
/**
*
* DataMessage is the message that contains a block
*
*
* Protobuf type {@code gossip.DataMessage}
*/
public static final class DataMessage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.DataMessage)
DataMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use DataMessage.newBuilder() to construct.
private DataMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DataMessage() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DataMessage();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DataMessage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
org.hyperledger.fabric.protos.gossip.Message.Payload.Builder subBuilder = null;
if (payload_ != null) {
subBuilder = payload_.toBuilder();
}
payload_ = input.readMessage(org.hyperledger.fabric.protos.gossip.Message.Payload.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(payload_);
payload_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.DataMessage.class, org.hyperledger.fabric.protos.gossip.Message.DataMessage.Builder.class);
}
public static final int PAYLOAD_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.gossip.Message.Payload payload_;
/**
* .gossip.Payload payload = 1;
* @return Whether the payload field is set.
*/
@java.lang.Override
public boolean hasPayload() {
return payload_ != null;
}
/**
* .gossip.Payload payload = 1;
* @return The payload.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Payload getPayload() {
return payload_ == null ? org.hyperledger.fabric.protos.gossip.Message.Payload.getDefaultInstance() : payload_;
}
/**
* .gossip.Payload payload = 1;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PayloadOrBuilder getPayloadOrBuilder() {
return getPayload();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (payload_ != null) {
output.writeMessage(1, getPayload());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (payload_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getPayload());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.DataMessage)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.DataMessage other = (org.hyperledger.fabric.protos.gossip.Message.DataMessage) obj;
if (hasPayload() != other.hasPayload()) return false;
if (hasPayload()) {
if (!getPayload()
.equals(other.getPayload())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasPayload()) {
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage 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.fabric.protos.gossip.Message.DataMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage 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.fabric.protos.gossip.Message.DataMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage 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.fabric.protos.gossip.Message.DataMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.DataMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* DataMessage is the message that contains a block
*
*
* Protobuf type {@code gossip.DataMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.DataMessage)
org.hyperledger.fabric.protos.gossip.Message.DataMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.DataMessage.class, org.hyperledger.fabric.protos.gossip.Message.DataMessage.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.DataMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (payloadBuilder_ == null) {
payload_ = null;
} else {
payload_ = null;
payloadBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_DataMessage_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataMessage getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.DataMessage.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataMessage build() {
org.hyperledger.fabric.protos.gossip.Message.DataMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataMessage buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.DataMessage result = new org.hyperledger.fabric.protos.gossip.Message.DataMessage(this);
if (payloadBuilder_ == null) {
result.payload_ = payload_;
} else {
result.payload_ = payloadBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.DataMessage) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.DataMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.DataMessage other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.DataMessage.getDefaultInstance()) return this;
if (other.hasPayload()) {
mergePayload(other.getPayload());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.DataMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.DataMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.hyperledger.fabric.protos.gossip.Message.Payload payload_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.Payload, org.hyperledger.fabric.protos.gossip.Message.Payload.Builder, org.hyperledger.fabric.protos.gossip.Message.PayloadOrBuilder> payloadBuilder_;
/**
* .gossip.Payload payload = 1;
* @return Whether the payload field is set.
*/
public boolean hasPayload() {
return payloadBuilder_ != null || payload_ != null;
}
/**
* .gossip.Payload payload = 1;
* @return The payload.
*/
public org.hyperledger.fabric.protos.gossip.Message.Payload getPayload() {
if (payloadBuilder_ == null) {
return payload_ == null ? org.hyperledger.fabric.protos.gossip.Message.Payload.getDefaultInstance() : payload_;
} else {
return payloadBuilder_.getMessage();
}
}
/**
* .gossip.Payload payload = 1;
*/
public Builder setPayload(org.hyperledger.fabric.protos.gossip.Message.Payload value) {
if (payloadBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
} else {
payloadBuilder_.setMessage(value);
}
return this;
}
/**
* .gossip.Payload payload = 1;
*/
public Builder setPayload(
org.hyperledger.fabric.protos.gossip.Message.Payload.Builder builderForValue) {
if (payloadBuilder_ == null) {
payload_ = builderForValue.build();
onChanged();
} else {
payloadBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .gossip.Payload payload = 1;
*/
public Builder mergePayload(org.hyperledger.fabric.protos.gossip.Message.Payload value) {
if (payloadBuilder_ == null) {
if (payload_ != null) {
payload_ =
org.hyperledger.fabric.protos.gossip.Message.Payload.newBuilder(payload_).mergeFrom(value).buildPartial();
} else {
payload_ = value;
}
onChanged();
} else {
payloadBuilder_.mergeFrom(value);
}
return this;
}
/**
* .gossip.Payload payload = 1;
*/
public Builder clearPayload() {
if (payloadBuilder_ == null) {
payload_ = null;
onChanged();
} else {
payload_ = null;
payloadBuilder_ = null;
}
return this;
}
/**
* .gossip.Payload payload = 1;
*/
public org.hyperledger.fabric.protos.gossip.Message.Payload.Builder getPayloadBuilder() {
onChanged();
return getPayloadFieldBuilder().getBuilder();
}
/**
* .gossip.Payload payload = 1;
*/
public org.hyperledger.fabric.protos.gossip.Message.PayloadOrBuilder getPayloadOrBuilder() {
if (payloadBuilder_ != null) {
return payloadBuilder_.getMessageOrBuilder();
} else {
return payload_ == null ?
org.hyperledger.fabric.protos.gossip.Message.Payload.getDefaultInstance() : payload_;
}
}
/**
* .gossip.Payload payload = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.Payload, org.hyperledger.fabric.protos.gossip.Message.Payload.Builder, org.hyperledger.fabric.protos.gossip.Message.PayloadOrBuilder>
getPayloadFieldBuilder() {
if (payloadBuilder_ == null) {
payloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.Payload, org.hyperledger.fabric.protos.gossip.Message.Payload.Builder, org.hyperledger.fabric.protos.gossip.Message.PayloadOrBuilder>(
getPayload(),
getParentForChildren(),
isClean());
payload_ = null;
}
return payloadBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.DataMessage)
}
// @@protoc_insertion_point(class_scope:gossip.DataMessage)
private static final org.hyperledger.fabric.protos.gossip.Message.DataMessage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.DataMessage();
}
public static org.hyperledger.fabric.protos.gossip.Message.DataMessage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DataMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DataMessage(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.DataMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PrivateDataMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.PrivateDataMessage)
com.google.protobuf.MessageOrBuilder {
/**
* .gossip.PrivatePayload payload = 1;
* @return Whether the payload field is set.
*/
boolean hasPayload();
/**
* .gossip.PrivatePayload payload = 1;
* @return The payload.
*/
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload getPayload();
/**
* .gossip.PrivatePayload payload = 1;
*/
org.hyperledger.fabric.protos.gossip.Message.PrivatePayloadOrBuilder getPayloadOrBuilder();
}
/**
*
* PrivateDataMessage message which includes private
* data information to distributed once transaction
* has been endorsed
*
*
* Protobuf type {@code gossip.PrivateDataMessage}
*/
public static final class PrivateDataMessage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.PrivateDataMessage)
PrivateDataMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use PrivateDataMessage.newBuilder() to construct.
private PrivateDataMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PrivateDataMessage() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PrivateDataMessage();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PrivateDataMessage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.Builder subBuilder = null;
if (payload_ != null) {
subBuilder = payload_.toBuilder();
}
payload_ = input.readMessage(org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(payload_);
payload_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivateDataMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivateDataMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.class, org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.Builder.class);
}
public static final int PAYLOAD_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.gossip.Message.PrivatePayload payload_;
/**
* .gossip.PrivatePayload payload = 1;
* @return Whether the payload field is set.
*/
@java.lang.Override
public boolean hasPayload() {
return payload_ != null;
}
/**
* .gossip.PrivatePayload payload = 1;
* @return The payload.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayload getPayload() {
return payload_ == null ? org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.getDefaultInstance() : payload_;
}
/**
* .gossip.PrivatePayload payload = 1;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayloadOrBuilder getPayloadOrBuilder() {
return getPayload();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (payload_ != null) {
output.writeMessage(1, getPayload());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (payload_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getPayload());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage other = (org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) obj;
if (hasPayload() != other.hasPayload()) return false;
if (hasPayload()) {
if (!getPayload()
.equals(other.getPayload())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasPayload()) {
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage 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.fabric.protos.gossip.Message.PrivateDataMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage 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.fabric.protos.gossip.Message.PrivateDataMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage 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.fabric.protos.gossip.Message.PrivateDataMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* PrivateDataMessage message which includes private
* data information to distributed once transaction
* has been endorsed
*
*
* Protobuf type {@code gossip.PrivateDataMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.PrivateDataMessage)
org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivateDataMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivateDataMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.class, org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (payloadBuilder_ == null) {
payload_ = null;
} else {
payload_ = null;
payloadBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivateDataMessage_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage build() {
org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage result = new org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage(this);
if (payloadBuilder_ == null) {
result.payload_ = payload_;
} else {
result.payload_ = payloadBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage.getDefaultInstance()) return this;
if (other.hasPayload()) {
mergePayload(other.getPayload());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.hyperledger.fabric.protos.gossip.Message.PrivatePayload payload_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload, org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.Builder, org.hyperledger.fabric.protos.gossip.Message.PrivatePayloadOrBuilder> payloadBuilder_;
/**
* .gossip.PrivatePayload payload = 1;
* @return Whether the payload field is set.
*/
public boolean hasPayload() {
return payloadBuilder_ != null || payload_ != null;
}
/**
* .gossip.PrivatePayload payload = 1;
* @return The payload.
*/
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayload getPayload() {
if (payloadBuilder_ == null) {
return payload_ == null ? org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.getDefaultInstance() : payload_;
} else {
return payloadBuilder_.getMessage();
}
}
/**
* .gossip.PrivatePayload payload = 1;
*/
public Builder setPayload(org.hyperledger.fabric.protos.gossip.Message.PrivatePayload value) {
if (payloadBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
} else {
payloadBuilder_.setMessage(value);
}
return this;
}
/**
* .gossip.PrivatePayload payload = 1;
*/
public Builder setPayload(
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.Builder builderForValue) {
if (payloadBuilder_ == null) {
payload_ = builderForValue.build();
onChanged();
} else {
payloadBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .gossip.PrivatePayload payload = 1;
*/
public Builder mergePayload(org.hyperledger.fabric.protos.gossip.Message.PrivatePayload value) {
if (payloadBuilder_ == null) {
if (payload_ != null) {
payload_ =
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.newBuilder(payload_).mergeFrom(value).buildPartial();
} else {
payload_ = value;
}
onChanged();
} else {
payloadBuilder_.mergeFrom(value);
}
return this;
}
/**
* .gossip.PrivatePayload payload = 1;
*/
public Builder clearPayload() {
if (payloadBuilder_ == null) {
payload_ = null;
onChanged();
} else {
payload_ = null;
payloadBuilder_ = null;
}
return this;
}
/**
* .gossip.PrivatePayload payload = 1;
*/
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.Builder getPayloadBuilder() {
onChanged();
return getPayloadFieldBuilder().getBuilder();
}
/**
* .gossip.PrivatePayload payload = 1;
*/
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayloadOrBuilder getPayloadOrBuilder() {
if (payloadBuilder_ != null) {
return payloadBuilder_.getMessageOrBuilder();
} else {
return payload_ == null ?
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.getDefaultInstance() : payload_;
}
}
/**
* .gossip.PrivatePayload payload = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload, org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.Builder, org.hyperledger.fabric.protos.gossip.Message.PrivatePayloadOrBuilder>
getPayloadFieldBuilder() {
if (payloadBuilder_ == null) {
payloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload, org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.Builder, org.hyperledger.fabric.protos.gossip.Message.PrivatePayloadOrBuilder>(
getPayload(),
getParentForChildren(),
isClean());
payload_ = null;
}
return payloadBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.PrivateDataMessage)
}
// @@protoc_insertion_point(class_scope:gossip.PrivateDataMessage)
private static final org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage();
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PrivateDataMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PrivateDataMessage(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivateDataMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PayloadOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.Payload)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 seq_num = 1;
* @return The seqNum.
*/
long getSeqNum();
/**
* bytes data = 2;
* @return The data.
*/
com.google.protobuf.ByteString getData();
/**
* repeated bytes private_data = 3;
* @return A list containing the privateData.
*/
java.util.List getPrivateDataList();
/**
* repeated bytes private_data = 3;
* @return The count of privateData.
*/
int getPrivateDataCount();
/**
* repeated bytes private_data = 3;
* @param index The index of the element to return.
* @return The privateData at the given index.
*/
com.google.protobuf.ByteString getPrivateData(int index);
}
/**
*
* Payload contains a block
*
*
* Protobuf type {@code gossip.Payload}
*/
public static final class Payload extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.Payload)
PayloadOrBuilder {
private static final long serialVersionUID = 0L;
// Use Payload.newBuilder() to construct.
private Payload(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Payload() {
data_ = com.google.protobuf.ByteString.EMPTY;
privateData_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Payload();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Payload(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
seqNum_ = input.readUInt64();
break;
}
case 18: {
data_ = input.readBytes();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
privateData_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
privateData_.add(input.readBytes());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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) != 0)) {
privateData_ = java.util.Collections.unmodifiableList(privateData_); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Payload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Payload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.Payload.class, org.hyperledger.fabric.protos.gossip.Message.Payload.Builder.class);
}
public static final int SEQ_NUM_FIELD_NUMBER = 1;
private long seqNum_;
/**
* uint64 seq_num = 1;
* @return The seqNum.
*/
@java.lang.Override
public long getSeqNum() {
return seqNum_;
}
public static final int DATA_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString data_;
/**
* bytes data = 2;
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
public static final int PRIVATE_DATA_FIELD_NUMBER = 3;
private java.util.List privateData_;
/**
* repeated bytes private_data = 3;
* @return A list containing the privateData.
*/
@java.lang.Override
public java.util.List
getPrivateDataList() {
return privateData_;
}
/**
* repeated bytes private_data = 3;
* @return The count of privateData.
*/
public int getPrivateDataCount() {
return privateData_.size();
}
/**
* repeated bytes private_data = 3;
* @param index The index of the element to return.
* @return The privateData at the given index.
*/
public com.google.protobuf.ByteString getPrivateData(int index) {
return privateData_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (seqNum_ != 0L) {
output.writeUInt64(1, seqNum_);
}
if (!data_.isEmpty()) {
output.writeBytes(2, data_);
}
for (int i = 0; i < privateData_.size(); i++) {
output.writeBytes(3, privateData_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (seqNum_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, seqNum_);
}
if (!data_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, data_);
}
{
int dataSize = 0;
for (int i = 0; i < privateData_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(privateData_.get(i));
}
size += dataSize;
size += 1 * getPrivateDataList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.Payload)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.Payload other = (org.hyperledger.fabric.protos.gossip.Message.Payload) obj;
if (getSeqNum()
!= other.getSeqNum()) return false;
if (!getData()
.equals(other.getData())) return false;
if (!getPrivateDataList()
.equals(other.getPrivateDataList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SEQ_NUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSeqNum());
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
if (getPrivateDataCount() > 0) {
hash = (37 * hash) + PRIVATE_DATA_FIELD_NUMBER;
hash = (53 * hash) + getPrivateDataList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload 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.fabric.protos.gossip.Message.Payload parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload 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.fabric.protos.gossip.Message.Payload parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload 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.fabric.protos.gossip.Message.Payload parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.Payload prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* Payload contains a block
*
*
* Protobuf type {@code gossip.Payload}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.Payload)
org.hyperledger.fabric.protos.gossip.Message.PayloadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Payload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Payload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.Payload.class, org.hyperledger.fabric.protos.gossip.Message.Payload.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.Payload.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
seqNum_ = 0L;
data_ = com.google.protobuf.ByteString.EMPTY;
privateData_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_Payload_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Payload getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.Payload.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Payload build() {
org.hyperledger.fabric.protos.gossip.Message.Payload result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Payload buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.Payload result = new org.hyperledger.fabric.protos.gossip.Message.Payload(this);
int from_bitField0_ = bitField0_;
result.seqNum_ = seqNum_;
result.data_ = data_;
if (((bitField0_ & 0x00000001) != 0)) {
privateData_ = java.util.Collections.unmodifiableList(privateData_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.privateData_ = privateData_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.Payload) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.Payload)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.Payload other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.Payload.getDefaultInstance()) return this;
if (other.getSeqNum() != 0L) {
setSeqNum(other.getSeqNum());
}
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
if (!other.privateData_.isEmpty()) {
if (privateData_.isEmpty()) {
privateData_ = other.privateData_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePrivateDataIsMutable();
privateData_.addAll(other.privateData_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.Payload parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.Payload) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long seqNum_ ;
/**
* uint64 seq_num = 1;
* @return The seqNum.
*/
@java.lang.Override
public long getSeqNum() {
return seqNum_;
}
/**
* uint64 seq_num = 1;
* @param value The seqNum to set.
* @return This builder for chaining.
*/
public Builder setSeqNum(long value) {
seqNum_ = value;
onChanged();
return this;
}
/**
* uint64 seq_num = 1;
* @return This builder for chaining.
*/
public Builder clearSeqNum() {
seqNum_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes data = 2;
* @return The data.
*/
@java.lang.Override
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
* bytes data = 2;
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
* bytes data = 2;
* @return This builder for chaining.
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
private java.util.List privateData_ = java.util.Collections.emptyList();
private void ensurePrivateDataIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
privateData_ = new java.util.ArrayList(privateData_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated bytes private_data = 3;
* @return A list containing the privateData.
*/
public java.util.List
getPrivateDataList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(privateData_) : privateData_;
}
/**
* repeated bytes private_data = 3;
* @return The count of privateData.
*/
public int getPrivateDataCount() {
return privateData_.size();
}
/**
* repeated bytes private_data = 3;
* @param index The index of the element to return.
* @return The privateData at the given index.
*/
public com.google.protobuf.ByteString getPrivateData(int index) {
return privateData_.get(index);
}
/**
* repeated bytes private_data = 3;
* @param index The index to set the value at.
* @param value The privateData to set.
* @return This builder for chaining.
*/
public Builder setPrivateData(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensurePrivateDataIsMutable();
privateData_.set(index, value);
onChanged();
return this;
}
/**
* repeated bytes private_data = 3;
* @param value The privateData to add.
* @return This builder for chaining.
*/
public Builder addPrivateData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensurePrivateDataIsMutable();
privateData_.add(value);
onChanged();
return this;
}
/**
* repeated bytes private_data = 3;
* @param values The privateData to add.
* @return This builder for chaining.
*/
public Builder addAllPrivateData(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensurePrivateDataIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, privateData_);
onChanged();
return this;
}
/**
* repeated bytes private_data = 3;
* @return This builder for chaining.
*/
public Builder clearPrivateData() {
privateData_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.Payload)
}
// @@protoc_insertion_point(class_scope:gossip.Payload)
private static final org.hyperledger.fabric.protos.gossip.Message.Payload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.Payload();
}
public static org.hyperledger.fabric.protos.gossip.Message.Payload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Payload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Payload(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Payload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PrivatePayloadOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.PrivatePayload)
com.google.protobuf.MessageOrBuilder {
/**
* string collection_name = 1;
* @return The collectionName.
*/
java.lang.String getCollectionName();
/**
* string collection_name = 1;
* @return The bytes for collectionName.
*/
com.google.protobuf.ByteString
getCollectionNameBytes();
/**
* string namespace = 2;
* @return The namespace.
*/
java.lang.String getNamespace();
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
com.google.protobuf.ByteString
getNamespaceBytes();
/**
* string tx_id = 3;
* @return The txId.
*/
java.lang.String getTxId();
/**
* string tx_id = 3;
* @return The bytes for txId.
*/
com.google.protobuf.ByteString
getTxIdBytes();
/**
* bytes private_rwset = 4;
* @return The privateRwset.
*/
com.google.protobuf.ByteString getPrivateRwset();
/**
* uint64 private_sim_height = 5;
* @return The privateSimHeight.
*/
long getPrivateSimHeight();
/**
* .protos.CollectionConfigPackage collection_configs = 6;
* @return Whether the collectionConfigs field is set.
*/
boolean hasCollectionConfigs();
/**
* .protos.CollectionConfigPackage collection_configs = 6;
* @return The collectionConfigs.
*/
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage getCollectionConfigs();
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackageOrBuilder getCollectionConfigsOrBuilder();
}
/**
*
* PrivatePayload payload to encapsulate private
* data with collection name to enable routing
* based on collection partitioning
*
*
* Protobuf type {@code gossip.PrivatePayload}
*/
public static final class PrivatePayload extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.PrivatePayload)
PrivatePayloadOrBuilder {
private static final long serialVersionUID = 0L;
// Use PrivatePayload.newBuilder() to construct.
private PrivatePayload(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PrivatePayload() {
collectionName_ = "";
namespace_ = "";
txId_ = "";
privateRwset_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PrivatePayload();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PrivatePayload(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
collectionName_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
namespace_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
txId_ = s;
break;
}
case 34: {
privateRwset_ = input.readBytes();
break;
}
case 40: {
privateSimHeight_ = input.readUInt64();
break;
}
case 50: {
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.Builder subBuilder = null;
if (collectionConfigs_ != null) {
subBuilder = collectionConfigs_.toBuilder();
}
collectionConfigs_ = input.readMessage(org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(collectionConfigs_);
collectionConfigs_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivatePayload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivatePayload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.class, org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.Builder.class);
}
public static final int COLLECTION_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object collectionName_;
/**
* string collection_name = 1;
* @return The collectionName.
*/
@java.lang.Override
public java.lang.String getCollectionName() {
java.lang.Object ref = collectionName_;
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();
collectionName_ = s;
return s;
}
}
/**
* string collection_name = 1;
* @return The bytes for collectionName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCollectionNameBytes() {
java.lang.Object ref = collectionName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
collectionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAMESPACE_FIELD_NUMBER = 2;
private volatile java.lang.Object namespace_;
/**
* string namespace = 2;
* @return The namespace.
*/
@java.lang.Override
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
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();
namespace_ = s;
return s;
}
}
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TX_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object txId_;
/**
* string tx_id = 3;
* @return The txId.
*/
@java.lang.Override
public java.lang.String getTxId() {
java.lang.Object ref = txId_;
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();
txId_ = s;
return s;
}
}
/**
* string tx_id = 3;
* @return The bytes for txId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTxIdBytes() {
java.lang.Object ref = txId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
txId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRIVATE_RWSET_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString privateRwset_;
/**
* bytes private_rwset = 4;
* @return The privateRwset.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPrivateRwset() {
return privateRwset_;
}
public static final int PRIVATE_SIM_HEIGHT_FIELD_NUMBER = 5;
private long privateSimHeight_;
/**
* uint64 private_sim_height = 5;
* @return The privateSimHeight.
*/
@java.lang.Override
public long getPrivateSimHeight() {
return privateSimHeight_;
}
public static final int COLLECTION_CONFIGS_FIELD_NUMBER = 6;
private org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage collectionConfigs_;
/**
* .protos.CollectionConfigPackage collection_configs = 6;
* @return Whether the collectionConfigs field is set.
*/
@java.lang.Override
public boolean hasCollectionConfigs() {
return collectionConfigs_ != null;
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
* @return The collectionConfigs.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage getCollectionConfigs() {
return collectionConfigs_ == null ? org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.getDefaultInstance() : collectionConfigs_;
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackageOrBuilder getCollectionConfigsOrBuilder() {
return getCollectionConfigs();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getCollectionNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, collectionName_);
}
if (!getNamespaceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_);
}
if (!getTxIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, txId_);
}
if (!privateRwset_.isEmpty()) {
output.writeBytes(4, privateRwset_);
}
if (privateSimHeight_ != 0L) {
output.writeUInt64(5, privateSimHeight_);
}
if (collectionConfigs_ != null) {
output.writeMessage(6, getCollectionConfigs());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCollectionNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, collectionName_);
}
if (!getNamespaceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_);
}
if (!getTxIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, txId_);
}
if (!privateRwset_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, privateRwset_);
}
if (privateSimHeight_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, privateSimHeight_);
}
if (collectionConfigs_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getCollectionConfigs());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.PrivatePayload)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload other = (org.hyperledger.fabric.protos.gossip.Message.PrivatePayload) obj;
if (!getCollectionName()
.equals(other.getCollectionName())) return false;
if (!getNamespace()
.equals(other.getNamespace())) return false;
if (!getTxId()
.equals(other.getTxId())) return false;
if (!getPrivateRwset()
.equals(other.getPrivateRwset())) return false;
if (getPrivateSimHeight()
!= other.getPrivateSimHeight()) return false;
if (hasCollectionConfigs() != other.hasCollectionConfigs()) return false;
if (hasCollectionConfigs()) {
if (!getCollectionConfigs()
.equals(other.getCollectionConfigs())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + COLLECTION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getCollectionName().hashCode();
hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getNamespace().hashCode();
hash = (37 * hash) + TX_ID_FIELD_NUMBER;
hash = (53 * hash) + getTxId().hashCode();
hash = (37 * hash) + PRIVATE_RWSET_FIELD_NUMBER;
hash = (53 * hash) + getPrivateRwset().hashCode();
hash = (37 * hash) + PRIVATE_SIM_HEIGHT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getPrivateSimHeight());
if (hasCollectionConfigs()) {
hash = (37 * hash) + COLLECTION_CONFIGS_FIELD_NUMBER;
hash = (53 * hash) + getCollectionConfigs().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload 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.fabric.protos.gossip.Message.PrivatePayload parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload 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.fabric.protos.gossip.Message.PrivatePayload parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload 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.fabric.protos.gossip.Message.PrivatePayload parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.PrivatePayload prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* PrivatePayload payload to encapsulate private
* data with collection name to enable routing
* based on collection partitioning
*
*
* Protobuf type {@code gossip.PrivatePayload}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.PrivatePayload)
org.hyperledger.fabric.protos.gossip.Message.PrivatePayloadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivatePayload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivatePayload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.class, org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
collectionName_ = "";
namespace_ = "";
txId_ = "";
privateRwset_ = com.google.protobuf.ByteString.EMPTY;
privateSimHeight_ = 0L;
if (collectionConfigsBuilder_ == null) {
collectionConfigs_ = null;
} else {
collectionConfigs_ = null;
collectionConfigsBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_PrivatePayload_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayload getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayload build() {
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayload buildPartial() {
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload result = new org.hyperledger.fabric.protos.gossip.Message.PrivatePayload(this);
result.collectionName_ = collectionName_;
result.namespace_ = namespace_;
result.txId_ = txId_;
result.privateRwset_ = privateRwset_;
result.privateSimHeight_ = privateSimHeight_;
if (collectionConfigsBuilder_ == null) {
result.collectionConfigs_ = collectionConfigs_;
} else {
result.collectionConfigs_ = collectionConfigsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.Message.PrivatePayload) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.Message.PrivatePayload)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.Message.PrivatePayload other) {
if (other == org.hyperledger.fabric.protos.gossip.Message.PrivatePayload.getDefaultInstance()) return this;
if (!other.getCollectionName().isEmpty()) {
collectionName_ = other.collectionName_;
onChanged();
}
if (!other.getNamespace().isEmpty()) {
namespace_ = other.namespace_;
onChanged();
}
if (!other.getTxId().isEmpty()) {
txId_ = other.txId_;
onChanged();
}
if (other.getPrivateRwset() != com.google.protobuf.ByteString.EMPTY) {
setPrivateRwset(other.getPrivateRwset());
}
if (other.getPrivateSimHeight() != 0L) {
setPrivateSimHeight(other.getPrivateSimHeight());
}
if (other.hasCollectionConfigs()) {
mergeCollectionConfigs(other.getCollectionConfigs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.hyperledger.fabric.protos.gossip.Message.PrivatePayload parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.hyperledger.fabric.protos.gossip.Message.PrivatePayload) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object collectionName_ = "";
/**
* string collection_name = 1;
* @return The collectionName.
*/
public java.lang.String getCollectionName() {
java.lang.Object ref = collectionName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
collectionName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string collection_name = 1;
* @return The bytes for collectionName.
*/
public com.google.protobuf.ByteString
getCollectionNameBytes() {
java.lang.Object ref = collectionName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
collectionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string collection_name = 1;
* @param value The collectionName to set.
* @return This builder for chaining.
*/
public Builder setCollectionName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collectionName_ = value;
onChanged();
return this;
}
/**
* string collection_name = 1;
* @return This builder for chaining.
*/
public Builder clearCollectionName() {
collectionName_ = getDefaultInstance().getCollectionName();
onChanged();
return this;
}
/**
* string collection_name = 1;
* @param value The bytes for collectionName to set.
* @return This builder for chaining.
*/
public Builder setCollectionNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collectionName_ = value;
onChanged();
return this;
}
private java.lang.Object namespace_ = "";
/**
* string namespace = 2;
* @return The namespace.
*/
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string namespace = 2;
* @param value The namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
namespace_ = value;
onChanged();
return this;
}
/**
* string namespace = 2;
* @return This builder for chaining.
*/
public Builder clearNamespace() {
namespace_ = getDefaultInstance().getNamespace();
onChanged();
return this;
}
/**
* string namespace = 2;
* @param value The bytes for namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
namespace_ = value;
onChanged();
return this;
}
private java.lang.Object txId_ = "";
/**
* string tx_id = 3;
* @return The txId.
*/
public java.lang.String getTxId() {
java.lang.Object ref = txId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
txId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string tx_id = 3;
* @return The bytes for txId.
*/
public com.google.protobuf.ByteString
getTxIdBytes() {
java.lang.Object ref = txId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
txId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string tx_id = 3;
* @param value The txId to set.
* @return This builder for chaining.
*/
public Builder setTxId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
txId_ = value;
onChanged();
return this;
}
/**
* string tx_id = 3;
* @return This builder for chaining.
*/
public Builder clearTxId() {
txId_ = getDefaultInstance().getTxId();
onChanged();
return this;
}
/**
* string tx_id = 3;
* @param value The bytes for txId to set.
* @return This builder for chaining.
*/
public Builder setTxIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
txId_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString privateRwset_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes private_rwset = 4;
* @return The privateRwset.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPrivateRwset() {
return privateRwset_;
}
/**
* bytes private_rwset = 4;
* @param value The privateRwset to set.
* @return This builder for chaining.
*/
public Builder setPrivateRwset(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
privateRwset_ = value;
onChanged();
return this;
}
/**
* bytes private_rwset = 4;
* @return This builder for chaining.
*/
public Builder clearPrivateRwset() {
privateRwset_ = getDefaultInstance().getPrivateRwset();
onChanged();
return this;
}
private long privateSimHeight_ ;
/**
* uint64 private_sim_height = 5;
* @return The privateSimHeight.
*/
@java.lang.Override
public long getPrivateSimHeight() {
return privateSimHeight_;
}
/**
* uint64 private_sim_height = 5;
* @param value The privateSimHeight to set.
* @return This builder for chaining.
*/
public Builder setPrivateSimHeight(long value) {
privateSimHeight_ = value;
onChanged();
return this;
}
/**
* uint64 private_sim_height = 5;
* @return This builder for chaining.
*/
public Builder clearPrivateSimHeight() {
privateSimHeight_ = 0L;
onChanged();
return this;
}
private org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage collectionConfigs_;
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage, org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.Builder, org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackageOrBuilder> collectionConfigsBuilder_;
/**
* .protos.CollectionConfigPackage collection_configs = 6;
* @return Whether the collectionConfigs field is set.
*/
public boolean hasCollectionConfigs() {
return collectionConfigsBuilder_ != null || collectionConfigs_ != null;
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
* @return The collectionConfigs.
*/
public org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage getCollectionConfigs() {
if (collectionConfigsBuilder_ == null) {
return collectionConfigs_ == null ? org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.getDefaultInstance() : collectionConfigs_;
} else {
return collectionConfigsBuilder_.getMessage();
}
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
public Builder setCollectionConfigs(org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage value) {
if (collectionConfigsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
collectionConfigs_ = value;
onChanged();
} else {
collectionConfigsBuilder_.setMessage(value);
}
return this;
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
public Builder setCollectionConfigs(
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.Builder builderForValue) {
if (collectionConfigsBuilder_ == null) {
collectionConfigs_ = builderForValue.build();
onChanged();
} else {
collectionConfigsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
public Builder mergeCollectionConfigs(org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage value) {
if (collectionConfigsBuilder_ == null) {
if (collectionConfigs_ != null) {
collectionConfigs_ =
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.newBuilder(collectionConfigs_).mergeFrom(value).buildPartial();
} else {
collectionConfigs_ = value;
}
onChanged();
} else {
collectionConfigsBuilder_.mergeFrom(value);
}
return this;
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
public Builder clearCollectionConfigs() {
if (collectionConfigsBuilder_ == null) {
collectionConfigs_ = null;
onChanged();
} else {
collectionConfigs_ = null;
collectionConfigsBuilder_ = null;
}
return this;
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
public org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.Builder getCollectionConfigsBuilder() {
onChanged();
return getCollectionConfigsFieldBuilder().getBuilder();
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
public org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackageOrBuilder getCollectionConfigsOrBuilder() {
if (collectionConfigsBuilder_ != null) {
return collectionConfigsBuilder_.getMessageOrBuilder();
} else {
return collectionConfigs_ == null ?
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.getDefaultInstance() : collectionConfigs_;
}
}
/**
* .protos.CollectionConfigPackage collection_configs = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage, org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.Builder, org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackageOrBuilder>
getCollectionConfigsFieldBuilder() {
if (collectionConfigsBuilder_ == null) {
collectionConfigsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage, org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage.Builder, org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackageOrBuilder>(
getCollectionConfigs(),
getParentForChildren(),
isClean());
collectionConfigs_ = null;
}
return collectionConfigsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:gossip.PrivatePayload)
}
// @@protoc_insertion_point(class_scope:gossip.PrivatePayload)
private static final org.hyperledger.fabric.protos.gossip.Message.PrivatePayload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.Message.PrivatePayload();
}
public static org.hyperledger.fabric.protos.gossip.Message.PrivatePayload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PrivatePayload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PrivatePayload(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PrivatePayload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AliveMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:gossip.AliveMessage)
com.google.protobuf.MessageOrBuilder {
/**
* .gossip.Member membership = 1;
* @return Whether the membership field is set.
*/
boolean hasMembership();
/**
* .gossip.Member membership = 1;
* @return The membership.
*/
org.hyperledger.fabric.protos.gossip.Message.Member getMembership();
/**
* .gossip.Member membership = 1;
*/
org.hyperledger.fabric.protos.gossip.Message.MemberOrBuilder getMembershipOrBuilder();
/**
* .gossip.PeerTime timestamp = 2;
* @return Whether the timestamp field is set.
*/
boolean hasTimestamp();
/**
* .gossip.PeerTime timestamp = 2;
* @return The timestamp.
*/
org.hyperledger.fabric.protos.gossip.Message.PeerTime getTimestamp();
/**
* .gossip.PeerTime timestamp = 2;
*/
org.hyperledger.fabric.protos.gossip.Message.PeerTimeOrBuilder getTimestampOrBuilder();
/**
* bytes identity = 4;
* @return The identity.
*/
com.google.protobuf.ByteString getIdentity();
}
/**
*
* AliveMessage is sent to inform remote peers
* of a peer's existence and activity
*
*
* Protobuf type {@code gossip.AliveMessage}
*/
public static final class AliveMessage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:gossip.AliveMessage)
AliveMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use AliveMessage.newBuilder() to construct.
private AliveMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AliveMessage() {
identity_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AliveMessage();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AliveMessage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
org.hyperledger.fabric.protos.gossip.Message.Member.Builder subBuilder = null;
if (membership_ != null) {
subBuilder = membership_.toBuilder();
}
membership_ = input.readMessage(org.hyperledger.fabric.protos.gossip.Message.Member.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(membership_);
membership_ = subBuilder.buildPartial();
}
break;
}
case 18: {
org.hyperledger.fabric.protos.gossip.Message.PeerTime.Builder subBuilder = null;
if (timestamp_ != null) {
subBuilder = timestamp_.toBuilder();
}
timestamp_ = input.readMessage(org.hyperledger.fabric.protos.gossip.Message.PeerTime.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timestamp_);
timestamp_ = subBuilder.buildPartial();
}
break;
}
case 34: {
identity_ = input.readBytes();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_AliveMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.Message.internal_static_gossip_AliveMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.Message.AliveMessage.class, org.hyperledger.fabric.protos.gossip.Message.AliveMessage.Builder.class);
}
public static final int MEMBERSHIP_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.gossip.Message.Member membership_;
/**
* .gossip.Member membership = 1;
* @return Whether the membership field is set.
*/
@java.lang.Override
public boolean hasMembership() {
return membership_ != null;
}
/**
* .gossip.Member membership = 1;
* @return The membership.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.Member getMembership() {
return membership_ == null ? org.hyperledger.fabric.protos.gossip.Message.Member.getDefaultInstance() : membership_;
}
/**
* .gossip.Member membership = 1;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.MemberOrBuilder getMembershipOrBuilder() {
return getMembership();
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private org.hyperledger.fabric.protos.gossip.Message.PeerTime timestamp_;
/**
* .gossip.PeerTime timestamp = 2;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return timestamp_ != null;
}
/**
* .gossip.PeerTime timestamp = 2;
* @return The timestamp.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PeerTime getTimestamp() {
return timestamp_ == null ? org.hyperledger.fabric.protos.gossip.Message.PeerTime.getDefaultInstance() : timestamp_;
}
/**
* .gossip.PeerTime timestamp = 2;
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Message.PeerTimeOrBuilder getTimestampOrBuilder() {
return getTimestamp();
}
public static final int IDENTITY_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString identity_;
/**
* bytes identity = 4;
* @return The identity.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIdentity() {
return identity_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (membership_ != null) {
output.writeMessage(1, getMembership());
}
if (timestamp_ != null) {
output.writeMessage(2, getTimestamp());
}
if (!identity_.isEmpty()) {
output.writeBytes(4, identity_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (membership_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getMembership());
}
if (timestamp_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTimestamp());
}
if (!identity_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, identity_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.hyperledger.fabric.protos.gossip.Message.AliveMessage)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.Message.AliveMessage other = (org.hyperledger.fabric.protos.gossip.Message.AliveMessage) obj;
if (hasMembership() != other.hasMembership()) return false;
if (hasMembership()) {
if (!getMembership()
.equals(other.getMembership())) return false;
}
if (hasTimestamp() != other.hasTimestamp()) return false;
if (hasTimestamp()) {
if (!getTimestamp()
.equals(other.getTimestamp())) return false;
}
if (!getIdentity()
.equals(other.getIdentity())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMembership()) {
hash = (37 * hash) + MEMBERSHIP_FIELD_NUMBER;
hash = (53 * hash) + getMembership().hashCode();
}
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getTimestamp().hashCode();
}
hash = (37 * hash) + IDENTITY_FIELD_NUMBER;
hash = (53 * hash) + getIdentity().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage 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.fabric.protos.gossip.Message.AliveMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage 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.fabric.protos.gossip.Message.AliveMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage 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.fabric.protos.gossip.Message.AliveMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.Message.AliveMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.hyperledger.fabric.protos.gossip.Message.AliveMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* AliveMessage is sent to inform remote peers
* of a peer's existence and activity
*