org.tron.p2p.protos.Connect Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libp2p Show documentation
Show all versions of libp2p Show documentation
libp2p is a p2p network SDK implemented in java language.
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Connect.proto
package org.tron.p2p.protos;
public final class Connect {
private Connect() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface KeepAliveMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:KeepAliveMessage)
com.google.protobuf.MessageOrBuilder {
/**
* int64 timestamp = 1;
*/
long getTimestamp();
}
/**
* Protobuf type {@code KeepAliveMessage}
*/
public static final class KeepAliveMessage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:KeepAliveMessage)
KeepAliveMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use KeepAliveMessage.newBuilder() to construct.
private KeepAliveMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private KeepAliveMessage() {
timestamp_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private KeepAliveMessage(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
timestamp_ = input.readInt64();
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.tron.p2p.protos.Connect.internal_static_KeepAliveMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tron.p2p.protos.Connect.internal_static_KeepAliveMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tron.p2p.protos.Connect.KeepAliveMessage.class, org.tron.p2p.protos.Connect.KeepAliveMessage.Builder.class);
}
public static final int TIMESTAMP_FIELD_NUMBER = 1;
private long timestamp_;
/**
* int64 timestamp = 1;
*/
public long getTimestamp() {
return timestamp_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (timestamp_ != 0L) {
output.writeInt64(1, timestamp_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, timestamp_);
}
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.tron.p2p.protos.Connect.KeepAliveMessage)) {
return super.equals(obj);
}
org.tron.p2p.protos.Connect.KeepAliveMessage other = (org.tron.p2p.protos.Connect.KeepAliveMessage) obj;
boolean result = true;
result = result && (getTimestamp()
== other.getTimestamp());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage 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.tron.p2p.protos.Connect.KeepAliveMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage 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.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tron.p2p.protos.Connect.KeepAliveMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code KeepAliveMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:KeepAliveMessage)
org.tron.p2p.protos.Connect.KeepAliveMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tron.p2p.protos.Connect.internal_static_KeepAliveMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tron.p2p.protos.Connect.internal_static_KeepAliveMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tron.p2p.protos.Connect.KeepAliveMessage.class, org.tron.p2p.protos.Connect.KeepAliveMessage.Builder.class);
}
// Construct using org.tron.p2p.protos.Connect.KeepAliveMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
timestamp_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tron.p2p.protos.Connect.internal_static_KeepAliveMessage_descriptor;
}
public org.tron.p2p.protos.Connect.KeepAliveMessage getDefaultInstanceForType() {
return org.tron.p2p.protos.Connect.KeepAliveMessage.getDefaultInstance();
}
public org.tron.p2p.protos.Connect.KeepAliveMessage build() {
org.tron.p2p.protos.Connect.KeepAliveMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tron.p2p.protos.Connect.KeepAliveMessage buildPartial() {
org.tron.p2p.protos.Connect.KeepAliveMessage result = new org.tron.p2p.protos.Connect.KeepAliveMessage(this);
result.timestamp_ = timestamp_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tron.p2p.protos.Connect.KeepAliveMessage) {
return mergeFrom((org.tron.p2p.protos.Connect.KeepAliveMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tron.p2p.protos.Connect.KeepAliveMessage other) {
if (other == org.tron.p2p.protos.Connect.KeepAliveMessage.getDefaultInstance()) return this;
if (other.getTimestamp() != 0L) {
setTimestamp(other.getTimestamp());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tron.p2p.protos.Connect.KeepAliveMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tron.p2p.protos.Connect.KeepAliveMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long timestamp_ ;
/**
* int64 timestamp = 1;
*/
public long getTimestamp() {
return timestamp_;
}
/**
* int64 timestamp = 1;
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
onChanged();
return this;
}
/**
* int64 timestamp = 1;
*/
public Builder clearTimestamp() {
timestamp_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:KeepAliveMessage)
}
// @@protoc_insertion_point(class_scope:KeepAliveMessage)
private static final org.tron.p2p.protos.Connect.KeepAliveMessage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tron.p2p.protos.Connect.KeepAliveMessage();
}
public static org.tron.p2p.protos.Connect.KeepAliveMessage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public KeepAliveMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new KeepAliveMessage(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tron.p2p.protos.Connect.KeepAliveMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HelloMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:HelloMessage)
com.google.protobuf.MessageOrBuilder {
/**
* .Endpoint from = 1;
*/
boolean hasFrom();
/**
* .Endpoint from = 1;
*/
org.tron.p2p.protos.Discover.Endpoint getFrom();
/**
* .Endpoint from = 1;
*/
org.tron.p2p.protos.Discover.EndpointOrBuilder getFromOrBuilder();
/**
* int32 version = 2;
*/
int getVersion();
/**
* int32 code = 3;
*/
int getCode();
/**
* int64 timestamp = 4;
*/
long getTimestamp();
}
/**
* Protobuf type {@code HelloMessage}
*/
public static final class HelloMessage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:HelloMessage)
HelloMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use HelloMessage.newBuilder() to construct.
private HelloMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HelloMessage() {
version_ = 0;
code_ = 0;
timestamp_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HelloMessage(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
org.tron.p2p.protos.Discover.Endpoint.Builder subBuilder = null;
if (from_ != null) {
subBuilder = from_.toBuilder();
}
from_ = input.readMessage(org.tron.p2p.protos.Discover.Endpoint.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(from_);
from_ = subBuilder.buildPartial();
}
break;
}
case 16: {
version_ = input.readInt32();
break;
}
case 24: {
code_ = input.readInt32();
break;
}
case 32: {
timestamp_ = input.readInt64();
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.tron.p2p.protos.Connect.internal_static_HelloMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tron.p2p.protos.Connect.internal_static_HelloMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tron.p2p.protos.Connect.HelloMessage.class, org.tron.p2p.protos.Connect.HelloMessage.Builder.class);
}
public static final int FROM_FIELD_NUMBER = 1;
private org.tron.p2p.protos.Discover.Endpoint from_;
/**
* .Endpoint from = 1;
*/
public boolean hasFrom() {
return from_ != null;
}
/**
* .Endpoint from = 1;
*/
public org.tron.p2p.protos.Discover.Endpoint getFrom() {
return from_ == null ? org.tron.p2p.protos.Discover.Endpoint.getDefaultInstance() : from_;
}
/**
* .Endpoint from = 1;
*/
public org.tron.p2p.protos.Discover.EndpointOrBuilder getFromOrBuilder() {
return getFrom();
}
public static final int VERSION_FIELD_NUMBER = 2;
private int version_;
/**
* int32 version = 2;
*/
public int getVersion() {
return version_;
}
public static final int CODE_FIELD_NUMBER = 3;
private int code_;
/**
* int32 code = 3;
*/
public int getCode() {
return code_;
}
public static final int TIMESTAMP_FIELD_NUMBER = 4;
private long timestamp_;
/**
* int64 timestamp = 4;
*/
public long getTimestamp() {
return timestamp_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (from_ != null) {
output.writeMessage(1, getFrom());
}
if (version_ != 0) {
output.writeInt32(2, version_);
}
if (code_ != 0) {
output.writeInt32(3, code_);
}
if (timestamp_ != 0L) {
output.writeInt64(4, timestamp_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (from_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getFrom());
}
if (version_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, version_);
}
if (code_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, code_);
}
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, timestamp_);
}
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.tron.p2p.protos.Connect.HelloMessage)) {
return super.equals(obj);
}
org.tron.p2p.protos.Connect.HelloMessage other = (org.tron.p2p.protos.Connect.HelloMessage) obj;
boolean result = true;
result = result && (hasFrom() == other.hasFrom());
if (hasFrom()) {
result = result && getFrom()
.equals(other.getFrom());
}
result = result && (getVersion()
== other.getVersion());
result = result && (getCode()
== other.getCode());
result = result && (getTimestamp()
== other.getTimestamp());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasFrom()) {
hash = (37 * hash) + FROM_FIELD_NUMBER;
hash = (53 * hash) + getFrom().hashCode();
}
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion();
hash = (37 * hash) + CODE_FIELD_NUMBER;
hash = (53 * hash) + getCode();
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tron.p2p.protos.Connect.HelloMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tron.p2p.protos.Connect.HelloMessage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tron.p2p.protos.Connect.HelloMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tron.p2p.protos.Connect.HelloMessage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tron.p2p.protos.Connect.HelloMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tron.p2p.protos.Connect.HelloMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tron.p2p.protos.Connect.HelloMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tron.p2p.protos.Connect.HelloMessage 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.tron.p2p.protos.Connect.HelloMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tron.p2p.protos.Connect.HelloMessage 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.tron.p2p.protos.Connect.HelloMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tron.p2p.protos.Connect.HelloMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tron.p2p.protos.Connect.HelloMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code HelloMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:HelloMessage)
org.tron.p2p.protos.Connect.HelloMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tron.p2p.protos.Connect.internal_static_HelloMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tron.p2p.protos.Connect.internal_static_HelloMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tron.p2p.protos.Connect.HelloMessage.class, org.tron.p2p.protos.Connect.HelloMessage.Builder.class);
}
// Construct using org.tron.p2p.protos.Connect.HelloMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (fromBuilder_ == null) {
from_ = null;
} else {
from_ = null;
fromBuilder_ = null;
}
version_ = 0;
code_ = 0;
timestamp_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tron.p2p.protos.Connect.internal_static_HelloMessage_descriptor;
}
public org.tron.p2p.protos.Connect.HelloMessage getDefaultInstanceForType() {
return org.tron.p2p.protos.Connect.HelloMessage.getDefaultInstance();
}
public org.tron.p2p.protos.Connect.HelloMessage build() {
org.tron.p2p.protos.Connect.HelloMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tron.p2p.protos.Connect.HelloMessage buildPartial() {
org.tron.p2p.protos.Connect.HelloMessage result = new org.tron.p2p.protos.Connect.HelloMessage(this);
if (fromBuilder_ == null) {
result.from_ = from_;
} else {
result.from_ = fromBuilder_.build();
}
result.version_ = version_;
result.code_ = code_;
result.timestamp_ = timestamp_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tron.p2p.protos.Connect.HelloMessage) {
return mergeFrom((org.tron.p2p.protos.Connect.HelloMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tron.p2p.protos.Connect.HelloMessage other) {
if (other == org.tron.p2p.protos.Connect.HelloMessage.getDefaultInstance()) return this;
if (other.hasFrom()) {
mergeFrom(other.getFrom());
}
if (other.getVersion() != 0) {
setVersion(other.getVersion());
}
if (other.getCode() != 0) {
setCode(other.getCode());
}
if (other.getTimestamp() != 0L) {
setTimestamp(other.getTimestamp());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tron.p2p.protos.Connect.HelloMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tron.p2p.protos.Connect.HelloMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.tron.p2p.protos.Discover.Endpoint from_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tron.p2p.protos.Discover.Endpoint, org.tron.p2p.protos.Discover.Endpoint.Builder, org.tron.p2p.protos.Discover.EndpointOrBuilder> fromBuilder_;
/**
* .Endpoint from = 1;
*/
public boolean hasFrom() {
return fromBuilder_ != null || from_ != null;
}
/**
* .Endpoint from = 1;
*/
public org.tron.p2p.protos.Discover.Endpoint getFrom() {
if (fromBuilder_ == null) {
return from_ == null ? org.tron.p2p.protos.Discover.Endpoint.getDefaultInstance() : from_;
} else {
return fromBuilder_.getMessage();
}
}
/**
* .Endpoint from = 1;
*/
public Builder setFrom(org.tron.p2p.protos.Discover.Endpoint value) {
if (fromBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
from_ = value;
onChanged();
} else {
fromBuilder_.setMessage(value);
}
return this;
}
/**
* .Endpoint from = 1;
*/
public Builder setFrom(
org.tron.p2p.protos.Discover.Endpoint.Builder builderForValue) {
if (fromBuilder_ == null) {
from_ = builderForValue.build();
onChanged();
} else {
fromBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .Endpoint from = 1;
*/
public Builder mergeFrom(org.tron.p2p.protos.Discover.Endpoint value) {
if (fromBuilder_ == null) {
if (from_ != null) {
from_ =
org.tron.p2p.protos.Discover.Endpoint.newBuilder(from_).mergeFrom(value).buildPartial();
} else {
from_ = value;
}
onChanged();
} else {
fromBuilder_.mergeFrom(value);
}
return this;
}
/**
* .Endpoint from = 1;
*/
public Builder clearFrom() {
if (fromBuilder_ == null) {
from_ = null;
onChanged();
} else {
from_ = null;
fromBuilder_ = null;
}
return this;
}
/**
* .Endpoint from = 1;
*/
public org.tron.p2p.protos.Discover.Endpoint.Builder getFromBuilder() {
onChanged();
return getFromFieldBuilder().getBuilder();
}
/**
* .Endpoint from = 1;
*/
public org.tron.p2p.protos.Discover.EndpointOrBuilder getFromOrBuilder() {
if (fromBuilder_ != null) {
return fromBuilder_.getMessageOrBuilder();
} else {
return from_ == null ?
org.tron.p2p.protos.Discover.Endpoint.getDefaultInstance() : from_;
}
}
/**
* .Endpoint from = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tron.p2p.protos.Discover.Endpoint, org.tron.p2p.protos.Discover.Endpoint.Builder, org.tron.p2p.protos.Discover.EndpointOrBuilder>
getFromFieldBuilder() {
if (fromBuilder_ == null) {
fromBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tron.p2p.protos.Discover.Endpoint, org.tron.p2p.protos.Discover.Endpoint.Builder, org.tron.p2p.protos.Discover.EndpointOrBuilder>(
getFrom(),
getParentForChildren(),
isClean());
from_ = null;
}
return fromBuilder_;
}
private int version_ ;
/**
* int32 version = 2;
*/
public int getVersion() {
return version_;
}
/**
* int32 version = 2;
*/
public Builder setVersion(int value) {
version_ = value;
onChanged();
return this;
}
/**
* int32 version = 2;
*/
public Builder clearVersion() {
version_ = 0;
onChanged();
return this;
}
private int code_ ;
/**
* int32 code = 3;
*/
public int getCode() {
return code_;
}
/**
* int32 code = 3;
*/
public Builder setCode(int value) {
code_ = value;
onChanged();
return this;
}
/**
* int32 code = 3;
*/
public Builder clearCode() {
code_ = 0;
onChanged();
return this;
}
private long timestamp_ ;
/**
* int64 timestamp = 4;
*/
public long getTimestamp() {
return timestamp_;
}
/**
* int64 timestamp = 4;
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
onChanged();
return this;
}
/**
* int64 timestamp = 4;
*/
public Builder clearTimestamp() {
timestamp_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:HelloMessage)
}
// @@protoc_insertion_point(class_scope:HelloMessage)
private static final org.tron.p2p.protos.Connect.HelloMessage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tron.p2p.protos.Connect.HelloMessage();
}
public static org.tron.p2p.protos.Connect.HelloMessage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public HelloMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HelloMessage(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tron.p2p.protos.Connect.HelloMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_KeepAliveMessage_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_KeepAliveMessage_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_HelloMessage_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_HelloMessage_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\rConnect.proto\032\016Discover.proto\"%\n\020KeepA" +
"liveMessage\022\021\n\ttimestamp\030\001 \001(\003\"Y\n\014HelloM" +
"essage\022\027\n\004from\030\001 \001(\0132\t.Endpoint\022\017\n\007versi" +
"on\030\002 \001(\005\022\014\n\004code\030\003 \001(\005\022\021\n\ttimestamp\030\004 \001(" +
"\003B\036\n\023org.tron.p2p.protosB\007Connectb\006proto" +
"3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
org.tron.p2p.protos.Discover.getDescriptor(),
}, assigner);
internal_static_KeepAliveMessage_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_KeepAliveMessage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_KeepAliveMessage_descriptor,
new java.lang.String[] { "Timestamp", });
internal_static_HelloMessage_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_HelloMessage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_HelloMessage_descriptor,
new java.lang.String[] { "From", "Version", "Code", "Timestamp", });
org.tron.p2p.protos.Discover.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}