All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.protos.gossip.ConnEstablish 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;

/**
 * 
 * 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 final class ConnEstablish extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:gossip.ConnEstablish) ConnEstablishOrBuilder { 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= */ "", ConnEstablish.class.getName()); } // Use ConnEstablish.newBuilder() to construct. private ConnEstablish(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ConnEstablish() { pkiId_ = com.google.protobuf.ByteString.EMPTY; identity_ = com.google.protobuf.ByteString.EMPTY; tlsCertHash_ = com.google.protobuf.ByteString.EMPTY; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_ConnEstablish_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_ConnEstablish_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.gossip.ConnEstablish.class, org.hyperledger.fabric.protos.gossip.ConnEstablish.Builder.class); } public static final int PKI_ID_FIELD_NUMBER = 1; private com.google.protobuf.ByteString pkiId_ = com.google.protobuf.ByteString.EMPTY; /** * bytes pki_id = 1 [json_name = "pkiId"]; * @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_ = com.google.protobuf.ByteString.EMPTY; /** * bytes identity = 2 [json_name = "identity"]; * @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_ = com.google.protobuf.ByteString.EMPTY; /** * bytes tls_cert_hash = 3 [json_name = "tlsCertHash"]; * @return The tlsCertHash. */ @java.lang.Override public com.google.protobuf.ByteString getTlsCertHash() { return tlsCertHash_; } public static final int PROBE_FIELD_NUMBER = 4; private boolean probe_ = false; /** * bool probe = 4 [json_name = "probe"]; * @return The probe. */ @java.lang.Override public boolean getProbe() { return probe_; } 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_); } if (probe_ != false) { output.writeBool(4, probe_); } getUnknownFields().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_); } if (probe_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, probe_); } 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.ConnEstablish)) { return super.equals(obj); } org.hyperledger.fabric.protos.gossip.ConnEstablish other = (org.hyperledger.fabric.protos.gossip.ConnEstablish) obj; if (!getPkiId() .equals(other.getPkiId())) return false; if (!getIdentity() .equals(other.getIdentity())) return false; if (!getTlsCertHash() .equals(other.getTlsCertHash())) return false; if (getProbe() != other.getProbe()) 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(); 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 = (37 * hash) + PROBE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getProbe()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.hyperledger.fabric.protos.gossip.ConnEstablish parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gossip.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.ConnEstablish parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gossip.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.ConnEstablish parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.hyperledger.fabric.protos.gossip.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.ConnEstablish parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.gossip.ConnEstablish 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.ConnEstablish parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } public static org.hyperledger.fabric.protos.gossip.ConnEstablish 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.ConnEstablish 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.ConnEstablish 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.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.GeneratedMessage.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.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:gossip.ConnEstablish) org.hyperledger.fabric.protos.gossip.ConnEstablishOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_ConnEstablish_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_ConnEstablish_fieldAccessorTable .ensureFieldAccessorsInitialized( org.hyperledger.fabric.protos.gossip.ConnEstablish.class, org.hyperledger.fabric.protos.gossip.ConnEstablish.Builder.class); } // Construct using org.hyperledger.fabric.protos.gossip.ConnEstablish.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; pkiId_ = com.google.protobuf.ByteString.EMPTY; identity_ = com.google.protobuf.ByteString.EMPTY; tlsCertHash_ = com.google.protobuf.ByteString.EMPTY; probe_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.hyperledger.fabric.protos.gossip.MessageProto.internal_static_gossip_ConnEstablish_descriptor; } @java.lang.Override public org.hyperledger.fabric.protos.gossip.ConnEstablish getDefaultInstanceForType() { return org.hyperledger.fabric.protos.gossip.ConnEstablish.getDefaultInstance(); } @java.lang.Override public org.hyperledger.fabric.protos.gossip.ConnEstablish build() { org.hyperledger.fabric.protos.gossip.ConnEstablish result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.hyperledger.fabric.protos.gossip.ConnEstablish buildPartial() { org.hyperledger.fabric.protos.gossip.ConnEstablish result = new org.hyperledger.fabric.protos.gossip.ConnEstablish(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.hyperledger.fabric.protos.gossip.ConnEstablish result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.pkiId_ = pkiId_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.identity_ = identity_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.tlsCertHash_ = tlsCertHash_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.probe_ = probe_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.hyperledger.fabric.protos.gossip.ConnEstablish) { return mergeFrom((org.hyperledger.fabric.protos.gossip.ConnEstablish)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.hyperledger.fabric.protos.gossip.ConnEstablish other) { if (other == org.hyperledger.fabric.protos.gossip.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()); } if (other.getProbe() != false) { setProbe(other.getProbe()); } 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: { pkiId_ = input.readBytes(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { identity_ = input.readBytes(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { tlsCertHash_ = input.readBytes(); bitField0_ |= 0x00000004; break; } // case 26 case 32: { probe_ = input.readBool(); bitField0_ |= 0x00000008; break; } // case 32 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 com.google.protobuf.ByteString pkiId_ = com.google.protobuf.ByteString.EMPTY; /** * bytes pki_id = 1 [json_name = "pkiId"]; * @return The pkiId. */ @java.lang.Override public com.google.protobuf.ByteString getPkiId() { return pkiId_; } /** * bytes pki_id = 1 [json_name = "pkiId"]; * @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; bitField0_ |= 0x00000001; onChanged(); return this; } /** * bytes pki_id = 1 [json_name = "pkiId"]; * @return This builder for chaining. */ public Builder clearPkiId() { bitField0_ = (bitField0_ & ~0x00000001); pkiId_ = getDefaultInstance().getPkiId(); onChanged(); return this; } private com.google.protobuf.ByteString identity_ = com.google.protobuf.ByteString.EMPTY; /** * bytes identity = 2 [json_name = "identity"]; * @return The identity. */ @java.lang.Override public com.google.protobuf.ByteString getIdentity() { return identity_; } /** * bytes identity = 2 [json_name = "identity"]; * @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; bitField0_ |= 0x00000002; onChanged(); return this; } /** * bytes identity = 2 [json_name = "identity"]; * @return This builder for chaining. */ public Builder clearIdentity() { bitField0_ = (bitField0_ & ~0x00000002); identity_ = getDefaultInstance().getIdentity(); onChanged(); return this; } private com.google.protobuf.ByteString tlsCertHash_ = com.google.protobuf.ByteString.EMPTY; /** * bytes tls_cert_hash = 3 [json_name = "tlsCertHash"]; * @return The tlsCertHash. */ @java.lang.Override public com.google.protobuf.ByteString getTlsCertHash() { return tlsCertHash_; } /** * bytes tls_cert_hash = 3 [json_name = "tlsCertHash"]; * @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; bitField0_ |= 0x00000004; onChanged(); return this; } /** * bytes tls_cert_hash = 3 [json_name = "tlsCertHash"]; * @return This builder for chaining. */ public Builder clearTlsCertHash() { bitField0_ = (bitField0_ & ~0x00000004); tlsCertHash_ = getDefaultInstance().getTlsCertHash(); onChanged(); return this; } private boolean probe_ ; /** * bool probe = 4 [json_name = "probe"]; * @return The probe. */ @java.lang.Override public boolean getProbe() { return probe_; } /** * bool probe = 4 [json_name = "probe"]; * @param value The probe to set. * @return This builder for chaining. */ public Builder setProbe(boolean value) { probe_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * bool probe = 4 [json_name = "probe"]; * @return This builder for chaining. */ public Builder clearProbe() { bitField0_ = (bitField0_ & ~0x00000008); probe_ = false; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:gossip.ConnEstablish) } // @@protoc_insertion_point(class_scope:gossip.ConnEstablish) private static final org.hyperledger.fabric.protos.gossip.ConnEstablish DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.hyperledger.fabric.protos.gossip.ConnEstablish(); } public static org.hyperledger.fabric.protos.gossip.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 { 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.ConnEstablish getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy