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

types.Node Maven / Gradle / Ivy

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

package types;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * Protobuf enum {@code types.PeerRole}
   */
  public enum PeerRole
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * LegacyVersion = 0;
     */
    LegacyVersion(0),
    /**
     * Producer = 1;
     */
    Producer(1),
    /**
     * Watcher = 2;
     */
    Watcher(2),
    /**
     * Agent = 3;
     */
    Agent(3),
    UNRECOGNIZED(-1),
    ;

    /**
     * LegacyVersion = 0;
     */
    public static final int LegacyVersion_VALUE = 0;
    /**
     * Producer = 1;
     */
    public static final int Producer_VALUE = 1;
    /**
     * Watcher = 2;
     */
    public static final int Watcher_VALUE = 2;
    /**
     * Agent = 3;
     */
    public static final int Agent_VALUE = 3;


    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 PeerRole 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 PeerRole forNumber(int value) {
      switch (value) {
        case 0: return LegacyVersion;
        case 1: return Producer;
        case 2: return Watcher;
        case 3: return Agent;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        PeerRole> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            public PeerRole findValueByNumber(int number) {
              return PeerRole.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.Node.getDescriptor().getEnumTypes().get(0);
    }

    private static final PeerRole[] VALUES = values();

    public static PeerRole 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 PeerRole(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:types.PeerRole)
  }

  public interface PeerAddressOrBuilder extends
      // @@protoc_insertion_point(interface_extends:types.PeerAddress)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * @Deprecated advertised address and port will be in addresses field in aergo v2.
     * address is string representation of ip address or domain name.
     * 
* * string address = 1; * @return The address. */ java.lang.String getAddress(); /** *
     * @Deprecated advertised address and port will be in addresses field in aergo v2.
     * address is string representation of ip address or domain name.
     * 
* * string address = 1; * @return The bytes for address. */ com.google.protobuf.ByteString getAddressBytes(); /** *
     * @Deprecated
     * 
* * uint32 port = 2; * @return The port. */ int getPort(); /** * bytes peerID = 3; * @return The peerID. */ com.google.protobuf.ByteString getPeerID(); /** * .types.PeerRole role = 4; * @return The enum numeric value on the wire for role. */ int getRoleValue(); /** * .types.PeerRole role = 4; * @return The role. */ types.Node.PeerRole getRole(); /** * string version = 5; * @return The version. */ java.lang.String getVersion(); /** * string version = 5; * @return The bytes for version. */ com.google.protobuf.ByteString getVersionBytes(); /** * repeated string addresses = 6; * @return A list containing the addresses. */ java.util.List getAddressesList(); /** * repeated string addresses = 6; * @return The count of addresses. */ int getAddressesCount(); /** * repeated string addresses = 6; * @param index The index of the element to return. * @return The addresses at the given index. */ java.lang.String getAddresses(int index); /** * repeated string addresses = 6; * @param index The index of the value to return. * @return The bytes of the addresses at the given index. */ com.google.protobuf.ByteString getAddressesBytes(int index); /** * repeated bytes producerIDs = 7; * @return A list containing the producerIDs. */ java.util.List getProducerIDsList(); /** * repeated bytes producerIDs = 7; * @return The count of producerIDs. */ int getProducerIDsCount(); /** * repeated bytes producerIDs = 7; * @param index The index of the element to return. * @return The producerIDs at the given index. */ com.google.protobuf.ByteString getProducerIDs(int index); } /** *
   * PeerAddress contains static information of peer and addresses to connect peer
   * 
* * Protobuf type {@code types.PeerAddress} */ public static final class PeerAddress extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.PeerAddress) PeerAddressOrBuilder { private static final long serialVersionUID = 0L; // Use PeerAddress.newBuilder() to construct. private PeerAddress(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PeerAddress() { address_ = ""; peerID_ = com.google.protobuf.ByteString.EMPTY; role_ = 0; version_ = ""; addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; producerIDs_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new PeerAddress(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PeerAddress( 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: { java.lang.String s = input.readStringRequireUtf8(); address_ = s; break; } case 16: { port_ = input.readUInt32(); break; } case 26: { peerID_ = input.readBytes(); break; } case 32: { int rawValue = input.readEnum(); role_ = rawValue; break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); version_ = s; break; } case 50: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { addresses_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } addresses_.add(s); break; } case 58: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { producerIDs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } producerIDs_.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)) { addresses_ = addresses_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000002) != 0)) { producerIDs_ = java.util.Collections.unmodifiableList(producerIDs_); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Node.internal_static_types_PeerAddress_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Node.internal_static_types_PeerAddress_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Node.PeerAddress.class, types.Node.PeerAddress.Builder.class); } public static final int ADDRESS_FIELD_NUMBER = 1; private volatile java.lang.Object address_; /** *
     * @Deprecated advertised address and port will be in addresses field in aergo v2.
     * address is string representation of ip address or domain name.
     * 
* * string address = 1; * @return The address. */ @java.lang.Override public java.lang.String getAddress() { java.lang.Object ref = address_; 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(); address_ = s; return s; } } /** *
     * @Deprecated advertised address and port will be in addresses field in aergo v2.
     * address is string representation of ip address or domain name.
     * 
* * string address = 1; * @return The bytes for address. */ @java.lang.Override public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PORT_FIELD_NUMBER = 2; private int port_; /** *
     * @Deprecated
     * 
* * uint32 port = 2; * @return The port. */ @java.lang.Override public int getPort() { return port_; } public static final int PEERID_FIELD_NUMBER = 3; private com.google.protobuf.ByteString peerID_; /** * bytes peerID = 3; * @return The peerID. */ @java.lang.Override public com.google.protobuf.ByteString getPeerID() { return peerID_; } public static final int ROLE_FIELD_NUMBER = 4; private int role_; /** * .types.PeerRole role = 4; * @return The enum numeric value on the wire for role. */ @java.lang.Override public int getRoleValue() { return role_; } /** * .types.PeerRole role = 4; * @return The role. */ @java.lang.Override public types.Node.PeerRole getRole() { @SuppressWarnings("deprecation") types.Node.PeerRole result = types.Node.PeerRole.valueOf(role_); return result == null ? types.Node.PeerRole.UNRECOGNIZED : result; } public static final int VERSION_FIELD_NUMBER = 5; private volatile java.lang.Object version_; /** * string version = 5; * @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; } } /** * string version = 5; * @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 ADDRESSES_FIELD_NUMBER = 6; private com.google.protobuf.LazyStringList addresses_; /** * repeated string addresses = 6; * @return A list containing the addresses. */ public com.google.protobuf.ProtocolStringList getAddressesList() { return addresses_; } /** * repeated string addresses = 6; * @return The count of addresses. */ public int getAddressesCount() { return addresses_.size(); } /** * repeated string addresses = 6; * @param index The index of the element to return. * @return The addresses at the given index. */ public java.lang.String getAddresses(int index) { return addresses_.get(index); } /** * repeated string addresses = 6; * @param index The index of the value to return. * @return The bytes of the addresses at the given index. */ public com.google.protobuf.ByteString getAddressesBytes(int index) { return addresses_.getByteString(index); } public static final int PRODUCERIDS_FIELD_NUMBER = 7; private java.util.List producerIDs_; /** * repeated bytes producerIDs = 7; * @return A list containing the producerIDs. */ @java.lang.Override public java.util.List getProducerIDsList() { return producerIDs_; } /** * repeated bytes producerIDs = 7; * @return The count of producerIDs. */ public int getProducerIDsCount() { return producerIDs_.size(); } /** * repeated bytes producerIDs = 7; * @param index The index of the element to return. * @return The producerIDs at the given index. */ public com.google.protobuf.ByteString getProducerIDs(int index) { return producerIDs_.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 (!getAddressBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); } if (port_ != 0) { output.writeUInt32(2, port_); } if (!peerID_.isEmpty()) { output.writeBytes(3, peerID_); } if (role_ != types.Node.PeerRole.LegacyVersion.getNumber()) { output.writeEnum(4, role_); } if (!getVersionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); } for (int i = 0; i < addresses_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, addresses_.getRaw(i)); } for (int i = 0; i < producerIDs_.size(); i++) { output.writeBytes(7, producerIDs_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getAddressBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); } if (port_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, port_); } if (!peerID_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, peerID_); } if (role_ != types.Node.PeerRole.LegacyVersion.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, role_); } if (!getVersionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); } { int dataSize = 0; for (int i = 0; i < addresses_.size(); i++) { dataSize += computeStringSizeNoTag(addresses_.getRaw(i)); } size += dataSize; size += 1 * getAddressesList().size(); } { int dataSize = 0; for (int i = 0; i < producerIDs_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(producerIDs_.get(i)); } size += dataSize; size += 1 * getProducerIDsList().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.Node.PeerAddress)) { return super.equals(obj); } types.Node.PeerAddress other = (types.Node.PeerAddress) obj; if (!getAddress() .equals(other.getAddress())) return false; if (getPort() != other.getPort()) return false; if (!getPeerID() .equals(other.getPeerID())) return false; if (role_ != other.role_) return false; if (!getVersion() .equals(other.getVersion())) return false; if (!getAddressesList() .equals(other.getAddressesList())) return false; if (!getProducerIDsList() .equals(other.getProducerIDsList())) 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) + ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getAddress().hashCode(); hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); hash = (37 * hash) + PEERID_FIELD_NUMBER; hash = (53 * hash) + getPeerID().hashCode(); hash = (37 * hash) + ROLE_FIELD_NUMBER; hash = (53 * hash) + role_; hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); if (getAddressesCount() > 0) { hash = (37 * hash) + ADDRESSES_FIELD_NUMBER; hash = (53 * hash) + getAddressesList().hashCode(); } if (getProducerIDsCount() > 0) { hash = (37 * hash) + PRODUCERIDS_FIELD_NUMBER; hash = (53 * hash) + getProducerIDsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.Node.PeerAddress parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Node.PeerAddress parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Node.PeerAddress parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Node.PeerAddress parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Node.PeerAddress parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Node.PeerAddress parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Node.PeerAddress parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Node.PeerAddress 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.Node.PeerAddress parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.Node.PeerAddress 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.Node.PeerAddress parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Node.PeerAddress 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.Node.PeerAddress 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; } /** *
     * PeerAddress contains static information of peer and addresses to connect peer
     * 
* * Protobuf type {@code types.PeerAddress} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.PeerAddress) types.Node.PeerAddressOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Node.internal_static_types_PeerAddress_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Node.internal_static_types_PeerAddress_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Node.PeerAddress.class, types.Node.PeerAddress.Builder.class); } // Construct using types.Node.PeerAddress.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(); address_ = ""; port_ = 0; peerID_ = com.google.protobuf.ByteString.EMPTY; role_ = 0; version_ = ""; addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); producerIDs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.Node.internal_static_types_PeerAddress_descriptor; } @java.lang.Override public types.Node.PeerAddress getDefaultInstanceForType() { return types.Node.PeerAddress.getDefaultInstance(); } @java.lang.Override public types.Node.PeerAddress build() { types.Node.PeerAddress result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.Node.PeerAddress buildPartial() { types.Node.PeerAddress result = new types.Node.PeerAddress(this); int from_bitField0_ = bitField0_; result.address_ = address_; result.port_ = port_; result.peerID_ = peerID_; result.role_ = role_; result.version_ = version_; if (((bitField0_ & 0x00000001) != 0)) { addresses_ = addresses_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.addresses_ = addresses_; if (((bitField0_ & 0x00000002) != 0)) { producerIDs_ = java.util.Collections.unmodifiableList(producerIDs_); bitField0_ = (bitField0_ & ~0x00000002); } result.producerIDs_ = producerIDs_; 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.Node.PeerAddress) { return mergeFrom((types.Node.PeerAddress)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.Node.PeerAddress other) { if (other == types.Node.PeerAddress.getDefaultInstance()) return this; if (!other.getAddress().isEmpty()) { address_ = other.address_; onChanged(); } if (other.getPort() != 0) { setPort(other.getPort()); } if (other.getPeerID() != com.google.protobuf.ByteString.EMPTY) { setPeerID(other.getPeerID()); } if (other.role_ != 0) { setRoleValue(other.getRoleValue()); } if (!other.getVersion().isEmpty()) { version_ = other.version_; onChanged(); } if (!other.addresses_.isEmpty()) { if (addresses_.isEmpty()) { addresses_ = other.addresses_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAddressesIsMutable(); addresses_.addAll(other.addresses_); } onChanged(); } if (!other.producerIDs_.isEmpty()) { if (producerIDs_.isEmpty()) { producerIDs_ = other.producerIDs_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureProducerIDsIsMutable(); producerIDs_.addAll(other.producerIDs_); } 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.Node.PeerAddress parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.Node.PeerAddress) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object address_ = ""; /** *
       * @Deprecated advertised address and port will be in addresses field in aergo v2.
       * address is string representation of ip address or domain name.
       * 
* * string address = 1; * @return The address. */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); address_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * @Deprecated advertised address and port will be in addresses field in aergo v2.
       * address is string representation of ip address or domain name.
       * 
* * string address = 1; * @return The bytes for address. */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * @Deprecated advertised address and port will be in addresses field in aergo v2.
       * address is string representation of ip address or domain name.
       * 
* * string address = 1; * @param value The address to set. * @return This builder for chaining. */ public Builder setAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } address_ = value; onChanged(); return this; } /** *
       * @Deprecated advertised address and port will be in addresses field in aergo v2.
       * address is string representation of ip address or domain name.
       * 
* * string address = 1; * @return This builder for chaining. */ public Builder clearAddress() { address_ = getDefaultInstance().getAddress(); onChanged(); return this; } /** *
       * @Deprecated advertised address and port will be in addresses field in aergo v2.
       * address is string representation of ip address or domain name.
       * 
* * string address = 1; * @param value The bytes for address to set. * @return This builder for chaining. */ public Builder setAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); address_ = value; onChanged(); return this; } private int port_ ; /** *
       * @Deprecated
       * 
* * uint32 port = 2; * @return The port. */ @java.lang.Override public int getPort() { return port_; } /** *
       * @Deprecated
       * 
* * uint32 port = 2; * @param value The port to set. * @return This builder for chaining. */ public Builder setPort(int value) { port_ = value; onChanged(); return this; } /** *
       * @Deprecated
       * 
* * uint32 port = 2; * @return This builder for chaining. */ public Builder clearPort() { port_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString peerID_ = com.google.protobuf.ByteString.EMPTY; /** * bytes peerID = 3; * @return The peerID. */ @java.lang.Override public com.google.protobuf.ByteString getPeerID() { return peerID_; } /** * bytes peerID = 3; * @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; } /** * bytes peerID = 3; * @return This builder for chaining. */ public Builder clearPeerID() { peerID_ = getDefaultInstance().getPeerID(); onChanged(); return this; } private int role_ = 0; /** * .types.PeerRole role = 4; * @return The enum numeric value on the wire for role. */ @java.lang.Override public int getRoleValue() { return role_; } /** * .types.PeerRole role = 4; * @param value The enum numeric value on the wire for role to set. * @return This builder for chaining. */ public Builder setRoleValue(int value) { role_ = value; onChanged(); return this; } /** * .types.PeerRole role = 4; * @return The role. */ @java.lang.Override public types.Node.PeerRole getRole() { @SuppressWarnings("deprecation") types.Node.PeerRole result = types.Node.PeerRole.valueOf(role_); return result == null ? types.Node.PeerRole.UNRECOGNIZED : result; } /** * .types.PeerRole role = 4; * @param value The role to set. * @return This builder for chaining. */ public Builder setRole(types.Node.PeerRole value) { if (value == null) { throw new NullPointerException(); } role_ = value.getNumber(); onChanged(); return this; } /** * .types.PeerRole role = 4; * @return This builder for chaining. */ public Builder clearRole() { role_ = 0; onChanged(); return this; } private java.lang.Object version_ = ""; /** * string version = 5; * @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; } } /** * string version = 5; * @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; } } /** * string version = 5; * @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; } /** * string version = 5; * @return This builder for chaining. */ public Builder clearVersion() { version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** * string version = 5; * @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.LazyStringList addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureAddressesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { addresses_ = new com.google.protobuf.LazyStringArrayList(addresses_); bitField0_ |= 0x00000001; } } /** * repeated string addresses = 6; * @return A list containing the addresses. */ public com.google.protobuf.ProtocolStringList getAddressesList() { return addresses_.getUnmodifiableView(); } /** * repeated string addresses = 6; * @return The count of addresses. */ public int getAddressesCount() { return addresses_.size(); } /** * repeated string addresses = 6; * @param index The index of the element to return. * @return The addresses at the given index. */ public java.lang.String getAddresses(int index) { return addresses_.get(index); } /** * repeated string addresses = 6; * @param index The index of the value to return. * @return The bytes of the addresses at the given index. */ public com.google.protobuf.ByteString getAddressesBytes(int index) { return addresses_.getByteString(index); } /** * repeated string addresses = 6; * @param index The index to set the value at. * @param value The addresses to set. * @return This builder for chaining. */ public Builder setAddresses( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAddressesIsMutable(); addresses_.set(index, value); onChanged(); return this; } /** * repeated string addresses = 6; * @param value The addresses to add. * @return This builder for chaining. */ public Builder addAddresses( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAddressesIsMutable(); addresses_.add(value); onChanged(); return this; } /** * repeated string addresses = 6; * @param values The addresses to add. * @return This builder for chaining. */ public Builder addAllAddresses( java.lang.Iterable values) { ensureAddressesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addresses_); onChanged(); return this; } /** * repeated string addresses = 6; * @return This builder for chaining. */ public Builder clearAddresses() { addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * repeated string addresses = 6; * @param value The bytes of the addresses to add. * @return This builder for chaining. */ public Builder addAddressesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureAddressesIsMutable(); addresses_.add(value); onChanged(); return this; } private java.util.List producerIDs_ = java.util.Collections.emptyList(); private void ensureProducerIDsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { producerIDs_ = new java.util.ArrayList(producerIDs_); bitField0_ |= 0x00000002; } } /** * repeated bytes producerIDs = 7; * @return A list containing the producerIDs. */ public java.util.List getProducerIDsList() { return ((bitField0_ & 0x00000002) != 0) ? java.util.Collections.unmodifiableList(producerIDs_) : producerIDs_; } /** * repeated bytes producerIDs = 7; * @return The count of producerIDs. */ public int getProducerIDsCount() { return producerIDs_.size(); } /** * repeated bytes producerIDs = 7; * @param index The index of the element to return. * @return The producerIDs at the given index. */ public com.google.protobuf.ByteString getProducerIDs(int index) { return producerIDs_.get(index); } /** * repeated bytes producerIDs = 7; * @param index The index to set the value at. * @param value The producerIDs to set. * @return This builder for chaining. */ public Builder setProducerIDs( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureProducerIDsIsMutable(); producerIDs_.set(index, value); onChanged(); return this; } /** * repeated bytes producerIDs = 7; * @param value The producerIDs to add. * @return This builder for chaining. */ public Builder addProducerIDs(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureProducerIDsIsMutable(); producerIDs_.add(value); onChanged(); return this; } /** * repeated bytes producerIDs = 7; * @param values The producerIDs to add. * @return This builder for chaining. */ public Builder addAllProducerIDs( java.lang.Iterable values) { ensureProducerIDsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, producerIDs_); onChanged(); return this; } /** * repeated bytes producerIDs = 7; * @return This builder for chaining. */ public Builder clearProducerIDs() { producerIDs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); 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.PeerAddress) } // @@protoc_insertion_point(class_scope:types.PeerAddress) private static final types.Node.PeerAddress DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.Node.PeerAddress(); } public static types.Node.PeerAddress getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PeerAddress parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PeerAddress(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.Node.PeerAddress getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface AgentCertificateOrBuilder extends // @@protoc_insertion_point(interface_extends:types.AgentCertificate) com.google.protobuf.MessageOrBuilder { /** * uint32 certVersion = 1; * @return The certVersion. */ int getCertVersion(); /** * bytes BPID = 2; * @return The bPID. */ com.google.protobuf.ByteString getBPID(); /** * bytes BPPubKey = 3; * @return The bPPubKey. */ com.google.protobuf.ByteString getBPPubKey(); /** *
     * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
     * 
* * int64 createTime = 4; * @return The createTime. */ long getCreateTime(); /** *
     * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
     * 
* * int64 expireTime = 5; * @return The expireTime. */ long getExpireTime(); /** * bytes agentID = 6; * @return The agentID. */ com.google.protobuf.ByteString getAgentID(); /** * repeated bytes AgentAddress = 7; * @return A list containing the agentAddress. */ java.util.List getAgentAddressList(); /** * repeated bytes AgentAddress = 7; * @return The count of agentAddress. */ int getAgentAddressCount(); /** * repeated bytes AgentAddress = 7; * @param index The index of the element to return. * @return The agentAddress at the given index. */ com.google.protobuf.ByteString getAgentAddress(int index); /** * bytes signature = 8; * @return The signature. */ com.google.protobuf.ByteString getSignature(); } /** * Protobuf type {@code types.AgentCertificate} */ public static final class AgentCertificate extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.AgentCertificate) AgentCertificateOrBuilder { private static final long serialVersionUID = 0L; // Use AgentCertificate.newBuilder() to construct. private AgentCertificate(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AgentCertificate() { bPID_ = com.google.protobuf.ByteString.EMPTY; bPPubKey_ = com.google.protobuf.ByteString.EMPTY; agentID_ = com.google.protobuf.ByteString.EMPTY; agentAddress_ = java.util.Collections.emptyList(); signature_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AgentCertificate(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private AgentCertificate( 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: { certVersion_ = input.readUInt32(); break; } case 18: { bPID_ = input.readBytes(); break; } case 26: { bPPubKey_ = input.readBytes(); break; } case 32: { createTime_ = input.readInt64(); break; } case 40: { expireTime_ = input.readInt64(); break; } case 50: { agentID_ = input.readBytes(); break; } case 58: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { agentAddress_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } agentAddress_.add(input.readBytes()); break; } case 66: { signature_ = input.readBytes(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { agentAddress_ = java.util.Collections.unmodifiableList(agentAddress_); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Node.internal_static_types_AgentCertificate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Node.internal_static_types_AgentCertificate_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Node.AgentCertificate.class, types.Node.AgentCertificate.Builder.class); } public static final int CERTVERSION_FIELD_NUMBER = 1; private int certVersion_; /** * uint32 certVersion = 1; * @return The certVersion. */ @java.lang.Override public int getCertVersion() { return certVersion_; } public static final int BPID_FIELD_NUMBER = 2; private com.google.protobuf.ByteString bPID_; /** * bytes BPID = 2; * @return The bPID. */ @java.lang.Override public com.google.protobuf.ByteString getBPID() { return bPID_; } public static final int BPPUBKEY_FIELD_NUMBER = 3; private com.google.protobuf.ByteString bPPubKey_; /** * bytes BPPubKey = 3; * @return The bPPubKey. */ @java.lang.Override public com.google.protobuf.ByteString getBPPubKey() { return bPPubKey_; } public static final int CREATETIME_FIELD_NUMBER = 4; private long createTime_; /** *
     * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
     * 
* * int64 createTime = 4; * @return The createTime. */ @java.lang.Override public long getCreateTime() { return createTime_; } public static final int EXPIRETIME_FIELD_NUMBER = 5; private long expireTime_; /** *
     * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
     * 
* * int64 expireTime = 5; * @return The expireTime. */ @java.lang.Override public long getExpireTime() { return expireTime_; } public static final int AGENTID_FIELD_NUMBER = 6; private com.google.protobuf.ByteString agentID_; /** * bytes agentID = 6; * @return The agentID. */ @java.lang.Override public com.google.protobuf.ByteString getAgentID() { return agentID_; } public static final int AGENTADDRESS_FIELD_NUMBER = 7; private java.util.List agentAddress_; /** * repeated bytes AgentAddress = 7; * @return A list containing the agentAddress. */ @java.lang.Override public java.util.List getAgentAddressList() { return agentAddress_; } /** * repeated bytes AgentAddress = 7; * @return The count of agentAddress. */ public int getAgentAddressCount() { return agentAddress_.size(); } /** * repeated bytes AgentAddress = 7; * @param index The index of the element to return. * @return The agentAddress at the given index. */ public com.google.protobuf.ByteString getAgentAddress(int index) { return agentAddress_.get(index); } public static final int SIGNATURE_FIELD_NUMBER = 8; private com.google.protobuf.ByteString signature_; /** * bytes signature = 8; * @return The signature. */ @java.lang.Override public com.google.protobuf.ByteString getSignature() { return signature_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (certVersion_ != 0) { output.writeUInt32(1, certVersion_); } if (!bPID_.isEmpty()) { output.writeBytes(2, bPID_); } if (!bPPubKey_.isEmpty()) { output.writeBytes(3, bPPubKey_); } if (createTime_ != 0L) { output.writeInt64(4, createTime_); } if (expireTime_ != 0L) { output.writeInt64(5, expireTime_); } if (!agentID_.isEmpty()) { output.writeBytes(6, agentID_); } for (int i = 0; i < agentAddress_.size(); i++) { output.writeBytes(7, agentAddress_.get(i)); } if (!signature_.isEmpty()) { output.writeBytes(8, signature_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (certVersion_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, certVersion_); } if (!bPID_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, bPID_); } if (!bPPubKey_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, bPPubKey_); } if (createTime_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, createTime_); } if (expireTime_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, expireTime_); } if (!agentID_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, agentID_); } { int dataSize = 0; for (int i = 0; i < agentAddress_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(agentAddress_.get(i)); } size += dataSize; size += 1 * getAgentAddressList().size(); } if (!signature_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(8, signature_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof types.Node.AgentCertificate)) { return super.equals(obj); } types.Node.AgentCertificate other = (types.Node.AgentCertificate) obj; if (getCertVersion() != other.getCertVersion()) return false; if (!getBPID() .equals(other.getBPID())) return false; if (!getBPPubKey() .equals(other.getBPPubKey())) return false; if (getCreateTime() != other.getCreateTime()) return false; if (getExpireTime() != other.getExpireTime()) return false; if (!getAgentID() .equals(other.getAgentID())) return false; if (!getAgentAddressList() .equals(other.getAgentAddressList())) return false; if (!getSignature() .equals(other.getSignature())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CERTVERSION_FIELD_NUMBER; hash = (53 * hash) + getCertVersion(); hash = (37 * hash) + BPID_FIELD_NUMBER; hash = (53 * hash) + getBPID().hashCode(); hash = (37 * hash) + BPPUBKEY_FIELD_NUMBER; hash = (53 * hash) + getBPPubKey().hashCode(); hash = (37 * hash) + CREATETIME_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCreateTime()); hash = (37 * hash) + EXPIRETIME_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getExpireTime()); hash = (37 * hash) + AGENTID_FIELD_NUMBER; hash = (53 * hash) + getAgentID().hashCode(); if (getAgentAddressCount() > 0) { hash = (37 * hash) + AGENTADDRESS_FIELD_NUMBER; hash = (53 * hash) + getAgentAddressList().hashCode(); } hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; hash = (53 * hash) + getSignature().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.Node.AgentCertificate parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Node.AgentCertificate parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Node.AgentCertificate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Node.AgentCertificate parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Node.AgentCertificate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Node.AgentCertificate parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Node.AgentCertificate parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Node.AgentCertificate 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.Node.AgentCertificate parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.Node.AgentCertificate 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.Node.AgentCertificate parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Node.AgentCertificate 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.Node.AgentCertificate 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.AgentCertificate} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.AgentCertificate) types.Node.AgentCertificateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Node.internal_static_types_AgentCertificate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Node.internal_static_types_AgentCertificate_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Node.AgentCertificate.class, types.Node.AgentCertificate.Builder.class); } // Construct using types.Node.AgentCertificate.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(); certVersion_ = 0; bPID_ = com.google.protobuf.ByteString.EMPTY; bPPubKey_ = com.google.protobuf.ByteString.EMPTY; createTime_ = 0L; expireTime_ = 0L; agentID_ = com.google.protobuf.ByteString.EMPTY; agentAddress_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); signature_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.Node.internal_static_types_AgentCertificate_descriptor; } @java.lang.Override public types.Node.AgentCertificate getDefaultInstanceForType() { return types.Node.AgentCertificate.getDefaultInstance(); } @java.lang.Override public types.Node.AgentCertificate build() { types.Node.AgentCertificate result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.Node.AgentCertificate buildPartial() { types.Node.AgentCertificate result = new types.Node.AgentCertificate(this); int from_bitField0_ = bitField0_; result.certVersion_ = certVersion_; result.bPID_ = bPID_; result.bPPubKey_ = bPPubKey_; result.createTime_ = createTime_; result.expireTime_ = expireTime_; result.agentID_ = agentID_; if (((bitField0_ & 0x00000001) != 0)) { agentAddress_ = java.util.Collections.unmodifiableList(agentAddress_); bitField0_ = (bitField0_ & ~0x00000001); } result.agentAddress_ = agentAddress_; result.signature_ = signature_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof types.Node.AgentCertificate) { return mergeFrom((types.Node.AgentCertificate)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.Node.AgentCertificate other) { if (other == types.Node.AgentCertificate.getDefaultInstance()) return this; if (other.getCertVersion() != 0) { setCertVersion(other.getCertVersion()); } if (other.getBPID() != com.google.protobuf.ByteString.EMPTY) { setBPID(other.getBPID()); } if (other.getBPPubKey() != com.google.protobuf.ByteString.EMPTY) { setBPPubKey(other.getBPPubKey()); } if (other.getCreateTime() != 0L) { setCreateTime(other.getCreateTime()); } if (other.getExpireTime() != 0L) { setExpireTime(other.getExpireTime()); } if (other.getAgentID() != com.google.protobuf.ByteString.EMPTY) { setAgentID(other.getAgentID()); } if (!other.agentAddress_.isEmpty()) { if (agentAddress_.isEmpty()) { agentAddress_ = other.agentAddress_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAgentAddressIsMutable(); agentAddress_.addAll(other.agentAddress_); } onChanged(); } if (other.getSignature() != com.google.protobuf.ByteString.EMPTY) { setSignature(other.getSignature()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { types.Node.AgentCertificate parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.Node.AgentCertificate) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int certVersion_ ; /** * uint32 certVersion = 1; * @return The certVersion. */ @java.lang.Override public int getCertVersion() { return certVersion_; } /** * uint32 certVersion = 1; * @param value The certVersion to set. * @return This builder for chaining. */ public Builder setCertVersion(int value) { certVersion_ = value; onChanged(); return this; } /** * uint32 certVersion = 1; * @return This builder for chaining. */ public Builder clearCertVersion() { certVersion_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString bPID_ = com.google.protobuf.ByteString.EMPTY; /** * bytes BPID = 2; * @return The bPID. */ @java.lang.Override public com.google.protobuf.ByteString getBPID() { return bPID_; } /** * bytes BPID = 2; * @param value The bPID to set. * @return This builder for chaining. */ public Builder setBPID(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bPID_ = value; onChanged(); return this; } /** * bytes BPID = 2; * @return This builder for chaining. */ public Builder clearBPID() { bPID_ = getDefaultInstance().getBPID(); onChanged(); return this; } private com.google.protobuf.ByteString bPPubKey_ = com.google.protobuf.ByteString.EMPTY; /** * bytes BPPubKey = 3; * @return The bPPubKey. */ @java.lang.Override public com.google.protobuf.ByteString getBPPubKey() { return bPPubKey_; } /** * bytes BPPubKey = 3; * @param value The bPPubKey to set. * @return This builder for chaining. */ public Builder setBPPubKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bPPubKey_ = value; onChanged(); return this; } /** * bytes BPPubKey = 3; * @return This builder for chaining. */ public Builder clearBPPubKey() { bPPubKey_ = getDefaultInstance().getBPPubKey(); onChanged(); return this; } private long createTime_ ; /** *
       * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
       * 
* * int64 createTime = 4; * @return The createTime. */ @java.lang.Override public long getCreateTime() { return createTime_; } /** *
       * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
       * 
* * int64 createTime = 4; * @param value The createTime to set. * @return This builder for chaining. */ public Builder setCreateTime(long value) { createTime_ = value; onChanged(); return this; } /** *
       * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
       * 
* * int64 createTime = 4; * @return This builder for chaining. */ public Builder clearCreateTime() { createTime_ = 0L; onChanged(); return this; } private long expireTime_ ; /** *
       * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
       * 
* * int64 expireTime = 5; * @return The expireTime. */ @java.lang.Override public long getExpireTime() { return expireTime_; } /** *
       * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
       * 
* * int64 expireTime = 5; * @param value The expireTime to set. * @return This builder for chaining. */ public Builder setExpireTime(long value) { expireTime_ = value; onChanged(); return this; } /** *
       * CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
       * 
* * int64 expireTime = 5; * @return This builder for chaining. */ public Builder clearExpireTime() { expireTime_ = 0L; onChanged(); return this; } private com.google.protobuf.ByteString agentID_ = com.google.protobuf.ByteString.EMPTY; /** * bytes agentID = 6; * @return The agentID. */ @java.lang.Override public com.google.protobuf.ByteString getAgentID() { return agentID_; } /** * bytes agentID = 6; * @param value The agentID to set. * @return This builder for chaining. */ public Builder setAgentID(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } agentID_ = value; onChanged(); return this; } /** * bytes agentID = 6; * @return This builder for chaining. */ public Builder clearAgentID() { agentID_ = getDefaultInstance().getAgentID(); onChanged(); return this; } private java.util.List agentAddress_ = java.util.Collections.emptyList(); private void ensureAgentAddressIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { agentAddress_ = new java.util.ArrayList(agentAddress_); bitField0_ |= 0x00000001; } } /** * repeated bytes AgentAddress = 7; * @return A list containing the agentAddress. */ public java.util.List getAgentAddressList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(agentAddress_) : agentAddress_; } /** * repeated bytes AgentAddress = 7; * @return The count of agentAddress. */ public int getAgentAddressCount() { return agentAddress_.size(); } /** * repeated bytes AgentAddress = 7; * @param index The index of the element to return. * @return The agentAddress at the given index. */ public com.google.protobuf.ByteString getAgentAddress(int index) { return agentAddress_.get(index); } /** * repeated bytes AgentAddress = 7; * @param index The index to set the value at. * @param value The agentAddress to set. * @return This builder for chaining. */ public Builder setAgentAddress( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureAgentAddressIsMutable(); agentAddress_.set(index, value); onChanged(); return this; } /** * repeated bytes AgentAddress = 7; * @param value The agentAddress to add. * @return This builder for chaining. */ public Builder addAgentAddress(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureAgentAddressIsMutable(); agentAddress_.add(value); onChanged(); return this; } /** * repeated bytes AgentAddress = 7; * @param values The agentAddress to add. * @return This builder for chaining. */ public Builder addAllAgentAddress( java.lang.Iterable values) { ensureAgentAddressIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, agentAddress_); onChanged(); return this; } /** * repeated bytes AgentAddress = 7; * @return This builder for chaining. */ public Builder clearAgentAddress() { agentAddress_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; /** * bytes signature = 8; * @return The signature. */ @java.lang.Override public com.google.protobuf.ByteString getSignature() { return signature_; } /** * bytes signature = 8; * @param value The signature to set. * @return This builder for chaining. */ public Builder setSignature(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } signature_ = value; onChanged(); return this; } /** * bytes signature = 8; * @return This builder for chaining. */ public Builder clearSignature() { signature_ = getDefaultInstance().getSignature(); onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:types.AgentCertificate) } // @@protoc_insertion_point(class_scope:types.AgentCertificate) private static final types.Node.AgentCertificate DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.Node.AgentCertificate(); } public static types.Node.AgentCertificate getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AgentCertificate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new AgentCertificate(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.Node.AgentCertificate getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_PeerAddress_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_PeerAddress_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_AgentCertificate_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_AgentCertificate_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\nnode.proto\022\005types\"\224\001\n\013PeerAddress\022\017\n\007a" + "ddress\030\001 \001(\t\022\014\n\004port\030\002 \001(\r\022\016\n\006peerID\030\003 \001" + "(\014\022\035\n\004role\030\004 \001(\0162\017.types.PeerRole\022\017\n\007ver" + "sion\030\005 \001(\t\022\021\n\taddresses\030\006 \003(\t\022\023\n\013produce" + "rIDs\030\007 \003(\014\"\251\001\n\020AgentCertificate\022\023\n\013certV" + "ersion\030\001 \001(\r\022\014\n\004BPID\030\002 \001(\014\022\020\n\010BPPubKey\030\003" + " \001(\014\022\022\n\ncreateTime\030\004 \001(\003\022\022\n\nexpireTime\030\005" + " \001(\003\022\017\n\007agentID\030\006 \001(\014\022\024\n\014AgentAddress\030\007 " + "\003(\014\022\021\n\tsignature\030\010 \001(\014*C\n\010PeerRole\022\021\n\rLe" + "gacyVersion\020\000\022\014\n\010Producer\020\001\022\013\n\007Watcher\020\002" + "\022\t\n\005Agent\020\003b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }); internal_static_types_PeerAddress_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_types_PeerAddress_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_PeerAddress_descriptor, new java.lang.String[] { "Address", "Port", "PeerID", "Role", "Version", "Addresses", "ProducerIDs", }); internal_static_types_AgentCertificate_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_types_AgentCertificate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_AgentCertificate_descriptor, new java.lang.String[] { "CertVersion", "BPID", "BPPubKey", "CreateTime", "ExpireTime", "AgentID", "AgentAddress", "Signature", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy