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

types.P2P Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: p2p.proto

package types;

public final class P2P {
  private P2P() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * 
   * Not all response contains ResultStatus value.
   * names from gRPC status
   * 
* * Protobuf enum {@code types.ResultStatus} */ public enum ResultStatus implements com.google.protobuf.ProtocolMessageEnum { /** *
     * OK is returned on success.
     * 
* * OK = 0; */ OK(0), /** *
     * CANCELED when operation was canceled (typically by the caller).
     * 
* * CANCELED = 1; */ CANCELED(1), /** *
     * UNKNOWN
     * 
* * UNKNOWN = 2; */ UNKNOWN(2), /** *
     * INVALID_ARGUMENT is missing or wrong value of argument
     * 
* * INVALID_ARGUMENT = 3; */ INVALID_ARGUMENT(3), /** *
     * DEADLINE_EXCEEDED timeout
     * 
* * DEADLINE_EXCEEDED = 4; */ DEADLINE_EXCEEDED(4), /** *
     * NOT_FOUND
     * 
* * NOT_FOUND = 5; */ NOT_FOUND(5), /** *
     * ALREADY_EXISTS
     * 
* * ALREADY_EXISTS = 6; */ ALREADY_EXISTS(6), /** *
     * PERMISSION_DENIED
     * 
* * PERMISSION_DENIED = 7; */ PERMISSION_DENIED(7), /** *
     * 
* * RESOURCE_EXHAUSTED = 8; */ RESOURCE_EXHAUSTED(8), /** *
     * 
* * FAILED_PRECONDITION = 9; */ FAILED_PRECONDITION(9), /** *
     * ABORTED
     * 
* * ABORTED = 10; */ ABORTED(10), /** *
     * 
* * OUT_OF_RANGE = 11; */ OUT_OF_RANGE(11), /** *
     * UNIMPLEMENTED indicates operation is not implemented or not
     * supported/enabled in this service.
     * 
* * UNIMPLEMENTED = 12; */ UNIMPLEMENTED(12), /** *
     * INTERNAL errors. Means some invariants expected by underlying
     * system has been broken. If you see one of these errors,
     * something is very broken.
     * 
* * INTERNAL = 13; */ INTERNAL(13), /** *
     * Unavailable indicates the service is currently unavailable.
     * This is a most likely a transient condition and may be corrected
     * by retrying with a backoff.
     * See litmus test above for deciding between FailedPrecondition,
     * Aborted, and Unavailable.
     * 
* * UNAVAILABLE = 14; */ UNAVAILABLE(14), /** * DATA_LOSS = 15; */ DATA_LOSS(15), /** *
     * UNAUTHENTICATED indicates the request does not have valid
     * authentication credentials for the operation.
     * 
* * UNAUTHENTICATED = 16; */ UNAUTHENTICATED(16), UNRECOGNIZED(-1), ; /** *
     * OK is returned on success.
     * 
* * OK = 0; */ public static final int OK_VALUE = 0; /** *
     * CANCELED when operation was canceled (typically by the caller).
     * 
* * CANCELED = 1; */ public static final int CANCELED_VALUE = 1; /** *
     * UNKNOWN
     * 
* * UNKNOWN = 2; */ public static final int UNKNOWN_VALUE = 2; /** *
     * INVALID_ARGUMENT is missing or wrong value of argument
     * 
* * INVALID_ARGUMENT = 3; */ public static final int INVALID_ARGUMENT_VALUE = 3; /** *
     * DEADLINE_EXCEEDED timeout
     * 
* * DEADLINE_EXCEEDED = 4; */ public static final int DEADLINE_EXCEEDED_VALUE = 4; /** *
     * NOT_FOUND
     * 
* * NOT_FOUND = 5; */ public static final int NOT_FOUND_VALUE = 5; /** *
     * ALREADY_EXISTS
     * 
* * ALREADY_EXISTS = 6; */ public static final int ALREADY_EXISTS_VALUE = 6; /** *
     * PERMISSION_DENIED
     * 
* * PERMISSION_DENIED = 7; */ public static final int PERMISSION_DENIED_VALUE = 7; /** *
     * 
* * RESOURCE_EXHAUSTED = 8; */ public static final int RESOURCE_EXHAUSTED_VALUE = 8; /** *
     * 
* * FAILED_PRECONDITION = 9; */ public static final int FAILED_PRECONDITION_VALUE = 9; /** *
     * ABORTED
     * 
* * ABORTED = 10; */ public static final int ABORTED_VALUE = 10; /** *
     * 
* * OUT_OF_RANGE = 11; */ public static final int OUT_OF_RANGE_VALUE = 11; /** *
     * UNIMPLEMENTED indicates operation is not implemented or not
     * supported/enabled in this service.
     * 
* * UNIMPLEMENTED = 12; */ public static final int UNIMPLEMENTED_VALUE = 12; /** *
     * INTERNAL errors. Means some invariants expected by underlying
     * system has been broken. If you see one of these errors,
     * something is very broken.
     * 
* * INTERNAL = 13; */ public static final int INTERNAL_VALUE = 13; /** *
     * Unavailable indicates the service is currently unavailable.
     * This is a most likely a transient condition and may be corrected
     * by retrying with a backoff.
     * See litmus test above for deciding between FailedPrecondition,
     * Aborted, and Unavailable.
     * 
* * UNAVAILABLE = 14; */ public static final int UNAVAILABLE_VALUE = 14; /** * DATA_LOSS = 15; */ public static final int DATA_LOSS_VALUE = 15; /** *
     * UNAUTHENTICATED indicates the request does not have valid
     * authentication credentials for the operation.
     * 
* * UNAUTHENTICATED = 16; */ public static final int UNAUTHENTICATED_VALUE = 16; 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 ResultStatus 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 ResultStatus forNumber(int value) { switch (value) { case 0: return OK; case 1: return CANCELED; case 2: return UNKNOWN; case 3: return INVALID_ARGUMENT; case 4: return DEADLINE_EXCEEDED; case 5: return NOT_FOUND; case 6: return ALREADY_EXISTS; case 7: return PERMISSION_DENIED; case 8: return RESOURCE_EXHAUSTED; case 9: return FAILED_PRECONDITION; case 10: return ABORTED; case 11: return OUT_OF_RANGE; case 12: return UNIMPLEMENTED; case 13: return INTERNAL; case 14: return UNAVAILABLE; case 15: return DATA_LOSS; case 16: return UNAUTHENTICATED; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< ResultStatus> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public ResultStatus findValueByNumber(int number) { return ResultStatus.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 types.P2P.getDescriptor().getEnumTypes().get(0); } private static final ResultStatus[] VALUES = values(); public static ResultStatus 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 ResultStatus(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:types.ResultStatus) } public interface MsgHeaderOrBuilder extends // @@protoc_insertion_point(interface_extends:types.MsgHeader) com.google.protobuf.MessageOrBuilder { /** *
     * Deprecated client version.
     * 
* * string clientVersion = 1; * @return The clientVersion. */ java.lang.String getClientVersion(); /** *
     * Deprecated client version.
     * 
* * string clientVersion = 1; * @return The bytes for clientVersion. */ com.google.protobuf.ByteString getClientVersionBytes(); /** *
     * unix time
     * 
* * int64 timestamp = 2; * @return The timestamp. */ long getTimestamp(); /** *
     * allows requesters to use request data when processing a response
     * 
* * string id = 3; * @return The id. */ java.lang.String getId(); /** *
     * allows requesters to use request data when processing a response
     * 
* * string id = 3; * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); /** *
     * Gossip is flag to have receiver peer gossip the message to neighbors
     * Deprecated whether to gossip other peers is determined by subprotocol since version 0.3.0 .
     * 
* * bool gossip = 4; * @return The gossip. */ boolean getGossip(); /** *
     * PeerID is id of node that created the message (not the peer that may have sent it). =base58(mh(sha256(nodePubKey)))
     * 
* * bytes peerID = 5; * @return The peerID. */ com.google.protobuf.ByteString getPeerID(); /** *
     * nodePubKey Authoring node Secp256k1 public key (32bytes) - protobufs serielized
     * 
* * bytes nodePubKey = 6; * @return The nodePubKey. */ com.google.protobuf.ByteString getNodePubKey(); /** *
     * signature of message data + method specific data by message authoring node. format: string([]bytes)
     * 
* * bytes sign = 7; * @return The sign. */ com.google.protobuf.ByteString getSign(); /** *
     * sub category of message. the receiving peer determines how to deserialize payload data and whether to spread messages to other peers
     * 
* * uint32 subprotocol = 8; * @return The subprotocol. */ int getSubprotocol(); /** *
     * size of bytes of the payload
     * 
* * uint32 length = 9; * @return The length. */ int getLength(); } /** *
   * MsgHeader contains common properties of all p2p messages
   * 
* * Protobuf type {@code types.MsgHeader} */ public static final class MsgHeader extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.MsgHeader) MsgHeaderOrBuilder { private static final long serialVersionUID = 0L; // Use MsgHeader.newBuilder() to construct. private MsgHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MsgHeader() { clientVersion_ = ""; id_ = ""; peerID_ = com.google.protobuf.ByteString.EMPTY; nodePubKey_ = com.google.protobuf.ByteString.EMPTY; sign_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MsgHeader(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MsgHeader( 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(); clientVersion_ = s; break; } case 16: { timestamp_ = input.readInt64(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); id_ = s; break; } case 32: { gossip_ = input.readBool(); break; } case 42: { peerID_ = input.readBytes(); break; } case 50: { nodePubKey_ = input.readBytes(); break; } case 58: { sign_ = input.readBytes(); break; } case 64: { subprotocol_ = input.readUInt32(); break; } case 72: { length_ = input.readUInt32(); 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 types.P2P.internal_static_types_MsgHeader_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_MsgHeader_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.MsgHeader.class, types.P2P.MsgHeader.Builder.class); } public static final int CLIENTVERSION_FIELD_NUMBER = 1; private volatile java.lang.Object clientVersion_; /** *
     * Deprecated client version.
     * 
* * string clientVersion = 1; * @return The clientVersion. */ @java.lang.Override public java.lang.String getClientVersion() { java.lang.Object ref = clientVersion_; 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(); clientVersion_ = s; return s; } } /** *
     * Deprecated client version.
     * 
* * string clientVersion = 1; * @return The bytes for clientVersion. */ @java.lang.Override public com.google.protobuf.ByteString getClientVersionBytes() { java.lang.Object ref = clientVersion_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); clientVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TIMESTAMP_FIELD_NUMBER = 2; private long timestamp_; /** *
     * unix time
     * 
* * int64 timestamp = 2; * @return The timestamp. */ @java.lang.Override public long getTimestamp() { return timestamp_; } public static final int ID_FIELD_NUMBER = 3; private volatile java.lang.Object id_; /** *
     * allows requesters to use request data when processing a response
     * 
* * string id = 3; * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** *
     * allows requesters to use request data when processing a response
     * 
* * string id = 3; * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GOSSIP_FIELD_NUMBER = 4; private boolean gossip_; /** *
     * Gossip is flag to have receiver peer gossip the message to neighbors
     * Deprecated whether to gossip other peers is determined by subprotocol since version 0.3.0 .
     * 
* * bool gossip = 4; * @return The gossip. */ @java.lang.Override public boolean getGossip() { return gossip_; } public static final int PEERID_FIELD_NUMBER = 5; private com.google.protobuf.ByteString peerID_; /** *
     * PeerID is id of node that created the message (not the peer that may have sent it). =base58(mh(sha256(nodePubKey)))
     * 
* * bytes peerID = 5; * @return The peerID. */ @java.lang.Override public com.google.protobuf.ByteString getPeerID() { return peerID_; } public static final int NODEPUBKEY_FIELD_NUMBER = 6; private com.google.protobuf.ByteString nodePubKey_; /** *
     * nodePubKey Authoring node Secp256k1 public key (32bytes) - protobufs serielized
     * 
* * bytes nodePubKey = 6; * @return The nodePubKey. */ @java.lang.Override public com.google.protobuf.ByteString getNodePubKey() { return nodePubKey_; } public static final int SIGN_FIELD_NUMBER = 7; private com.google.protobuf.ByteString sign_; /** *
     * signature of message data + method specific data by message authoring node. format: string([]bytes)
     * 
* * bytes sign = 7; * @return The sign. */ @java.lang.Override public com.google.protobuf.ByteString getSign() { return sign_; } public static final int SUBPROTOCOL_FIELD_NUMBER = 8; private int subprotocol_; /** *
     * sub category of message. the receiving peer determines how to deserialize payload data and whether to spread messages to other peers
     * 
* * uint32 subprotocol = 8; * @return The subprotocol. */ @java.lang.Override public int getSubprotocol() { return subprotocol_; } public static final int LENGTH_FIELD_NUMBER = 9; private int length_; /** *
     * size of bytes of the payload
     * 
* * uint32 length = 9; * @return The length. */ @java.lang.Override public int getLength() { return length_; } 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 (!getClientVersionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientVersion_); } if (timestamp_ != 0L) { output.writeInt64(2, timestamp_); } if (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_); } if (gossip_ != false) { output.writeBool(4, gossip_); } if (!peerID_.isEmpty()) { output.writeBytes(5, peerID_); } if (!nodePubKey_.isEmpty()) { output.writeBytes(6, nodePubKey_); } if (!sign_.isEmpty()) { output.writeBytes(7, sign_); } if (subprotocol_ != 0) { output.writeUInt32(8, subprotocol_); } if (length_ != 0) { output.writeUInt32(9, length_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getClientVersionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientVersion_); } if (timestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, timestamp_); } if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_); } if (gossip_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, gossip_); } if (!peerID_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, peerID_); } if (!nodePubKey_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, nodePubKey_); } if (!sign_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(7, sign_); } if (subprotocol_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(8, subprotocol_); } if (length_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(9, length_); } 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 types.P2P.MsgHeader)) { return super.equals(obj); } types.P2P.MsgHeader other = (types.P2P.MsgHeader) obj; if (!getClientVersion() .equals(other.getClientVersion())) return false; if (getTimestamp() != other.getTimestamp()) return false; if (!getId() .equals(other.getId())) return false; if (getGossip() != other.getGossip()) return false; if (!getPeerID() .equals(other.getPeerID())) return false; if (!getNodePubKey() .equals(other.getNodePubKey())) return false; if (!getSign() .equals(other.getSign())) return false; if (getSubprotocol() != other.getSubprotocol()) return false; if (getLength() != other.getLength()) 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) + CLIENTVERSION_FIELD_NUMBER; hash = (53 * hash) + getClientVersion().hashCode(); hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTimestamp()); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + GOSSIP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getGossip()); hash = (37 * hash) + PEERID_FIELD_NUMBER; hash = (53 * hash) + getPeerID().hashCode(); hash = (37 * hash) + NODEPUBKEY_FIELD_NUMBER; hash = (53 * hash) + getNodePubKey().hashCode(); hash = (37 * hash) + SIGN_FIELD_NUMBER; hash = (53 * hash) + getSign().hashCode(); hash = (37 * hash) + SUBPROTOCOL_FIELD_NUMBER; hash = (53 * hash) + getSubprotocol(); hash = (37 * hash) + LENGTH_FIELD_NUMBER; hash = (53 * hash) + getLength(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.MsgHeader parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.MsgHeader parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.MsgHeader parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.MsgHeader parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.MsgHeader parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.MsgHeader parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.MsgHeader parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.MsgHeader 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 types.P2P.MsgHeader parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.MsgHeader 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 types.P2P.MsgHeader parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.MsgHeader 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(types.P2P.MsgHeader 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; } /** *
     * MsgHeader contains common properties of all p2p messages
     * 
* * Protobuf type {@code types.MsgHeader} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.MsgHeader) types.P2P.MsgHeaderOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_MsgHeader_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_MsgHeader_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.MsgHeader.class, types.P2P.MsgHeader.Builder.class); } // Construct using types.P2P.MsgHeader.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(); clientVersion_ = ""; timestamp_ = 0L; id_ = ""; gossip_ = false; peerID_ = com.google.protobuf.ByteString.EMPTY; nodePubKey_ = com.google.protobuf.ByteString.EMPTY; sign_ = com.google.protobuf.ByteString.EMPTY; subprotocol_ = 0; length_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_MsgHeader_descriptor; } @java.lang.Override public types.P2P.MsgHeader getDefaultInstanceForType() { return types.P2P.MsgHeader.getDefaultInstance(); } @java.lang.Override public types.P2P.MsgHeader build() { types.P2P.MsgHeader result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.MsgHeader buildPartial() { types.P2P.MsgHeader result = new types.P2P.MsgHeader(this); result.clientVersion_ = clientVersion_; result.timestamp_ = timestamp_; result.id_ = id_; result.gossip_ = gossip_; result.peerID_ = peerID_; result.nodePubKey_ = nodePubKey_; result.sign_ = sign_; result.subprotocol_ = subprotocol_; result.length_ = length_; 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 types.P2P.MsgHeader) { return mergeFrom((types.P2P.MsgHeader)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.MsgHeader other) { if (other == types.P2P.MsgHeader.getDefaultInstance()) return this; if (!other.getClientVersion().isEmpty()) { clientVersion_ = other.clientVersion_; onChanged(); } if (other.getTimestamp() != 0L) { setTimestamp(other.getTimestamp()); } if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (other.getGossip() != false) { setGossip(other.getGossip()); } if (other.getPeerID() != com.google.protobuf.ByteString.EMPTY) { setPeerID(other.getPeerID()); } if (other.getNodePubKey() != com.google.protobuf.ByteString.EMPTY) { setNodePubKey(other.getNodePubKey()); } if (other.getSign() != com.google.protobuf.ByteString.EMPTY) { setSign(other.getSign()); } if (other.getSubprotocol() != 0) { setSubprotocol(other.getSubprotocol()); } if (other.getLength() != 0) { setLength(other.getLength()); } 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 { types.P2P.MsgHeader parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.MsgHeader) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object clientVersion_ = ""; /** *
       * Deprecated client version.
       * 
* * string clientVersion = 1; * @return The clientVersion. */ public java.lang.String getClientVersion() { java.lang.Object ref = clientVersion_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); clientVersion_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Deprecated client version.
       * 
* * string clientVersion = 1; * @return The bytes for clientVersion. */ public com.google.protobuf.ByteString getClientVersionBytes() { java.lang.Object ref = clientVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); clientVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Deprecated client version.
       * 
* * string clientVersion = 1; * @param value The clientVersion to set. * @return This builder for chaining. */ public Builder setClientVersion( java.lang.String value) { if (value == null) { throw new NullPointerException(); } clientVersion_ = value; onChanged(); return this; } /** *
       * Deprecated client version.
       * 
* * string clientVersion = 1; * @return This builder for chaining. */ public Builder clearClientVersion() { clientVersion_ = getDefaultInstance().getClientVersion(); onChanged(); return this; } /** *
       * Deprecated client version.
       * 
* * string clientVersion = 1; * @param value The bytes for clientVersion to set. * @return This builder for chaining. */ public Builder setClientVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); clientVersion_ = value; onChanged(); return this; } private long timestamp_ ; /** *
       * unix time
       * 
* * int64 timestamp = 2; * @return The timestamp. */ @java.lang.Override public long getTimestamp() { return timestamp_; } /** *
       * unix time
       * 
* * int64 timestamp = 2; * @param value The timestamp to set. * @return This builder for chaining. */ public Builder setTimestamp(long value) { timestamp_ = value; onChanged(); return this; } /** *
       * unix time
       * 
* * int64 timestamp = 2; * @return This builder for chaining. */ public Builder clearTimestamp() { timestamp_ = 0L; onChanged(); return this; } private java.lang.Object id_ = ""; /** *
       * allows requesters to use request data when processing a response
       * 
* * string id = 3; * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * allows requesters to use request data when processing a response
       * 
* * string id = 3; * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * allows requesters to use request data when processing a response
       * 
* * string id = 3; * @param value The id to set. * @return This builder for chaining. */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** *
       * allows requesters to use request data when processing a response
       * 
* * string id = 3; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** *
       * allows requesters to use request data when processing a response
       * 
* * string id = 3; * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } private boolean gossip_ ; /** *
       * Gossip is flag to have receiver peer gossip the message to neighbors
       * Deprecated whether to gossip other peers is determined by subprotocol since version 0.3.0 .
       * 
* * bool gossip = 4; * @return The gossip. */ @java.lang.Override public boolean getGossip() { return gossip_; } /** *
       * Gossip is flag to have receiver peer gossip the message to neighbors
       * Deprecated whether to gossip other peers is determined by subprotocol since version 0.3.0 .
       * 
* * bool gossip = 4; * @param value The gossip to set. * @return This builder for chaining. */ public Builder setGossip(boolean value) { gossip_ = value; onChanged(); return this; } /** *
       * Gossip is flag to have receiver peer gossip the message to neighbors
       * Deprecated whether to gossip other peers is determined by subprotocol since version 0.3.0 .
       * 
* * bool gossip = 4; * @return This builder for chaining. */ public Builder clearGossip() { gossip_ = false; onChanged(); return this; } private com.google.protobuf.ByteString peerID_ = com.google.protobuf.ByteString.EMPTY; /** *
       * PeerID is id of node that created the message (not the peer that may have sent it). =base58(mh(sha256(nodePubKey)))
       * 
* * bytes peerID = 5; * @return The peerID. */ @java.lang.Override public com.google.protobuf.ByteString getPeerID() { return peerID_; } /** *
       * PeerID is id of node that created the message (not the peer that may have sent it). =base58(mh(sha256(nodePubKey)))
       * 
* * bytes peerID = 5; * @param value The peerID to set. * @return This builder for chaining. */ public Builder setPeerID(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } peerID_ = value; onChanged(); return this; } /** *
       * PeerID is id of node that created the message (not the peer that may have sent it). =base58(mh(sha256(nodePubKey)))
       * 
* * bytes peerID = 5; * @return This builder for chaining. */ public Builder clearPeerID() { peerID_ = getDefaultInstance().getPeerID(); onChanged(); return this; } private com.google.protobuf.ByteString nodePubKey_ = com.google.protobuf.ByteString.EMPTY; /** *
       * nodePubKey Authoring node Secp256k1 public key (32bytes) - protobufs serielized
       * 
* * bytes nodePubKey = 6; * @return The nodePubKey. */ @java.lang.Override public com.google.protobuf.ByteString getNodePubKey() { return nodePubKey_; } /** *
       * nodePubKey Authoring node Secp256k1 public key (32bytes) - protobufs serielized
       * 
* * bytes nodePubKey = 6; * @param value The nodePubKey to set. * @return This builder for chaining. */ public Builder setNodePubKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } nodePubKey_ = value; onChanged(); return this; } /** *
       * nodePubKey Authoring node Secp256k1 public key (32bytes) - protobufs serielized
       * 
* * bytes nodePubKey = 6; * @return This builder for chaining. */ public Builder clearNodePubKey() { nodePubKey_ = getDefaultInstance().getNodePubKey(); onChanged(); return this; } private com.google.protobuf.ByteString sign_ = com.google.protobuf.ByteString.EMPTY; /** *
       * signature of message data + method specific data by message authoring node. format: string([]bytes)
       * 
* * bytes sign = 7; * @return The sign. */ @java.lang.Override public com.google.protobuf.ByteString getSign() { return sign_; } /** *
       * signature of message data + method specific data by message authoring node. format: string([]bytes)
       * 
* * bytes sign = 7; * @param value The sign to set. * @return This builder for chaining. */ public Builder setSign(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } sign_ = value; onChanged(); return this; } /** *
       * signature of message data + method specific data by message authoring node. format: string([]bytes)
       * 
* * bytes sign = 7; * @return This builder for chaining. */ public Builder clearSign() { sign_ = getDefaultInstance().getSign(); onChanged(); return this; } private int subprotocol_ ; /** *
       * sub category of message. the receiving peer determines how to deserialize payload data and whether to spread messages to other peers
       * 
* * uint32 subprotocol = 8; * @return The subprotocol. */ @java.lang.Override public int getSubprotocol() { return subprotocol_; } /** *
       * sub category of message. the receiving peer determines how to deserialize payload data and whether to spread messages to other peers
       * 
* * uint32 subprotocol = 8; * @param value The subprotocol to set. * @return This builder for chaining. */ public Builder setSubprotocol(int value) { subprotocol_ = value; onChanged(); return this; } /** *
       * sub category of message. the receiving peer determines how to deserialize payload data and whether to spread messages to other peers
       * 
* * uint32 subprotocol = 8; * @return This builder for chaining. */ public Builder clearSubprotocol() { subprotocol_ = 0; onChanged(); return this; } private int length_ ; /** *
       * size of bytes of the payload
       * 
* * uint32 length = 9; * @return The length. */ @java.lang.Override public int getLength() { return length_; } /** *
       * size of bytes of the payload
       * 
* * uint32 length = 9; * @param value The length to set. * @return This builder for chaining. */ public Builder setLength(int value) { length_ = value; onChanged(); return this; } /** *
       * size of bytes of the payload
       * 
* * uint32 length = 9; * @return This builder for chaining. */ public Builder clearLength() { length_ = 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:types.MsgHeader) } // @@protoc_insertion_point(class_scope:types.MsgHeader) private static final types.P2P.MsgHeader DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.MsgHeader(); } public static types.P2P.MsgHeader getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MsgHeader parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MsgHeader(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 types.P2P.MsgHeader getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface P2PMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:types.P2PMessage) com.google.protobuf.MessageOrBuilder { /** * .types.MsgHeader header = 1; * @return Whether the header field is set. */ boolean hasHeader(); /** * .types.MsgHeader header = 1; * @return The header. */ types.P2P.MsgHeader getHeader(); /** * .types.MsgHeader header = 1; */ types.P2P.MsgHeaderOrBuilder getHeaderOrBuilder(); /** * bytes data = 2; * @return The data. */ com.google.protobuf.ByteString getData(); } /** *
   * Deprecated P2PMessage is data structure for aergo v0.2 or earlier. This structure is not used anymore since v0.3.0.
   * 
* * Protobuf type {@code types.P2PMessage} */ public static final class P2PMessage extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.P2PMessage) P2PMessageOrBuilder { private static final long serialVersionUID = 0L; // Use P2PMessage.newBuilder() to construct. private P2PMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private P2PMessage() { data_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new P2PMessage(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private P2PMessage( 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: { types.P2P.MsgHeader.Builder subBuilder = null; if (header_ != null) { subBuilder = header_.toBuilder(); } header_ = input.readMessage(types.P2P.MsgHeader.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(header_); header_ = subBuilder.buildPartial(); } break; } case 18: { data_ = 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 types.P2P.internal_static_types_P2PMessage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_P2PMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.P2PMessage.class, types.P2P.P2PMessage.Builder.class); } public static final int HEADER_FIELD_NUMBER = 1; private types.P2P.MsgHeader header_; /** * .types.MsgHeader header = 1; * @return Whether the header field is set. */ @java.lang.Override public boolean hasHeader() { return header_ != null; } /** * .types.MsgHeader header = 1; * @return The header. */ @java.lang.Override public types.P2P.MsgHeader getHeader() { return header_ == null ? types.P2P.MsgHeader.getDefaultInstance() : header_; } /** * .types.MsgHeader header = 1; */ @java.lang.Override public types.P2P.MsgHeaderOrBuilder getHeaderOrBuilder() { return getHeader(); } 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_; } 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 (header_ != null) { output.writeMessage(1, getHeader()); } if (!data_.isEmpty()) { output.writeBytes(2, data_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (header_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getHeader()); } if (!data_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, data_); } 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 types.P2P.P2PMessage)) { return super.equals(obj); } types.P2P.P2PMessage other = (types.P2P.P2PMessage) obj; if (hasHeader() != other.hasHeader()) return false; if (hasHeader()) { if (!getHeader() .equals(other.getHeader())) return false; } if (!getData() .equals(other.getData())) 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 (hasHeader()) { hash = (37 * hash) + HEADER_FIELD_NUMBER; hash = (53 * hash) + getHeader().hashCode(); } hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.P2PMessage parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.P2PMessage parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.P2PMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.P2PMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.P2PMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.P2PMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.P2PMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.P2PMessage 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 types.P2P.P2PMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.P2PMessage 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 types.P2P.P2PMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.P2PMessage 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(types.P2P.P2PMessage 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; } /** *
     * Deprecated P2PMessage is data structure for aergo v0.2 or earlier. This structure is not used anymore since v0.3.0.
     * 
* * Protobuf type {@code types.P2PMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.P2PMessage) types.P2P.P2PMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_P2PMessage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_P2PMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.P2PMessage.class, types.P2P.P2PMessage.Builder.class); } // Construct using types.P2P.P2PMessage.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 (headerBuilder_ == null) { header_ = null; } else { header_ = null; headerBuilder_ = null; } data_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_P2PMessage_descriptor; } @java.lang.Override public types.P2P.P2PMessage getDefaultInstanceForType() { return types.P2P.P2PMessage.getDefaultInstance(); } @java.lang.Override public types.P2P.P2PMessage build() { types.P2P.P2PMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.P2PMessage buildPartial() { types.P2P.P2PMessage result = new types.P2P.P2PMessage(this); if (headerBuilder_ == null) { result.header_ = header_; } else { result.header_ = headerBuilder_.build(); } result.data_ = data_; 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 types.P2P.P2PMessage) { return mergeFrom((types.P2P.P2PMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.P2PMessage other) { if (other == types.P2P.P2PMessage.getDefaultInstance()) return this; if (other.hasHeader()) { mergeHeader(other.getHeader()); } if (other.getData() != com.google.protobuf.ByteString.EMPTY) { setData(other.getData()); } 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 { types.P2P.P2PMessage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.P2PMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private types.P2P.MsgHeader header_; private com.google.protobuf.SingleFieldBuilderV3< types.P2P.MsgHeader, types.P2P.MsgHeader.Builder, types.P2P.MsgHeaderOrBuilder> headerBuilder_; /** * .types.MsgHeader header = 1; * @return Whether the header field is set. */ public boolean hasHeader() { return headerBuilder_ != null || header_ != null; } /** * .types.MsgHeader header = 1; * @return The header. */ public types.P2P.MsgHeader getHeader() { if (headerBuilder_ == null) { return header_ == null ? types.P2P.MsgHeader.getDefaultInstance() : header_; } else { return headerBuilder_.getMessage(); } } /** * .types.MsgHeader header = 1; */ public Builder setHeader(types.P2P.MsgHeader value) { if (headerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } header_ = value; onChanged(); } else { headerBuilder_.setMessage(value); } return this; } /** * .types.MsgHeader header = 1; */ public Builder setHeader( types.P2P.MsgHeader.Builder builderForValue) { if (headerBuilder_ == null) { header_ = builderForValue.build(); onChanged(); } else { headerBuilder_.setMessage(builderForValue.build()); } return this; } /** * .types.MsgHeader header = 1; */ public Builder mergeHeader(types.P2P.MsgHeader value) { if (headerBuilder_ == null) { if (header_ != null) { header_ = types.P2P.MsgHeader.newBuilder(header_).mergeFrom(value).buildPartial(); } else { header_ = value; } onChanged(); } else { headerBuilder_.mergeFrom(value); } return this; } /** * .types.MsgHeader header = 1; */ public Builder clearHeader() { if (headerBuilder_ == null) { header_ = null; onChanged(); } else { header_ = null; headerBuilder_ = null; } return this; } /** * .types.MsgHeader header = 1; */ public types.P2P.MsgHeader.Builder getHeaderBuilder() { onChanged(); return getHeaderFieldBuilder().getBuilder(); } /** * .types.MsgHeader header = 1; */ public types.P2P.MsgHeaderOrBuilder getHeaderOrBuilder() { if (headerBuilder_ != null) { return headerBuilder_.getMessageOrBuilder(); } else { return header_ == null ? types.P2P.MsgHeader.getDefaultInstance() : header_; } } /** * .types.MsgHeader header = 1; */ private com.google.protobuf.SingleFieldBuilderV3< types.P2P.MsgHeader, types.P2P.MsgHeader.Builder, types.P2P.MsgHeaderOrBuilder> getHeaderFieldBuilder() { if (headerBuilder_ == null) { headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< types.P2P.MsgHeader, types.P2P.MsgHeader.Builder, types.P2P.MsgHeaderOrBuilder>( getHeader(), getParentForChildren(), isClean()); header_ = null; } return headerBuilder_; } 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; } @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:types.P2PMessage) } // @@protoc_insertion_point(class_scope:types.P2PMessage) private static final types.P2P.P2PMessage DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.P2PMessage(); } public static types.P2P.P2PMessage getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public P2PMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new P2PMessage(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 types.P2P.P2PMessage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PingOrBuilder extends // @@protoc_insertion_point(interface_extends:types.Ping) com.google.protobuf.MessageOrBuilder { /** * bytes best_block_hash = 1; * @return The bestBlockHash. */ com.google.protobuf.ByteString getBestBlockHash(); /** * uint64 best_height = 2; * @return The bestHeight. */ long getBestHeight(); } /** *
   * Ping request message
   * 
* * Protobuf type {@code types.Ping} */ public static final class Ping extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.Ping) PingOrBuilder { private static final long serialVersionUID = 0L; // Use Ping.newBuilder() to construct. private Ping(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Ping() { bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Ping(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Ping( 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: { bestBlockHash_ = input.readBytes(); break; } case 16: { bestHeight_ = input.readUInt64(); 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 types.P2P.internal_static_types_Ping_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_Ping_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.Ping.class, types.P2P.Ping.Builder.class); } public static final int BEST_BLOCK_HASH_FIELD_NUMBER = 1; private com.google.protobuf.ByteString bestBlockHash_; /** * bytes best_block_hash = 1; * @return The bestBlockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBestBlockHash() { return bestBlockHash_; } public static final int BEST_HEIGHT_FIELD_NUMBER = 2; private long bestHeight_; /** * uint64 best_height = 2; * @return The bestHeight. */ @java.lang.Override public long getBestHeight() { return bestHeight_; } 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 (!bestBlockHash_.isEmpty()) { output.writeBytes(1, bestBlockHash_); } if (bestHeight_ != 0L) { output.writeUInt64(2, bestHeight_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!bestBlockHash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, bestBlockHash_); } if (bestHeight_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, bestHeight_); } 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 types.P2P.Ping)) { return super.equals(obj); } types.P2P.Ping other = (types.P2P.Ping) obj; if (!getBestBlockHash() .equals(other.getBestBlockHash())) return false; if (getBestHeight() != other.getBestHeight()) 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) + BEST_BLOCK_HASH_FIELD_NUMBER; hash = (53 * hash) + getBestBlockHash().hashCode(); hash = (37 * hash) + BEST_HEIGHT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBestHeight()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.Ping parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Ping parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Ping parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Ping parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Ping parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Ping parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Ping parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.Ping 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 types.P2P.Ping parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.Ping 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 types.P2P.Ping parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.Ping 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(types.P2P.Ping 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; } /** *
     * Ping request message
     * 
* * Protobuf type {@code types.Ping} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.Ping) types.P2P.PingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_Ping_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_Ping_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.Ping.class, types.P2P.Ping.Builder.class); } // Construct using types.P2P.Ping.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(); bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; bestHeight_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_Ping_descriptor; } @java.lang.Override public types.P2P.Ping getDefaultInstanceForType() { return types.P2P.Ping.getDefaultInstance(); } @java.lang.Override public types.P2P.Ping build() { types.P2P.Ping result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.Ping buildPartial() { types.P2P.Ping result = new types.P2P.Ping(this); result.bestBlockHash_ = bestBlockHash_; result.bestHeight_ = bestHeight_; 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 types.P2P.Ping) { return mergeFrom((types.P2P.Ping)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.Ping other) { if (other == types.P2P.Ping.getDefaultInstance()) return this; if (other.getBestBlockHash() != com.google.protobuf.ByteString.EMPTY) { setBestBlockHash(other.getBestBlockHash()); } if (other.getBestHeight() != 0L) { setBestHeight(other.getBestHeight()); } 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 { types.P2P.Ping parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.Ping) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; /** * bytes best_block_hash = 1; * @return The bestBlockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBestBlockHash() { return bestBlockHash_; } /** * bytes best_block_hash = 1; * @param value The bestBlockHash to set. * @return This builder for chaining. */ public Builder setBestBlockHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bestBlockHash_ = value; onChanged(); return this; } /** * bytes best_block_hash = 1; * @return This builder for chaining. */ public Builder clearBestBlockHash() { bestBlockHash_ = getDefaultInstance().getBestBlockHash(); onChanged(); return this; } private long bestHeight_ ; /** * uint64 best_height = 2; * @return The bestHeight. */ @java.lang.Override public long getBestHeight() { return bestHeight_; } /** * uint64 best_height = 2; * @param value The bestHeight to set. * @return This builder for chaining. */ public Builder setBestHeight(long value) { bestHeight_ = value; onChanged(); return this; } /** * uint64 best_height = 2; * @return This builder for chaining. */ public Builder clearBestHeight() { bestHeight_ = 0L; 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:types.Ping) } // @@protoc_insertion_point(class_scope:types.Ping) private static final types.P2P.Ping DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.Ping(); } public static types.P2P.Ping getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Ping parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Ping(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 types.P2P.Ping getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PongOrBuilder extends // @@protoc_insertion_point(interface_extends:types.Pong) com.google.protobuf.MessageOrBuilder { /** * bytes bestBlockHash = 1; * @return The bestBlockHash. */ com.google.protobuf.ByteString getBestBlockHash(); /** * uint64 bestHeight = 2; * @return The bestHeight. */ long getBestHeight(); } /** *
   * Ping response message
   * 
* * Protobuf type {@code types.Pong} */ public static final class Pong extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.Pong) PongOrBuilder { private static final long serialVersionUID = 0L; // Use Pong.newBuilder() to construct. private Pong(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Pong() { bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Pong(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Pong( 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: { bestBlockHash_ = input.readBytes(); break; } case 16: { bestHeight_ = input.readUInt64(); 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 types.P2P.internal_static_types_Pong_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_Pong_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.Pong.class, types.P2P.Pong.Builder.class); } public static final int BESTBLOCKHASH_FIELD_NUMBER = 1; private com.google.protobuf.ByteString bestBlockHash_; /** * bytes bestBlockHash = 1; * @return The bestBlockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBestBlockHash() { return bestBlockHash_; } public static final int BESTHEIGHT_FIELD_NUMBER = 2; private long bestHeight_; /** * uint64 bestHeight = 2; * @return The bestHeight. */ @java.lang.Override public long getBestHeight() { return bestHeight_; } 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 (!bestBlockHash_.isEmpty()) { output.writeBytes(1, bestBlockHash_); } if (bestHeight_ != 0L) { output.writeUInt64(2, bestHeight_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!bestBlockHash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, bestBlockHash_); } if (bestHeight_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, bestHeight_); } 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 types.P2P.Pong)) { return super.equals(obj); } types.P2P.Pong other = (types.P2P.Pong) obj; if (!getBestBlockHash() .equals(other.getBestBlockHash())) return false; if (getBestHeight() != other.getBestHeight()) 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) + BESTBLOCKHASH_FIELD_NUMBER; hash = (53 * hash) + getBestBlockHash().hashCode(); hash = (37 * hash) + BESTHEIGHT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBestHeight()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.Pong parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Pong parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Pong parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Pong parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Pong parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Pong parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Pong parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.Pong 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 types.P2P.Pong parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.Pong 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 types.P2P.Pong parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.Pong 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(types.P2P.Pong 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; } /** *
     * Ping response message
     * 
* * Protobuf type {@code types.Pong} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.Pong) types.P2P.PongOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_Pong_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_Pong_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.Pong.class, types.P2P.Pong.Builder.class); } // Construct using types.P2P.Pong.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(); bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; bestHeight_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_Pong_descriptor; } @java.lang.Override public types.P2P.Pong getDefaultInstanceForType() { return types.P2P.Pong.getDefaultInstance(); } @java.lang.Override public types.P2P.Pong build() { types.P2P.Pong result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.Pong buildPartial() { types.P2P.Pong result = new types.P2P.Pong(this); result.bestBlockHash_ = bestBlockHash_; result.bestHeight_ = bestHeight_; 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 types.P2P.Pong) { return mergeFrom((types.P2P.Pong)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.Pong other) { if (other == types.P2P.Pong.getDefaultInstance()) return this; if (other.getBestBlockHash() != com.google.protobuf.ByteString.EMPTY) { setBestBlockHash(other.getBestBlockHash()); } if (other.getBestHeight() != 0L) { setBestHeight(other.getBestHeight()); } 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 { types.P2P.Pong parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.Pong) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; /** * bytes bestBlockHash = 1; * @return The bestBlockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBestBlockHash() { return bestBlockHash_; } /** * bytes bestBlockHash = 1; * @param value The bestBlockHash to set. * @return This builder for chaining. */ public Builder setBestBlockHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bestBlockHash_ = value; onChanged(); return this; } /** * bytes bestBlockHash = 1; * @return This builder for chaining. */ public Builder clearBestBlockHash() { bestBlockHash_ = getDefaultInstance().getBestBlockHash(); onChanged(); return this; } private long bestHeight_ ; /** * uint64 bestHeight = 2; * @return The bestHeight. */ @java.lang.Override public long getBestHeight() { return bestHeight_; } /** * uint64 bestHeight = 2; * @param value The bestHeight to set. * @return This builder for chaining. */ public Builder setBestHeight(long value) { bestHeight_ = value; onChanged(); return this; } /** * uint64 bestHeight = 2; * @return This builder for chaining. */ public Builder clearBestHeight() { bestHeight_ = 0L; 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:types.Pong) } // @@protoc_insertion_point(class_scope:types.Pong) private static final types.P2P.Pong DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.Pong(); } public static types.P2P.Pong getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Pong parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Pong(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 types.P2P.Pong getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface StatusOrBuilder extends // @@protoc_insertion_point(interface_extends:types.Status) com.google.protobuf.MessageOrBuilder { /** * .types.PeerAddress sender = 1; * @return Whether the sender field is set. */ boolean hasSender(); /** * .types.PeerAddress sender = 1; * @return The sender. */ types.Node.PeerAddress getSender(); /** * .types.PeerAddress sender = 1; */ types.Node.PeerAddressOrBuilder getSenderOrBuilder(); /** * bytes bestBlockHash = 2; * @return The bestBlockHash. */ com.google.protobuf.ByteString getBestBlockHash(); /** * uint64 bestHeight = 3; * @return The bestHeight. */ long getBestHeight(); /** * bytes chainID = 4; * @return The chainID. */ com.google.protobuf.ByteString getChainID(); /** *
     * noExpose means that peer doesn't want to be known to other peers.
     * 
* * bool noExpose = 5; * @return The noExpose. */ boolean getNoExpose(); /** *
     * @Deprecated version is used in PeerAddress since aergo v2.
     * version of server binary.
     * 
* * string version = 6; * @return The version. */ java.lang.String getVersion(); /** *
     * @Deprecated version is used in PeerAddress since aergo v2.
     * version of server binary.
     * 
* * string version = 6; * @return The bytes for version. */ com.google.protobuf.ByteString getVersionBytes(); /** *
     * hash of genesis block
     * 
* * bytes genesis = 7; * @return The genesis. */ com.google.protobuf.ByteString getGenesis(); /** * repeated .types.AgentCertificate certificates = 8; */ java.util.List getCertificatesList(); /** * repeated .types.AgentCertificate certificates = 8; */ types.Node.AgentCertificate getCertificates(int index); /** * repeated .types.AgentCertificate certificates = 8; */ int getCertificatesCount(); /** * repeated .types.AgentCertificate certificates = 8; */ java.util.List getCertificatesOrBuilderList(); /** * repeated .types.AgentCertificate certificates = 8; */ types.Node.AgentCertificateOrBuilder getCertificatesOrBuilder( int index); /** *
     * request to issue agent certificates
     * 
* * bool issueCertificate = 9; * @return The issueCertificate. */ boolean getIssueCertificate(); } /** *
   * Status is peer status exchanged during handshake.
   * 
* * Protobuf type {@code types.Status} */ public static final class Status extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.Status) StatusOrBuilder { private static final long serialVersionUID = 0L; // Use Status.newBuilder() to construct. private Status(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Status() { bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; chainID_ = com.google.protobuf.ByteString.EMPTY; version_ = ""; genesis_ = com.google.protobuf.ByteString.EMPTY; certificates_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Status(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Status( 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 10: { types.Node.PeerAddress.Builder subBuilder = null; if (sender_ != null) { subBuilder = sender_.toBuilder(); } sender_ = input.readMessage(types.Node.PeerAddress.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(sender_); sender_ = subBuilder.buildPartial(); } break; } case 18: { bestBlockHash_ = input.readBytes(); break; } case 24: { bestHeight_ = input.readUInt64(); break; } case 34: { chainID_ = input.readBytes(); break; } case 40: { noExpose_ = input.readBool(); break; } case 50: { java.lang.String s = input.readStringRequireUtf8(); version_ = s; break; } case 58: { genesis_ = input.readBytes(); break; } case 66: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { certificates_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } certificates_.add( input.readMessage(types.Node.AgentCertificate.parser(), extensionRegistry)); break; } case 72: { issueCertificate_ = input.readBool(); 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)) { certificates_ = java.util.Collections.unmodifiableList(certificates_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_Status_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_Status_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.Status.class, types.P2P.Status.Builder.class); } public static final int SENDER_FIELD_NUMBER = 1; private types.Node.PeerAddress sender_; /** * .types.PeerAddress sender = 1; * @return Whether the sender field is set. */ @java.lang.Override public boolean hasSender() { return sender_ != null; } /** * .types.PeerAddress sender = 1; * @return The sender. */ @java.lang.Override public types.Node.PeerAddress getSender() { return sender_ == null ? types.Node.PeerAddress.getDefaultInstance() : sender_; } /** * .types.PeerAddress sender = 1; */ @java.lang.Override public types.Node.PeerAddressOrBuilder getSenderOrBuilder() { return getSender(); } public static final int BESTBLOCKHASH_FIELD_NUMBER = 2; private com.google.protobuf.ByteString bestBlockHash_; /** * bytes bestBlockHash = 2; * @return The bestBlockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBestBlockHash() { return bestBlockHash_; } public static final int BESTHEIGHT_FIELD_NUMBER = 3; private long bestHeight_; /** * uint64 bestHeight = 3; * @return The bestHeight. */ @java.lang.Override public long getBestHeight() { return bestHeight_; } public static final int CHAINID_FIELD_NUMBER = 4; private com.google.protobuf.ByteString chainID_; /** * bytes chainID = 4; * @return The chainID. */ @java.lang.Override public com.google.protobuf.ByteString getChainID() { return chainID_; } public static final int NOEXPOSE_FIELD_NUMBER = 5; private boolean noExpose_; /** *
     * noExpose means that peer doesn't want to be known to other peers.
     * 
* * bool noExpose = 5; * @return The noExpose. */ @java.lang.Override public boolean getNoExpose() { return noExpose_; } public static final int VERSION_FIELD_NUMBER = 6; private volatile java.lang.Object version_; /** *
     * @Deprecated version is used in PeerAddress since aergo v2.
     * version of server binary.
     * 
* * string version = 6; * @return The version. */ @java.lang.Override public java.lang.String getVersion() { java.lang.Object ref = version_; 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(); version_ = s; return s; } } /** *
     * @Deprecated version is used in PeerAddress since aergo v2.
     * version of server binary.
     * 
* * string version = 6; * @return The bytes for version. */ @java.lang.Override public com.google.protobuf.ByteString getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GENESIS_FIELD_NUMBER = 7; private com.google.protobuf.ByteString genesis_; /** *
     * hash of genesis block
     * 
* * bytes genesis = 7; * @return The genesis. */ @java.lang.Override public com.google.protobuf.ByteString getGenesis() { return genesis_; } public static final int CERTIFICATES_FIELD_NUMBER = 8; private java.util.List certificates_; /** * repeated .types.AgentCertificate certificates = 8; */ @java.lang.Override public java.util.List getCertificatesList() { return certificates_; } /** * repeated .types.AgentCertificate certificates = 8; */ @java.lang.Override public java.util.List getCertificatesOrBuilderList() { return certificates_; } /** * repeated .types.AgentCertificate certificates = 8; */ @java.lang.Override public int getCertificatesCount() { return certificates_.size(); } /** * repeated .types.AgentCertificate certificates = 8; */ @java.lang.Override public types.Node.AgentCertificate getCertificates(int index) { return certificates_.get(index); } /** * repeated .types.AgentCertificate certificates = 8; */ @java.lang.Override public types.Node.AgentCertificateOrBuilder getCertificatesOrBuilder( int index) { return certificates_.get(index); } public static final int ISSUECERTIFICATE_FIELD_NUMBER = 9; private boolean issueCertificate_; /** *
     * request to issue agent certificates
     * 
* * bool issueCertificate = 9; * @return The issueCertificate. */ @java.lang.Override public boolean getIssueCertificate() { return issueCertificate_; } 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 (sender_ != null) { output.writeMessage(1, getSender()); } if (!bestBlockHash_.isEmpty()) { output.writeBytes(2, bestBlockHash_); } if (bestHeight_ != 0L) { output.writeUInt64(3, bestHeight_); } if (!chainID_.isEmpty()) { output.writeBytes(4, chainID_); } if (noExpose_ != false) { output.writeBool(5, noExpose_); } if (!getVersionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, version_); } if (!genesis_.isEmpty()) { output.writeBytes(7, genesis_); } for (int i = 0; i < certificates_.size(); i++) { output.writeMessage(8, certificates_.get(i)); } if (issueCertificate_ != false) { output.writeBool(9, issueCertificate_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (sender_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getSender()); } if (!bestBlockHash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, bestBlockHash_); } if (bestHeight_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, bestHeight_); } if (!chainID_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, chainID_); } if (noExpose_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, noExpose_); } if (!getVersionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, version_); } if (!genesis_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(7, genesis_); } for (int i = 0; i < certificates_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, certificates_.get(i)); } if (issueCertificate_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(9, issueCertificate_); } 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 types.P2P.Status)) { return super.equals(obj); } types.P2P.Status other = (types.P2P.Status) obj; if (hasSender() != other.hasSender()) return false; if (hasSender()) { if (!getSender() .equals(other.getSender())) return false; } if (!getBestBlockHash() .equals(other.getBestBlockHash())) return false; if (getBestHeight() != other.getBestHeight()) return false; if (!getChainID() .equals(other.getChainID())) return false; if (getNoExpose() != other.getNoExpose()) return false; if (!getVersion() .equals(other.getVersion())) return false; if (!getGenesis() .equals(other.getGenesis())) return false; if (!getCertificatesList() .equals(other.getCertificatesList())) return false; if (getIssueCertificate() != other.getIssueCertificate()) 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 (hasSender()) { hash = (37 * hash) + SENDER_FIELD_NUMBER; hash = (53 * hash) + getSender().hashCode(); } hash = (37 * hash) + BESTBLOCKHASH_FIELD_NUMBER; hash = (53 * hash) + getBestBlockHash().hashCode(); hash = (37 * hash) + BESTHEIGHT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBestHeight()); hash = (37 * hash) + CHAINID_FIELD_NUMBER; hash = (53 * hash) + getChainID().hashCode(); hash = (37 * hash) + NOEXPOSE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getNoExpose()); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); hash = (37 * hash) + GENESIS_FIELD_NUMBER; hash = (53 * hash) + getGenesis().hashCode(); if (getCertificatesCount() > 0) { hash = (37 * hash) + CERTIFICATES_FIELD_NUMBER; hash = (53 * hash) + getCertificatesList().hashCode(); } hash = (37 * hash) + ISSUECERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIssueCertificate()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.Status parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Status parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Status parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Status parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Status parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.Status parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.Status parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.Status 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 types.P2P.Status parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.Status 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 types.P2P.Status parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.Status 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(types.P2P.Status 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; } /** *
     * Status is peer status exchanged during handshake.
     * 
* * Protobuf type {@code types.Status} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.Status) types.P2P.StatusOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_Status_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_Status_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.Status.class, types.P2P.Status.Builder.class); } // Construct using types.P2P.Status.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getCertificatesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (senderBuilder_ == null) { sender_ = null; } else { sender_ = null; senderBuilder_ = null; } bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; bestHeight_ = 0L; chainID_ = com.google.protobuf.ByteString.EMPTY; noExpose_ = false; version_ = ""; genesis_ = com.google.protobuf.ByteString.EMPTY; if (certificatesBuilder_ == null) { certificates_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { certificatesBuilder_.clear(); } issueCertificate_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_Status_descriptor; } @java.lang.Override public types.P2P.Status getDefaultInstanceForType() { return types.P2P.Status.getDefaultInstance(); } @java.lang.Override public types.P2P.Status build() { types.P2P.Status result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.Status buildPartial() { types.P2P.Status result = new types.P2P.Status(this); int from_bitField0_ = bitField0_; if (senderBuilder_ == null) { result.sender_ = sender_; } else { result.sender_ = senderBuilder_.build(); } result.bestBlockHash_ = bestBlockHash_; result.bestHeight_ = bestHeight_; result.chainID_ = chainID_; result.noExpose_ = noExpose_; result.version_ = version_; result.genesis_ = genesis_; if (certificatesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { certificates_ = java.util.Collections.unmodifiableList(certificates_); bitField0_ = (bitField0_ & ~0x00000001); } result.certificates_ = certificates_; } else { result.certificates_ = certificatesBuilder_.build(); } result.issueCertificate_ = issueCertificate_; 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 types.P2P.Status) { return mergeFrom((types.P2P.Status)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.Status other) { if (other == types.P2P.Status.getDefaultInstance()) return this; if (other.hasSender()) { mergeSender(other.getSender()); } if (other.getBestBlockHash() != com.google.protobuf.ByteString.EMPTY) { setBestBlockHash(other.getBestBlockHash()); } if (other.getBestHeight() != 0L) { setBestHeight(other.getBestHeight()); } if (other.getChainID() != com.google.protobuf.ByteString.EMPTY) { setChainID(other.getChainID()); } if (other.getNoExpose() != false) { setNoExpose(other.getNoExpose()); } if (!other.getVersion().isEmpty()) { version_ = other.version_; onChanged(); } if (other.getGenesis() != com.google.protobuf.ByteString.EMPTY) { setGenesis(other.getGenesis()); } if (certificatesBuilder_ == null) { if (!other.certificates_.isEmpty()) { if (certificates_.isEmpty()) { certificates_ = other.certificates_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureCertificatesIsMutable(); certificates_.addAll(other.certificates_); } onChanged(); } } else { if (!other.certificates_.isEmpty()) { if (certificatesBuilder_.isEmpty()) { certificatesBuilder_.dispose(); certificatesBuilder_ = null; certificates_ = other.certificates_; bitField0_ = (bitField0_ & ~0x00000001); certificatesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getCertificatesFieldBuilder() : null; } else { certificatesBuilder_.addAllMessages(other.certificates_); } } } if (other.getIssueCertificate() != false) { setIssueCertificate(other.getIssueCertificate()); } 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 { types.P2P.Status parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.Status) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private types.Node.PeerAddress sender_; private com.google.protobuf.SingleFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder> senderBuilder_; /** * .types.PeerAddress sender = 1; * @return Whether the sender field is set. */ public boolean hasSender() { return senderBuilder_ != null || sender_ != null; } /** * .types.PeerAddress sender = 1; * @return The sender. */ public types.Node.PeerAddress getSender() { if (senderBuilder_ == null) { return sender_ == null ? types.Node.PeerAddress.getDefaultInstance() : sender_; } else { return senderBuilder_.getMessage(); } } /** * .types.PeerAddress sender = 1; */ public Builder setSender(types.Node.PeerAddress value) { if (senderBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sender_ = value; onChanged(); } else { senderBuilder_.setMessage(value); } return this; } /** * .types.PeerAddress sender = 1; */ public Builder setSender( types.Node.PeerAddress.Builder builderForValue) { if (senderBuilder_ == null) { sender_ = builderForValue.build(); onChanged(); } else { senderBuilder_.setMessage(builderForValue.build()); } return this; } /** * .types.PeerAddress sender = 1; */ public Builder mergeSender(types.Node.PeerAddress value) { if (senderBuilder_ == null) { if (sender_ != null) { sender_ = types.Node.PeerAddress.newBuilder(sender_).mergeFrom(value).buildPartial(); } else { sender_ = value; } onChanged(); } else { senderBuilder_.mergeFrom(value); } return this; } /** * .types.PeerAddress sender = 1; */ public Builder clearSender() { if (senderBuilder_ == null) { sender_ = null; onChanged(); } else { sender_ = null; senderBuilder_ = null; } return this; } /** * .types.PeerAddress sender = 1; */ public types.Node.PeerAddress.Builder getSenderBuilder() { onChanged(); return getSenderFieldBuilder().getBuilder(); } /** * .types.PeerAddress sender = 1; */ public types.Node.PeerAddressOrBuilder getSenderOrBuilder() { if (senderBuilder_ != null) { return senderBuilder_.getMessageOrBuilder(); } else { return sender_ == null ? types.Node.PeerAddress.getDefaultInstance() : sender_; } } /** * .types.PeerAddress sender = 1; */ private com.google.protobuf.SingleFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder> getSenderFieldBuilder() { if (senderBuilder_ == null) { senderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder>( getSender(), getParentForChildren(), isClean()); sender_ = null; } return senderBuilder_; } private com.google.protobuf.ByteString bestBlockHash_ = com.google.protobuf.ByteString.EMPTY; /** * bytes bestBlockHash = 2; * @return The bestBlockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBestBlockHash() { return bestBlockHash_; } /** * bytes bestBlockHash = 2; * @param value The bestBlockHash to set. * @return This builder for chaining. */ public Builder setBestBlockHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bestBlockHash_ = value; onChanged(); return this; } /** * bytes bestBlockHash = 2; * @return This builder for chaining. */ public Builder clearBestBlockHash() { bestBlockHash_ = getDefaultInstance().getBestBlockHash(); onChanged(); return this; } private long bestHeight_ ; /** * uint64 bestHeight = 3; * @return The bestHeight. */ @java.lang.Override public long getBestHeight() { return bestHeight_; } /** * uint64 bestHeight = 3; * @param value The bestHeight to set. * @return This builder for chaining. */ public Builder setBestHeight(long value) { bestHeight_ = value; onChanged(); return this; } /** * uint64 bestHeight = 3; * @return This builder for chaining. */ public Builder clearBestHeight() { bestHeight_ = 0L; onChanged(); return this; } private com.google.protobuf.ByteString chainID_ = com.google.protobuf.ByteString.EMPTY; /** * bytes chainID = 4; * @return The chainID. */ @java.lang.Override public com.google.protobuf.ByteString getChainID() { return chainID_; } /** * bytes chainID = 4; * @param value The chainID to set. * @return This builder for chaining. */ public Builder setChainID(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } chainID_ = value; onChanged(); return this; } /** * bytes chainID = 4; * @return This builder for chaining. */ public Builder clearChainID() { chainID_ = getDefaultInstance().getChainID(); onChanged(); return this; } private boolean noExpose_ ; /** *
       * noExpose means that peer doesn't want to be known to other peers.
       * 
* * bool noExpose = 5; * @return The noExpose. */ @java.lang.Override public boolean getNoExpose() { return noExpose_; } /** *
       * noExpose means that peer doesn't want to be known to other peers.
       * 
* * bool noExpose = 5; * @param value The noExpose to set. * @return This builder for chaining. */ public Builder setNoExpose(boolean value) { noExpose_ = value; onChanged(); return this; } /** *
       * noExpose means that peer doesn't want to be known to other peers.
       * 
* * bool noExpose = 5; * @return This builder for chaining. */ public Builder clearNoExpose() { noExpose_ = false; onChanged(); return this; } private java.lang.Object version_ = ""; /** *
       * @Deprecated version is used in PeerAddress since aergo v2.
       * version of server binary.
       * 
* * string version = 6; * @return The version. */ public java.lang.String getVersion() { java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * @Deprecated version is used in PeerAddress since aergo v2.
       * version of server binary.
       * 
* * string version = 6; * @return The bytes for version. */ public com.google.protobuf.ByteString getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * @Deprecated version is used in PeerAddress since aergo v2.
       * version of server binary.
       * 
* * string version = 6; * @param value The version to set. * @return This builder for chaining. */ public Builder setVersion( java.lang.String value) { if (value == null) { throw new NullPointerException(); } version_ = value; onChanged(); return this; } /** *
       * @Deprecated version is used in PeerAddress since aergo v2.
       * version of server binary.
       * 
* * string version = 6; * @return This builder for chaining. */ public Builder clearVersion() { version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** *
       * @Deprecated version is used in PeerAddress since aergo v2.
       * version of server binary.
       * 
* * string version = 6; * @param value The bytes for version to set. * @return This builder for chaining. */ public Builder setVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); version_ = value; onChanged(); return this; } private com.google.protobuf.ByteString genesis_ = com.google.protobuf.ByteString.EMPTY; /** *
       * hash of genesis block
       * 
* * bytes genesis = 7; * @return The genesis. */ @java.lang.Override public com.google.protobuf.ByteString getGenesis() { return genesis_; } /** *
       * hash of genesis block
       * 
* * bytes genesis = 7; * @param value The genesis to set. * @return This builder for chaining. */ public Builder setGenesis(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } genesis_ = value; onChanged(); return this; } /** *
       * hash of genesis block
       * 
* * bytes genesis = 7; * @return This builder for chaining. */ public Builder clearGenesis() { genesis_ = getDefaultInstance().getGenesis(); onChanged(); return this; } private java.util.List certificates_ = java.util.Collections.emptyList(); private void ensureCertificatesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { certificates_ = new java.util.ArrayList(certificates_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder> certificatesBuilder_; /** * repeated .types.AgentCertificate certificates = 8; */ public java.util.List getCertificatesList() { if (certificatesBuilder_ == null) { return java.util.Collections.unmodifiableList(certificates_); } else { return certificatesBuilder_.getMessageList(); } } /** * repeated .types.AgentCertificate certificates = 8; */ public int getCertificatesCount() { if (certificatesBuilder_ == null) { return certificates_.size(); } else { return certificatesBuilder_.getCount(); } } /** * repeated .types.AgentCertificate certificates = 8; */ public types.Node.AgentCertificate getCertificates(int index) { if (certificatesBuilder_ == null) { return certificates_.get(index); } else { return certificatesBuilder_.getMessage(index); } } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder setCertificates( int index, types.Node.AgentCertificate value) { if (certificatesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCertificatesIsMutable(); certificates_.set(index, value); onChanged(); } else { certificatesBuilder_.setMessage(index, value); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder setCertificates( int index, types.Node.AgentCertificate.Builder builderForValue) { if (certificatesBuilder_ == null) { ensureCertificatesIsMutable(); certificates_.set(index, builderForValue.build()); onChanged(); } else { certificatesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder addCertificates(types.Node.AgentCertificate value) { if (certificatesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCertificatesIsMutable(); certificates_.add(value); onChanged(); } else { certificatesBuilder_.addMessage(value); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder addCertificates( int index, types.Node.AgentCertificate value) { if (certificatesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCertificatesIsMutable(); certificates_.add(index, value); onChanged(); } else { certificatesBuilder_.addMessage(index, value); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder addCertificates( types.Node.AgentCertificate.Builder builderForValue) { if (certificatesBuilder_ == null) { ensureCertificatesIsMutable(); certificates_.add(builderForValue.build()); onChanged(); } else { certificatesBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder addCertificates( int index, types.Node.AgentCertificate.Builder builderForValue) { if (certificatesBuilder_ == null) { ensureCertificatesIsMutable(); certificates_.add(index, builderForValue.build()); onChanged(); } else { certificatesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder addAllCertificates( java.lang.Iterable values) { if (certificatesBuilder_ == null) { ensureCertificatesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, certificates_); onChanged(); } else { certificatesBuilder_.addAllMessages(values); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder clearCertificates() { if (certificatesBuilder_ == null) { certificates_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { certificatesBuilder_.clear(); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public Builder removeCertificates(int index) { if (certificatesBuilder_ == null) { ensureCertificatesIsMutable(); certificates_.remove(index); onChanged(); } else { certificatesBuilder_.remove(index); } return this; } /** * repeated .types.AgentCertificate certificates = 8; */ public types.Node.AgentCertificate.Builder getCertificatesBuilder( int index) { return getCertificatesFieldBuilder().getBuilder(index); } /** * repeated .types.AgentCertificate certificates = 8; */ public types.Node.AgentCertificateOrBuilder getCertificatesOrBuilder( int index) { if (certificatesBuilder_ == null) { return certificates_.get(index); } else { return certificatesBuilder_.getMessageOrBuilder(index); } } /** * repeated .types.AgentCertificate certificates = 8; */ public java.util.List getCertificatesOrBuilderList() { if (certificatesBuilder_ != null) { return certificatesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(certificates_); } } /** * repeated .types.AgentCertificate certificates = 8; */ public types.Node.AgentCertificate.Builder addCertificatesBuilder() { return getCertificatesFieldBuilder().addBuilder( types.Node.AgentCertificate.getDefaultInstance()); } /** * repeated .types.AgentCertificate certificates = 8; */ public types.Node.AgentCertificate.Builder addCertificatesBuilder( int index) { return getCertificatesFieldBuilder().addBuilder( index, types.Node.AgentCertificate.getDefaultInstance()); } /** * repeated .types.AgentCertificate certificates = 8; */ public java.util.List getCertificatesBuilderList() { return getCertificatesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder> getCertificatesFieldBuilder() { if (certificatesBuilder_ == null) { certificatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder>( certificates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); certificates_ = null; } return certificatesBuilder_; } private boolean issueCertificate_ ; /** *
       * request to issue agent certificates
       * 
* * bool issueCertificate = 9; * @return The issueCertificate. */ @java.lang.Override public boolean getIssueCertificate() { return issueCertificate_; } /** *
       * request to issue agent certificates
       * 
* * bool issueCertificate = 9; * @param value The issueCertificate to set. * @return This builder for chaining. */ public Builder setIssueCertificate(boolean value) { issueCertificate_ = value; onChanged(); return this; } /** *
       * request to issue agent certificates
       * 
* * bool issueCertificate = 9; * @return This builder for chaining. */ public Builder clearIssueCertificate() { issueCertificate_ = false; 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:types.Status) } // @@protoc_insertion_point(class_scope:types.Status) private static final types.P2P.Status DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.Status(); } public static types.P2P.Status getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Status parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Status(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 types.P2P.Status getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GoAwayNoticeOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GoAwayNotice) com.google.protobuf.MessageOrBuilder { /** * string message = 1; * @return The message. */ java.lang.String getMessage(); /** * string message = 1; * @return The bytes for message. */ com.google.protobuf.ByteString getMessageBytes(); } /** *
   * GoAwayNotice is sent before host peer is closing connection to remote peer. it contains why the host closing connection.
   * 
* * Protobuf type {@code types.GoAwayNotice} */ public static final class GoAwayNotice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GoAwayNotice) GoAwayNoticeOrBuilder { private static final long serialVersionUID = 0L; // Use GoAwayNotice.newBuilder() to construct. private GoAwayNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GoAwayNotice() { message_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GoAwayNotice(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GoAwayNotice( 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(); message_ = 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 types.P2P.internal_static_types_GoAwayNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GoAwayNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GoAwayNotice.class, types.P2P.GoAwayNotice.Builder.class); } public static final int MESSAGE_FIELD_NUMBER = 1; private volatile java.lang.Object message_; /** * string message = 1; * @return The message. */ @java.lang.Override public java.lang.String getMessage() { java.lang.Object ref = message_; 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(); message_ = s; return s; } } /** * string message = 1; * @return The bytes for message. */ @java.lang.Override public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = 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 (!getMessageBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getMessageBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); } 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 types.P2P.GoAwayNotice)) { return super.equals(obj); } types.P2P.GoAwayNotice other = (types.P2P.GoAwayNotice) obj; if (!getMessage() .equals(other.getMessage())) 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) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GoAwayNotice parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GoAwayNotice parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GoAwayNotice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GoAwayNotice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GoAwayNotice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GoAwayNotice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GoAwayNotice parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GoAwayNotice 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 types.P2P.GoAwayNotice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GoAwayNotice 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 types.P2P.GoAwayNotice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GoAwayNotice 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(types.P2P.GoAwayNotice 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; } /** *
     * GoAwayNotice is sent before host peer is closing connection to remote peer. it contains why the host closing connection.
     * 
* * Protobuf type {@code types.GoAwayNotice} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GoAwayNotice) types.P2P.GoAwayNoticeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GoAwayNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GoAwayNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GoAwayNotice.class, types.P2P.GoAwayNotice.Builder.class); } // Construct using types.P2P.GoAwayNotice.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(); message_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GoAwayNotice_descriptor; } @java.lang.Override public types.P2P.GoAwayNotice getDefaultInstanceForType() { return types.P2P.GoAwayNotice.getDefaultInstance(); } @java.lang.Override public types.P2P.GoAwayNotice build() { types.P2P.GoAwayNotice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GoAwayNotice buildPartial() { types.P2P.GoAwayNotice result = new types.P2P.GoAwayNotice(this); result.message_ = message_; 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 types.P2P.GoAwayNotice) { return mergeFrom((types.P2P.GoAwayNotice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GoAwayNotice other) { if (other == types.P2P.GoAwayNotice.getDefaultInstance()) return this; if (!other.getMessage().isEmpty()) { message_ = other.message_; 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 { types.P2P.GoAwayNotice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GoAwayNotice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object message_ = ""; /** * string message = 1; * @return The message. */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); message_ = s; return s; } else { return (java.lang.String) ref; } } /** * string message = 1; * @return The bytes for message. */ public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string message = 1; * @param value The message to set. * @return This builder for chaining. */ public Builder setMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } message_ = value; onChanged(); return this; } /** * string message = 1; * @return This builder for chaining. */ public Builder clearMessage() { message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /** * string message = 1; * @param value The bytes for message to set. * @return This builder for chaining. */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); message_ = 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:types.GoAwayNotice) } // @@protoc_insertion_point(class_scope:types.GoAwayNotice) private static final types.P2P.GoAwayNotice DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GoAwayNotice(); } public static types.P2P.GoAwayNotice getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GoAwayNotice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GoAwayNotice(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 types.P2P.GoAwayNotice getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface AddressesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.AddressesRequest) com.google.protobuf.MessageOrBuilder { /** * .types.PeerAddress sender = 1; * @return Whether the sender field is set. */ boolean hasSender(); /** * .types.PeerAddress sender = 1; * @return The sender. */ types.Node.PeerAddress getSender(); /** * .types.PeerAddress sender = 1; */ types.Node.PeerAddressOrBuilder getSenderOrBuilder(); /** * uint32 maxSize = 2; * @return The maxSize. */ int getMaxSize(); } /** * Protobuf type {@code types.AddressesRequest} */ public static final class AddressesRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.AddressesRequest) AddressesRequestOrBuilder { private static final long serialVersionUID = 0L; // Use AddressesRequest.newBuilder() to construct. private AddressesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AddressesRequest() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AddressesRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private AddressesRequest( 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: { types.Node.PeerAddress.Builder subBuilder = null; if (sender_ != null) { subBuilder = sender_.toBuilder(); } sender_ = input.readMessage(types.Node.PeerAddress.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(sender_); sender_ = subBuilder.buildPartial(); } break; } case 16: { maxSize_ = input.readUInt32(); 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 types.P2P.internal_static_types_AddressesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_AddressesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.AddressesRequest.class, types.P2P.AddressesRequest.Builder.class); } public static final int SENDER_FIELD_NUMBER = 1; private types.Node.PeerAddress sender_; /** * .types.PeerAddress sender = 1; * @return Whether the sender field is set. */ @java.lang.Override public boolean hasSender() { return sender_ != null; } /** * .types.PeerAddress sender = 1; * @return The sender. */ @java.lang.Override public types.Node.PeerAddress getSender() { return sender_ == null ? types.Node.PeerAddress.getDefaultInstance() : sender_; } /** * .types.PeerAddress sender = 1; */ @java.lang.Override public types.Node.PeerAddressOrBuilder getSenderOrBuilder() { return getSender(); } public static final int MAXSIZE_FIELD_NUMBER = 2; private int maxSize_; /** * uint32 maxSize = 2; * @return The maxSize. */ @java.lang.Override public int getMaxSize() { return maxSize_; } 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 (sender_ != null) { output.writeMessage(1, getSender()); } if (maxSize_ != 0) { output.writeUInt32(2, maxSize_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (sender_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getSender()); } if (maxSize_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, maxSize_); } 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 types.P2P.AddressesRequest)) { return super.equals(obj); } types.P2P.AddressesRequest other = (types.P2P.AddressesRequest) obj; if (hasSender() != other.hasSender()) return false; if (hasSender()) { if (!getSender() .equals(other.getSender())) return false; } if (getMaxSize() != other.getMaxSize()) 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 (hasSender()) { hash = (37 * hash) + SENDER_FIELD_NUMBER; hash = (53 * hash) + getSender().hashCode(); } hash = (37 * hash) + MAXSIZE_FIELD_NUMBER; hash = (53 * hash) + getMaxSize(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.AddressesRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.AddressesRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.AddressesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.AddressesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.AddressesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.AddressesRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.AddressesRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.AddressesRequest 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 types.P2P.AddressesRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.AddressesRequest 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 types.P2P.AddressesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.AddressesRequest 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(types.P2P.AddressesRequest 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; } /** * Protobuf type {@code types.AddressesRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.AddressesRequest) types.P2P.AddressesRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_AddressesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_AddressesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.AddressesRequest.class, types.P2P.AddressesRequest.Builder.class); } // Construct using types.P2P.AddressesRequest.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 (senderBuilder_ == null) { sender_ = null; } else { sender_ = null; senderBuilder_ = null; } maxSize_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_AddressesRequest_descriptor; } @java.lang.Override public types.P2P.AddressesRequest getDefaultInstanceForType() { return types.P2P.AddressesRequest.getDefaultInstance(); } @java.lang.Override public types.P2P.AddressesRequest build() { types.P2P.AddressesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.AddressesRequest buildPartial() { types.P2P.AddressesRequest result = new types.P2P.AddressesRequest(this); if (senderBuilder_ == null) { result.sender_ = sender_; } else { result.sender_ = senderBuilder_.build(); } result.maxSize_ = maxSize_; 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 types.P2P.AddressesRequest) { return mergeFrom((types.P2P.AddressesRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.AddressesRequest other) { if (other == types.P2P.AddressesRequest.getDefaultInstance()) return this; if (other.hasSender()) { mergeSender(other.getSender()); } if (other.getMaxSize() != 0) { setMaxSize(other.getMaxSize()); } 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 { types.P2P.AddressesRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.AddressesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private types.Node.PeerAddress sender_; private com.google.protobuf.SingleFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder> senderBuilder_; /** * .types.PeerAddress sender = 1; * @return Whether the sender field is set. */ public boolean hasSender() { return senderBuilder_ != null || sender_ != null; } /** * .types.PeerAddress sender = 1; * @return The sender. */ public types.Node.PeerAddress getSender() { if (senderBuilder_ == null) { return sender_ == null ? types.Node.PeerAddress.getDefaultInstance() : sender_; } else { return senderBuilder_.getMessage(); } } /** * .types.PeerAddress sender = 1; */ public Builder setSender(types.Node.PeerAddress value) { if (senderBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sender_ = value; onChanged(); } else { senderBuilder_.setMessage(value); } return this; } /** * .types.PeerAddress sender = 1; */ public Builder setSender( types.Node.PeerAddress.Builder builderForValue) { if (senderBuilder_ == null) { sender_ = builderForValue.build(); onChanged(); } else { senderBuilder_.setMessage(builderForValue.build()); } return this; } /** * .types.PeerAddress sender = 1; */ public Builder mergeSender(types.Node.PeerAddress value) { if (senderBuilder_ == null) { if (sender_ != null) { sender_ = types.Node.PeerAddress.newBuilder(sender_).mergeFrom(value).buildPartial(); } else { sender_ = value; } onChanged(); } else { senderBuilder_.mergeFrom(value); } return this; } /** * .types.PeerAddress sender = 1; */ public Builder clearSender() { if (senderBuilder_ == null) { sender_ = null; onChanged(); } else { sender_ = null; senderBuilder_ = null; } return this; } /** * .types.PeerAddress sender = 1; */ public types.Node.PeerAddress.Builder getSenderBuilder() { onChanged(); return getSenderFieldBuilder().getBuilder(); } /** * .types.PeerAddress sender = 1; */ public types.Node.PeerAddressOrBuilder getSenderOrBuilder() { if (senderBuilder_ != null) { return senderBuilder_.getMessageOrBuilder(); } else { return sender_ == null ? types.Node.PeerAddress.getDefaultInstance() : sender_; } } /** * .types.PeerAddress sender = 1; */ private com.google.protobuf.SingleFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder> getSenderFieldBuilder() { if (senderBuilder_ == null) { senderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder>( getSender(), getParentForChildren(), isClean()); sender_ = null; } return senderBuilder_; } private int maxSize_ ; /** * uint32 maxSize = 2; * @return The maxSize. */ @java.lang.Override public int getMaxSize() { return maxSize_; } /** * uint32 maxSize = 2; * @param value The maxSize to set. * @return This builder for chaining. */ public Builder setMaxSize(int value) { maxSize_ = value; onChanged(); return this; } /** * uint32 maxSize = 2; * @return This builder for chaining. */ public Builder clearMaxSize() { maxSize_ = 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:types.AddressesRequest) } // @@protoc_insertion_point(class_scope:types.AddressesRequest) private static final types.P2P.AddressesRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.AddressesRequest(); } public static types.P2P.AddressesRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AddressesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new AddressesRequest(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 types.P2P.AddressesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface AddressesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:types.AddressesResponse) com.google.protobuf.MessageOrBuilder { /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .types.ResultStatus status = 1; * @return The status. */ types.P2P.ResultStatus getStatus(); /** * repeated .types.PeerAddress peers = 2; */ java.util.List getPeersList(); /** * repeated .types.PeerAddress peers = 2; */ types.Node.PeerAddress getPeers(int index); /** * repeated .types.PeerAddress peers = 2; */ int getPeersCount(); /** * repeated .types.PeerAddress peers = 2; */ java.util.List getPeersOrBuilderList(); /** * repeated .types.PeerAddress peers = 2; */ types.Node.PeerAddressOrBuilder getPeersOrBuilder( int index); } /** * Protobuf type {@code types.AddressesResponse} */ public static final class AddressesResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.AddressesResponse) AddressesResponseOrBuilder { private static final long serialVersionUID = 0L; // Use AddressesResponse.newBuilder() to construct. private AddressesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AddressesResponse() { status_ = 0; peers_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AddressesResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private AddressesResponse( 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: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { peers_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } peers_.add( input.readMessage(types.Node.PeerAddress.parser(), extensionRegistry)); 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)) { peers_ = java.util.Collections.unmodifiableList(peers_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_AddressesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_AddressesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.AddressesResponse.class, types.P2P.AddressesResponse.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; private int status_; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } public static final int PEERS_FIELD_NUMBER = 2; private java.util.List peers_; /** * repeated .types.PeerAddress peers = 2; */ @java.lang.Override public java.util.List getPeersList() { return peers_; } /** * repeated .types.PeerAddress peers = 2; */ @java.lang.Override public java.util.List getPeersOrBuilderList() { return peers_; } /** * repeated .types.PeerAddress peers = 2; */ @java.lang.Override public int getPeersCount() { return peers_.size(); } /** * repeated .types.PeerAddress peers = 2; */ @java.lang.Override public types.Node.PeerAddress getPeers(int index) { return peers_.get(index); } /** * repeated .types.PeerAddress peers = 2; */ @java.lang.Override public types.Node.PeerAddressOrBuilder getPeersOrBuilder( int index) { return peers_.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 (status_ != types.P2P.ResultStatus.OK.getNumber()) { output.writeEnum(1, status_); } for (int i = 0; i < peers_.size(); i++) { output.writeMessage(2, peers_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (status_ != types.P2P.ResultStatus.OK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, status_); } for (int i = 0; i < peers_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, peers_.get(i)); } 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 types.P2P.AddressesResponse)) { return super.equals(obj); } types.P2P.AddressesResponse other = (types.P2P.AddressesResponse) obj; if (status_ != other.status_) return false; if (!getPeersList() .equals(other.getPeersList())) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; if (getPeersCount() > 0) { hash = (37 * hash) + PEERS_FIELD_NUMBER; hash = (53 * hash) + getPeersList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.AddressesResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.AddressesResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.AddressesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.AddressesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.AddressesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.AddressesResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.AddressesResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.AddressesResponse 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 types.P2P.AddressesResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.AddressesResponse 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 types.P2P.AddressesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.AddressesResponse 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(types.P2P.AddressesResponse 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; } /** * Protobuf type {@code types.AddressesResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.AddressesResponse) types.P2P.AddressesResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_AddressesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_AddressesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.AddressesResponse.class, types.P2P.AddressesResponse.Builder.class); } // Construct using types.P2P.AddressesResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getPeersFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); status_ = 0; if (peersBuilder_ == null) { peers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { peersBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_AddressesResponse_descriptor; } @java.lang.Override public types.P2P.AddressesResponse getDefaultInstanceForType() { return types.P2P.AddressesResponse.getDefaultInstance(); } @java.lang.Override public types.P2P.AddressesResponse build() { types.P2P.AddressesResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.AddressesResponse buildPartial() { types.P2P.AddressesResponse result = new types.P2P.AddressesResponse(this); int from_bitField0_ = bitField0_; result.status_ = status_; if (peersBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { peers_ = java.util.Collections.unmodifiableList(peers_); bitField0_ = (bitField0_ & ~0x00000001); } result.peers_ = peers_; } else { result.peers_ = peersBuilder_.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 types.P2P.AddressesResponse) { return mergeFrom((types.P2P.AddressesResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.AddressesResponse other) { if (other == types.P2P.AddressesResponse.getDefaultInstance()) return this; if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (peersBuilder_ == null) { if (!other.peers_.isEmpty()) { if (peers_.isEmpty()) { peers_ = other.peers_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensurePeersIsMutable(); peers_.addAll(other.peers_); } onChanged(); } } else { if (!other.peers_.isEmpty()) { if (peersBuilder_.isEmpty()) { peersBuilder_.dispose(); peersBuilder_ = null; peers_ = other.peers_; bitField0_ = (bitField0_ & ~0x00000001); peersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPeersFieldBuilder() : null; } else { peersBuilder_.addAllMessages(other.peers_); } } } 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 { types.P2P.AddressesResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.AddressesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int status_ = 0; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } /** * .types.ResultStatus status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(types.P2P.ResultStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return This builder for chaining. */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private java.util.List peers_ = java.util.Collections.emptyList(); private void ensurePeersIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { peers_ = new java.util.ArrayList(peers_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder> peersBuilder_; /** * repeated .types.PeerAddress peers = 2; */ public java.util.List getPeersList() { if (peersBuilder_ == null) { return java.util.Collections.unmodifiableList(peers_); } else { return peersBuilder_.getMessageList(); } } /** * repeated .types.PeerAddress peers = 2; */ public int getPeersCount() { if (peersBuilder_ == null) { return peers_.size(); } else { return peersBuilder_.getCount(); } } /** * repeated .types.PeerAddress peers = 2; */ public types.Node.PeerAddress getPeers(int index) { if (peersBuilder_ == null) { return peers_.get(index); } else { return peersBuilder_.getMessage(index); } } /** * repeated .types.PeerAddress peers = 2; */ public Builder setPeers( int index, types.Node.PeerAddress value) { if (peersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePeersIsMutable(); peers_.set(index, value); onChanged(); } else { peersBuilder_.setMessage(index, value); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public Builder setPeers( int index, types.Node.PeerAddress.Builder builderForValue) { if (peersBuilder_ == null) { ensurePeersIsMutable(); peers_.set(index, builderForValue.build()); onChanged(); } else { peersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public Builder addPeers(types.Node.PeerAddress value) { if (peersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePeersIsMutable(); peers_.add(value); onChanged(); } else { peersBuilder_.addMessage(value); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public Builder addPeers( int index, types.Node.PeerAddress value) { if (peersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePeersIsMutable(); peers_.add(index, value); onChanged(); } else { peersBuilder_.addMessage(index, value); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public Builder addPeers( types.Node.PeerAddress.Builder builderForValue) { if (peersBuilder_ == null) { ensurePeersIsMutable(); peers_.add(builderForValue.build()); onChanged(); } else { peersBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public Builder addPeers( int index, types.Node.PeerAddress.Builder builderForValue) { if (peersBuilder_ == null) { ensurePeersIsMutable(); peers_.add(index, builderForValue.build()); onChanged(); } else { peersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public Builder addAllPeers( java.lang.Iterable values) { if (peersBuilder_ == null) { ensurePeersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, peers_); onChanged(); } else { peersBuilder_.addAllMessages(values); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public Builder clearPeers() { if (peersBuilder_ == null) { peers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { peersBuilder_.clear(); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public Builder removePeers(int index) { if (peersBuilder_ == null) { ensurePeersIsMutable(); peers_.remove(index); onChanged(); } else { peersBuilder_.remove(index); } return this; } /** * repeated .types.PeerAddress peers = 2; */ public types.Node.PeerAddress.Builder getPeersBuilder( int index) { return getPeersFieldBuilder().getBuilder(index); } /** * repeated .types.PeerAddress peers = 2; */ public types.Node.PeerAddressOrBuilder getPeersOrBuilder( int index) { if (peersBuilder_ == null) { return peers_.get(index); } else { return peersBuilder_.getMessageOrBuilder(index); } } /** * repeated .types.PeerAddress peers = 2; */ public java.util.List getPeersOrBuilderList() { if (peersBuilder_ != null) { return peersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(peers_); } } /** * repeated .types.PeerAddress peers = 2; */ public types.Node.PeerAddress.Builder addPeersBuilder() { return getPeersFieldBuilder().addBuilder( types.Node.PeerAddress.getDefaultInstance()); } /** * repeated .types.PeerAddress peers = 2; */ public types.Node.PeerAddress.Builder addPeersBuilder( int index) { return getPeersFieldBuilder().addBuilder( index, types.Node.PeerAddress.getDefaultInstance()); } /** * repeated .types.PeerAddress peers = 2; */ public java.util.List getPeersBuilderList() { return getPeersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder> getPeersFieldBuilder() { if (peersBuilder_ == null) { peersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< types.Node.PeerAddress, types.Node.PeerAddress.Builder, types.Node.PeerAddressOrBuilder>( peers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); peers_ = null; } return peersBuilder_; } @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:types.AddressesResponse) } // @@protoc_insertion_point(class_scope:types.AddressesResponse) private static final types.P2P.AddressesResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.AddressesResponse(); } public static types.P2P.AddressesResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AddressesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new AddressesResponse(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 types.P2P.AddressesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface NewBlockNoticeOrBuilder extends // @@protoc_insertion_point(interface_extends:types.NewBlockNotice) com.google.protobuf.MessageOrBuilder { /** * bytes blockHash = 1; * @return The blockHash. */ com.google.protobuf.ByteString getBlockHash(); /** * uint64 blockNo = 2; * @return The blockNo. */ long getBlockNo(); } /** *
   * NewBlockNotice is sent to other peers when host node add a block, which is not produced by this host peer (i.e. added block
   * that other bp node produced.) It contains just hash and blockNo. The host node will not send notice if target receiving peer
   * knows that block already at best effort.
   * 
* * Protobuf type {@code types.NewBlockNotice} */ public static final class NewBlockNotice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.NewBlockNotice) NewBlockNoticeOrBuilder { private static final long serialVersionUID = 0L; // Use NewBlockNotice.newBuilder() to construct. private NewBlockNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private NewBlockNotice() { blockHash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new NewBlockNotice(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private NewBlockNotice( 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: { blockHash_ = input.readBytes(); break; } case 16: { blockNo_ = input.readUInt64(); 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 types.P2P.internal_static_types_NewBlockNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_NewBlockNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.NewBlockNotice.class, types.P2P.NewBlockNotice.Builder.class); } public static final int BLOCKHASH_FIELD_NUMBER = 1; private com.google.protobuf.ByteString blockHash_; /** * bytes blockHash = 1; * @return The blockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBlockHash() { return blockHash_; } public static final int BLOCKNO_FIELD_NUMBER = 2; private long blockNo_; /** * uint64 blockNo = 2; * @return The blockNo. */ @java.lang.Override public long getBlockNo() { return blockNo_; } 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 (!blockHash_.isEmpty()) { output.writeBytes(1, blockHash_); } if (blockNo_ != 0L) { output.writeUInt64(2, blockNo_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!blockHash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, blockHash_); } if (blockNo_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, blockNo_); } 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 types.P2P.NewBlockNotice)) { return super.equals(obj); } types.P2P.NewBlockNotice other = (types.P2P.NewBlockNotice) obj; if (!getBlockHash() .equals(other.getBlockHash())) return false; if (getBlockNo() != other.getBlockNo()) 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) + BLOCKHASH_FIELD_NUMBER; hash = (53 * hash) + getBlockHash().hashCode(); hash = (37 * hash) + BLOCKNO_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBlockNo()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.NewBlockNotice parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.NewBlockNotice parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.NewBlockNotice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.NewBlockNotice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.NewBlockNotice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.NewBlockNotice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.NewBlockNotice parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.NewBlockNotice 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 types.P2P.NewBlockNotice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.NewBlockNotice 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 types.P2P.NewBlockNotice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.NewBlockNotice 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(types.P2P.NewBlockNotice 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; } /** *
     * NewBlockNotice is sent to other peers when host node add a block, which is not produced by this host peer (i.e. added block
     * that other bp node produced.) It contains just hash and blockNo. The host node will not send notice if target receiving peer
     * knows that block already at best effort.
     * 
* * Protobuf type {@code types.NewBlockNotice} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.NewBlockNotice) types.P2P.NewBlockNoticeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_NewBlockNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_NewBlockNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.NewBlockNotice.class, types.P2P.NewBlockNotice.Builder.class); } // Construct using types.P2P.NewBlockNotice.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(); blockHash_ = com.google.protobuf.ByteString.EMPTY; blockNo_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_NewBlockNotice_descriptor; } @java.lang.Override public types.P2P.NewBlockNotice getDefaultInstanceForType() { return types.P2P.NewBlockNotice.getDefaultInstance(); } @java.lang.Override public types.P2P.NewBlockNotice build() { types.P2P.NewBlockNotice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.NewBlockNotice buildPartial() { types.P2P.NewBlockNotice result = new types.P2P.NewBlockNotice(this); result.blockHash_ = blockHash_; result.blockNo_ = blockNo_; 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 types.P2P.NewBlockNotice) { return mergeFrom((types.P2P.NewBlockNotice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.NewBlockNotice other) { if (other == types.P2P.NewBlockNotice.getDefaultInstance()) return this; if (other.getBlockHash() != com.google.protobuf.ByteString.EMPTY) { setBlockHash(other.getBlockHash()); } if (other.getBlockNo() != 0L) { setBlockNo(other.getBlockNo()); } 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 { types.P2P.NewBlockNotice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.NewBlockNotice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY; /** * bytes blockHash = 1; * @return The blockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBlockHash() { return blockHash_; } /** * bytes blockHash = 1; * @param value The blockHash to set. * @return This builder for chaining. */ public Builder setBlockHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } blockHash_ = value; onChanged(); return this; } /** * bytes blockHash = 1; * @return This builder for chaining. */ public Builder clearBlockHash() { blockHash_ = getDefaultInstance().getBlockHash(); onChanged(); return this; } private long blockNo_ ; /** * uint64 blockNo = 2; * @return The blockNo. */ @java.lang.Override public long getBlockNo() { return blockNo_; } /** * uint64 blockNo = 2; * @param value The blockNo to set. * @return This builder for chaining. */ public Builder setBlockNo(long value) { blockNo_ = value; onChanged(); return this; } /** * uint64 blockNo = 2; * @return This builder for chaining. */ public Builder clearBlockNo() { blockNo_ = 0L; 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:types.NewBlockNotice) } // @@protoc_insertion_point(class_scope:types.NewBlockNotice) private static final types.P2P.NewBlockNotice DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.NewBlockNotice(); } public static types.P2P.NewBlockNotice getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public NewBlockNotice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new NewBlockNotice(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 types.P2P.NewBlockNotice getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface BlockProducedNoticeOrBuilder extends // @@protoc_insertion_point(interface_extends:types.BlockProducedNotice) com.google.protobuf.MessageOrBuilder { /** * bytes producerID = 1; * @return The producerID. */ com.google.protobuf.ByteString getProducerID(); /** * uint64 blockNo = 2; * @return The blockNo. */ long getBlockNo(); /** * .types.Block block = 3; * @return Whether the block field is set. */ boolean hasBlock(); /** * .types.Block block = 3; * @return The block. */ types.Blockchain.Block getBlock(); /** * .types.Block block = 3; */ types.Blockchain.BlockOrBuilder getBlockOrBuilder(); } /** *
   * BlockProducedNotice is sent when BP created blocks and host peer is BP (or surrogate of BP) and receiving peer is also trusted BP or surrogate of BP.
   * It contains whole block information
   * 
* * Protobuf type {@code types.BlockProducedNotice} */ public static final class BlockProducedNotice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.BlockProducedNotice) BlockProducedNoticeOrBuilder { private static final long serialVersionUID = 0L; // Use BlockProducedNotice.newBuilder() to construct. private BlockProducedNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BlockProducedNotice() { producerID_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new BlockProducedNotice(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private BlockProducedNotice( 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: { producerID_ = input.readBytes(); break; } case 16: { blockNo_ = input.readUInt64(); break; } case 26: { types.Blockchain.Block.Builder subBuilder = null; if (block_ != null) { subBuilder = block_.toBuilder(); } block_ = input.readMessage(types.Blockchain.Block.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(block_); block_ = 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 types.P2P.internal_static_types_BlockProducedNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_BlockProducedNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.BlockProducedNotice.class, types.P2P.BlockProducedNotice.Builder.class); } public static final int PRODUCERID_FIELD_NUMBER = 1; private com.google.protobuf.ByteString producerID_; /** * bytes producerID = 1; * @return The producerID. */ @java.lang.Override public com.google.protobuf.ByteString getProducerID() { return producerID_; } public static final int BLOCKNO_FIELD_NUMBER = 2; private long blockNo_; /** * uint64 blockNo = 2; * @return The blockNo. */ @java.lang.Override public long getBlockNo() { return blockNo_; } public static final int BLOCK_FIELD_NUMBER = 3; private types.Blockchain.Block block_; /** * .types.Block block = 3; * @return Whether the block field is set. */ @java.lang.Override public boolean hasBlock() { return block_ != null; } /** * .types.Block block = 3; * @return The block. */ @java.lang.Override public types.Blockchain.Block getBlock() { return block_ == null ? types.Blockchain.Block.getDefaultInstance() : block_; } /** * .types.Block block = 3; */ @java.lang.Override public types.Blockchain.BlockOrBuilder getBlockOrBuilder() { return getBlock(); } 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 (!producerID_.isEmpty()) { output.writeBytes(1, producerID_); } if (blockNo_ != 0L) { output.writeUInt64(2, blockNo_); } if (block_ != null) { output.writeMessage(3, getBlock()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!producerID_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, producerID_); } if (blockNo_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, blockNo_); } if (block_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getBlock()); } 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 types.P2P.BlockProducedNotice)) { return super.equals(obj); } types.P2P.BlockProducedNotice other = (types.P2P.BlockProducedNotice) obj; if (!getProducerID() .equals(other.getProducerID())) return false; if (getBlockNo() != other.getBlockNo()) return false; if (hasBlock() != other.hasBlock()) return false; if (hasBlock()) { if (!getBlock() .equals(other.getBlock())) 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) + PRODUCERID_FIELD_NUMBER; hash = (53 * hash) + getProducerID().hashCode(); hash = (37 * hash) + BLOCKNO_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBlockNo()); if (hasBlock()) { hash = (37 * hash) + BLOCK_FIELD_NUMBER; hash = (53 * hash) + getBlock().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.BlockProducedNotice parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.BlockProducedNotice parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.BlockProducedNotice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.BlockProducedNotice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.BlockProducedNotice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.BlockProducedNotice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.BlockProducedNotice parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.BlockProducedNotice 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 types.P2P.BlockProducedNotice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.BlockProducedNotice 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 types.P2P.BlockProducedNotice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.BlockProducedNotice 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(types.P2P.BlockProducedNotice 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; } /** *
     * BlockProducedNotice is sent when BP created blocks and host peer is BP (or surrogate of BP) and receiving peer is also trusted BP or surrogate of BP.
     * It contains whole block information
     * 
* * Protobuf type {@code types.BlockProducedNotice} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.BlockProducedNotice) types.P2P.BlockProducedNoticeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_BlockProducedNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_BlockProducedNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.BlockProducedNotice.class, types.P2P.BlockProducedNotice.Builder.class); } // Construct using types.P2P.BlockProducedNotice.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(); producerID_ = com.google.protobuf.ByteString.EMPTY; blockNo_ = 0L; if (blockBuilder_ == null) { block_ = null; } else { block_ = null; blockBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_BlockProducedNotice_descriptor; } @java.lang.Override public types.P2P.BlockProducedNotice getDefaultInstanceForType() { return types.P2P.BlockProducedNotice.getDefaultInstance(); } @java.lang.Override public types.P2P.BlockProducedNotice build() { types.P2P.BlockProducedNotice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.BlockProducedNotice buildPartial() { types.P2P.BlockProducedNotice result = new types.P2P.BlockProducedNotice(this); result.producerID_ = producerID_; result.blockNo_ = blockNo_; if (blockBuilder_ == null) { result.block_ = block_; } else { result.block_ = blockBuilder_.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 types.P2P.BlockProducedNotice) { return mergeFrom((types.P2P.BlockProducedNotice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.BlockProducedNotice other) { if (other == types.P2P.BlockProducedNotice.getDefaultInstance()) return this; if (other.getProducerID() != com.google.protobuf.ByteString.EMPTY) { setProducerID(other.getProducerID()); } if (other.getBlockNo() != 0L) { setBlockNo(other.getBlockNo()); } if (other.hasBlock()) { mergeBlock(other.getBlock()); } 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 { types.P2P.BlockProducedNotice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.BlockProducedNotice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString producerID_ = com.google.protobuf.ByteString.EMPTY; /** * bytes producerID = 1; * @return The producerID. */ @java.lang.Override public com.google.protobuf.ByteString getProducerID() { return producerID_; } /** * bytes producerID = 1; * @param value The producerID to set. * @return This builder for chaining. */ public Builder setProducerID(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } producerID_ = value; onChanged(); return this; } /** * bytes producerID = 1; * @return This builder for chaining. */ public Builder clearProducerID() { producerID_ = getDefaultInstance().getProducerID(); onChanged(); return this; } private long blockNo_ ; /** * uint64 blockNo = 2; * @return The blockNo. */ @java.lang.Override public long getBlockNo() { return blockNo_; } /** * uint64 blockNo = 2; * @param value The blockNo to set. * @return This builder for chaining. */ public Builder setBlockNo(long value) { blockNo_ = value; onChanged(); return this; } /** * uint64 blockNo = 2; * @return This builder for chaining. */ public Builder clearBlockNo() { blockNo_ = 0L; onChanged(); return this; } private types.Blockchain.Block block_; private com.google.protobuf.SingleFieldBuilderV3< types.Blockchain.Block, types.Blockchain.Block.Builder, types.Blockchain.BlockOrBuilder> blockBuilder_; /** * .types.Block block = 3; * @return Whether the block field is set. */ public boolean hasBlock() { return blockBuilder_ != null || block_ != null; } /** * .types.Block block = 3; * @return The block. */ public types.Blockchain.Block getBlock() { if (blockBuilder_ == null) { return block_ == null ? types.Blockchain.Block.getDefaultInstance() : block_; } else { return blockBuilder_.getMessage(); } } /** * .types.Block block = 3; */ public Builder setBlock(types.Blockchain.Block value) { if (blockBuilder_ == null) { if (value == null) { throw new NullPointerException(); } block_ = value; onChanged(); } else { blockBuilder_.setMessage(value); } return this; } /** * .types.Block block = 3; */ public Builder setBlock( types.Blockchain.Block.Builder builderForValue) { if (blockBuilder_ == null) { block_ = builderForValue.build(); onChanged(); } else { blockBuilder_.setMessage(builderForValue.build()); } return this; } /** * .types.Block block = 3; */ public Builder mergeBlock(types.Blockchain.Block value) { if (blockBuilder_ == null) { if (block_ != null) { block_ = types.Blockchain.Block.newBuilder(block_).mergeFrom(value).buildPartial(); } else { block_ = value; } onChanged(); } else { blockBuilder_.mergeFrom(value); } return this; } /** * .types.Block block = 3; */ public Builder clearBlock() { if (blockBuilder_ == null) { block_ = null; onChanged(); } else { block_ = null; blockBuilder_ = null; } return this; } /** * .types.Block block = 3; */ public types.Blockchain.Block.Builder getBlockBuilder() { onChanged(); return getBlockFieldBuilder().getBuilder(); } /** * .types.Block block = 3; */ public types.Blockchain.BlockOrBuilder getBlockOrBuilder() { if (blockBuilder_ != null) { return blockBuilder_.getMessageOrBuilder(); } else { return block_ == null ? types.Blockchain.Block.getDefaultInstance() : block_; } } /** * .types.Block block = 3; */ private com.google.protobuf.SingleFieldBuilderV3< types.Blockchain.Block, types.Blockchain.Block.Builder, types.Blockchain.BlockOrBuilder> getBlockFieldBuilder() { if (blockBuilder_ == null) { blockBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< types.Blockchain.Block, types.Blockchain.Block.Builder, types.Blockchain.BlockOrBuilder>( getBlock(), getParentForChildren(), isClean()); block_ = null; } return blockBuilder_; } @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:types.BlockProducedNotice) } // @@protoc_insertion_point(class_scope:types.BlockProducedNotice) private static final types.P2P.BlockProducedNotice DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.BlockProducedNotice(); } public static types.P2P.BlockProducedNotice getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BlockProducedNotice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new BlockProducedNotice(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 types.P2P.BlockProducedNotice getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetBlockHeadersRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetBlockHeadersRequest) com.google.protobuf.MessageOrBuilder { /** *
     * Hash indicated referenced block hash. server will return headers from this block.
     * 
* * bytes hash = 1; * @return The hash. */ com.google.protobuf.ByteString getHash(); /** *
     * Block height instead of hash will be used for the first returned block, if hash is nil or empty
     * 
* * uint64 height = 2; * @return The height. */ long getHeight(); /** * uint64 offset = 3; * @return The offset. */ long getOffset(); /** * uint32 size = 4; * @return The size. */ int getSize(); /** *
     * default is false.
     * 
* * bool asc = 5; * @return The asc. */ boolean getAsc(); } /** *
   * GetBlockHeadersRequest 
   * 
* * Protobuf type {@code types.GetBlockHeadersRequest} */ public static final class GetBlockHeadersRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetBlockHeadersRequest) GetBlockHeadersRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetBlockHeadersRequest.newBuilder() to construct. private GetBlockHeadersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetBlockHeadersRequest() { hash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetBlockHeadersRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetBlockHeadersRequest( 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: { hash_ = input.readBytes(); break; } case 16: { height_ = input.readUInt64(); break; } case 24: { offset_ = input.readUInt64(); break; } case 32: { size_ = input.readUInt32(); break; } case 40: { asc_ = input.readBool(); 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 types.P2P.internal_static_types_GetBlockHeadersRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetBlockHeadersRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetBlockHeadersRequest.class, types.P2P.GetBlockHeadersRequest.Builder.class); } public static final int HASH_FIELD_NUMBER = 1; private com.google.protobuf.ByteString hash_; /** *
     * Hash indicated referenced block hash. server will return headers from this block.
     * 
* * bytes hash = 1; * @return The hash. */ @java.lang.Override public com.google.protobuf.ByteString getHash() { return hash_; } public static final int HEIGHT_FIELD_NUMBER = 2; private long height_; /** *
     * Block height instead of hash will be used for the first returned block, if hash is nil or empty
     * 
* * uint64 height = 2; * @return The height. */ @java.lang.Override public long getHeight() { return height_; } public static final int OFFSET_FIELD_NUMBER = 3; private long offset_; /** * uint64 offset = 3; * @return The offset. */ @java.lang.Override public long getOffset() { return offset_; } public static final int SIZE_FIELD_NUMBER = 4; private int size_; /** * uint32 size = 4; * @return The size. */ @java.lang.Override public int getSize() { return size_; } public static final int ASC_FIELD_NUMBER = 5; private boolean asc_; /** *
     * default is false.
     * 
* * bool asc = 5; * @return The asc. */ @java.lang.Override public boolean getAsc() { return asc_; } 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 (!hash_.isEmpty()) { output.writeBytes(1, hash_); } if (height_ != 0L) { output.writeUInt64(2, height_); } if (offset_ != 0L) { output.writeUInt64(3, offset_); } if (size_ != 0) { output.writeUInt32(4, size_); } if (asc_ != false) { output.writeBool(5, asc_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!hash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, hash_); } if (height_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, height_); } if (offset_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, offset_); } if (size_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, size_); } if (asc_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, asc_); } 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 types.P2P.GetBlockHeadersRequest)) { return super.equals(obj); } types.P2P.GetBlockHeadersRequest other = (types.P2P.GetBlockHeadersRequest) obj; if (!getHash() .equals(other.getHash())) return false; if (getHeight() != other.getHeight()) return false; if (getOffset() != other.getOffset()) return false; if (getSize() != other.getSize()) return false; if (getAsc() != other.getAsc()) 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) + HASH_FIELD_NUMBER; hash = (53 * hash) + getHash().hashCode(); hash = (37 * hash) + HEIGHT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getHeight()); hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getOffset()); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + getSize(); hash = (37 * hash) + ASC_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getAsc()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetBlockHeadersRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockHeadersRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockHeadersRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockHeadersRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockHeadersRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockHeadersRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockHeadersRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetBlockHeadersRequest 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 types.P2P.GetBlockHeadersRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetBlockHeadersRequest 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 types.P2P.GetBlockHeadersRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetBlockHeadersRequest 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(types.P2P.GetBlockHeadersRequest 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; } /** *
     * GetBlockHeadersRequest 
     * 
* * Protobuf type {@code types.GetBlockHeadersRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetBlockHeadersRequest) types.P2P.GetBlockHeadersRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetBlockHeadersRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetBlockHeadersRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetBlockHeadersRequest.class, types.P2P.GetBlockHeadersRequest.Builder.class); } // Construct using types.P2P.GetBlockHeadersRequest.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(); hash_ = com.google.protobuf.ByteString.EMPTY; height_ = 0L; offset_ = 0L; size_ = 0; asc_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetBlockHeadersRequest_descriptor; } @java.lang.Override public types.P2P.GetBlockHeadersRequest getDefaultInstanceForType() { return types.P2P.GetBlockHeadersRequest.getDefaultInstance(); } @java.lang.Override public types.P2P.GetBlockHeadersRequest build() { types.P2P.GetBlockHeadersRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetBlockHeadersRequest buildPartial() { types.P2P.GetBlockHeadersRequest result = new types.P2P.GetBlockHeadersRequest(this); result.hash_ = hash_; result.height_ = height_; result.offset_ = offset_; result.size_ = size_; result.asc_ = asc_; 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 types.P2P.GetBlockHeadersRequest) { return mergeFrom((types.P2P.GetBlockHeadersRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetBlockHeadersRequest other) { if (other == types.P2P.GetBlockHeadersRequest.getDefaultInstance()) return this; if (other.getHash() != com.google.protobuf.ByteString.EMPTY) { setHash(other.getHash()); } if (other.getHeight() != 0L) { setHeight(other.getHeight()); } if (other.getOffset() != 0L) { setOffset(other.getOffset()); } if (other.getSize() != 0) { setSize(other.getSize()); } if (other.getAsc() != false) { setAsc(other.getAsc()); } 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 { types.P2P.GetBlockHeadersRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetBlockHeadersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY; /** *
       * Hash indicated referenced block hash. server will return headers from this block.
       * 
* * bytes hash = 1; * @return The hash. */ @java.lang.Override public com.google.protobuf.ByteString getHash() { return hash_; } /** *
       * Hash indicated referenced block hash. server will return headers from this block.
       * 
* * bytes hash = 1; * @param value The hash to set. * @return This builder for chaining. */ public Builder setHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } hash_ = value; onChanged(); return this; } /** *
       * Hash indicated referenced block hash. server will return headers from this block.
       * 
* * bytes hash = 1; * @return This builder for chaining. */ public Builder clearHash() { hash_ = getDefaultInstance().getHash(); onChanged(); return this; } private long height_ ; /** *
       * Block height instead of hash will be used for the first returned block, if hash is nil or empty
       * 
* * uint64 height = 2; * @return The height. */ @java.lang.Override public long getHeight() { return height_; } /** *
       * Block height instead of hash will be used for the first returned block, if hash is nil or empty
       * 
* * uint64 height = 2; * @param value The height to set. * @return This builder for chaining. */ public Builder setHeight(long value) { height_ = value; onChanged(); return this; } /** *
       * Block height instead of hash will be used for the first returned block, if hash is nil or empty
       * 
* * uint64 height = 2; * @return This builder for chaining. */ public Builder clearHeight() { height_ = 0L; onChanged(); return this; } private long offset_ ; /** * uint64 offset = 3; * @return The offset. */ @java.lang.Override public long getOffset() { return offset_; } /** * uint64 offset = 3; * @param value The offset to set. * @return This builder for chaining. */ public Builder setOffset(long value) { offset_ = value; onChanged(); return this; } /** * uint64 offset = 3; * @return This builder for chaining. */ public Builder clearOffset() { offset_ = 0L; onChanged(); return this; } private int size_ ; /** * uint32 size = 4; * @return The size. */ @java.lang.Override public int getSize() { return size_; } /** * uint32 size = 4; * @param value The size to set. * @return This builder for chaining. */ public Builder setSize(int value) { size_ = value; onChanged(); return this; } /** * uint32 size = 4; * @return This builder for chaining. */ public Builder clearSize() { size_ = 0; onChanged(); return this; } private boolean asc_ ; /** *
       * default is false.
       * 
* * bool asc = 5; * @return The asc. */ @java.lang.Override public boolean getAsc() { return asc_; } /** *
       * default is false.
       * 
* * bool asc = 5; * @param value The asc to set. * @return This builder for chaining. */ public Builder setAsc(boolean value) { asc_ = value; onChanged(); return this; } /** *
       * default is false.
       * 
* * bool asc = 5; * @return This builder for chaining. */ public Builder clearAsc() { asc_ = false; 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:types.GetBlockHeadersRequest) } // @@protoc_insertion_point(class_scope:types.GetBlockHeadersRequest) private static final types.P2P.GetBlockHeadersRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetBlockHeadersRequest(); } public static types.P2P.GetBlockHeadersRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetBlockHeadersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetBlockHeadersRequest(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 types.P2P.GetBlockHeadersRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetBlockHeadersResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetBlockHeadersResponse) com.google.protobuf.MessageOrBuilder { /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .types.ResultStatus status = 1; * @return The status. */ types.P2P.ResultStatus getStatus(); /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ java.util.List getHashesList(); /** * repeated bytes hashes = 2; * @return The count of hashes. */ int getHashesCount(); /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ com.google.protobuf.ByteString getHashes(int index); /** * repeated .types.BlockHeader headers = 3; */ java.util.List getHeadersList(); /** * repeated .types.BlockHeader headers = 3; */ types.Blockchain.BlockHeader getHeaders(int index); /** * repeated .types.BlockHeader headers = 3; */ int getHeadersCount(); /** * repeated .types.BlockHeader headers = 3; */ java.util.List getHeadersOrBuilderList(); /** * repeated .types.BlockHeader headers = 3; */ types.Blockchain.BlockHeaderOrBuilder getHeadersOrBuilder( int index); /** * bool hasNext = 4; * @return The hasNext. */ boolean getHasNext(); } /** *
   * GetBlockResponse contains response of GetBlockRequest.
   * 
* * Protobuf type {@code types.GetBlockHeadersResponse} */ public static final class GetBlockHeadersResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetBlockHeadersResponse) GetBlockHeadersResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetBlockHeadersResponse.newBuilder() to construct. private GetBlockHeadersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetBlockHeadersResponse() { status_ = 0; hashes_ = java.util.Collections.emptyList(); headers_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetBlockHeadersResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetBlockHeadersResponse( 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: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } hashes_.add(input.readBytes()); break; } case 26: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { headers_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } headers_.add( input.readMessage(types.Blockchain.BlockHeader.parser(), extensionRegistry)); break; } case 32: { hasNext_ = input.readBool(); 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)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); // C } if (((mutable_bitField0_ & 0x00000002) != 0)) { headers_ = java.util.Collections.unmodifiableList(headers_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetBlockHeadersResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetBlockHeadersResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetBlockHeadersResponse.class, types.P2P.GetBlockHeadersResponse.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; private int status_; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } public static final int HASHES_FIELD_NUMBER = 2; private java.util.List hashes_; /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ @java.lang.Override public java.util.List getHashesList() { return hashes_; } /** * repeated bytes hashes = 2; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } public static final int HEADERS_FIELD_NUMBER = 3; private java.util.List headers_; /** * repeated .types.BlockHeader headers = 3; */ @java.lang.Override public java.util.List getHeadersList() { return headers_; } /** * repeated .types.BlockHeader headers = 3; */ @java.lang.Override public java.util.List getHeadersOrBuilderList() { return headers_; } /** * repeated .types.BlockHeader headers = 3; */ @java.lang.Override public int getHeadersCount() { return headers_.size(); } /** * repeated .types.BlockHeader headers = 3; */ @java.lang.Override public types.Blockchain.BlockHeader getHeaders(int index) { return headers_.get(index); } /** * repeated .types.BlockHeader headers = 3; */ @java.lang.Override public types.Blockchain.BlockHeaderOrBuilder getHeadersOrBuilder( int index) { return headers_.get(index); } public static final int HASNEXT_FIELD_NUMBER = 4; private boolean hasNext_; /** * bool hasNext = 4; * @return The hasNext. */ @java.lang.Override public boolean getHasNext() { return hasNext_; } 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 (status_ != types.P2P.ResultStatus.OK.getNumber()) { output.writeEnum(1, status_); } for (int i = 0; i < hashes_.size(); i++) { output.writeBytes(2, hashes_.get(i)); } for (int i = 0; i < headers_.size(); i++) { output.writeMessage(3, headers_.get(i)); } if (hasNext_ != false) { output.writeBool(4, hasNext_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (status_ != types.P2P.ResultStatus.OK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, status_); } { int dataSize = 0; for (int i = 0; i < hashes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(hashes_.get(i)); } size += dataSize; size += 1 * getHashesList().size(); } for (int i = 0; i < headers_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, headers_.get(i)); } if (hasNext_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, hasNext_); } 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 types.P2P.GetBlockHeadersResponse)) { return super.equals(obj); } types.P2P.GetBlockHeadersResponse other = (types.P2P.GetBlockHeadersResponse) obj; if (status_ != other.status_) return false; if (!getHashesList() .equals(other.getHashesList())) return false; if (!getHeadersList() .equals(other.getHeadersList())) return false; if (getHasNext() != other.getHasNext()) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; if (getHashesCount() > 0) { hash = (37 * hash) + HASHES_FIELD_NUMBER; hash = (53 * hash) + getHashesList().hashCode(); } if (getHeadersCount() > 0) { hash = (37 * hash) + HEADERS_FIELD_NUMBER; hash = (53 * hash) + getHeadersList().hashCode(); } hash = (37 * hash) + HASNEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHasNext()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetBlockHeadersResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockHeadersResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockHeadersResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockHeadersResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockHeadersResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockHeadersResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockHeadersResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetBlockHeadersResponse 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 types.P2P.GetBlockHeadersResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetBlockHeadersResponse 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 types.P2P.GetBlockHeadersResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetBlockHeadersResponse 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(types.P2P.GetBlockHeadersResponse 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; } /** *
     * GetBlockResponse contains response of GetBlockRequest.
     * 
* * Protobuf type {@code types.GetBlockHeadersResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetBlockHeadersResponse) types.P2P.GetBlockHeadersResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetBlockHeadersResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetBlockHeadersResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetBlockHeadersResponse.class, types.P2P.GetBlockHeadersResponse.Builder.class); } // Construct using types.P2P.GetBlockHeadersResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getHeadersFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); status_ = 0; hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); if (headersBuilder_ == null) { headers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { headersBuilder_.clear(); } hasNext_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetBlockHeadersResponse_descriptor; } @java.lang.Override public types.P2P.GetBlockHeadersResponse getDefaultInstanceForType() { return types.P2P.GetBlockHeadersResponse.getDefaultInstance(); } @java.lang.Override public types.P2P.GetBlockHeadersResponse build() { types.P2P.GetBlockHeadersResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetBlockHeadersResponse buildPartial() { types.P2P.GetBlockHeadersResponse result = new types.P2P.GetBlockHeadersResponse(this); int from_bitField0_ = bitField0_; result.status_ = status_; if (((bitField0_ & 0x00000001) != 0)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); bitField0_ = (bitField0_ & ~0x00000001); } result.hashes_ = hashes_; if (headersBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { headers_ = java.util.Collections.unmodifiableList(headers_); bitField0_ = (bitField0_ & ~0x00000002); } result.headers_ = headers_; } else { result.headers_ = headersBuilder_.build(); } result.hasNext_ = hasNext_; 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 types.P2P.GetBlockHeadersResponse) { return mergeFrom((types.P2P.GetBlockHeadersResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetBlockHeadersResponse other) { if (other == types.P2P.GetBlockHeadersResponse.getDefaultInstance()) return this; if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (!other.hashes_.isEmpty()) { if (hashes_.isEmpty()) { hashes_ = other.hashes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureHashesIsMutable(); hashes_.addAll(other.hashes_); } onChanged(); } if (headersBuilder_ == null) { if (!other.headers_.isEmpty()) { if (headers_.isEmpty()) { headers_ = other.headers_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureHeadersIsMutable(); headers_.addAll(other.headers_); } onChanged(); } } else { if (!other.headers_.isEmpty()) { if (headersBuilder_.isEmpty()) { headersBuilder_.dispose(); headersBuilder_ = null; headers_ = other.headers_; bitField0_ = (bitField0_ & ~0x00000002); headersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getHeadersFieldBuilder() : null; } else { headersBuilder_.addAllMessages(other.headers_); } } } if (other.getHasNext() != false) { setHasNext(other.getHasNext()); } 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 { types.P2P.GetBlockHeadersResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetBlockHeadersResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int status_ = 0; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } /** * .types.ResultStatus status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(types.P2P.ResultStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return This builder for chaining. */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private java.util.List hashes_ = java.util.Collections.emptyList(); private void ensureHashesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(hashes_); bitField0_ |= 0x00000001; } } /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ public java.util.List getHashesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(hashes_) : hashes_; } /** * repeated bytes hashes = 2; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } /** * repeated bytes hashes = 2; * @param index The index to set the value at. * @param value The hashes to set. * @return This builder for chaining. */ public Builder setHashes( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.set(index, value); onChanged(); return this; } /** * repeated bytes hashes = 2; * @param value The hashes to add. * @return This builder for chaining. */ public Builder addHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.add(value); onChanged(); return this; } /** * repeated bytes hashes = 2; * @param values The hashes to add. * @return This builder for chaining. */ public Builder addAllHashes( java.lang.Iterable values) { ensureHashesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, hashes_); onChanged(); return this; } /** * repeated bytes hashes = 2; * @return This builder for chaining. */ public Builder clearHashes() { hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private java.util.List headers_ = java.util.Collections.emptyList(); private void ensureHeadersIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { headers_ = new java.util.ArrayList(headers_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.BlockHeader, types.Blockchain.BlockHeader.Builder, types.Blockchain.BlockHeaderOrBuilder> headersBuilder_; /** * repeated .types.BlockHeader headers = 3; */ public java.util.List getHeadersList() { if (headersBuilder_ == null) { return java.util.Collections.unmodifiableList(headers_); } else { return headersBuilder_.getMessageList(); } } /** * repeated .types.BlockHeader headers = 3; */ public int getHeadersCount() { if (headersBuilder_ == null) { return headers_.size(); } else { return headersBuilder_.getCount(); } } /** * repeated .types.BlockHeader headers = 3; */ public types.Blockchain.BlockHeader getHeaders(int index) { if (headersBuilder_ == null) { return headers_.get(index); } else { return headersBuilder_.getMessage(index); } } /** * repeated .types.BlockHeader headers = 3; */ public Builder setHeaders( int index, types.Blockchain.BlockHeader value) { if (headersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeadersIsMutable(); headers_.set(index, value); onChanged(); } else { headersBuilder_.setMessage(index, value); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public Builder setHeaders( int index, types.Blockchain.BlockHeader.Builder builderForValue) { if (headersBuilder_ == null) { ensureHeadersIsMutable(); headers_.set(index, builderForValue.build()); onChanged(); } else { headersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public Builder addHeaders(types.Blockchain.BlockHeader value) { if (headersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeadersIsMutable(); headers_.add(value); onChanged(); } else { headersBuilder_.addMessage(value); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public Builder addHeaders( int index, types.Blockchain.BlockHeader value) { if (headersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeadersIsMutable(); headers_.add(index, value); onChanged(); } else { headersBuilder_.addMessage(index, value); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public Builder addHeaders( types.Blockchain.BlockHeader.Builder builderForValue) { if (headersBuilder_ == null) { ensureHeadersIsMutable(); headers_.add(builderForValue.build()); onChanged(); } else { headersBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public Builder addHeaders( int index, types.Blockchain.BlockHeader.Builder builderForValue) { if (headersBuilder_ == null) { ensureHeadersIsMutable(); headers_.add(index, builderForValue.build()); onChanged(); } else { headersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public Builder addAllHeaders( java.lang.Iterable values) { if (headersBuilder_ == null) { ensureHeadersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, headers_); onChanged(); } else { headersBuilder_.addAllMessages(values); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public Builder clearHeaders() { if (headersBuilder_ == null) { headers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { headersBuilder_.clear(); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public Builder removeHeaders(int index) { if (headersBuilder_ == null) { ensureHeadersIsMutable(); headers_.remove(index); onChanged(); } else { headersBuilder_.remove(index); } return this; } /** * repeated .types.BlockHeader headers = 3; */ public types.Blockchain.BlockHeader.Builder getHeadersBuilder( int index) { return getHeadersFieldBuilder().getBuilder(index); } /** * repeated .types.BlockHeader headers = 3; */ public types.Blockchain.BlockHeaderOrBuilder getHeadersOrBuilder( int index) { if (headersBuilder_ == null) { return headers_.get(index); } else { return headersBuilder_.getMessageOrBuilder(index); } } /** * repeated .types.BlockHeader headers = 3; */ public java.util.List getHeadersOrBuilderList() { if (headersBuilder_ != null) { return headersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(headers_); } } /** * repeated .types.BlockHeader headers = 3; */ public types.Blockchain.BlockHeader.Builder addHeadersBuilder() { return getHeadersFieldBuilder().addBuilder( types.Blockchain.BlockHeader.getDefaultInstance()); } /** * repeated .types.BlockHeader headers = 3; */ public types.Blockchain.BlockHeader.Builder addHeadersBuilder( int index) { return getHeadersFieldBuilder().addBuilder( index, types.Blockchain.BlockHeader.getDefaultInstance()); } /** * repeated .types.BlockHeader headers = 3; */ public java.util.List getHeadersBuilderList() { return getHeadersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.BlockHeader, types.Blockchain.BlockHeader.Builder, types.Blockchain.BlockHeaderOrBuilder> getHeadersFieldBuilder() { if (headersBuilder_ == null) { headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.BlockHeader, types.Blockchain.BlockHeader.Builder, types.Blockchain.BlockHeaderOrBuilder>( headers_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); headers_ = null; } return headersBuilder_; } private boolean hasNext_ ; /** * bool hasNext = 4; * @return The hasNext. */ @java.lang.Override public boolean getHasNext() { return hasNext_; } /** * bool hasNext = 4; * @param value The hasNext to set. * @return This builder for chaining. */ public Builder setHasNext(boolean value) { hasNext_ = value; onChanged(); return this; } /** * bool hasNext = 4; * @return This builder for chaining. */ public Builder clearHasNext() { hasNext_ = false; 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:types.GetBlockHeadersResponse) } // @@protoc_insertion_point(class_scope:types.GetBlockHeadersResponse) private static final types.P2P.GetBlockHeadersResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetBlockHeadersResponse(); } public static types.P2P.GetBlockHeadersResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetBlockHeadersResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetBlockHeadersResponse(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 types.P2P.GetBlockHeadersResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetBlockRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetBlockRequest) com.google.protobuf.MessageOrBuilder { /** * repeated bytes hashes = 1; * @return A list containing the hashes. */ java.util.List getHashesList(); /** * repeated bytes hashes = 1; * @return The count of hashes. */ int getHashesCount(); /** * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ com.google.protobuf.ByteString getHashes(int index); } /** *
   * GetBlockRequest request blocks informations, not just single block.
   * 
* * Protobuf type {@code types.GetBlockRequest} */ public static final class GetBlockRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetBlockRequest) GetBlockRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetBlockRequest.newBuilder() to construct. private GetBlockRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetBlockRequest() { hashes_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetBlockRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetBlockRequest( 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 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } hashes_.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)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetBlockRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetBlockRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetBlockRequest.class, types.P2P.GetBlockRequest.Builder.class); } public static final int HASHES_FIELD_NUMBER = 1; private java.util.List hashes_; /** * repeated bytes hashes = 1; * @return A list containing the hashes. */ @java.lang.Override public java.util.List getHashesList() { return hashes_; } /** * repeated bytes hashes = 1; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.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 { for (int i = 0; i < hashes_.size(); i++) { output.writeBytes(1, hashes_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < hashes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(hashes_.get(i)); } size += dataSize; size += 1 * getHashesList().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 types.P2P.GetBlockRequest)) { return super.equals(obj); } types.P2P.GetBlockRequest other = (types.P2P.GetBlockRequest) obj; if (!getHashesList() .equals(other.getHashesList())) 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 (getHashesCount() > 0) { hash = (37 * hash) + HASHES_FIELD_NUMBER; hash = (53 * hash) + getHashesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetBlockRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetBlockRequest 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 types.P2P.GetBlockRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetBlockRequest 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 types.P2P.GetBlockRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetBlockRequest 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(types.P2P.GetBlockRequest 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; } /** *
     * GetBlockRequest request blocks informations, not just single block.
     * 
* * Protobuf type {@code types.GetBlockRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetBlockRequest) types.P2P.GetBlockRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetBlockRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetBlockRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetBlockRequest.class, types.P2P.GetBlockRequest.Builder.class); } // Construct using types.P2P.GetBlockRequest.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(); hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetBlockRequest_descriptor; } @java.lang.Override public types.P2P.GetBlockRequest getDefaultInstanceForType() { return types.P2P.GetBlockRequest.getDefaultInstance(); } @java.lang.Override public types.P2P.GetBlockRequest build() { types.P2P.GetBlockRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetBlockRequest buildPartial() { types.P2P.GetBlockRequest result = new types.P2P.GetBlockRequest(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); bitField0_ = (bitField0_ & ~0x00000001); } result.hashes_ = hashes_; 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 types.P2P.GetBlockRequest) { return mergeFrom((types.P2P.GetBlockRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetBlockRequest other) { if (other == types.P2P.GetBlockRequest.getDefaultInstance()) return this; if (!other.hashes_.isEmpty()) { if (hashes_.isEmpty()) { hashes_ = other.hashes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureHashesIsMutable(); hashes_.addAll(other.hashes_); } 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 { types.P2P.GetBlockRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetBlockRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List hashes_ = java.util.Collections.emptyList(); private void ensureHashesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(hashes_); bitField0_ |= 0x00000001; } } /** * repeated bytes hashes = 1; * @return A list containing the hashes. */ public java.util.List getHashesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(hashes_) : hashes_; } /** * repeated bytes hashes = 1; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } /** * repeated bytes hashes = 1; * @param index The index to set the value at. * @param value The hashes to set. * @return This builder for chaining. */ public Builder setHashes( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.set(index, value); onChanged(); return this; } /** * repeated bytes hashes = 1; * @param value The hashes to add. * @return This builder for chaining. */ public Builder addHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.add(value); onChanged(); return this; } /** * repeated bytes hashes = 1; * @param values The hashes to add. * @return This builder for chaining. */ public Builder addAllHashes( java.lang.Iterable values) { ensureHashesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, hashes_); onChanged(); return this; } /** * repeated bytes hashes = 1; * @return This builder for chaining. */ public Builder clearHashes() { hashes_ = 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:types.GetBlockRequest) } // @@protoc_insertion_point(class_scope:types.GetBlockRequest) private static final types.P2P.GetBlockRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetBlockRequest(); } public static types.P2P.GetBlockRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetBlockRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetBlockRequest(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 types.P2P.GetBlockRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetBlockResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetBlockResponse) com.google.protobuf.MessageOrBuilder { /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .types.ResultStatus status = 1; * @return The status. */ types.P2P.ResultStatus getStatus(); /** * repeated .types.Block blocks = 2; */ java.util.List getBlocksList(); /** * repeated .types.Block blocks = 2; */ types.Blockchain.Block getBlocks(int index); /** * repeated .types.Block blocks = 2; */ int getBlocksCount(); /** * repeated .types.Block blocks = 2; */ java.util.List getBlocksOrBuilderList(); /** * repeated .types.Block blocks = 2; */ types.Blockchain.BlockOrBuilder getBlocksOrBuilder( int index); /** * bool hasNext = 3; * @return The hasNext. */ boolean getHasNext(); } /** *
   * GetBlockResponse contains response of GetBlockRequest.
   * 
* * Protobuf type {@code types.GetBlockResponse} */ public static final class GetBlockResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetBlockResponse) GetBlockResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetBlockResponse.newBuilder() to construct. private GetBlockResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetBlockResponse() { status_ = 0; blocks_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetBlockResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetBlockResponse( 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: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { blocks_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } blocks_.add( input.readMessage(types.Blockchain.Block.parser(), extensionRegistry)); break; } case 24: { hasNext_ = input.readBool(); 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)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetBlockResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetBlockResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetBlockResponse.class, types.P2P.GetBlockResponse.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; private int status_; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } public static final int BLOCKS_FIELD_NUMBER = 2; private java.util.List blocks_; /** * repeated .types.Block blocks = 2; */ @java.lang.Override public java.util.List getBlocksList() { return blocks_; } /** * repeated .types.Block blocks = 2; */ @java.lang.Override public java.util.List getBlocksOrBuilderList() { return blocks_; } /** * repeated .types.Block blocks = 2; */ @java.lang.Override public int getBlocksCount() { return blocks_.size(); } /** * repeated .types.Block blocks = 2; */ @java.lang.Override public types.Blockchain.Block getBlocks(int index) { return blocks_.get(index); } /** * repeated .types.Block blocks = 2; */ @java.lang.Override public types.Blockchain.BlockOrBuilder getBlocksOrBuilder( int index) { return blocks_.get(index); } public static final int HASNEXT_FIELD_NUMBER = 3; private boolean hasNext_; /** * bool hasNext = 3; * @return The hasNext. */ @java.lang.Override public boolean getHasNext() { return hasNext_; } 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 (status_ != types.P2P.ResultStatus.OK.getNumber()) { output.writeEnum(1, status_); } for (int i = 0; i < blocks_.size(); i++) { output.writeMessage(2, blocks_.get(i)); } if (hasNext_ != false) { output.writeBool(3, hasNext_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (status_ != types.P2P.ResultStatus.OK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, status_); } for (int i = 0; i < blocks_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, blocks_.get(i)); } if (hasNext_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, hasNext_); } 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 types.P2P.GetBlockResponse)) { return super.equals(obj); } types.P2P.GetBlockResponse other = (types.P2P.GetBlockResponse) obj; if (status_ != other.status_) return false; if (!getBlocksList() .equals(other.getBlocksList())) return false; if (getHasNext() != other.getHasNext()) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; if (getBlocksCount() > 0) { hash = (37 * hash) + BLOCKS_FIELD_NUMBER; hash = (53 * hash) + getBlocksList().hashCode(); } hash = (37 * hash) + HASNEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHasNext()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetBlockResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetBlockResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetBlockResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetBlockResponse 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 types.P2P.GetBlockResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetBlockResponse 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 types.P2P.GetBlockResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetBlockResponse 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(types.P2P.GetBlockResponse 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; } /** *
     * GetBlockResponse contains response of GetBlockRequest.
     * 
* * Protobuf type {@code types.GetBlockResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetBlockResponse) types.P2P.GetBlockResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetBlockResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetBlockResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetBlockResponse.class, types.P2P.GetBlockResponse.Builder.class); } // Construct using types.P2P.GetBlockResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getBlocksFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); status_ = 0; if (blocksBuilder_ == null) { blocks_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { blocksBuilder_.clear(); } hasNext_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetBlockResponse_descriptor; } @java.lang.Override public types.P2P.GetBlockResponse getDefaultInstanceForType() { return types.P2P.GetBlockResponse.getDefaultInstance(); } @java.lang.Override public types.P2P.GetBlockResponse build() { types.P2P.GetBlockResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetBlockResponse buildPartial() { types.P2P.GetBlockResponse result = new types.P2P.GetBlockResponse(this); int from_bitField0_ = bitField0_; result.status_ = status_; if (blocksBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); bitField0_ = (bitField0_ & ~0x00000001); } result.blocks_ = blocks_; } else { result.blocks_ = blocksBuilder_.build(); } result.hasNext_ = hasNext_; 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 types.P2P.GetBlockResponse) { return mergeFrom((types.P2P.GetBlockResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetBlockResponse other) { if (other == types.P2P.GetBlockResponse.getDefaultInstance()) return this; if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (blocksBuilder_ == null) { if (!other.blocks_.isEmpty()) { if (blocks_.isEmpty()) { blocks_ = other.blocks_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureBlocksIsMutable(); blocks_.addAll(other.blocks_); } onChanged(); } } else { if (!other.blocks_.isEmpty()) { if (blocksBuilder_.isEmpty()) { blocksBuilder_.dispose(); blocksBuilder_ = null; blocks_ = other.blocks_; bitField0_ = (bitField0_ & ~0x00000001); blocksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getBlocksFieldBuilder() : null; } else { blocksBuilder_.addAllMessages(other.blocks_); } } } if (other.getHasNext() != false) { setHasNext(other.getHasNext()); } 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 { types.P2P.GetBlockResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetBlockResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int status_ = 0; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } /** * .types.ResultStatus status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(types.P2P.ResultStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return This builder for chaining. */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private java.util.List blocks_ = java.util.Collections.emptyList(); private void ensureBlocksIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { blocks_ = new java.util.ArrayList(blocks_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.Block, types.Blockchain.Block.Builder, types.Blockchain.BlockOrBuilder> blocksBuilder_; /** * repeated .types.Block blocks = 2; */ public java.util.List getBlocksList() { if (blocksBuilder_ == null) { return java.util.Collections.unmodifiableList(blocks_); } else { return blocksBuilder_.getMessageList(); } } /** * repeated .types.Block blocks = 2; */ public int getBlocksCount() { if (blocksBuilder_ == null) { return blocks_.size(); } else { return blocksBuilder_.getCount(); } } /** * repeated .types.Block blocks = 2; */ public types.Blockchain.Block getBlocks(int index) { if (blocksBuilder_ == null) { return blocks_.get(index); } else { return blocksBuilder_.getMessage(index); } } /** * repeated .types.Block blocks = 2; */ public Builder setBlocks( int index, types.Blockchain.Block value) { if (blocksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBlocksIsMutable(); blocks_.set(index, value); onChanged(); } else { blocksBuilder_.setMessage(index, value); } return this; } /** * repeated .types.Block blocks = 2; */ public Builder setBlocks( int index, types.Blockchain.Block.Builder builderForValue) { if (blocksBuilder_ == null) { ensureBlocksIsMutable(); blocks_.set(index, builderForValue.build()); onChanged(); } else { blocksBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .types.Block blocks = 2; */ public Builder addBlocks(types.Blockchain.Block value) { if (blocksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBlocksIsMutable(); blocks_.add(value); onChanged(); } else { blocksBuilder_.addMessage(value); } return this; } /** * repeated .types.Block blocks = 2; */ public Builder addBlocks( int index, types.Blockchain.Block value) { if (blocksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBlocksIsMutable(); blocks_.add(index, value); onChanged(); } else { blocksBuilder_.addMessage(index, value); } return this; } /** * repeated .types.Block blocks = 2; */ public Builder addBlocks( types.Blockchain.Block.Builder builderForValue) { if (blocksBuilder_ == null) { ensureBlocksIsMutable(); blocks_.add(builderForValue.build()); onChanged(); } else { blocksBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .types.Block blocks = 2; */ public Builder addBlocks( int index, types.Blockchain.Block.Builder builderForValue) { if (blocksBuilder_ == null) { ensureBlocksIsMutable(); blocks_.add(index, builderForValue.build()); onChanged(); } else { blocksBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .types.Block blocks = 2; */ public Builder addAllBlocks( java.lang.Iterable values) { if (blocksBuilder_ == null) { ensureBlocksIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, blocks_); onChanged(); } else { blocksBuilder_.addAllMessages(values); } return this; } /** * repeated .types.Block blocks = 2; */ public Builder clearBlocks() { if (blocksBuilder_ == null) { blocks_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { blocksBuilder_.clear(); } return this; } /** * repeated .types.Block blocks = 2; */ public Builder removeBlocks(int index) { if (blocksBuilder_ == null) { ensureBlocksIsMutable(); blocks_.remove(index); onChanged(); } else { blocksBuilder_.remove(index); } return this; } /** * repeated .types.Block blocks = 2; */ public types.Blockchain.Block.Builder getBlocksBuilder( int index) { return getBlocksFieldBuilder().getBuilder(index); } /** * repeated .types.Block blocks = 2; */ public types.Blockchain.BlockOrBuilder getBlocksOrBuilder( int index) { if (blocksBuilder_ == null) { return blocks_.get(index); } else { return blocksBuilder_.getMessageOrBuilder(index); } } /** * repeated .types.Block blocks = 2; */ public java.util.List getBlocksOrBuilderList() { if (blocksBuilder_ != null) { return blocksBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(blocks_); } } /** * repeated .types.Block blocks = 2; */ public types.Blockchain.Block.Builder addBlocksBuilder() { return getBlocksFieldBuilder().addBuilder( types.Blockchain.Block.getDefaultInstance()); } /** * repeated .types.Block blocks = 2; */ public types.Blockchain.Block.Builder addBlocksBuilder( int index) { return getBlocksFieldBuilder().addBuilder( index, types.Blockchain.Block.getDefaultInstance()); } /** * repeated .types.Block blocks = 2; */ public java.util.List getBlocksBuilderList() { return getBlocksFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.Block, types.Blockchain.Block.Builder, types.Blockchain.BlockOrBuilder> getBlocksFieldBuilder() { if (blocksBuilder_ == null) { blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.Block, types.Blockchain.Block.Builder, types.Blockchain.BlockOrBuilder>( blocks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); blocks_ = null; } return blocksBuilder_; } private boolean hasNext_ ; /** * bool hasNext = 3; * @return The hasNext. */ @java.lang.Override public boolean getHasNext() { return hasNext_; } /** * bool hasNext = 3; * @param value The hasNext to set. * @return This builder for chaining. */ public Builder setHasNext(boolean value) { hasNext_ = value; onChanged(); return this; } /** * bool hasNext = 3; * @return This builder for chaining. */ public Builder clearHasNext() { hasNext_ = false; 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:types.GetBlockResponse) } // @@protoc_insertion_point(class_scope:types.GetBlockResponse) private static final types.P2P.GetBlockResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetBlockResponse(); } public static types.P2P.GetBlockResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetBlockResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetBlockResponse(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 types.P2P.GetBlockResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface NewTransactionsNoticeOrBuilder extends // @@protoc_insertion_point(interface_extends:types.NewTransactionsNotice) com.google.protobuf.MessageOrBuilder { /** * repeated bytes txHashes = 1; * @return A list containing the txHashes. */ java.util.List getTxHashesList(); /** * repeated bytes txHashes = 1; * @return The count of txHashes. */ int getTxHashesCount(); /** * repeated bytes txHashes = 1; * @param index The index of the element to return. * @return The txHashes at the given index. */ com.google.protobuf.ByteString getTxHashes(int index); } /** * Protobuf type {@code types.NewTransactionsNotice} */ public static final class NewTransactionsNotice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.NewTransactionsNotice) NewTransactionsNoticeOrBuilder { private static final long serialVersionUID = 0L; // Use NewTransactionsNotice.newBuilder() to construct. private NewTransactionsNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private NewTransactionsNotice() { txHashes_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new NewTransactionsNotice(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private NewTransactionsNotice( 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 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { txHashes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } txHashes_.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)) { txHashes_ = java.util.Collections.unmodifiableList(txHashes_); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_NewTransactionsNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_NewTransactionsNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.NewTransactionsNotice.class, types.P2P.NewTransactionsNotice.Builder.class); } public static final int TXHASHES_FIELD_NUMBER = 1; private java.util.List txHashes_; /** * repeated bytes txHashes = 1; * @return A list containing the txHashes. */ @java.lang.Override public java.util.List getTxHashesList() { return txHashes_; } /** * repeated bytes txHashes = 1; * @return The count of txHashes. */ public int getTxHashesCount() { return txHashes_.size(); } /** * repeated bytes txHashes = 1; * @param index The index of the element to return. * @return The txHashes at the given index. */ public com.google.protobuf.ByteString getTxHashes(int index) { return txHashes_.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 { for (int i = 0; i < txHashes_.size(); i++) { output.writeBytes(1, txHashes_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < txHashes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(txHashes_.get(i)); } size += dataSize; size += 1 * getTxHashesList().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 types.P2P.NewTransactionsNotice)) { return super.equals(obj); } types.P2P.NewTransactionsNotice other = (types.P2P.NewTransactionsNotice) obj; if (!getTxHashesList() .equals(other.getTxHashesList())) 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 (getTxHashesCount() > 0) { hash = (37 * hash) + TXHASHES_FIELD_NUMBER; hash = (53 * hash) + getTxHashesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.NewTransactionsNotice parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.NewTransactionsNotice parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.NewTransactionsNotice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.NewTransactionsNotice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.NewTransactionsNotice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.NewTransactionsNotice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.NewTransactionsNotice parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.NewTransactionsNotice 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 types.P2P.NewTransactionsNotice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.NewTransactionsNotice 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 types.P2P.NewTransactionsNotice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.NewTransactionsNotice 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(types.P2P.NewTransactionsNotice 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; } /** * Protobuf type {@code types.NewTransactionsNotice} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.NewTransactionsNotice) types.P2P.NewTransactionsNoticeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_NewTransactionsNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_NewTransactionsNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.NewTransactionsNotice.class, types.P2P.NewTransactionsNotice.Builder.class); } // Construct using types.P2P.NewTransactionsNotice.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(); txHashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_NewTransactionsNotice_descriptor; } @java.lang.Override public types.P2P.NewTransactionsNotice getDefaultInstanceForType() { return types.P2P.NewTransactionsNotice.getDefaultInstance(); } @java.lang.Override public types.P2P.NewTransactionsNotice build() { types.P2P.NewTransactionsNotice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.NewTransactionsNotice buildPartial() { types.P2P.NewTransactionsNotice result = new types.P2P.NewTransactionsNotice(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { txHashes_ = java.util.Collections.unmodifiableList(txHashes_); bitField0_ = (bitField0_ & ~0x00000001); } result.txHashes_ = txHashes_; 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 types.P2P.NewTransactionsNotice) { return mergeFrom((types.P2P.NewTransactionsNotice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.NewTransactionsNotice other) { if (other == types.P2P.NewTransactionsNotice.getDefaultInstance()) return this; if (!other.txHashes_.isEmpty()) { if (txHashes_.isEmpty()) { txHashes_ = other.txHashes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureTxHashesIsMutable(); txHashes_.addAll(other.txHashes_); } 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 { types.P2P.NewTransactionsNotice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.NewTransactionsNotice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List txHashes_ = java.util.Collections.emptyList(); private void ensureTxHashesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { txHashes_ = new java.util.ArrayList(txHashes_); bitField0_ |= 0x00000001; } } /** * repeated bytes txHashes = 1; * @return A list containing the txHashes. */ public java.util.List getTxHashesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(txHashes_) : txHashes_; } /** * repeated bytes txHashes = 1; * @return The count of txHashes. */ public int getTxHashesCount() { return txHashes_.size(); } /** * repeated bytes txHashes = 1; * @param index The index of the element to return. * @return The txHashes at the given index. */ public com.google.protobuf.ByteString getTxHashes(int index) { return txHashes_.get(index); } /** * repeated bytes txHashes = 1; * @param index The index to set the value at. * @param value The txHashes to set. * @return This builder for chaining. */ public Builder setTxHashes( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureTxHashesIsMutable(); txHashes_.set(index, value); onChanged(); return this; } /** * repeated bytes txHashes = 1; * @param value The txHashes to add. * @return This builder for chaining. */ public Builder addTxHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureTxHashesIsMutable(); txHashes_.add(value); onChanged(); return this; } /** * repeated bytes txHashes = 1; * @param values The txHashes to add. * @return This builder for chaining. */ public Builder addAllTxHashes( java.lang.Iterable values) { ensureTxHashesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, txHashes_); onChanged(); return this; } /** * repeated bytes txHashes = 1; * @return This builder for chaining. */ public Builder clearTxHashes() { txHashes_ = 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:types.NewTransactionsNotice) } // @@protoc_insertion_point(class_scope:types.NewTransactionsNotice) private static final types.P2P.NewTransactionsNotice DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.NewTransactionsNotice(); } public static types.P2P.NewTransactionsNotice getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public NewTransactionsNotice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new NewTransactionsNotice(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 types.P2P.NewTransactionsNotice getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetTransactionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetTransactionsRequest) com.google.protobuf.MessageOrBuilder { /** * repeated bytes hashes = 1; * @return A list containing the hashes. */ java.util.List getHashesList(); /** * repeated bytes hashes = 1; * @return The count of hashes. */ int getHashesCount(); /** * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ com.google.protobuf.ByteString getHashes(int index); } /** * Protobuf type {@code types.GetTransactionsRequest} */ public static final class GetTransactionsRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetTransactionsRequest) GetTransactionsRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetTransactionsRequest.newBuilder() to construct. private GetTransactionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetTransactionsRequest() { hashes_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetTransactionsRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetTransactionsRequest( 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 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } hashes_.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)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetTransactionsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetTransactionsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetTransactionsRequest.class, types.P2P.GetTransactionsRequest.Builder.class); } public static final int HASHES_FIELD_NUMBER = 1; private java.util.List hashes_; /** * repeated bytes hashes = 1; * @return A list containing the hashes. */ @java.lang.Override public java.util.List getHashesList() { return hashes_; } /** * repeated bytes hashes = 1; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.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 { for (int i = 0; i < hashes_.size(); i++) { output.writeBytes(1, hashes_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < hashes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(hashes_.get(i)); } size += dataSize; size += 1 * getHashesList().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 types.P2P.GetTransactionsRequest)) { return super.equals(obj); } types.P2P.GetTransactionsRequest other = (types.P2P.GetTransactionsRequest) obj; if (!getHashesList() .equals(other.getHashesList())) 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 (getHashesCount() > 0) { hash = (37 * hash) + HASHES_FIELD_NUMBER; hash = (53 * hash) + getHashesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetTransactionsRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetTransactionsRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetTransactionsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetTransactionsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetTransactionsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetTransactionsRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetTransactionsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetTransactionsRequest 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 types.P2P.GetTransactionsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetTransactionsRequest 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 types.P2P.GetTransactionsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetTransactionsRequest 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(types.P2P.GetTransactionsRequest 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; } /** * Protobuf type {@code types.GetTransactionsRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetTransactionsRequest) types.P2P.GetTransactionsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetTransactionsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetTransactionsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetTransactionsRequest.class, types.P2P.GetTransactionsRequest.Builder.class); } // Construct using types.P2P.GetTransactionsRequest.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(); hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetTransactionsRequest_descriptor; } @java.lang.Override public types.P2P.GetTransactionsRequest getDefaultInstanceForType() { return types.P2P.GetTransactionsRequest.getDefaultInstance(); } @java.lang.Override public types.P2P.GetTransactionsRequest build() { types.P2P.GetTransactionsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetTransactionsRequest buildPartial() { types.P2P.GetTransactionsRequest result = new types.P2P.GetTransactionsRequest(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); bitField0_ = (bitField0_ & ~0x00000001); } result.hashes_ = hashes_; 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 types.P2P.GetTransactionsRequest) { return mergeFrom((types.P2P.GetTransactionsRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetTransactionsRequest other) { if (other == types.P2P.GetTransactionsRequest.getDefaultInstance()) return this; if (!other.hashes_.isEmpty()) { if (hashes_.isEmpty()) { hashes_ = other.hashes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureHashesIsMutable(); hashes_.addAll(other.hashes_); } 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 { types.P2P.GetTransactionsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetTransactionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List hashes_ = java.util.Collections.emptyList(); private void ensureHashesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(hashes_); bitField0_ |= 0x00000001; } } /** * repeated bytes hashes = 1; * @return A list containing the hashes. */ public java.util.List getHashesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(hashes_) : hashes_; } /** * repeated bytes hashes = 1; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } /** * repeated bytes hashes = 1; * @param index The index to set the value at. * @param value The hashes to set. * @return This builder for chaining. */ public Builder setHashes( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.set(index, value); onChanged(); return this; } /** * repeated bytes hashes = 1; * @param value The hashes to add. * @return This builder for chaining. */ public Builder addHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.add(value); onChanged(); return this; } /** * repeated bytes hashes = 1; * @param values The hashes to add. * @return This builder for chaining. */ public Builder addAllHashes( java.lang.Iterable values) { ensureHashesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, hashes_); onChanged(); return this; } /** * repeated bytes hashes = 1; * @return This builder for chaining. */ public Builder clearHashes() { hashes_ = 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:types.GetTransactionsRequest) } // @@protoc_insertion_point(class_scope:types.GetTransactionsRequest) private static final types.P2P.GetTransactionsRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetTransactionsRequest(); } public static types.P2P.GetTransactionsRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetTransactionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetTransactionsRequest(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 types.P2P.GetTransactionsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetTransactionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetTransactionsResponse) com.google.protobuf.MessageOrBuilder { /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .types.ResultStatus status = 1; * @return The status. */ types.P2P.ResultStatus getStatus(); /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ java.util.List getHashesList(); /** * repeated bytes hashes = 2; * @return The count of hashes. */ int getHashesCount(); /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ com.google.protobuf.ByteString getHashes(int index); /** * repeated .types.Tx txs = 3; */ java.util.List getTxsList(); /** * repeated .types.Tx txs = 3; */ types.Blockchain.Tx getTxs(int index); /** * repeated .types.Tx txs = 3; */ int getTxsCount(); /** * repeated .types.Tx txs = 3; */ java.util.List getTxsOrBuilderList(); /** * repeated .types.Tx txs = 3; */ types.Blockchain.TxOrBuilder getTxsOrBuilder( int index); /** * bool hasNext = 4; * @return The hasNext. */ boolean getHasNext(); } /** * Protobuf type {@code types.GetTransactionsResponse} */ public static final class GetTransactionsResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetTransactionsResponse) GetTransactionsResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetTransactionsResponse.newBuilder() to construct. private GetTransactionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetTransactionsResponse() { status_ = 0; hashes_ = java.util.Collections.emptyList(); txs_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetTransactionsResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetTransactionsResponse( 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: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } hashes_.add(input.readBytes()); break; } case 26: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { txs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } txs_.add( input.readMessage(types.Blockchain.Tx.parser(), extensionRegistry)); break; } case 32: { hasNext_ = input.readBool(); 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)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); // C } if (((mutable_bitField0_ & 0x00000002) != 0)) { txs_ = java.util.Collections.unmodifiableList(txs_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetTransactionsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetTransactionsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetTransactionsResponse.class, types.P2P.GetTransactionsResponse.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; private int status_; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } public static final int HASHES_FIELD_NUMBER = 2; private java.util.List hashes_; /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ @java.lang.Override public java.util.List getHashesList() { return hashes_; } /** * repeated bytes hashes = 2; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } public static final int TXS_FIELD_NUMBER = 3; private java.util.List txs_; /** * repeated .types.Tx txs = 3; */ @java.lang.Override public java.util.List getTxsList() { return txs_; } /** * repeated .types.Tx txs = 3; */ @java.lang.Override public java.util.List getTxsOrBuilderList() { return txs_; } /** * repeated .types.Tx txs = 3; */ @java.lang.Override public int getTxsCount() { return txs_.size(); } /** * repeated .types.Tx txs = 3; */ @java.lang.Override public types.Blockchain.Tx getTxs(int index) { return txs_.get(index); } /** * repeated .types.Tx txs = 3; */ @java.lang.Override public types.Blockchain.TxOrBuilder getTxsOrBuilder( int index) { return txs_.get(index); } public static final int HASNEXT_FIELD_NUMBER = 4; private boolean hasNext_; /** * bool hasNext = 4; * @return The hasNext. */ @java.lang.Override public boolean getHasNext() { return hasNext_; } 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 (status_ != types.P2P.ResultStatus.OK.getNumber()) { output.writeEnum(1, status_); } for (int i = 0; i < hashes_.size(); i++) { output.writeBytes(2, hashes_.get(i)); } for (int i = 0; i < txs_.size(); i++) { output.writeMessage(3, txs_.get(i)); } if (hasNext_ != false) { output.writeBool(4, hasNext_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (status_ != types.P2P.ResultStatus.OK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, status_); } { int dataSize = 0; for (int i = 0; i < hashes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(hashes_.get(i)); } size += dataSize; size += 1 * getHashesList().size(); } for (int i = 0; i < txs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, txs_.get(i)); } if (hasNext_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, hasNext_); } 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 types.P2P.GetTransactionsResponse)) { return super.equals(obj); } types.P2P.GetTransactionsResponse other = (types.P2P.GetTransactionsResponse) obj; if (status_ != other.status_) return false; if (!getHashesList() .equals(other.getHashesList())) return false; if (!getTxsList() .equals(other.getTxsList())) return false; if (getHasNext() != other.getHasNext()) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; if (getHashesCount() > 0) { hash = (37 * hash) + HASHES_FIELD_NUMBER; hash = (53 * hash) + getHashesList().hashCode(); } if (getTxsCount() > 0) { hash = (37 * hash) + TXS_FIELD_NUMBER; hash = (53 * hash) + getTxsList().hashCode(); } hash = (37 * hash) + HASNEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHasNext()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetTransactionsResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetTransactionsResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetTransactionsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetTransactionsResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetTransactionsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetTransactionsResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetTransactionsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetTransactionsResponse 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 types.P2P.GetTransactionsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetTransactionsResponse 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 types.P2P.GetTransactionsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetTransactionsResponse 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(types.P2P.GetTransactionsResponse 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; } /** * Protobuf type {@code types.GetTransactionsResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetTransactionsResponse) types.P2P.GetTransactionsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetTransactionsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetTransactionsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetTransactionsResponse.class, types.P2P.GetTransactionsResponse.Builder.class); } // Construct using types.P2P.GetTransactionsResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getTxsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); status_ = 0; hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); if (txsBuilder_ == null) { txs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { txsBuilder_.clear(); } hasNext_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetTransactionsResponse_descriptor; } @java.lang.Override public types.P2P.GetTransactionsResponse getDefaultInstanceForType() { return types.P2P.GetTransactionsResponse.getDefaultInstance(); } @java.lang.Override public types.P2P.GetTransactionsResponse build() { types.P2P.GetTransactionsResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetTransactionsResponse buildPartial() { types.P2P.GetTransactionsResponse result = new types.P2P.GetTransactionsResponse(this); int from_bitField0_ = bitField0_; result.status_ = status_; if (((bitField0_ & 0x00000001) != 0)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); bitField0_ = (bitField0_ & ~0x00000001); } result.hashes_ = hashes_; if (txsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { txs_ = java.util.Collections.unmodifiableList(txs_); bitField0_ = (bitField0_ & ~0x00000002); } result.txs_ = txs_; } else { result.txs_ = txsBuilder_.build(); } result.hasNext_ = hasNext_; 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 types.P2P.GetTransactionsResponse) { return mergeFrom((types.P2P.GetTransactionsResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetTransactionsResponse other) { if (other == types.P2P.GetTransactionsResponse.getDefaultInstance()) return this; if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (!other.hashes_.isEmpty()) { if (hashes_.isEmpty()) { hashes_ = other.hashes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureHashesIsMutable(); hashes_.addAll(other.hashes_); } onChanged(); } if (txsBuilder_ == null) { if (!other.txs_.isEmpty()) { if (txs_.isEmpty()) { txs_ = other.txs_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureTxsIsMutable(); txs_.addAll(other.txs_); } onChanged(); } } else { if (!other.txs_.isEmpty()) { if (txsBuilder_.isEmpty()) { txsBuilder_.dispose(); txsBuilder_ = null; txs_ = other.txs_; bitField0_ = (bitField0_ & ~0x00000002); txsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTxsFieldBuilder() : null; } else { txsBuilder_.addAllMessages(other.txs_); } } } if (other.getHasNext() != false) { setHasNext(other.getHasNext()); } 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 { types.P2P.GetTransactionsResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetTransactionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int status_ = 0; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } /** * .types.ResultStatus status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(types.P2P.ResultStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return This builder for chaining. */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private java.util.List hashes_ = java.util.Collections.emptyList(); private void ensureHashesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(hashes_); bitField0_ |= 0x00000001; } } /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ public java.util.List getHashesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(hashes_) : hashes_; } /** * repeated bytes hashes = 2; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } /** * repeated bytes hashes = 2; * @param index The index to set the value at. * @param value The hashes to set. * @return This builder for chaining. */ public Builder setHashes( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.set(index, value); onChanged(); return this; } /** * repeated bytes hashes = 2; * @param value The hashes to add. * @return This builder for chaining. */ public Builder addHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.add(value); onChanged(); return this; } /** * repeated bytes hashes = 2; * @param values The hashes to add. * @return This builder for chaining. */ public Builder addAllHashes( java.lang.Iterable values) { ensureHashesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, hashes_); onChanged(); return this; } /** * repeated bytes hashes = 2; * @return This builder for chaining. */ public Builder clearHashes() { hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private java.util.List txs_ = java.util.Collections.emptyList(); private void ensureTxsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { txs_ = new java.util.ArrayList(txs_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.Tx, types.Blockchain.Tx.Builder, types.Blockchain.TxOrBuilder> txsBuilder_; /** * repeated .types.Tx txs = 3; */ public java.util.List getTxsList() { if (txsBuilder_ == null) { return java.util.Collections.unmodifiableList(txs_); } else { return txsBuilder_.getMessageList(); } } /** * repeated .types.Tx txs = 3; */ public int getTxsCount() { if (txsBuilder_ == null) { return txs_.size(); } else { return txsBuilder_.getCount(); } } /** * repeated .types.Tx txs = 3; */ public types.Blockchain.Tx getTxs(int index) { if (txsBuilder_ == null) { return txs_.get(index); } else { return txsBuilder_.getMessage(index); } } /** * repeated .types.Tx txs = 3; */ public Builder setTxs( int index, types.Blockchain.Tx value) { if (txsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTxsIsMutable(); txs_.set(index, value); onChanged(); } else { txsBuilder_.setMessage(index, value); } return this; } /** * repeated .types.Tx txs = 3; */ public Builder setTxs( int index, types.Blockchain.Tx.Builder builderForValue) { if (txsBuilder_ == null) { ensureTxsIsMutable(); txs_.set(index, builderForValue.build()); onChanged(); } else { txsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .types.Tx txs = 3; */ public Builder addTxs(types.Blockchain.Tx value) { if (txsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTxsIsMutable(); txs_.add(value); onChanged(); } else { txsBuilder_.addMessage(value); } return this; } /** * repeated .types.Tx txs = 3; */ public Builder addTxs( int index, types.Blockchain.Tx value) { if (txsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTxsIsMutable(); txs_.add(index, value); onChanged(); } else { txsBuilder_.addMessage(index, value); } return this; } /** * repeated .types.Tx txs = 3; */ public Builder addTxs( types.Blockchain.Tx.Builder builderForValue) { if (txsBuilder_ == null) { ensureTxsIsMutable(); txs_.add(builderForValue.build()); onChanged(); } else { txsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .types.Tx txs = 3; */ public Builder addTxs( int index, types.Blockchain.Tx.Builder builderForValue) { if (txsBuilder_ == null) { ensureTxsIsMutable(); txs_.add(index, builderForValue.build()); onChanged(); } else { txsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .types.Tx txs = 3; */ public Builder addAllTxs( java.lang.Iterable values) { if (txsBuilder_ == null) { ensureTxsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, txs_); onChanged(); } else { txsBuilder_.addAllMessages(values); } return this; } /** * repeated .types.Tx txs = 3; */ public Builder clearTxs() { if (txsBuilder_ == null) { txs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { txsBuilder_.clear(); } return this; } /** * repeated .types.Tx txs = 3; */ public Builder removeTxs(int index) { if (txsBuilder_ == null) { ensureTxsIsMutable(); txs_.remove(index); onChanged(); } else { txsBuilder_.remove(index); } return this; } /** * repeated .types.Tx txs = 3; */ public types.Blockchain.Tx.Builder getTxsBuilder( int index) { return getTxsFieldBuilder().getBuilder(index); } /** * repeated .types.Tx txs = 3; */ public types.Blockchain.TxOrBuilder getTxsOrBuilder( int index) { if (txsBuilder_ == null) { return txs_.get(index); } else { return txsBuilder_.getMessageOrBuilder(index); } } /** * repeated .types.Tx txs = 3; */ public java.util.List getTxsOrBuilderList() { if (txsBuilder_ != null) { return txsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(txs_); } } /** * repeated .types.Tx txs = 3; */ public types.Blockchain.Tx.Builder addTxsBuilder() { return getTxsFieldBuilder().addBuilder( types.Blockchain.Tx.getDefaultInstance()); } /** * repeated .types.Tx txs = 3; */ public types.Blockchain.Tx.Builder addTxsBuilder( int index) { return getTxsFieldBuilder().addBuilder( index, types.Blockchain.Tx.getDefaultInstance()); } /** * repeated .types.Tx txs = 3; */ public java.util.List getTxsBuilderList() { return getTxsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.Tx, types.Blockchain.Tx.Builder, types.Blockchain.TxOrBuilder> getTxsFieldBuilder() { if (txsBuilder_ == null) { txsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< types.Blockchain.Tx, types.Blockchain.Tx.Builder, types.Blockchain.TxOrBuilder>( txs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); txs_ = null; } return txsBuilder_; } private boolean hasNext_ ; /** * bool hasNext = 4; * @return The hasNext. */ @java.lang.Override public boolean getHasNext() { return hasNext_; } /** * bool hasNext = 4; * @param value The hasNext to set. * @return This builder for chaining. */ public Builder setHasNext(boolean value) { hasNext_ = value; onChanged(); return this; } /** * bool hasNext = 4; * @return This builder for chaining. */ public Builder clearHasNext() { hasNext_ = false; 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:types.GetTransactionsResponse) } // @@protoc_insertion_point(class_scope:types.GetTransactionsResponse) private static final types.P2P.GetTransactionsResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetTransactionsResponse(); } public static types.P2P.GetTransactionsResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetTransactionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetTransactionsResponse(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 types.P2P.GetTransactionsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetMissingRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetMissingRequest) com.google.protobuf.MessageOrBuilder { /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @return A list containing the hashes. */ java.util.List getHashesList(); /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @return The count of hashes. */ int getHashesCount(); /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ com.google.protobuf.ByteString getHashes(int index); /** *
     * stophash will be used the meaning of end point of missing part.
     * 
* * bytes stophash = 2; * @return The stophash. */ com.google.protobuf.ByteString getStophash(); } /** *
   * GetMissingRequest 
   * 
* * Protobuf type {@code types.GetMissingRequest} */ public static final class GetMissingRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetMissingRequest) GetMissingRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetMissingRequest.newBuilder() to construct. private GetMissingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetMissingRequest() { hashes_ = java.util.Collections.emptyList(); stophash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetMissingRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetMissingRequest( 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 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } hashes_.add(input.readBytes()); break; } case 18: { stophash_ = 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)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetMissingRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetMissingRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetMissingRequest.class, types.P2P.GetMissingRequest.Builder.class); } public static final int HASHES_FIELD_NUMBER = 1; private java.util.List hashes_; /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @return A list containing the hashes. */ @java.lang.Override public java.util.List getHashesList() { return hashes_; } /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } public static final int STOPHASH_FIELD_NUMBER = 2; private com.google.protobuf.ByteString stophash_; /** *
     * stophash will be used the meaning of end point of missing part.
     * 
* * bytes stophash = 2; * @return The stophash. */ @java.lang.Override public com.google.protobuf.ByteString getStophash() { return stophash_; } 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 { for (int i = 0; i < hashes_.size(); i++) { output.writeBytes(1, hashes_.get(i)); } if (!stophash_.isEmpty()) { output.writeBytes(2, stophash_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < hashes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(hashes_.get(i)); } size += dataSize; size += 1 * getHashesList().size(); } if (!stophash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, stophash_); } 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 types.P2P.GetMissingRequest)) { return super.equals(obj); } types.P2P.GetMissingRequest other = (types.P2P.GetMissingRequest) obj; if (!getHashesList() .equals(other.getHashesList())) return false; if (!getStophash() .equals(other.getStophash())) 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 (getHashesCount() > 0) { hash = (37 * hash) + HASHES_FIELD_NUMBER; hash = (53 * hash) + getHashesList().hashCode(); } hash = (37 * hash) + STOPHASH_FIELD_NUMBER; hash = (53 * hash) + getStophash().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetMissingRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetMissingRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetMissingRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetMissingRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetMissingRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetMissingRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetMissingRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetMissingRequest 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 types.P2P.GetMissingRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetMissingRequest 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 types.P2P.GetMissingRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetMissingRequest 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(types.P2P.GetMissingRequest 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; } /** *
     * GetMissingRequest 
     * 
* * Protobuf type {@code types.GetMissingRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetMissingRequest) types.P2P.GetMissingRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetMissingRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetMissingRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetMissingRequest.class, types.P2P.GetMissingRequest.Builder.class); } // Construct using types.P2P.GetMissingRequest.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(); hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); stophash_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetMissingRequest_descriptor; } @java.lang.Override public types.P2P.GetMissingRequest getDefaultInstanceForType() { return types.P2P.GetMissingRequest.getDefaultInstance(); } @java.lang.Override public types.P2P.GetMissingRequest build() { types.P2P.GetMissingRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetMissingRequest buildPartial() { types.P2P.GetMissingRequest result = new types.P2P.GetMissingRequest(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); bitField0_ = (bitField0_ & ~0x00000001); } result.hashes_ = hashes_; result.stophash_ = stophash_; 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 types.P2P.GetMissingRequest) { return mergeFrom((types.P2P.GetMissingRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetMissingRequest other) { if (other == types.P2P.GetMissingRequest.getDefaultInstance()) return this; if (!other.hashes_.isEmpty()) { if (hashes_.isEmpty()) { hashes_ = other.hashes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureHashesIsMutable(); hashes_.addAll(other.hashes_); } onChanged(); } if (other.getStophash() != com.google.protobuf.ByteString.EMPTY) { setStophash(other.getStophash()); } 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 { types.P2P.GetMissingRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetMissingRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List hashes_ = java.util.Collections.emptyList(); private void ensureHashesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(hashes_); bitField0_ |= 0x00000001; } } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @return A list containing the hashes. */ public java.util.List getHashesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(hashes_) : hashes_; } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @param index The index to set the value at. * @param value The hashes to set. * @return This builder for chaining. */ public Builder setHashes( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.set(index, value); onChanged(); return this; } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @param value The hashes to add. * @return This builder for chaining. */ public Builder addHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.add(value); onChanged(); return this; } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @param values The hashes to add. * @return This builder for chaining. */ public Builder addAllHashes( java.lang.Iterable values) { ensureHashesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, hashes_); onChanged(); return this; } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @return This builder for chaining. */ public Builder clearHashes() { hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private com.google.protobuf.ByteString stophash_ = com.google.protobuf.ByteString.EMPTY; /** *
       * stophash will be used the meaning of end point of missing part.
       * 
* * bytes stophash = 2; * @return The stophash. */ @java.lang.Override public com.google.protobuf.ByteString getStophash() { return stophash_; } /** *
       * stophash will be used the meaning of end point of missing part.
       * 
* * bytes stophash = 2; * @param value The stophash to set. * @return This builder for chaining. */ public Builder setStophash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } stophash_ = value; onChanged(); return this; } /** *
       * stophash will be used the meaning of end point of missing part.
       * 
* * bytes stophash = 2; * @return This builder for chaining. */ public Builder clearStophash() { stophash_ = getDefaultInstance().getStophash(); 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:types.GetMissingRequest) } // @@protoc_insertion_point(class_scope:types.GetMissingRequest) private static final types.P2P.GetMissingRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetMissingRequest(); } public static types.P2P.GetMissingRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetMissingRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetMissingRequest(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 types.P2P.GetMissingRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetAncestorRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetAncestorRequest) com.google.protobuf.MessageOrBuilder { /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @return A list containing the hashes. */ java.util.List getHashesList(); /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @return The count of hashes. */ int getHashesCount(); /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ com.google.protobuf.ByteString getHashes(int index); } /** * Protobuf type {@code types.GetAncestorRequest} */ public static final class GetAncestorRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetAncestorRequest) GetAncestorRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetAncestorRequest.newBuilder() to construct. private GetAncestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetAncestorRequest() { hashes_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetAncestorRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetAncestorRequest( 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 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } hashes_.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)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetAncestorRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetAncestorRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetAncestorRequest.class, types.P2P.GetAncestorRequest.Builder.class); } public static final int HASHES_FIELD_NUMBER = 1; private java.util.List hashes_; /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @return A list containing the hashes. */ @java.lang.Override public java.util.List getHashesList() { return hashes_; } /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** *
     * Hash indicated referenced sparse block hash array of longest chain(caller).
     * 
* * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.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 { for (int i = 0; i < hashes_.size(); i++) { output.writeBytes(1, hashes_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < hashes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(hashes_.get(i)); } size += dataSize; size += 1 * getHashesList().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 types.P2P.GetAncestorRequest)) { return super.equals(obj); } types.P2P.GetAncestorRequest other = (types.P2P.GetAncestorRequest) obj; if (!getHashesList() .equals(other.getHashesList())) 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 (getHashesCount() > 0) { hash = (37 * hash) + HASHES_FIELD_NUMBER; hash = (53 * hash) + getHashesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetAncestorRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetAncestorRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetAncestorRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetAncestorRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetAncestorRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetAncestorRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetAncestorRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetAncestorRequest 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 types.P2P.GetAncestorRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetAncestorRequest 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 types.P2P.GetAncestorRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetAncestorRequest 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(types.P2P.GetAncestorRequest 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; } /** * Protobuf type {@code types.GetAncestorRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetAncestorRequest) types.P2P.GetAncestorRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetAncestorRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetAncestorRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetAncestorRequest.class, types.P2P.GetAncestorRequest.Builder.class); } // Construct using types.P2P.GetAncestorRequest.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(); hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetAncestorRequest_descriptor; } @java.lang.Override public types.P2P.GetAncestorRequest getDefaultInstanceForType() { return types.P2P.GetAncestorRequest.getDefaultInstance(); } @java.lang.Override public types.P2P.GetAncestorRequest build() { types.P2P.GetAncestorRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetAncestorRequest buildPartial() { types.P2P.GetAncestorRequest result = new types.P2P.GetAncestorRequest(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); bitField0_ = (bitField0_ & ~0x00000001); } result.hashes_ = hashes_; 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 types.P2P.GetAncestorRequest) { return mergeFrom((types.P2P.GetAncestorRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetAncestorRequest other) { if (other == types.P2P.GetAncestorRequest.getDefaultInstance()) return this; if (!other.hashes_.isEmpty()) { if (hashes_.isEmpty()) { hashes_ = other.hashes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureHashesIsMutable(); hashes_.addAll(other.hashes_); } 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 { types.P2P.GetAncestorRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetAncestorRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List hashes_ = java.util.Collections.emptyList(); private void ensureHashesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(hashes_); bitField0_ |= 0x00000001; } } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @return A list containing the hashes. */ public java.util.List getHashesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(hashes_) : hashes_; } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @param index The index to set the value at. * @param value The hashes to set. * @return This builder for chaining. */ public Builder setHashes( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.set(index, value); onChanged(); return this; } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @param value The hashes to add. * @return This builder for chaining. */ public Builder addHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.add(value); onChanged(); return this; } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @param values The hashes to add. * @return This builder for chaining. */ public Builder addAllHashes( java.lang.Iterable values) { ensureHashesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, hashes_); onChanged(); return this; } /** *
       * Hash indicated referenced sparse block hash array of longest chain(caller).
       * 
* * repeated bytes hashes = 1; * @return This builder for chaining. */ public Builder clearHashes() { hashes_ = 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:types.GetAncestorRequest) } // @@protoc_insertion_point(class_scope:types.GetAncestorRequest) private static final types.P2P.GetAncestorRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetAncestorRequest(); } public static types.P2P.GetAncestorRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetAncestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetAncestorRequest(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 types.P2P.GetAncestorRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetAncestorResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetAncestorResponse) com.google.protobuf.MessageOrBuilder { /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .types.ResultStatus status = 1; * @return The status. */ types.P2P.ResultStatus getStatus(); /** * bytes ancestorHash = 2; * @return The ancestorHash. */ com.google.protobuf.ByteString getAncestorHash(); /** * uint64 ancestorNo = 3; * @return The ancestorNo. */ long getAncestorNo(); } /** * Protobuf type {@code types.GetAncestorResponse} */ public static final class GetAncestorResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetAncestorResponse) GetAncestorResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetAncestorResponse.newBuilder() to construct. private GetAncestorResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetAncestorResponse() { status_ = 0; ancestorHash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetAncestorResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetAncestorResponse( 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: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 18: { ancestorHash_ = input.readBytes(); break; } case 24: { ancestorNo_ = input.readUInt64(); 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 types.P2P.internal_static_types_GetAncestorResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetAncestorResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetAncestorResponse.class, types.P2P.GetAncestorResponse.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; private int status_; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } public static final int ANCESTORHASH_FIELD_NUMBER = 2; private com.google.protobuf.ByteString ancestorHash_; /** * bytes ancestorHash = 2; * @return The ancestorHash. */ @java.lang.Override public com.google.protobuf.ByteString getAncestorHash() { return ancestorHash_; } public static final int ANCESTORNO_FIELD_NUMBER = 3; private long ancestorNo_; /** * uint64 ancestorNo = 3; * @return The ancestorNo. */ @java.lang.Override public long getAncestorNo() { return ancestorNo_; } 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 (status_ != types.P2P.ResultStatus.OK.getNumber()) { output.writeEnum(1, status_); } if (!ancestorHash_.isEmpty()) { output.writeBytes(2, ancestorHash_); } if (ancestorNo_ != 0L) { output.writeUInt64(3, ancestorNo_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (status_ != types.P2P.ResultStatus.OK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, status_); } if (!ancestorHash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, ancestorHash_); } if (ancestorNo_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, ancestorNo_); } 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 types.P2P.GetAncestorResponse)) { return super.equals(obj); } types.P2P.GetAncestorResponse other = (types.P2P.GetAncestorResponse) obj; if (status_ != other.status_) return false; if (!getAncestorHash() .equals(other.getAncestorHash())) return false; if (getAncestorNo() != other.getAncestorNo()) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; hash = (37 * hash) + ANCESTORHASH_FIELD_NUMBER; hash = (53 * hash) + getAncestorHash().hashCode(); hash = (37 * hash) + ANCESTORNO_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAncestorNo()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetAncestorResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetAncestorResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetAncestorResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetAncestorResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetAncestorResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetAncestorResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetAncestorResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetAncestorResponse 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 types.P2P.GetAncestorResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetAncestorResponse 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 types.P2P.GetAncestorResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetAncestorResponse 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(types.P2P.GetAncestorResponse 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; } /** * Protobuf type {@code types.GetAncestorResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetAncestorResponse) types.P2P.GetAncestorResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetAncestorResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetAncestorResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetAncestorResponse.class, types.P2P.GetAncestorResponse.Builder.class); } // Construct using types.P2P.GetAncestorResponse.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(); status_ = 0; ancestorHash_ = com.google.protobuf.ByteString.EMPTY; ancestorNo_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetAncestorResponse_descriptor; } @java.lang.Override public types.P2P.GetAncestorResponse getDefaultInstanceForType() { return types.P2P.GetAncestorResponse.getDefaultInstance(); } @java.lang.Override public types.P2P.GetAncestorResponse build() { types.P2P.GetAncestorResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetAncestorResponse buildPartial() { types.P2P.GetAncestorResponse result = new types.P2P.GetAncestorResponse(this); result.status_ = status_; result.ancestorHash_ = ancestorHash_; result.ancestorNo_ = ancestorNo_; 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 types.P2P.GetAncestorResponse) { return mergeFrom((types.P2P.GetAncestorResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetAncestorResponse other) { if (other == types.P2P.GetAncestorResponse.getDefaultInstance()) return this; if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (other.getAncestorHash() != com.google.protobuf.ByteString.EMPTY) { setAncestorHash(other.getAncestorHash()); } if (other.getAncestorNo() != 0L) { setAncestorNo(other.getAncestorNo()); } 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 { types.P2P.GetAncestorResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetAncestorResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int status_ = 0; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } /** * .types.ResultStatus status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(types.P2P.ResultStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return This builder for chaining. */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString ancestorHash_ = com.google.protobuf.ByteString.EMPTY; /** * bytes ancestorHash = 2; * @return The ancestorHash. */ @java.lang.Override public com.google.protobuf.ByteString getAncestorHash() { return ancestorHash_; } /** * bytes ancestorHash = 2; * @param value The ancestorHash to set. * @return This builder for chaining. */ public Builder setAncestorHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ancestorHash_ = value; onChanged(); return this; } /** * bytes ancestorHash = 2; * @return This builder for chaining. */ public Builder clearAncestorHash() { ancestorHash_ = getDefaultInstance().getAncestorHash(); onChanged(); return this; } private long ancestorNo_ ; /** * uint64 ancestorNo = 3; * @return The ancestorNo. */ @java.lang.Override public long getAncestorNo() { return ancestorNo_; } /** * uint64 ancestorNo = 3; * @param value The ancestorNo to set. * @return This builder for chaining. */ public Builder setAncestorNo(long value) { ancestorNo_ = value; onChanged(); return this; } /** * uint64 ancestorNo = 3; * @return This builder for chaining. */ public Builder clearAncestorNo() { ancestorNo_ = 0L; 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:types.GetAncestorResponse) } // @@protoc_insertion_point(class_scope:types.GetAncestorResponse) private static final types.P2P.GetAncestorResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetAncestorResponse(); } public static types.P2P.GetAncestorResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetAncestorResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetAncestorResponse(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 types.P2P.GetAncestorResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetHashByNoOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetHashByNo) com.google.protobuf.MessageOrBuilder { /** * uint64 blockNo = 1; * @return The blockNo. */ long getBlockNo(); } /** * Protobuf type {@code types.GetHashByNo} */ public static final class GetHashByNo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetHashByNo) GetHashByNoOrBuilder { private static final long serialVersionUID = 0L; // Use GetHashByNo.newBuilder() to construct. private GetHashByNo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetHashByNo() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetHashByNo(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetHashByNo( 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: { blockNo_ = input.readUInt64(); 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 types.P2P.internal_static_types_GetHashByNo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetHashByNo_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetHashByNo.class, types.P2P.GetHashByNo.Builder.class); } public static final int BLOCKNO_FIELD_NUMBER = 1; private long blockNo_; /** * uint64 blockNo = 1; * @return The blockNo. */ @java.lang.Override public long getBlockNo() { return blockNo_; } 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 (blockNo_ != 0L) { output.writeUInt64(1, blockNo_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (blockNo_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, blockNo_); } 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 types.P2P.GetHashByNo)) { return super.equals(obj); } types.P2P.GetHashByNo other = (types.P2P.GetHashByNo) obj; if (getBlockNo() != other.getBlockNo()) 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) + BLOCKNO_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBlockNo()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetHashByNo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashByNo parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashByNo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashByNo parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashByNo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashByNo parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashByNo parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetHashByNo 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 types.P2P.GetHashByNo parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetHashByNo 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 types.P2P.GetHashByNo parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetHashByNo 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(types.P2P.GetHashByNo 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; } /** * Protobuf type {@code types.GetHashByNo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetHashByNo) types.P2P.GetHashByNoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetHashByNo_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetHashByNo_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetHashByNo.class, types.P2P.GetHashByNo.Builder.class); } // Construct using types.P2P.GetHashByNo.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(); blockNo_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetHashByNo_descriptor; } @java.lang.Override public types.P2P.GetHashByNo getDefaultInstanceForType() { return types.P2P.GetHashByNo.getDefaultInstance(); } @java.lang.Override public types.P2P.GetHashByNo build() { types.P2P.GetHashByNo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetHashByNo buildPartial() { types.P2P.GetHashByNo result = new types.P2P.GetHashByNo(this); result.blockNo_ = blockNo_; 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 types.P2P.GetHashByNo) { return mergeFrom((types.P2P.GetHashByNo)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetHashByNo other) { if (other == types.P2P.GetHashByNo.getDefaultInstance()) return this; if (other.getBlockNo() != 0L) { setBlockNo(other.getBlockNo()); } 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 { types.P2P.GetHashByNo parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetHashByNo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private long blockNo_ ; /** * uint64 blockNo = 1; * @return The blockNo. */ @java.lang.Override public long getBlockNo() { return blockNo_; } /** * uint64 blockNo = 1; * @param value The blockNo to set. * @return This builder for chaining. */ public Builder setBlockNo(long value) { blockNo_ = value; onChanged(); return this; } /** * uint64 blockNo = 1; * @return This builder for chaining. */ public Builder clearBlockNo() { blockNo_ = 0L; 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:types.GetHashByNo) } // @@protoc_insertion_point(class_scope:types.GetHashByNo) private static final types.P2P.GetHashByNo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetHashByNo(); } public static types.P2P.GetHashByNo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetHashByNo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetHashByNo(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 types.P2P.GetHashByNo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetHashByNoResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetHashByNoResponse) com.google.protobuf.MessageOrBuilder { /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .types.ResultStatus status = 1; * @return The status. */ types.P2P.ResultStatus getStatus(); /** * bytes blockHash = 2; * @return The blockHash. */ com.google.protobuf.ByteString getBlockHash(); } /** * Protobuf type {@code types.GetHashByNoResponse} */ public static final class GetHashByNoResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetHashByNoResponse) GetHashByNoResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetHashByNoResponse.newBuilder() to construct. private GetHashByNoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetHashByNoResponse() { status_ = 0; blockHash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetHashByNoResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetHashByNoResponse( 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: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 18: { blockHash_ = 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 types.P2P.internal_static_types_GetHashByNoResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetHashByNoResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetHashByNoResponse.class, types.P2P.GetHashByNoResponse.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; private int status_; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } public static final int BLOCKHASH_FIELD_NUMBER = 2; private com.google.protobuf.ByteString blockHash_; /** * bytes blockHash = 2; * @return The blockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBlockHash() { return blockHash_; } 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 (status_ != types.P2P.ResultStatus.OK.getNumber()) { output.writeEnum(1, status_); } if (!blockHash_.isEmpty()) { output.writeBytes(2, blockHash_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (status_ != types.P2P.ResultStatus.OK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, status_); } if (!blockHash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, blockHash_); } 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 types.P2P.GetHashByNoResponse)) { return super.equals(obj); } types.P2P.GetHashByNoResponse other = (types.P2P.GetHashByNoResponse) obj; if (status_ != other.status_) return false; if (!getBlockHash() .equals(other.getBlockHash())) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; hash = (37 * hash) + BLOCKHASH_FIELD_NUMBER; hash = (53 * hash) + getBlockHash().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetHashByNoResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashByNoResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashByNoResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashByNoResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashByNoResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashByNoResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashByNoResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetHashByNoResponse 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 types.P2P.GetHashByNoResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetHashByNoResponse 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 types.P2P.GetHashByNoResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetHashByNoResponse 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(types.P2P.GetHashByNoResponse 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; } /** * Protobuf type {@code types.GetHashByNoResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetHashByNoResponse) types.P2P.GetHashByNoResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetHashByNoResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetHashByNoResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetHashByNoResponse.class, types.P2P.GetHashByNoResponse.Builder.class); } // Construct using types.P2P.GetHashByNoResponse.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(); status_ = 0; blockHash_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetHashByNoResponse_descriptor; } @java.lang.Override public types.P2P.GetHashByNoResponse getDefaultInstanceForType() { return types.P2P.GetHashByNoResponse.getDefaultInstance(); } @java.lang.Override public types.P2P.GetHashByNoResponse build() { types.P2P.GetHashByNoResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetHashByNoResponse buildPartial() { types.P2P.GetHashByNoResponse result = new types.P2P.GetHashByNoResponse(this); result.status_ = status_; result.blockHash_ = blockHash_; 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 types.P2P.GetHashByNoResponse) { return mergeFrom((types.P2P.GetHashByNoResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetHashByNoResponse other) { if (other == types.P2P.GetHashByNoResponse.getDefaultInstance()) return this; if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (other.getBlockHash() != com.google.protobuf.ByteString.EMPTY) { setBlockHash(other.getBlockHash()); } 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 { types.P2P.GetHashByNoResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetHashByNoResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int status_ = 0; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } /** * .types.ResultStatus status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(types.P2P.ResultStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return This builder for chaining. */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY; /** * bytes blockHash = 2; * @return The blockHash. */ @java.lang.Override public com.google.protobuf.ByteString getBlockHash() { return blockHash_; } /** * bytes blockHash = 2; * @param value The blockHash to set. * @return This builder for chaining. */ public Builder setBlockHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } blockHash_ = value; onChanged(); return this; } /** * bytes blockHash = 2; * @return This builder for chaining. */ public Builder clearBlockHash() { blockHash_ = getDefaultInstance().getBlockHash(); 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:types.GetHashByNoResponse) } // @@protoc_insertion_point(class_scope:types.GetHashByNoResponse) private static final types.P2P.GetHashByNoResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetHashByNoResponse(); } public static types.P2P.GetHashByNoResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetHashByNoResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetHashByNoResponse(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 types.P2P.GetHashByNoResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetHashesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetHashesRequest) com.google.protobuf.MessageOrBuilder { /** *
     * prevHash indicated referenced block hash. server will return hashes after this block.
     * 
* * bytes prevHash = 1; * @return The prevHash. */ com.google.protobuf.ByteString getPrevHash(); /** *
     * prevNumber indicated referenced block
     * 
* * uint64 prevNumber = 2; * @return The prevNumber. */ long getPrevNumber(); /** *
     * maximum count of hashes that want to get
     * 
* * uint64 size = 3; * @return The size. */ long getSize(); } /** *
   * GetHashesRequest
   * 
* * Protobuf type {@code types.GetHashesRequest} */ public static final class GetHashesRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetHashesRequest) GetHashesRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetHashesRequest.newBuilder() to construct. private GetHashesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetHashesRequest() { prevHash_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetHashesRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetHashesRequest( 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: { prevHash_ = input.readBytes(); break; } case 16: { prevNumber_ = input.readUInt64(); break; } case 24: { size_ = input.readUInt64(); 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 types.P2P.internal_static_types_GetHashesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetHashesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetHashesRequest.class, types.P2P.GetHashesRequest.Builder.class); } public static final int PREVHASH_FIELD_NUMBER = 1; private com.google.protobuf.ByteString prevHash_; /** *
     * prevHash indicated referenced block hash. server will return hashes after this block.
     * 
* * bytes prevHash = 1; * @return The prevHash. */ @java.lang.Override public com.google.protobuf.ByteString getPrevHash() { return prevHash_; } public static final int PREVNUMBER_FIELD_NUMBER = 2; private long prevNumber_; /** *
     * prevNumber indicated referenced block
     * 
* * uint64 prevNumber = 2; * @return The prevNumber. */ @java.lang.Override public long getPrevNumber() { return prevNumber_; } public static final int SIZE_FIELD_NUMBER = 3; private long size_; /** *
     * maximum count of hashes that want to get
     * 
* * uint64 size = 3; * @return The size. */ @java.lang.Override public long getSize() { return size_; } 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 (!prevHash_.isEmpty()) { output.writeBytes(1, prevHash_); } if (prevNumber_ != 0L) { output.writeUInt64(2, prevNumber_); } if (size_ != 0L) { output.writeUInt64(3, size_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!prevHash_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, prevHash_); } if (prevNumber_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, prevNumber_); } if (size_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, 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 types.P2P.GetHashesRequest)) { return super.equals(obj); } types.P2P.GetHashesRequest other = (types.P2P.GetHashesRequest) obj; if (!getPrevHash() .equals(other.getPrevHash())) return false; if (getPrevNumber() != other.getPrevNumber()) return false; if (getSize() != other.getSize()) 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) + PREVHASH_FIELD_NUMBER; hash = (53 * hash) + getPrevHash().hashCode(); hash = (37 * hash) + PREVNUMBER_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPrevNumber()); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSize()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetHashesRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashesRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashesRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashesRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashesRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashesRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashesRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetHashesRequest 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 types.P2P.GetHashesRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetHashesRequest 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 types.P2P.GetHashesRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetHashesRequest 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(types.P2P.GetHashesRequest 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; } /** *
     * GetHashesRequest
     * 
* * Protobuf type {@code types.GetHashesRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetHashesRequest) types.P2P.GetHashesRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetHashesRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetHashesRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetHashesRequest.class, types.P2P.GetHashesRequest.Builder.class); } // Construct using types.P2P.GetHashesRequest.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(); prevHash_ = com.google.protobuf.ByteString.EMPTY; prevNumber_ = 0L; size_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetHashesRequest_descriptor; } @java.lang.Override public types.P2P.GetHashesRequest getDefaultInstanceForType() { return types.P2P.GetHashesRequest.getDefaultInstance(); } @java.lang.Override public types.P2P.GetHashesRequest build() { types.P2P.GetHashesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetHashesRequest buildPartial() { types.P2P.GetHashesRequest result = new types.P2P.GetHashesRequest(this); result.prevHash_ = prevHash_; result.prevNumber_ = prevNumber_; result.size_ = size_; 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 types.P2P.GetHashesRequest) { return mergeFrom((types.P2P.GetHashesRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetHashesRequest other) { if (other == types.P2P.GetHashesRequest.getDefaultInstance()) return this; if (other.getPrevHash() != com.google.protobuf.ByteString.EMPTY) { setPrevHash(other.getPrevHash()); } if (other.getPrevNumber() != 0L) { setPrevNumber(other.getPrevNumber()); } if (other.getSize() != 0L) { setSize(other.getSize()); } 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 { types.P2P.GetHashesRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetHashesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString prevHash_ = com.google.protobuf.ByteString.EMPTY; /** *
       * prevHash indicated referenced block hash. server will return hashes after this block.
       * 
* * bytes prevHash = 1; * @return The prevHash. */ @java.lang.Override public com.google.protobuf.ByteString getPrevHash() { return prevHash_; } /** *
       * prevHash indicated referenced block hash. server will return hashes after this block.
       * 
* * bytes prevHash = 1; * @param value The prevHash to set. * @return This builder for chaining. */ public Builder setPrevHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } prevHash_ = value; onChanged(); return this; } /** *
       * prevHash indicated referenced block hash. server will return hashes after this block.
       * 
* * bytes prevHash = 1; * @return This builder for chaining. */ public Builder clearPrevHash() { prevHash_ = getDefaultInstance().getPrevHash(); onChanged(); return this; } private long prevNumber_ ; /** *
       * prevNumber indicated referenced block
       * 
* * uint64 prevNumber = 2; * @return The prevNumber. */ @java.lang.Override public long getPrevNumber() { return prevNumber_; } /** *
       * prevNumber indicated referenced block
       * 
* * uint64 prevNumber = 2; * @param value The prevNumber to set. * @return This builder for chaining. */ public Builder setPrevNumber(long value) { prevNumber_ = value; onChanged(); return this; } /** *
       * prevNumber indicated referenced block
       * 
* * uint64 prevNumber = 2; * @return This builder for chaining. */ public Builder clearPrevNumber() { prevNumber_ = 0L; onChanged(); return this; } private long size_ ; /** *
       * maximum count of hashes that want to get
       * 
* * uint64 size = 3; * @return The size. */ @java.lang.Override public long getSize() { return size_; } /** *
       * maximum count of hashes that want to get
       * 
* * uint64 size = 3; * @param value The size to set. * @return This builder for chaining. */ public Builder setSize(long value) { size_ = value; onChanged(); return this; } /** *
       * maximum count of hashes that want to get
       * 
* * uint64 size = 3; * @return This builder for chaining. */ public Builder clearSize() { size_ = 0L; 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:types.GetHashesRequest) } // @@protoc_insertion_point(class_scope:types.GetHashesRequest) private static final types.P2P.GetHashesRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetHashesRequest(); } public static types.P2P.GetHashesRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetHashesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetHashesRequest(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 types.P2P.GetHashesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetHashesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:types.GetHashesResponse) com.google.protobuf.MessageOrBuilder { /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .types.ResultStatus status = 1; * @return The status. */ types.P2P.ResultStatus getStatus(); /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ java.util.List getHashesList(); /** * repeated bytes hashes = 2; * @return The count of hashes. */ int getHashesCount(); /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ com.google.protobuf.ByteString getHashes(int index); /** * bool hasNext = 3; * @return The hasNext. */ boolean getHasNext(); } /** *
   * GetHashesResponse contains response of GetHashesRequest.
   * 
* * Protobuf type {@code types.GetHashesResponse} */ public static final class GetHashesResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.GetHashesResponse) GetHashesResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetHashesResponse.newBuilder() to construct. private GetHashesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetHashesResponse() { status_ = 0; hashes_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetHashesResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetHashesResponse( 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: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } hashes_.add(input.readBytes()); break; } case 24: { hasNext_ = input.readBool(); 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)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetHashesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetHashesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetHashesResponse.class, types.P2P.GetHashesResponse.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; private int status_; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } public static final int HASHES_FIELD_NUMBER = 2; private java.util.List hashes_; /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ @java.lang.Override public java.util.List getHashesList() { return hashes_; } /** * repeated bytes hashes = 2; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } public static final int HASNEXT_FIELD_NUMBER = 3; private boolean hasNext_; /** * bool hasNext = 3; * @return The hasNext. */ @java.lang.Override public boolean getHasNext() { return hasNext_; } 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 (status_ != types.P2P.ResultStatus.OK.getNumber()) { output.writeEnum(1, status_); } for (int i = 0; i < hashes_.size(); i++) { output.writeBytes(2, hashes_.get(i)); } if (hasNext_ != false) { output.writeBool(3, hasNext_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (status_ != types.P2P.ResultStatus.OK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, status_); } { int dataSize = 0; for (int i = 0; i < hashes_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(hashes_.get(i)); } size += dataSize; size += 1 * getHashesList().size(); } if (hasNext_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, hasNext_); } 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 types.P2P.GetHashesResponse)) { return super.equals(obj); } types.P2P.GetHashesResponse other = (types.P2P.GetHashesResponse) obj; if (status_ != other.status_) return false; if (!getHashesList() .equals(other.getHashesList())) return false; if (getHasNext() != other.getHasNext()) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; if (getHashesCount() > 0) { hash = (37 * hash) + HASHES_FIELD_NUMBER; hash = (53 * hash) + getHashesList().hashCode(); } hash = (37 * hash) + HASNEXT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHasNext()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.GetHashesResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashesResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashesResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashesResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashesResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.GetHashesResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.GetHashesResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetHashesResponse 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 types.P2P.GetHashesResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.GetHashesResponse 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 types.P2P.GetHashesResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.GetHashesResponse 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(types.P2P.GetHashesResponse 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; } /** *
     * GetHashesResponse contains response of GetHashesRequest.
     * 
* * Protobuf type {@code types.GetHashesResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.GetHashesResponse) types.P2P.GetHashesResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_GetHashesResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_GetHashesResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.GetHashesResponse.class, types.P2P.GetHashesResponse.Builder.class); } // Construct using types.P2P.GetHashesResponse.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(); status_ = 0; hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); hasNext_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_GetHashesResponse_descriptor; } @java.lang.Override public types.P2P.GetHashesResponse getDefaultInstanceForType() { return types.P2P.GetHashesResponse.getDefaultInstance(); } @java.lang.Override public types.P2P.GetHashesResponse build() { types.P2P.GetHashesResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.GetHashesResponse buildPartial() { types.P2P.GetHashesResponse result = new types.P2P.GetHashesResponse(this); int from_bitField0_ = bitField0_; result.status_ = status_; if (((bitField0_ & 0x00000001) != 0)) { hashes_ = java.util.Collections.unmodifiableList(hashes_); bitField0_ = (bitField0_ & ~0x00000001); } result.hashes_ = hashes_; result.hasNext_ = hasNext_; 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 types.P2P.GetHashesResponse) { return mergeFrom((types.P2P.GetHashesResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.GetHashesResponse other) { if (other == types.P2P.GetHashesResponse.getDefaultInstance()) return this; if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (!other.hashes_.isEmpty()) { if (hashes_.isEmpty()) { hashes_ = other.hashes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureHashesIsMutable(); hashes_.addAll(other.hashes_); } onChanged(); } if (other.getHasNext() != false) { setHasNext(other.getHasNext()); } 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 { types.P2P.GetHashesResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.GetHashesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int status_ = 0; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } /** * .types.ResultStatus status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(types.P2P.ResultStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return This builder for chaining. */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private java.util.List hashes_ = java.util.Collections.emptyList(); private void ensureHashesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { hashes_ = new java.util.ArrayList(hashes_); bitField0_ |= 0x00000001; } } /** * repeated bytes hashes = 2; * @return A list containing the hashes. */ public java.util.List getHashesList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(hashes_) : hashes_; } /** * repeated bytes hashes = 2; * @return The count of hashes. */ public int getHashesCount() { return hashes_.size(); } /** * repeated bytes hashes = 2; * @param index The index of the element to return. * @return The hashes at the given index. */ public com.google.protobuf.ByteString getHashes(int index) { return hashes_.get(index); } /** * repeated bytes hashes = 2; * @param index The index to set the value at. * @param value The hashes to set. * @return This builder for chaining. */ public Builder setHashes( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.set(index, value); onChanged(); return this; } /** * repeated bytes hashes = 2; * @param value The hashes to add. * @return This builder for chaining. */ public Builder addHashes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureHashesIsMutable(); hashes_.add(value); onChanged(); return this; } /** * repeated bytes hashes = 2; * @param values The hashes to add. * @return This builder for chaining. */ public Builder addAllHashes( java.lang.Iterable values) { ensureHashesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, hashes_); onChanged(); return this; } /** * repeated bytes hashes = 2; * @return This builder for chaining. */ public Builder clearHashes() { hashes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private boolean hasNext_ ; /** * bool hasNext = 3; * @return The hasNext. */ @java.lang.Override public boolean getHasNext() { return hasNext_; } /** * bool hasNext = 3; * @param value The hasNext to set. * @return This builder for chaining. */ public Builder setHasNext(boolean value) { hasNext_ = value; onChanged(); return this; } /** * bool hasNext = 3; * @return This builder for chaining. */ public Builder clearHasNext() { hasNext_ = false; 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:types.GetHashesResponse) } // @@protoc_insertion_point(class_scope:types.GetHashesResponse) private static final types.P2P.GetHashesResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.GetHashesResponse(); } public static types.P2P.GetHashesResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetHashesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetHashesResponse(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 types.P2P.GetHashesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface IssueCertificateRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.IssueCertificateRequest) com.google.protobuf.MessageOrBuilder { } /** *
   * IssueCertificateRequest is message to block producer from agent
   * 
* * Protobuf type {@code types.IssueCertificateRequest} */ public static final class IssueCertificateRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.IssueCertificateRequest) IssueCertificateRequestOrBuilder { private static final long serialVersionUID = 0L; // Use IssueCertificateRequest.newBuilder() to construct. private IssueCertificateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private IssueCertificateRequest() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new IssueCertificateRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private IssueCertificateRequest( 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; 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 types.P2P.internal_static_types_IssueCertificateRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_IssueCertificateRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.IssueCertificateRequest.class, types.P2P.IssueCertificateRequest.Builder.class); } 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 { unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; 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 types.P2P.IssueCertificateRequest)) { return super.equals(obj); } types.P2P.IssueCertificateRequest other = (types.P2P.IssueCertificateRequest) obj; 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 = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.IssueCertificateRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.IssueCertificateRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.IssueCertificateRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.IssueCertificateRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.IssueCertificateRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.IssueCertificateRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.IssueCertificateRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.IssueCertificateRequest 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 types.P2P.IssueCertificateRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.IssueCertificateRequest 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 types.P2P.IssueCertificateRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.IssueCertificateRequest 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(types.P2P.IssueCertificateRequest 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; } /** *
     * IssueCertificateRequest is message to block producer from agent
     * 
* * Protobuf type {@code types.IssueCertificateRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.IssueCertificateRequest) types.P2P.IssueCertificateRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_IssueCertificateRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_IssueCertificateRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.IssueCertificateRequest.class, types.P2P.IssueCertificateRequest.Builder.class); } // Construct using types.P2P.IssueCertificateRequest.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(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_IssueCertificateRequest_descriptor; } @java.lang.Override public types.P2P.IssueCertificateRequest getDefaultInstanceForType() { return types.P2P.IssueCertificateRequest.getDefaultInstance(); } @java.lang.Override public types.P2P.IssueCertificateRequest build() { types.P2P.IssueCertificateRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.IssueCertificateRequest buildPartial() { types.P2P.IssueCertificateRequest result = new types.P2P.IssueCertificateRequest(this); 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 types.P2P.IssueCertificateRequest) { return mergeFrom((types.P2P.IssueCertificateRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.IssueCertificateRequest other) { if (other == types.P2P.IssueCertificateRequest.getDefaultInstance()) return this; 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 { types.P2P.IssueCertificateRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.IssueCertificateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } 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:types.IssueCertificateRequest) } // @@protoc_insertion_point(class_scope:types.IssueCertificateRequest) private static final types.P2P.IssueCertificateRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.IssueCertificateRequest(); } public static types.P2P.IssueCertificateRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public IssueCertificateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new IssueCertificateRequest(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 types.P2P.IssueCertificateRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface IssueCertificateResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:types.IssueCertificateResponse) com.google.protobuf.MessageOrBuilder { /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ int getStatusValue(); /** * .types.ResultStatus status = 1; * @return The status. */ types.P2P.ResultStatus getStatus(); /** * .types.AgentCertificate certificate = 2; * @return Whether the certificate field is set. */ boolean hasCertificate(); /** * .types.AgentCertificate certificate = 2; * @return The certificate. */ types.Node.AgentCertificate getCertificate(); /** * .types.AgentCertificate certificate = 2; */ types.Node.AgentCertificateOrBuilder getCertificateOrBuilder(); } /** *
   * IssueCertificateResp is common message during handshake
   * 
* * Protobuf type {@code types.IssueCertificateResponse} */ public static final class IssueCertificateResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.IssueCertificateResponse) IssueCertificateResponseOrBuilder { private static final long serialVersionUID = 0L; // Use IssueCertificateResponse.newBuilder() to construct. private IssueCertificateResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private IssueCertificateResponse() { status_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new IssueCertificateResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private IssueCertificateResponse( 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: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 18: { types.Node.AgentCertificate.Builder subBuilder = null; if (certificate_ != null) { subBuilder = certificate_.toBuilder(); } certificate_ = input.readMessage(types.Node.AgentCertificate.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(certificate_); certificate_ = 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 types.P2P.internal_static_types_IssueCertificateResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_IssueCertificateResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.IssueCertificateResponse.class, types.P2P.IssueCertificateResponse.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; private int status_; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } public static final int CERTIFICATE_FIELD_NUMBER = 2; private types.Node.AgentCertificate certificate_; /** * .types.AgentCertificate certificate = 2; * @return Whether the certificate field is set. */ @java.lang.Override public boolean hasCertificate() { return certificate_ != null; } /** * .types.AgentCertificate certificate = 2; * @return The certificate. */ @java.lang.Override public types.Node.AgentCertificate getCertificate() { return certificate_ == null ? types.Node.AgentCertificate.getDefaultInstance() : certificate_; } /** * .types.AgentCertificate certificate = 2; */ @java.lang.Override public types.Node.AgentCertificateOrBuilder getCertificateOrBuilder() { return getCertificate(); } 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 (status_ != types.P2P.ResultStatus.OK.getNumber()) { output.writeEnum(1, status_); } if (certificate_ != null) { output.writeMessage(2, getCertificate()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (status_ != types.P2P.ResultStatus.OK.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, status_); } if (certificate_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getCertificate()); } 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 types.P2P.IssueCertificateResponse)) { return super.equals(obj); } types.P2P.IssueCertificateResponse other = (types.P2P.IssueCertificateResponse) obj; if (status_ != other.status_) return false; if (hasCertificate() != other.hasCertificate()) return false; if (hasCertificate()) { if (!getCertificate() .equals(other.getCertificate())) 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) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; if (hasCertificate()) { hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + getCertificate().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.IssueCertificateResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.IssueCertificateResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.IssueCertificateResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.IssueCertificateResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.IssueCertificateResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.IssueCertificateResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.IssueCertificateResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.IssueCertificateResponse 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 types.P2P.IssueCertificateResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.IssueCertificateResponse 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 types.P2P.IssueCertificateResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.IssueCertificateResponse 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(types.P2P.IssueCertificateResponse 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; } /** *
     * IssueCertificateResp is common message during handshake
     * 
* * Protobuf type {@code types.IssueCertificateResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.IssueCertificateResponse) types.P2P.IssueCertificateResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_IssueCertificateResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_IssueCertificateResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.IssueCertificateResponse.class, types.P2P.IssueCertificateResponse.Builder.class); } // Construct using types.P2P.IssueCertificateResponse.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(); status_ = 0; if (certificateBuilder_ == null) { certificate_ = null; } else { certificate_ = null; certificateBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_IssueCertificateResponse_descriptor; } @java.lang.Override public types.P2P.IssueCertificateResponse getDefaultInstanceForType() { return types.P2P.IssueCertificateResponse.getDefaultInstance(); } @java.lang.Override public types.P2P.IssueCertificateResponse build() { types.P2P.IssueCertificateResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.IssueCertificateResponse buildPartial() { types.P2P.IssueCertificateResponse result = new types.P2P.IssueCertificateResponse(this); result.status_ = status_; if (certificateBuilder_ == null) { result.certificate_ = certificate_; } else { result.certificate_ = certificateBuilder_.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 types.P2P.IssueCertificateResponse) { return mergeFrom((types.P2P.IssueCertificateResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.IssueCertificateResponse other) { if (other == types.P2P.IssueCertificateResponse.getDefaultInstance()) return this; if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (other.hasCertificate()) { mergeCertificate(other.getCertificate()); } 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 { types.P2P.IssueCertificateResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.IssueCertificateResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int status_ = 0; /** * .types.ResultStatus status = 1; * @return The enum numeric value on the wire for status. */ @java.lang.Override public int getStatusValue() { return status_; } /** * .types.ResultStatus status = 1; * @param value The enum numeric value on the wire for status to set. * @return This builder for chaining. */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return The status. */ @java.lang.Override public types.P2P.ResultStatus getStatus() { @SuppressWarnings("deprecation") types.P2P.ResultStatus result = types.P2P.ResultStatus.valueOf(status_); return result == null ? types.P2P.ResultStatus.UNRECOGNIZED : result; } /** * .types.ResultStatus status = 1; * @param value The status to set. * @return This builder for chaining. */ public Builder setStatus(types.P2P.ResultStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .types.ResultStatus status = 1; * @return This builder for chaining. */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private types.Node.AgentCertificate certificate_; private com.google.protobuf.SingleFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder> certificateBuilder_; /** * .types.AgentCertificate certificate = 2; * @return Whether the certificate field is set. */ public boolean hasCertificate() { return certificateBuilder_ != null || certificate_ != null; } /** * .types.AgentCertificate certificate = 2; * @return The certificate. */ public types.Node.AgentCertificate getCertificate() { if (certificateBuilder_ == null) { return certificate_ == null ? types.Node.AgentCertificate.getDefaultInstance() : certificate_; } else { return certificateBuilder_.getMessage(); } } /** * .types.AgentCertificate certificate = 2; */ public Builder setCertificate(types.Node.AgentCertificate value) { if (certificateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } certificate_ = value; onChanged(); } else { certificateBuilder_.setMessage(value); } return this; } /** * .types.AgentCertificate certificate = 2; */ public Builder setCertificate( types.Node.AgentCertificate.Builder builderForValue) { if (certificateBuilder_ == null) { certificate_ = builderForValue.build(); onChanged(); } else { certificateBuilder_.setMessage(builderForValue.build()); } return this; } /** * .types.AgentCertificate certificate = 2; */ public Builder mergeCertificate(types.Node.AgentCertificate value) { if (certificateBuilder_ == null) { if (certificate_ != null) { certificate_ = types.Node.AgentCertificate.newBuilder(certificate_).mergeFrom(value).buildPartial(); } else { certificate_ = value; } onChanged(); } else { certificateBuilder_.mergeFrom(value); } return this; } /** * .types.AgentCertificate certificate = 2; */ public Builder clearCertificate() { if (certificateBuilder_ == null) { certificate_ = null; onChanged(); } else { certificate_ = null; certificateBuilder_ = null; } return this; } /** * .types.AgentCertificate certificate = 2; */ public types.Node.AgentCertificate.Builder getCertificateBuilder() { onChanged(); return getCertificateFieldBuilder().getBuilder(); } /** * .types.AgentCertificate certificate = 2; */ public types.Node.AgentCertificateOrBuilder getCertificateOrBuilder() { if (certificateBuilder_ != null) { return certificateBuilder_.getMessageOrBuilder(); } else { return certificate_ == null ? types.Node.AgentCertificate.getDefaultInstance() : certificate_; } } /** * .types.AgentCertificate certificate = 2; */ private com.google.protobuf.SingleFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder> getCertificateFieldBuilder() { if (certificateBuilder_ == null) { certificateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder>( getCertificate(), getParentForChildren(), isClean()); certificate_ = null; } return certificateBuilder_; } @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:types.IssueCertificateResponse) } // @@protoc_insertion_point(class_scope:types.IssueCertificateResponse) private static final types.P2P.IssueCertificateResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.IssueCertificateResponse(); } public static types.P2P.IssueCertificateResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public IssueCertificateResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new IssueCertificateResponse(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 types.P2P.IssueCertificateResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface CertificateRenewedNoticeOrBuilder extends // @@protoc_insertion_point(interface_extends:types.CertificateRenewedNotice) com.google.protobuf.MessageOrBuilder { /** * .types.AgentCertificate certificate = 2; * @return Whether the certificate field is set. */ boolean hasCertificate(); /** * .types.AgentCertificate certificate = 2; * @return The certificate. */ types.Node.AgentCertificate getCertificate(); /** * .types.AgentCertificate certificate = 2; */ types.Node.AgentCertificateOrBuilder getCertificateOrBuilder(); } /** *
   * CertificateRenewedNotice is sent when agent update hi certificate
   * 
* * Protobuf type {@code types.CertificateRenewedNotice} */ public static final class CertificateRenewedNotice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.CertificateRenewedNotice) CertificateRenewedNoticeOrBuilder { private static final long serialVersionUID = 0L; // Use CertificateRenewedNotice.newBuilder() to construct. private CertificateRenewedNotice(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private CertificateRenewedNotice() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new CertificateRenewedNotice(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private CertificateRenewedNotice( 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 18: { types.Node.AgentCertificate.Builder subBuilder = null; if (certificate_ != null) { subBuilder = certificate_.toBuilder(); } certificate_ = input.readMessage(types.Node.AgentCertificate.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(certificate_); certificate_ = 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 types.P2P.internal_static_types_CertificateRenewedNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_CertificateRenewedNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.CertificateRenewedNotice.class, types.P2P.CertificateRenewedNotice.Builder.class); } public static final int CERTIFICATE_FIELD_NUMBER = 2; private types.Node.AgentCertificate certificate_; /** * .types.AgentCertificate certificate = 2; * @return Whether the certificate field is set. */ @java.lang.Override public boolean hasCertificate() { return certificate_ != null; } /** * .types.AgentCertificate certificate = 2; * @return The certificate. */ @java.lang.Override public types.Node.AgentCertificate getCertificate() { return certificate_ == null ? types.Node.AgentCertificate.getDefaultInstance() : certificate_; } /** * .types.AgentCertificate certificate = 2; */ @java.lang.Override public types.Node.AgentCertificateOrBuilder getCertificateOrBuilder() { return getCertificate(); } 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 (certificate_ != null) { output.writeMessage(2, getCertificate()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (certificate_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getCertificate()); } 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 types.P2P.CertificateRenewedNotice)) { return super.equals(obj); } types.P2P.CertificateRenewedNotice other = (types.P2P.CertificateRenewedNotice) obj; if (hasCertificate() != other.hasCertificate()) return false; if (hasCertificate()) { if (!getCertificate() .equals(other.getCertificate())) 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 (hasCertificate()) { hash = (37 * hash) + CERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + getCertificate().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.P2P.CertificateRenewedNotice parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.CertificateRenewedNotice parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.CertificateRenewedNotice parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.CertificateRenewedNotice parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.CertificateRenewedNotice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.P2P.CertificateRenewedNotice parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.P2P.CertificateRenewedNotice parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.CertificateRenewedNotice 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 types.P2P.CertificateRenewedNotice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.P2P.CertificateRenewedNotice 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 types.P2P.CertificateRenewedNotice parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.P2P.CertificateRenewedNotice 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(types.P2P.CertificateRenewedNotice 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; } /** *
     * CertificateRenewedNotice is sent when agent update hi certificate
     * 
* * Protobuf type {@code types.CertificateRenewedNotice} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.CertificateRenewedNotice) types.P2P.CertificateRenewedNoticeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.P2P.internal_static_types_CertificateRenewedNotice_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.P2P.internal_static_types_CertificateRenewedNotice_fieldAccessorTable .ensureFieldAccessorsInitialized( types.P2P.CertificateRenewedNotice.class, types.P2P.CertificateRenewedNotice.Builder.class); } // Construct using types.P2P.CertificateRenewedNotice.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 (certificateBuilder_ == null) { certificate_ = null; } else { certificate_ = null; certificateBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.P2P.internal_static_types_CertificateRenewedNotice_descriptor; } @java.lang.Override public types.P2P.CertificateRenewedNotice getDefaultInstanceForType() { return types.P2P.CertificateRenewedNotice.getDefaultInstance(); } @java.lang.Override public types.P2P.CertificateRenewedNotice build() { types.P2P.CertificateRenewedNotice result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.P2P.CertificateRenewedNotice buildPartial() { types.P2P.CertificateRenewedNotice result = new types.P2P.CertificateRenewedNotice(this); if (certificateBuilder_ == null) { result.certificate_ = certificate_; } else { result.certificate_ = certificateBuilder_.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 types.P2P.CertificateRenewedNotice) { return mergeFrom((types.P2P.CertificateRenewedNotice)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.P2P.CertificateRenewedNotice other) { if (other == types.P2P.CertificateRenewedNotice.getDefaultInstance()) return this; if (other.hasCertificate()) { mergeCertificate(other.getCertificate()); } 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 { types.P2P.CertificateRenewedNotice parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.P2P.CertificateRenewedNotice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private types.Node.AgentCertificate certificate_; private com.google.protobuf.SingleFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder> certificateBuilder_; /** * .types.AgentCertificate certificate = 2; * @return Whether the certificate field is set. */ public boolean hasCertificate() { return certificateBuilder_ != null || certificate_ != null; } /** * .types.AgentCertificate certificate = 2; * @return The certificate. */ public types.Node.AgentCertificate getCertificate() { if (certificateBuilder_ == null) { return certificate_ == null ? types.Node.AgentCertificate.getDefaultInstance() : certificate_; } else { return certificateBuilder_.getMessage(); } } /** * .types.AgentCertificate certificate = 2; */ public Builder setCertificate(types.Node.AgentCertificate value) { if (certificateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } certificate_ = value; onChanged(); } else { certificateBuilder_.setMessage(value); } return this; } /** * .types.AgentCertificate certificate = 2; */ public Builder setCertificate( types.Node.AgentCertificate.Builder builderForValue) { if (certificateBuilder_ == null) { certificate_ = builderForValue.build(); onChanged(); } else { certificateBuilder_.setMessage(builderForValue.build()); } return this; } /** * .types.AgentCertificate certificate = 2; */ public Builder mergeCertificate(types.Node.AgentCertificate value) { if (certificateBuilder_ == null) { if (certificate_ != null) { certificate_ = types.Node.AgentCertificate.newBuilder(certificate_).mergeFrom(value).buildPartial(); } else { certificate_ = value; } onChanged(); } else { certificateBuilder_.mergeFrom(value); } return this; } /** * .types.AgentCertificate certificate = 2; */ public Builder clearCertificate() { if (certificateBuilder_ == null) { certificate_ = null; onChanged(); } else { certificate_ = null; certificateBuilder_ = null; } return this; } /** * .types.AgentCertificate certificate = 2; */ public types.Node.AgentCertificate.Builder getCertificateBuilder() { onChanged(); return getCertificateFieldBuilder().getBuilder(); } /** * .types.AgentCertificate certificate = 2; */ public types.Node.AgentCertificateOrBuilder getCertificateOrBuilder() { if (certificateBuilder_ != null) { return certificateBuilder_.getMessageOrBuilder(); } else { return certificate_ == null ? types.Node.AgentCertificate.getDefaultInstance() : certificate_; } } /** * .types.AgentCertificate certificate = 2; */ private com.google.protobuf.SingleFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder> getCertificateFieldBuilder() { if (certificateBuilder_ == null) { certificateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< types.Node.AgentCertificate, types.Node.AgentCertificate.Builder, types.Node.AgentCertificateOrBuilder>( getCertificate(), getParentForChildren(), isClean()); certificate_ = null; } return certificateBuilder_; } @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:types.CertificateRenewedNotice) } // @@protoc_insertion_point(class_scope:types.CertificateRenewedNotice) private static final types.P2P.CertificateRenewedNotice DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.P2P.CertificateRenewedNotice(); } public static types.P2P.CertificateRenewedNotice getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public CertificateRenewedNotice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CertificateRenewedNotice(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 types.P2P.CertificateRenewedNotice getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_MsgHeader_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_MsgHeader_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_P2PMessage_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_P2PMessage_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_Ping_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_Ping_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_Pong_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_Pong_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_Status_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_Status_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GoAwayNotice_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GoAwayNotice_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_AddressesRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_AddressesRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_AddressesResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_AddressesResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_NewBlockNotice_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_NewBlockNotice_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_BlockProducedNotice_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_BlockProducedNotice_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetBlockHeadersRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetBlockHeadersRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetBlockHeadersResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetBlockHeadersResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetBlockRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetBlockRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetBlockResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetBlockResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_NewTransactionsNotice_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_NewTransactionsNotice_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetTransactionsRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetTransactionsRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetTransactionsResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetTransactionsResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetMissingRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetMissingRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetAncestorRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetAncestorRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetAncestorResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetAncestorResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetHashByNo_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetHashByNo_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetHashByNoResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetHashByNoResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetHashesRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetHashesRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_GetHashesResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_GetHashesResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_IssueCertificateRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_IssueCertificateRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_IssueCertificateResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_IssueCertificateResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_CertificateRenewedNotice_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_CertificateRenewedNotice_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\tp2p.proto\022\005types\032\020blockchain.proto\032\nno" + "de.proto\"\250\001\n\tMsgHeader\022\025\n\rclientVersion\030" + "\001 \001(\t\022\021\n\ttimestamp\030\002 \001(\003\022\n\n\002id\030\003 \001(\t\022\016\n\006" + "gossip\030\004 \001(\010\022\016\n\006peerID\030\005 \001(\014\022\022\n\nnodePubK" + "ey\030\006 \001(\014\022\014\n\004sign\030\007 \001(\014\022\023\n\013subprotocol\030\010 " + "\001(\r\022\016\n\006length\030\t \001(\r\"<\n\nP2PMessage\022 \n\006hea" + "der\030\001 \001(\0132\020.types.MsgHeader\022\014\n\004data\030\002 \001(" + "\014\"4\n\004Ping\022\027\n\017best_block_hash\030\001 \001(\014\022\023\n\013be" + "st_height\030\002 \001(\004\"1\n\004Pong\022\025\n\rbestBlockHash" + "\030\001 \001(\014\022\022\n\nbestHeight\030\002 \001(\004\"\345\001\n\006Status\022\"\n" + "\006sender\030\001 \001(\0132\022.types.PeerAddress\022\025\n\rbes" + "tBlockHash\030\002 \001(\014\022\022\n\nbestHeight\030\003 \001(\004\022\017\n\007" + "chainID\030\004 \001(\014\022\020\n\010noExpose\030\005 \001(\010\022\017\n\007versi" + "on\030\006 \001(\t\022\017\n\007genesis\030\007 \001(\014\022-\n\014certificate" + "s\030\010 \003(\0132\027.types.AgentCertificate\022\030\n\020issu" + "eCertificate\030\t \001(\010\"\037\n\014GoAwayNotice\022\017\n\007me" + "ssage\030\001 \001(\t\"G\n\020AddressesRequest\022\"\n\006sende" + "r\030\001 \001(\0132\022.types.PeerAddress\022\017\n\007maxSize\030\002" + " \001(\r\"[\n\021AddressesResponse\022#\n\006status\030\001 \001(" + "\0162\023.types.ResultStatus\022!\n\005peers\030\002 \003(\0132\022." + "types.PeerAddress\"4\n\016NewBlockNotice\022\021\n\tb" + "lockHash\030\001 \001(\014\022\017\n\007blockNo\030\002 \001(\004\"W\n\023Block" + "ProducedNotice\022\022\n\nproducerID\030\001 \001(\014\022\017\n\007bl" + "ockNo\030\002 \001(\004\022\033\n\005block\030\003 \001(\0132\014.types.Block" + "\"a\n\026GetBlockHeadersRequest\022\014\n\004hash\030\001 \001(\014" + "\022\016\n\006height\030\002 \001(\004\022\016\n\006offset\030\003 \001(\004\022\014\n\004size" + "\030\004 \001(\r\022\013\n\003asc\030\005 \001(\010\"\204\001\n\027GetBlockHeadersR" + "esponse\022#\n\006status\030\001 \001(\0162\023.types.ResultSt" + "atus\022\016\n\006hashes\030\002 \003(\014\022#\n\007headers\030\003 \003(\0132\022." + "types.BlockHeader\022\017\n\007hasNext\030\004 \001(\010\"!\n\017Ge" + "tBlockRequest\022\016\n\006hashes\030\001 \003(\014\"f\n\020GetBloc" + "kResponse\022#\n\006status\030\001 \001(\0162\023.types.Result" + "Status\022\034\n\006blocks\030\002 \003(\0132\014.types.Block\022\017\n\007" + "hasNext\030\003 \001(\010\")\n\025NewTransactionsNotice\022\020" + "\n\010txHashes\030\001 \003(\014\"(\n\026GetTransactionsReque" + "st\022\016\n\006hashes\030\001 \003(\014\"w\n\027GetTransactionsRes" + "ponse\022#\n\006status\030\001 \001(\0162\023.types.ResultStat" + "us\022\016\n\006hashes\030\002 \003(\014\022\026\n\003txs\030\003 \003(\0132\t.types." + "Tx\022\017\n\007hasNext\030\004 \001(\010\"5\n\021GetMissingRequest" + "\022\016\n\006hashes\030\001 \003(\014\022\020\n\010stophash\030\002 \001(\014\"$\n\022Ge" + "tAncestorRequest\022\016\n\006hashes\030\001 \003(\014\"d\n\023GetA" + "ncestorResponse\022#\n\006status\030\001 \001(\0162\023.types." + "ResultStatus\022\024\n\014ancestorHash\030\002 \001(\014\022\022\n\nan" + "cestorNo\030\003 \001(\004\"\036\n\013GetHashByNo\022\017\n\007blockNo" + "\030\001 \001(\004\"M\n\023GetHashByNoResponse\022#\n\006status\030" + "\001 \001(\0162\023.types.ResultStatus\022\021\n\tblockHash\030" + "\002 \001(\014\"F\n\020GetHashesRequest\022\020\n\010prevHash\030\001 " + "\001(\014\022\022\n\nprevNumber\030\002 \001(\004\022\014\n\004size\030\003 \001(\004\"Y\n" + "\021GetHashesResponse\022#\n\006status\030\001 \001(\0162\023.typ" + "es.ResultStatus\022\016\n\006hashes\030\002 \003(\014\022\017\n\007hasNe" + "xt\030\003 \001(\010\"\031\n\027IssueCertificateRequest\"m\n\030I" + "ssueCertificateResponse\022#\n\006status\030\001 \001(\0162" + "\023.types.ResultStatus\022,\n\013certificate\030\002 \001(" + "\0132\027.types.AgentCertificate\"H\n\030Certificat" + "eRenewedNotice\022,\n\013certificate\030\002 \001(\0132\027.ty" + "pes.AgentCertificate*\276\002\n\014ResultStatus\022\006\n" + "\002OK\020\000\022\014\n\010CANCELED\020\001\022\013\n\007UNKNOWN\020\002\022\024\n\020INVA" + "LID_ARGUMENT\020\003\022\025\n\021DEADLINE_EXCEEDED\020\004\022\r\n" + "\tNOT_FOUND\020\005\022\022\n\016ALREADY_EXISTS\020\006\022\025\n\021PERM" + "ISSION_DENIED\020\007\022\026\n\022RESOURCE_EXHAUSTED\020\010\022" + "\027\n\023FAILED_PRECONDITION\020\t\022\013\n\007ABORTED\020\n\022\020\n" + "\014OUT_OF_RANGE\020\013\022\021\n\rUNIMPLEMENTED\020\014\022\014\n\010IN" + "TERNAL\020\r\022\017\n\013UNAVAILABLE\020\016\022\r\n\tDATA_LOSS\020\017" + "\022\023\n\017UNAUTHENTICATED\020\020b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { types.Blockchain.getDescriptor(), types.Node.getDescriptor(), }); internal_static_types_MsgHeader_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_types_MsgHeader_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_MsgHeader_descriptor, new java.lang.String[] { "ClientVersion", "Timestamp", "Id", "Gossip", "PeerID", "NodePubKey", "Sign", "Subprotocol", "Length", }); internal_static_types_P2PMessage_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_types_P2PMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_P2PMessage_descriptor, new java.lang.String[] { "Header", "Data", }); internal_static_types_Ping_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_types_Ping_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_Ping_descriptor, new java.lang.String[] { "BestBlockHash", "BestHeight", }); internal_static_types_Pong_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_types_Pong_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_Pong_descriptor, new java.lang.String[] { "BestBlockHash", "BestHeight", }); internal_static_types_Status_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_types_Status_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_Status_descriptor, new java.lang.String[] { "Sender", "BestBlockHash", "BestHeight", "ChainID", "NoExpose", "Version", "Genesis", "Certificates", "IssueCertificate", }); internal_static_types_GoAwayNotice_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_types_GoAwayNotice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GoAwayNotice_descriptor, new java.lang.String[] { "Message", }); internal_static_types_AddressesRequest_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_types_AddressesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_AddressesRequest_descriptor, new java.lang.String[] { "Sender", "MaxSize", }); internal_static_types_AddressesResponse_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_types_AddressesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_AddressesResponse_descriptor, new java.lang.String[] { "Status", "Peers", }); internal_static_types_NewBlockNotice_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_types_NewBlockNotice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_NewBlockNotice_descriptor, new java.lang.String[] { "BlockHash", "BlockNo", }); internal_static_types_BlockProducedNotice_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_types_BlockProducedNotice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_BlockProducedNotice_descriptor, new java.lang.String[] { "ProducerID", "BlockNo", "Block", }); internal_static_types_GetBlockHeadersRequest_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_types_GetBlockHeadersRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetBlockHeadersRequest_descriptor, new java.lang.String[] { "Hash", "Height", "Offset", "Size", "Asc", }); internal_static_types_GetBlockHeadersResponse_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_types_GetBlockHeadersResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetBlockHeadersResponse_descriptor, new java.lang.String[] { "Status", "Hashes", "Headers", "HasNext", }); internal_static_types_GetBlockRequest_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_types_GetBlockRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetBlockRequest_descriptor, new java.lang.String[] { "Hashes", }); internal_static_types_GetBlockResponse_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_types_GetBlockResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetBlockResponse_descriptor, new java.lang.String[] { "Status", "Blocks", "HasNext", }); internal_static_types_NewTransactionsNotice_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_types_NewTransactionsNotice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_NewTransactionsNotice_descriptor, new java.lang.String[] { "TxHashes", }); internal_static_types_GetTransactionsRequest_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_types_GetTransactionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetTransactionsRequest_descriptor, new java.lang.String[] { "Hashes", }); internal_static_types_GetTransactionsResponse_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_types_GetTransactionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetTransactionsResponse_descriptor, new java.lang.String[] { "Status", "Hashes", "Txs", "HasNext", }); internal_static_types_GetMissingRequest_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_types_GetMissingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetMissingRequest_descriptor, new java.lang.String[] { "Hashes", "Stophash", }); internal_static_types_GetAncestorRequest_descriptor = getDescriptor().getMessageTypes().get(18); internal_static_types_GetAncestorRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetAncestorRequest_descriptor, new java.lang.String[] { "Hashes", }); internal_static_types_GetAncestorResponse_descriptor = getDescriptor().getMessageTypes().get(19); internal_static_types_GetAncestorResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetAncestorResponse_descriptor, new java.lang.String[] { "Status", "AncestorHash", "AncestorNo", }); internal_static_types_GetHashByNo_descriptor = getDescriptor().getMessageTypes().get(20); internal_static_types_GetHashByNo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetHashByNo_descriptor, new java.lang.String[] { "BlockNo", }); internal_static_types_GetHashByNoResponse_descriptor = getDescriptor().getMessageTypes().get(21); internal_static_types_GetHashByNoResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetHashByNoResponse_descriptor, new java.lang.String[] { "Status", "BlockHash", }); internal_static_types_GetHashesRequest_descriptor = getDescriptor().getMessageTypes().get(22); internal_static_types_GetHashesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetHashesRequest_descriptor, new java.lang.String[] { "PrevHash", "PrevNumber", "Size", }); internal_static_types_GetHashesResponse_descriptor = getDescriptor().getMessageTypes().get(23); internal_static_types_GetHashesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_GetHashesResponse_descriptor, new java.lang.String[] { "Status", "Hashes", "HasNext", }); internal_static_types_IssueCertificateRequest_descriptor = getDescriptor().getMessageTypes().get(24); internal_static_types_IssueCertificateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_IssueCertificateRequest_descriptor, new java.lang.String[] { }); internal_static_types_IssueCertificateResponse_descriptor = getDescriptor().getMessageTypes().get(25); internal_static_types_IssueCertificateResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_IssueCertificateResponse_descriptor, new java.lang.String[] { "Status", "Certificate", }); internal_static_types_CertificateRenewedNotice_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_types_CertificateRenewedNotice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_CertificateRenewedNotice_descriptor, new java.lang.String[] { "Certificate", }); types.Blockchain.getDescriptor(); types.Node.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy