org.hyperledger.fabric.protos.gossip.MembershipRequest Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: gossip/message.proto
// Protobuf Java Version: 4.28.2
package org.hyperledger.fabric.protos.gossip;
/**
*
* MembershipRequest is used to ask membership information
* from a remote peer
*
*
* Protobuf type {@code gossip.MembershipRequest}
*/
public final class MembershipRequest extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:gossip.MembershipRequest)
MembershipRequestOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 2,
/* suffix= */ "",
MembershipRequest.class.getName());
}
// Use MembershipRequest.newBuilder() to construct.
private MembershipRequest(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private MembershipRequest() {
known_ = emptyList(com.google.protobuf.ByteString.class);
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_MembershipRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_MembershipRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.MembershipRequest.class, org.hyperledger.fabric.protos.gossip.MembershipRequest.Builder.class);
}
private int bitField0_;
public static final int SELF_INFORMATION_FIELD_NUMBER = 1;
private org.hyperledger.fabric.protos.gossip.Envelope selfInformation_;
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
* @return Whether the selfInformation field is set.
*/
@java.lang.Override
public boolean hasSelfInformation() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
* @return The selfInformation.
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.Envelope getSelfInformation() {
return selfInformation_ == null ? org.hyperledger.fabric.protos.gossip.Envelope.getDefaultInstance() : selfInformation_;
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
*/
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.EnvelopeOrBuilder getSelfInformationOrBuilder() {
return selfInformation_ == null ? org.hyperledger.fabric.protos.gossip.Envelope.getDefaultInstance() : selfInformation_;
}
public static final int KNOWN_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.ProtobufList known_ =
emptyList(com.google.protobuf.ByteString.class);
/**
* repeated bytes known = 2 [json_name = "known"];
* @return A list containing the known.
*/
@java.lang.Override
public java.util.List
getKnownList() {
return known_;
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @return The count of known.
*/
public int getKnownCount() {
return known_.size();
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @param index The index of the element to return.
* @return The known at the given index.
*/
public com.google.protobuf.ByteString getKnown(int index) {
return known_.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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getSelfInformation());
}
for (int i = 0; i < known_.size(); i++) {
output.writeBytes(2, known_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getSelfInformation());
}
{
int dataSize = 0;
for (int i = 0; i < known_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(known_.get(i));
}
size += dataSize;
size += 1 * getKnownList().size();
}
size += getUnknownFields().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.MembershipRequest)) {
return super.equals(obj);
}
org.hyperledger.fabric.protos.gossip.MembershipRequest other = (org.hyperledger.fabric.protos.gossip.MembershipRequest) obj;
if (hasSelfInformation() != other.hasSelfInformation()) return false;
if (hasSelfInformation()) {
if (!getSelfInformation()
.equals(other.getSelfInformation())) return false;
}
if (!getKnownList()
.equals(other.getKnownList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasSelfInformation()) {
hash = (37 * hash) + SELF_INFORMATION_FIELD_NUMBER;
hash = (53 * hash) + getSelfInformation().hashCode();
}
if (getKnownCount() > 0) {
hash = (37 * hash) + KNOWN_FIELD_NUMBER;
hash = (53 * hash) + getKnownList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest 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.MembershipRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest 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.MembershipRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest 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.MembershipRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.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.MembershipRequest 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.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* MembershipRequest is used to ask membership information
* from a remote peer
*
*
* Protobuf type {@code gossip.MembershipRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:gossip.MembershipRequest)
org.hyperledger.fabric.protos.gossip.MembershipRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_MembershipRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_MembershipRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.hyperledger.fabric.protos.gossip.MembershipRequest.class, org.hyperledger.fabric.protos.gossip.MembershipRequest.Builder.class);
}
// Construct using org.hyperledger.fabric.protos.gossip.MembershipRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getSelfInformationFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
selfInformation_ = null;
if (selfInformationBuilder_ != null) {
selfInformationBuilder_.dispose();
selfInformationBuilder_ = null;
}
known_ = emptyList(com.google.protobuf.ByteString.class);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_MembershipRequest_descriptor;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.MembershipRequest getDefaultInstanceForType() {
return org.hyperledger.fabric.protos.gossip.MembershipRequest.getDefaultInstance();
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.MembershipRequest build() {
org.hyperledger.fabric.protos.gossip.MembershipRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.hyperledger.fabric.protos.gossip.MembershipRequest buildPartial() {
org.hyperledger.fabric.protos.gossip.MembershipRequest result = new org.hyperledger.fabric.protos.gossip.MembershipRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.hyperledger.fabric.protos.gossip.MembershipRequest result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.selfInformation_ = selfInformationBuilder_ == null
? selfInformation_
: selfInformationBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
known_.makeImmutable();
result.known_ = known_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.hyperledger.fabric.protos.gossip.MembershipRequest) {
return mergeFrom((org.hyperledger.fabric.protos.gossip.MembershipRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.MembershipRequest other) {
if (other == org.hyperledger.fabric.protos.gossip.MembershipRequest.getDefaultInstance()) return this;
if (other.hasSelfInformation()) {
mergeSelfInformation(other.getSelfInformation());
}
if (!other.known_.isEmpty()) {
if (known_.isEmpty()) {
known_ = other.known_;
known_.makeImmutable();
bitField0_ |= 0x00000002;
} else {
ensureKnownIsMutable();
known_.addAll(other.known_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getSelfInformationFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.ByteString v = input.readBytes();
ensureKnownIsMutable();
known_.add(v);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private org.hyperledger.fabric.protos.gossip.Envelope selfInformation_;
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.gossip.Envelope, org.hyperledger.fabric.protos.gossip.Envelope.Builder, org.hyperledger.fabric.protos.gossip.EnvelopeOrBuilder> selfInformationBuilder_;
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
* @return Whether the selfInformation field is set.
*/
public boolean hasSelfInformation() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
* @return The selfInformation.
*/
public org.hyperledger.fabric.protos.gossip.Envelope getSelfInformation() {
if (selfInformationBuilder_ == null) {
return selfInformation_ == null ? org.hyperledger.fabric.protos.gossip.Envelope.getDefaultInstance() : selfInformation_;
} else {
return selfInformationBuilder_.getMessage();
}
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
*/
public Builder setSelfInformation(org.hyperledger.fabric.protos.gossip.Envelope value) {
if (selfInformationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
selfInformation_ = value;
} else {
selfInformationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
*/
public Builder setSelfInformation(
org.hyperledger.fabric.protos.gossip.Envelope.Builder builderForValue) {
if (selfInformationBuilder_ == null) {
selfInformation_ = builderForValue.build();
} else {
selfInformationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
*/
public Builder mergeSelfInformation(org.hyperledger.fabric.protos.gossip.Envelope value) {
if (selfInformationBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
selfInformation_ != null &&
selfInformation_ != org.hyperledger.fabric.protos.gossip.Envelope.getDefaultInstance()) {
getSelfInformationBuilder().mergeFrom(value);
} else {
selfInformation_ = value;
}
} else {
selfInformationBuilder_.mergeFrom(value);
}
if (selfInformation_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
*/
public Builder clearSelfInformation() {
bitField0_ = (bitField0_ & ~0x00000001);
selfInformation_ = null;
if (selfInformationBuilder_ != null) {
selfInformationBuilder_.dispose();
selfInformationBuilder_ = null;
}
onChanged();
return this;
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
*/
public org.hyperledger.fabric.protos.gossip.Envelope.Builder getSelfInformationBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getSelfInformationFieldBuilder().getBuilder();
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
*/
public org.hyperledger.fabric.protos.gossip.EnvelopeOrBuilder getSelfInformationOrBuilder() {
if (selfInformationBuilder_ != null) {
return selfInformationBuilder_.getMessageOrBuilder();
} else {
return selfInformation_ == null ?
org.hyperledger.fabric.protos.gossip.Envelope.getDefaultInstance() : selfInformation_;
}
}
/**
* .gossip.Envelope self_information = 1 [json_name = "selfInformation"];
*/
private com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.gossip.Envelope, org.hyperledger.fabric.protos.gossip.Envelope.Builder, org.hyperledger.fabric.protos.gossip.EnvelopeOrBuilder>
getSelfInformationFieldBuilder() {
if (selfInformationBuilder_ == null) {
selfInformationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.hyperledger.fabric.protos.gossip.Envelope, org.hyperledger.fabric.protos.gossip.Envelope.Builder, org.hyperledger.fabric.protos.gossip.EnvelopeOrBuilder>(
getSelfInformation(),
getParentForChildren(),
isClean());
selfInformation_ = null;
}
return selfInformationBuilder_;
}
private com.google.protobuf.Internal.ProtobufList known_ = emptyList(com.google.protobuf.ByteString.class);
private void ensureKnownIsMutable() {
if (!known_.isModifiable()) {
known_ = makeMutableCopy(known_);
}
bitField0_ |= 0x00000002;
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @return A list containing the known.
*/
public java.util.List
getKnownList() {
known_.makeImmutable();
return known_;
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @return The count of known.
*/
public int getKnownCount() {
return known_.size();
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @param index The index of the element to return.
* @return The known at the given index.
*/
public com.google.protobuf.ByteString getKnown(int index) {
return known_.get(index);
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @param index The index to set the value at.
* @param value The known to set.
* @return This builder for chaining.
*/
public Builder setKnown(
int index, com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureKnownIsMutable();
known_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @param value The known to add.
* @return This builder for chaining.
*/
public Builder addKnown(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureKnownIsMutable();
known_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @param values The known to add.
* @return This builder for chaining.
*/
public Builder addAllKnown(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureKnownIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, known_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated bytes known = 2 [json_name = "known"];
* @return This builder for chaining.
*/
public Builder clearKnown() {
known_ = emptyList(com.google.protobuf.ByteString.class);
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:gossip.MembershipRequest)
}
// @@protoc_insertion_point(class_scope:gossip.MembershipRequest)
private static final org.hyperledger.fabric.protos.gossip.MembershipRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.MembershipRequest();
}
public static org.hyperledger.fabric.protos.gossip.MembershipRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MembershipRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.MembershipRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy