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

com.tencent.polaris.client.pb.RoutingProto Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: routing.proto

package com.tencent.polaris.client.pb;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface RoutingOrBuilder extends
      // @@protoc_insertion_point(interface_extends:v1.Routing)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * 规则所属服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ boolean hasService(); /** *
     * 规则所属服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ com.google.protobuf.StringValue getService(); /** *
     * 规则所属服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; */ com.google.protobuf.StringValueOrBuilder getServiceOrBuilder(); /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ boolean hasNamespace(); /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ com.google.protobuf.StringValue getNamespace(); /** * .google.protobuf.StringValue namespace = 2; */ com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder(); /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ java.util.List getInboundsList(); /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ com.tencent.polaris.client.pb.RoutingProto.Route getInbounds(int index); /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ int getInboundsCount(); /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ java.util.List getInboundsOrBuilderList(); /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder getInboundsOrBuilder( int index); /** * repeated .v1.Route outbounds = 4; */ java.util.List getOutboundsList(); /** * repeated .v1.Route outbounds = 4; */ com.tencent.polaris.client.pb.RoutingProto.Route getOutbounds(int index); /** * repeated .v1.Route outbounds = 4; */ int getOutboundsCount(); /** * repeated .v1.Route outbounds = 4; */ java.util.List getOutboundsOrBuilderList(); /** * repeated .v1.Route outbounds = 4; */ com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder getOutboundsOrBuilder( int index); /** * .google.protobuf.StringValue ctime = 5; * @return Whether the ctime field is set. */ boolean hasCtime(); /** * .google.protobuf.StringValue ctime = 5; * @return The ctime. */ com.google.protobuf.StringValue getCtime(); /** * .google.protobuf.StringValue ctime = 5; */ com.google.protobuf.StringValueOrBuilder getCtimeOrBuilder(); /** * .google.protobuf.StringValue mtime = 6; * @return Whether the mtime field is set. */ boolean hasMtime(); /** * .google.protobuf.StringValue mtime = 6; * @return The mtime. */ com.google.protobuf.StringValue getMtime(); /** * .google.protobuf.StringValue mtime = 6; */ com.google.protobuf.StringValueOrBuilder getMtimeOrBuilder(); /** * .google.protobuf.StringValue revision = 7; * @return Whether the revision field is set. */ boolean hasRevision(); /** * .google.protobuf.StringValue revision = 7; * @return The revision. */ com.google.protobuf.StringValue getRevision(); /** * .google.protobuf.StringValue revision = 7; */ com.google.protobuf.StringValueOrBuilder getRevisionOrBuilder(); /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; * @return Whether the serviceToken field is set. */ boolean hasServiceToken(); /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; * @return The serviceToken. */ com.google.protobuf.StringValue getServiceToken(); /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ com.google.protobuf.StringValueOrBuilder getServiceTokenOrBuilder(); } /** * Protobuf type {@code v1.Routing} */ public static final class Routing extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:v1.Routing) RoutingOrBuilder { private static final long serialVersionUID = 0L; // Use Routing.newBuilder() to construct. private Routing(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Routing() { inbounds_ = java.util.Collections.emptyList(); outbounds_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Routing(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Routing( 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: { com.google.protobuf.StringValue.Builder subBuilder = null; if (service_ != null) { subBuilder = service_.toBuilder(); } service_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(service_); service_ = subBuilder.buildPartial(); } break; } case 18: { com.google.protobuf.StringValue.Builder subBuilder = null; if (namespace_ != null) { subBuilder = namespace_.toBuilder(); } namespace_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(namespace_); namespace_ = subBuilder.buildPartial(); } break; } case 26: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { inbounds_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } inbounds_.add( input.readMessage(com.tencent.polaris.client.pb.RoutingProto.Route.parser(), extensionRegistry)); break; } case 34: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { outbounds_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } outbounds_.add( input.readMessage(com.tencent.polaris.client.pb.RoutingProto.Route.parser(), extensionRegistry)); break; } case 42: { com.google.protobuf.StringValue.Builder subBuilder = null; if (ctime_ != null) { subBuilder = ctime_.toBuilder(); } ctime_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(ctime_); ctime_ = subBuilder.buildPartial(); } break; } case 50: { com.google.protobuf.StringValue.Builder subBuilder = null; if (mtime_ != null) { subBuilder = mtime_.toBuilder(); } mtime_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(mtime_); mtime_ = subBuilder.buildPartial(); } break; } case 58: { com.google.protobuf.StringValue.Builder subBuilder = null; if (revision_ != null) { subBuilder = revision_.toBuilder(); } revision_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(revision_); revision_ = subBuilder.buildPartial(); } break; } case 66: { com.google.protobuf.StringValue.Builder subBuilder = null; if (serviceToken_ != null) { subBuilder = serviceToken_.toBuilder(); } serviceToken_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(serviceToken_); serviceToken_ = 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 { if (((mutable_bitField0_ & 0x00000001) != 0)) { inbounds_ = java.util.Collections.unmodifiableList(inbounds_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { outbounds_ = java.util.Collections.unmodifiableList(outbounds_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Routing_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Routing_fieldAccessorTable .ensureFieldAccessorsInitialized( com.tencent.polaris.client.pb.RoutingProto.Routing.class, com.tencent.polaris.client.pb.RoutingProto.Routing.Builder.class); } public static final int SERVICE_FIELD_NUMBER = 1; private com.google.protobuf.StringValue service_; /** *
     * 规则所属服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ @java.lang.Override public boolean hasService() { return service_ != null; } /** *
     * 规则所属服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ @java.lang.Override public com.google.protobuf.StringValue getService() { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } /** *
     * 规则所属服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() { return getService(); } public static final int NAMESPACE_FIELD_NUMBER = 2; private com.google.protobuf.StringValue namespace_; /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ @java.lang.Override public boolean hasNamespace() { return namespace_ != null; } /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ @java.lang.Override public com.google.protobuf.StringValue getNamespace() { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } /** * .google.protobuf.StringValue namespace = 2; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() { return getNamespace(); } public static final int INBOUNDS_FIELD_NUMBER = 3; private java.util.List inbounds_; /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ @java.lang.Override public java.util.List getInboundsList() { return inbounds_; } /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ @java.lang.Override public java.util.List getInboundsOrBuilderList() { return inbounds_; } /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ @java.lang.Override public int getInboundsCount() { return inbounds_.size(); } /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Route getInbounds(int index) { return inbounds_.get(index); } /** *
     * 每个服务可以配置多条入站或者出站规则
     * 对于每个请求,从上到下依次匹配,若命中则终止
     * 
* * repeated .v1.Route inbounds = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder getInboundsOrBuilder( int index) { return inbounds_.get(index); } public static final int OUTBOUNDS_FIELD_NUMBER = 4; private java.util.List outbounds_; /** * repeated .v1.Route outbounds = 4; */ @java.lang.Override public java.util.List getOutboundsList() { return outbounds_; } /** * repeated .v1.Route outbounds = 4; */ @java.lang.Override public java.util.List getOutboundsOrBuilderList() { return outbounds_; } /** * repeated .v1.Route outbounds = 4; */ @java.lang.Override public int getOutboundsCount() { return outbounds_.size(); } /** * repeated .v1.Route outbounds = 4; */ @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Route getOutbounds(int index) { return outbounds_.get(index); } /** * repeated .v1.Route outbounds = 4; */ @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder getOutboundsOrBuilder( int index) { return outbounds_.get(index); } public static final int CTIME_FIELD_NUMBER = 5; private com.google.protobuf.StringValue ctime_; /** * .google.protobuf.StringValue ctime = 5; * @return Whether the ctime field is set. */ @java.lang.Override public boolean hasCtime() { return ctime_ != null; } /** * .google.protobuf.StringValue ctime = 5; * @return The ctime. */ @java.lang.Override public com.google.protobuf.StringValue getCtime() { return ctime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : ctime_; } /** * .google.protobuf.StringValue ctime = 5; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getCtimeOrBuilder() { return getCtime(); } public static final int MTIME_FIELD_NUMBER = 6; private com.google.protobuf.StringValue mtime_; /** * .google.protobuf.StringValue mtime = 6; * @return Whether the mtime field is set. */ @java.lang.Override public boolean hasMtime() { return mtime_ != null; } /** * .google.protobuf.StringValue mtime = 6; * @return The mtime. */ @java.lang.Override public com.google.protobuf.StringValue getMtime() { return mtime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : mtime_; } /** * .google.protobuf.StringValue mtime = 6; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getMtimeOrBuilder() { return getMtime(); } public static final int REVISION_FIELD_NUMBER = 7; private com.google.protobuf.StringValue revision_; /** * .google.protobuf.StringValue revision = 7; * @return Whether the revision field is set. */ @java.lang.Override public boolean hasRevision() { return revision_ != null; } /** * .google.protobuf.StringValue revision = 7; * @return The revision. */ @java.lang.Override public com.google.protobuf.StringValue getRevision() { return revision_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : revision_; } /** * .google.protobuf.StringValue revision = 7; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getRevisionOrBuilder() { return getRevision(); } public static final int SERVICE_TOKEN_FIELD_NUMBER = 8; private com.google.protobuf.StringValue serviceToken_; /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; * @return Whether the serviceToken field is set. */ @java.lang.Override public boolean hasServiceToken() { return serviceToken_ != null; } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; * @return The serviceToken. */ @java.lang.Override public com.google.protobuf.StringValue getServiceToken() { return serviceToken_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : serviceToken_; } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getServiceTokenOrBuilder() { return getServiceToken(); } 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 (service_ != null) { output.writeMessage(1, getService()); } if (namespace_ != null) { output.writeMessage(2, getNamespace()); } for (int i = 0; i < inbounds_.size(); i++) { output.writeMessage(3, inbounds_.get(i)); } for (int i = 0; i < outbounds_.size(); i++) { output.writeMessage(4, outbounds_.get(i)); } if (ctime_ != null) { output.writeMessage(5, getCtime()); } if (mtime_ != null) { output.writeMessage(6, getMtime()); } if (revision_ != null) { output.writeMessage(7, getRevision()); } if (serviceToken_ != null) { output.writeMessage(8, getServiceToken()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (service_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getService()); } if (namespace_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getNamespace()); } for (int i = 0; i < inbounds_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, inbounds_.get(i)); } for (int i = 0; i < outbounds_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, outbounds_.get(i)); } if (ctime_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getCtime()); } if (mtime_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getMtime()); } if (revision_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getRevision()); } if (serviceToken_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getServiceToken()); } 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 com.tencent.polaris.client.pb.RoutingProto.Routing)) { return super.equals(obj); } com.tencent.polaris.client.pb.RoutingProto.Routing other = (com.tencent.polaris.client.pb.RoutingProto.Routing) obj; if (hasService() != other.hasService()) return false; if (hasService()) { if (!getService() .equals(other.getService())) return false; } if (hasNamespace() != other.hasNamespace()) return false; if (hasNamespace()) { if (!getNamespace() .equals(other.getNamespace())) return false; } if (!getInboundsList() .equals(other.getInboundsList())) return false; if (!getOutboundsList() .equals(other.getOutboundsList())) return false; if (hasCtime() != other.hasCtime()) return false; if (hasCtime()) { if (!getCtime() .equals(other.getCtime())) return false; } if (hasMtime() != other.hasMtime()) return false; if (hasMtime()) { if (!getMtime() .equals(other.getMtime())) return false; } if (hasRevision() != other.hasRevision()) return false; if (hasRevision()) { if (!getRevision() .equals(other.getRevision())) return false; } if (hasServiceToken() != other.hasServiceToken()) return false; if (hasServiceToken()) { if (!getServiceToken() .equals(other.getServiceToken())) 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 (hasService()) { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } if (hasNamespace()) { hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; hash = (53 * hash) + getNamespace().hashCode(); } if (getInboundsCount() > 0) { hash = (37 * hash) + INBOUNDS_FIELD_NUMBER; hash = (53 * hash) + getInboundsList().hashCode(); } if (getOutboundsCount() > 0) { hash = (37 * hash) + OUTBOUNDS_FIELD_NUMBER; hash = (53 * hash) + getOutboundsList().hashCode(); } if (hasCtime()) { hash = (37 * hash) + CTIME_FIELD_NUMBER; hash = (53 * hash) + getCtime().hashCode(); } if (hasMtime()) { hash = (37 * hash) + MTIME_FIELD_NUMBER; hash = (53 * hash) + getMtime().hashCode(); } if (hasRevision()) { hash = (37 * hash) + REVISION_FIELD_NUMBER; hash = (53 * hash) + getRevision().hashCode(); } if (hasServiceToken()) { hash = (37 * hash) + SERVICE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getServiceToken().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.tencent.polaris.client.pb.RoutingProto.Routing parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Routing parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Routing parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Routing parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Routing parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Routing parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Routing parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Routing 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 com.tencent.polaris.client.pb.RoutingProto.Routing parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Routing 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 com.tencent.polaris.client.pb.RoutingProto.Routing parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Routing 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(com.tencent.polaris.client.pb.RoutingProto.Routing 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 v1.Routing} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:v1.Routing) com.tencent.polaris.client.pb.RoutingProto.RoutingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Routing_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Routing_fieldAccessorTable .ensureFieldAccessorsInitialized( com.tencent.polaris.client.pb.RoutingProto.Routing.class, com.tencent.polaris.client.pb.RoutingProto.Routing.Builder.class); } // Construct using com.tencent.polaris.client.pb.RoutingProto.Routing.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getInboundsFieldBuilder(); getOutboundsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (serviceBuilder_ == null) { service_ = null; } else { service_ = null; serviceBuilder_ = null; } if (namespaceBuilder_ == null) { namespace_ = null; } else { namespace_ = null; namespaceBuilder_ = null; } if (inboundsBuilder_ == null) { inbounds_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { inboundsBuilder_.clear(); } if (outboundsBuilder_ == null) { outbounds_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { outboundsBuilder_.clear(); } if (ctimeBuilder_ == null) { ctime_ = null; } else { ctime_ = null; ctimeBuilder_ = null; } if (mtimeBuilder_ == null) { mtime_ = null; } else { mtime_ = null; mtimeBuilder_ = null; } if (revisionBuilder_ == null) { revision_ = null; } else { revision_ = null; revisionBuilder_ = null; } if (serviceTokenBuilder_ == null) { serviceToken_ = null; } else { serviceToken_ = null; serviceTokenBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Routing_descriptor; } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Routing getDefaultInstanceForType() { return com.tencent.polaris.client.pb.RoutingProto.Routing.getDefaultInstance(); } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Routing build() { com.tencent.polaris.client.pb.RoutingProto.Routing result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Routing buildPartial() { com.tencent.polaris.client.pb.RoutingProto.Routing result = new com.tencent.polaris.client.pb.RoutingProto.Routing(this); int from_bitField0_ = bitField0_; if (serviceBuilder_ == null) { result.service_ = service_; } else { result.service_ = serviceBuilder_.build(); } if (namespaceBuilder_ == null) { result.namespace_ = namespace_; } else { result.namespace_ = namespaceBuilder_.build(); } if (inboundsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { inbounds_ = java.util.Collections.unmodifiableList(inbounds_); bitField0_ = (bitField0_ & ~0x00000001); } result.inbounds_ = inbounds_; } else { result.inbounds_ = inboundsBuilder_.build(); } if (outboundsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { outbounds_ = java.util.Collections.unmodifiableList(outbounds_); bitField0_ = (bitField0_ & ~0x00000002); } result.outbounds_ = outbounds_; } else { result.outbounds_ = outboundsBuilder_.build(); } if (ctimeBuilder_ == null) { result.ctime_ = ctime_; } else { result.ctime_ = ctimeBuilder_.build(); } if (mtimeBuilder_ == null) { result.mtime_ = mtime_; } else { result.mtime_ = mtimeBuilder_.build(); } if (revisionBuilder_ == null) { result.revision_ = revision_; } else { result.revision_ = revisionBuilder_.build(); } if (serviceTokenBuilder_ == null) { result.serviceToken_ = serviceToken_; } else { result.serviceToken_ = serviceTokenBuilder_.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 com.tencent.polaris.client.pb.RoutingProto.Routing) { return mergeFrom((com.tencent.polaris.client.pb.RoutingProto.Routing)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.tencent.polaris.client.pb.RoutingProto.Routing other) { if (other == com.tencent.polaris.client.pb.RoutingProto.Routing.getDefaultInstance()) return this; if (other.hasService()) { mergeService(other.getService()); } if (other.hasNamespace()) { mergeNamespace(other.getNamespace()); } if (inboundsBuilder_ == null) { if (!other.inbounds_.isEmpty()) { if (inbounds_.isEmpty()) { inbounds_ = other.inbounds_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureInboundsIsMutable(); inbounds_.addAll(other.inbounds_); } onChanged(); } } else { if (!other.inbounds_.isEmpty()) { if (inboundsBuilder_.isEmpty()) { inboundsBuilder_.dispose(); inboundsBuilder_ = null; inbounds_ = other.inbounds_; bitField0_ = (bitField0_ & ~0x00000001); inboundsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getInboundsFieldBuilder() : null; } else { inboundsBuilder_.addAllMessages(other.inbounds_); } } } if (outboundsBuilder_ == null) { if (!other.outbounds_.isEmpty()) { if (outbounds_.isEmpty()) { outbounds_ = other.outbounds_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureOutboundsIsMutable(); outbounds_.addAll(other.outbounds_); } onChanged(); } } else { if (!other.outbounds_.isEmpty()) { if (outboundsBuilder_.isEmpty()) { outboundsBuilder_.dispose(); outboundsBuilder_ = null; outbounds_ = other.outbounds_; bitField0_ = (bitField0_ & ~0x00000002); outboundsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOutboundsFieldBuilder() : null; } else { outboundsBuilder_.addAllMessages(other.outbounds_); } } } if (other.hasCtime()) { mergeCtime(other.getCtime()); } if (other.hasMtime()) { mergeMtime(other.getMtime()); } if (other.hasRevision()) { mergeRevision(other.getRevision()); } if (other.hasServiceToken()) { mergeServiceToken(other.getServiceToken()); } 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 { com.tencent.polaris.client.pb.RoutingProto.Routing parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.tencent.polaris.client.pb.RoutingProto.Routing) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.StringValue service_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceBuilder_; /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ public boolean hasService() { return serviceBuilder_ != null || service_ != null; } /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ public com.google.protobuf.StringValue getService() { if (serviceBuilder_ == null) { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } else { return serviceBuilder_.getMessage(); } } /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder setService(com.google.protobuf.StringValue value) { if (serviceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } service_ = value; onChanged(); } else { serviceBuilder_.setMessage(value); } return this; } /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder setService( com.google.protobuf.StringValue.Builder builderForValue) { if (serviceBuilder_ == null) { service_ = builderForValue.build(); onChanged(); } else { serviceBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder mergeService(com.google.protobuf.StringValue value) { if (serviceBuilder_ == null) { if (service_ != null) { service_ = com.google.protobuf.StringValue.newBuilder(service_).mergeFrom(value).buildPartial(); } else { service_ = value; } onChanged(); } else { serviceBuilder_.mergeFrom(value); } return this; } /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder clearService() { if (serviceBuilder_ == null) { service_ = null; onChanged(); } else { service_ = null; serviceBuilder_ = null; } return this; } /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public com.google.protobuf.StringValue.Builder getServiceBuilder() { onChanged(); return getServiceFieldBuilder().getBuilder(); } /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() { if (serviceBuilder_ != null) { return serviceBuilder_.getMessageOrBuilder(); } else { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } } /** *
       * 规则所属服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getServiceFieldBuilder() { if (serviceBuilder_ == null) { serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getService(), getParentForChildren(), isClean()); service_ = null; } return serviceBuilder_; } private com.google.protobuf.StringValue namespace_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> namespaceBuilder_; /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ public boolean hasNamespace() { return namespaceBuilder_ != null || namespace_ != null; } /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ public com.google.protobuf.StringValue getNamespace() { if (namespaceBuilder_ == null) { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } else { return namespaceBuilder_.getMessage(); } } /** * .google.protobuf.StringValue namespace = 2; */ public Builder setNamespace(com.google.protobuf.StringValue value) { if (namespaceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } namespace_ = value; onChanged(); } else { namespaceBuilder_.setMessage(value); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder setNamespace( com.google.protobuf.StringValue.Builder builderForValue) { if (namespaceBuilder_ == null) { namespace_ = builderForValue.build(); onChanged(); } else { namespaceBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder mergeNamespace(com.google.protobuf.StringValue value) { if (namespaceBuilder_ == null) { if (namespace_ != null) { namespace_ = com.google.protobuf.StringValue.newBuilder(namespace_).mergeFrom(value).buildPartial(); } else { namespace_ = value; } onChanged(); } else { namespaceBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder clearNamespace() { if (namespaceBuilder_ == null) { namespace_ = null; onChanged(); } else { namespace_ = null; namespaceBuilder_ = null; } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public com.google.protobuf.StringValue.Builder getNamespaceBuilder() { onChanged(); return getNamespaceFieldBuilder().getBuilder(); } /** * .google.protobuf.StringValue namespace = 2; */ public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() { if (namespaceBuilder_ != null) { return namespaceBuilder_.getMessageOrBuilder(); } else { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } } /** * .google.protobuf.StringValue namespace = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getNamespaceFieldBuilder() { if (namespaceBuilder_ == null) { namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getNamespace(), getParentForChildren(), isClean()); namespace_ = null; } return namespaceBuilder_; } private java.util.List inbounds_ = java.util.Collections.emptyList(); private void ensureInboundsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { inbounds_ = new java.util.ArrayList(inbounds_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Route, com.tencent.polaris.client.pb.RoutingProto.Route.Builder, com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder> inboundsBuilder_; /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public java.util.List getInboundsList() { if (inboundsBuilder_ == null) { return java.util.Collections.unmodifiableList(inbounds_); } else { return inboundsBuilder_.getMessageList(); } } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public int getInboundsCount() { if (inboundsBuilder_ == null) { return inbounds_.size(); } else { return inboundsBuilder_.getCount(); } } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public com.tencent.polaris.client.pb.RoutingProto.Route getInbounds(int index) { if (inboundsBuilder_ == null) { return inbounds_.get(index); } else { return inboundsBuilder_.getMessage(index); } } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder setInbounds( int index, com.tencent.polaris.client.pb.RoutingProto.Route value) { if (inboundsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInboundsIsMutable(); inbounds_.set(index, value); onChanged(); } else { inboundsBuilder_.setMessage(index, value); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder setInbounds( int index, com.tencent.polaris.client.pb.RoutingProto.Route.Builder builderForValue) { if (inboundsBuilder_ == null) { ensureInboundsIsMutable(); inbounds_.set(index, builderForValue.build()); onChanged(); } else { inboundsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder addInbounds(com.tencent.polaris.client.pb.RoutingProto.Route value) { if (inboundsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInboundsIsMutable(); inbounds_.add(value); onChanged(); } else { inboundsBuilder_.addMessage(value); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder addInbounds( int index, com.tencent.polaris.client.pb.RoutingProto.Route value) { if (inboundsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInboundsIsMutable(); inbounds_.add(index, value); onChanged(); } else { inboundsBuilder_.addMessage(index, value); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder addInbounds( com.tencent.polaris.client.pb.RoutingProto.Route.Builder builderForValue) { if (inboundsBuilder_ == null) { ensureInboundsIsMutable(); inbounds_.add(builderForValue.build()); onChanged(); } else { inboundsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder addInbounds( int index, com.tencent.polaris.client.pb.RoutingProto.Route.Builder builderForValue) { if (inboundsBuilder_ == null) { ensureInboundsIsMutable(); inbounds_.add(index, builderForValue.build()); onChanged(); } else { inboundsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder addAllInbounds( java.lang.Iterable values) { if (inboundsBuilder_ == null) { ensureInboundsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, inbounds_); onChanged(); } else { inboundsBuilder_.addAllMessages(values); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder clearInbounds() { if (inboundsBuilder_ == null) { inbounds_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { inboundsBuilder_.clear(); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public Builder removeInbounds(int index) { if (inboundsBuilder_ == null) { ensureInboundsIsMutable(); inbounds_.remove(index); onChanged(); } else { inboundsBuilder_.remove(index); } return this; } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public com.tencent.polaris.client.pb.RoutingProto.Route.Builder getInboundsBuilder( int index) { return getInboundsFieldBuilder().getBuilder(index); } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder getInboundsOrBuilder( int index) { if (inboundsBuilder_ == null) { return inbounds_.get(index); } else { return inboundsBuilder_.getMessageOrBuilder(index); } } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public java.util.List getInboundsOrBuilderList() { if (inboundsBuilder_ != null) { return inboundsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(inbounds_); } } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public com.tencent.polaris.client.pb.RoutingProto.Route.Builder addInboundsBuilder() { return getInboundsFieldBuilder().addBuilder( com.tencent.polaris.client.pb.RoutingProto.Route.getDefaultInstance()); } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public com.tencent.polaris.client.pb.RoutingProto.Route.Builder addInboundsBuilder( int index) { return getInboundsFieldBuilder().addBuilder( index, com.tencent.polaris.client.pb.RoutingProto.Route.getDefaultInstance()); } /** *
       * 每个服务可以配置多条入站或者出站规则
       * 对于每个请求,从上到下依次匹配,若命中则终止
       * 
* * repeated .v1.Route inbounds = 3; */ public java.util.List getInboundsBuilderList() { return getInboundsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Route, com.tencent.polaris.client.pb.RoutingProto.Route.Builder, com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder> getInboundsFieldBuilder() { if (inboundsBuilder_ == null) { inboundsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Route, com.tencent.polaris.client.pb.RoutingProto.Route.Builder, com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder>( inbounds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); inbounds_ = null; } return inboundsBuilder_; } private java.util.List outbounds_ = java.util.Collections.emptyList(); private void ensureOutboundsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { outbounds_ = new java.util.ArrayList(outbounds_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Route, com.tencent.polaris.client.pb.RoutingProto.Route.Builder, com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder> outboundsBuilder_; /** * repeated .v1.Route outbounds = 4; */ public java.util.List getOutboundsList() { if (outboundsBuilder_ == null) { return java.util.Collections.unmodifiableList(outbounds_); } else { return outboundsBuilder_.getMessageList(); } } /** * repeated .v1.Route outbounds = 4; */ public int getOutboundsCount() { if (outboundsBuilder_ == null) { return outbounds_.size(); } else { return outboundsBuilder_.getCount(); } } /** * repeated .v1.Route outbounds = 4; */ public com.tencent.polaris.client.pb.RoutingProto.Route getOutbounds(int index) { if (outboundsBuilder_ == null) { return outbounds_.get(index); } else { return outboundsBuilder_.getMessage(index); } } /** * repeated .v1.Route outbounds = 4; */ public Builder setOutbounds( int index, com.tencent.polaris.client.pb.RoutingProto.Route value) { if (outboundsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutboundsIsMutable(); outbounds_.set(index, value); onChanged(); } else { outboundsBuilder_.setMessage(index, value); } return this; } /** * repeated .v1.Route outbounds = 4; */ public Builder setOutbounds( int index, com.tencent.polaris.client.pb.RoutingProto.Route.Builder builderForValue) { if (outboundsBuilder_ == null) { ensureOutboundsIsMutable(); outbounds_.set(index, builderForValue.build()); onChanged(); } else { outboundsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .v1.Route outbounds = 4; */ public Builder addOutbounds(com.tencent.polaris.client.pb.RoutingProto.Route value) { if (outboundsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutboundsIsMutable(); outbounds_.add(value); onChanged(); } else { outboundsBuilder_.addMessage(value); } return this; } /** * repeated .v1.Route outbounds = 4; */ public Builder addOutbounds( int index, com.tencent.polaris.client.pb.RoutingProto.Route value) { if (outboundsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutboundsIsMutable(); outbounds_.add(index, value); onChanged(); } else { outboundsBuilder_.addMessage(index, value); } return this; } /** * repeated .v1.Route outbounds = 4; */ public Builder addOutbounds( com.tencent.polaris.client.pb.RoutingProto.Route.Builder builderForValue) { if (outboundsBuilder_ == null) { ensureOutboundsIsMutable(); outbounds_.add(builderForValue.build()); onChanged(); } else { outboundsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .v1.Route outbounds = 4; */ public Builder addOutbounds( int index, com.tencent.polaris.client.pb.RoutingProto.Route.Builder builderForValue) { if (outboundsBuilder_ == null) { ensureOutboundsIsMutable(); outbounds_.add(index, builderForValue.build()); onChanged(); } else { outboundsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .v1.Route outbounds = 4; */ public Builder addAllOutbounds( java.lang.Iterable values) { if (outboundsBuilder_ == null) { ensureOutboundsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, outbounds_); onChanged(); } else { outboundsBuilder_.addAllMessages(values); } return this; } /** * repeated .v1.Route outbounds = 4; */ public Builder clearOutbounds() { if (outboundsBuilder_ == null) { outbounds_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { outboundsBuilder_.clear(); } return this; } /** * repeated .v1.Route outbounds = 4; */ public Builder removeOutbounds(int index) { if (outboundsBuilder_ == null) { ensureOutboundsIsMutable(); outbounds_.remove(index); onChanged(); } else { outboundsBuilder_.remove(index); } return this; } /** * repeated .v1.Route outbounds = 4; */ public com.tencent.polaris.client.pb.RoutingProto.Route.Builder getOutboundsBuilder( int index) { return getOutboundsFieldBuilder().getBuilder(index); } /** * repeated .v1.Route outbounds = 4; */ public com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder getOutboundsOrBuilder( int index) { if (outboundsBuilder_ == null) { return outbounds_.get(index); } else { return outboundsBuilder_.getMessageOrBuilder(index); } } /** * repeated .v1.Route outbounds = 4; */ public java.util.List getOutboundsOrBuilderList() { if (outboundsBuilder_ != null) { return outboundsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(outbounds_); } } /** * repeated .v1.Route outbounds = 4; */ public com.tencent.polaris.client.pb.RoutingProto.Route.Builder addOutboundsBuilder() { return getOutboundsFieldBuilder().addBuilder( com.tencent.polaris.client.pb.RoutingProto.Route.getDefaultInstance()); } /** * repeated .v1.Route outbounds = 4; */ public com.tencent.polaris.client.pb.RoutingProto.Route.Builder addOutboundsBuilder( int index) { return getOutboundsFieldBuilder().addBuilder( index, com.tencent.polaris.client.pb.RoutingProto.Route.getDefaultInstance()); } /** * repeated .v1.Route outbounds = 4; */ public java.util.List getOutboundsBuilderList() { return getOutboundsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Route, com.tencent.polaris.client.pb.RoutingProto.Route.Builder, com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder> getOutboundsFieldBuilder() { if (outboundsBuilder_ == null) { outboundsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Route, com.tencent.polaris.client.pb.RoutingProto.Route.Builder, com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder>( outbounds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); outbounds_ = null; } return outboundsBuilder_; } private com.google.protobuf.StringValue ctime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> ctimeBuilder_; /** * .google.protobuf.StringValue ctime = 5; * @return Whether the ctime field is set. */ public boolean hasCtime() { return ctimeBuilder_ != null || ctime_ != null; } /** * .google.protobuf.StringValue ctime = 5; * @return The ctime. */ public com.google.protobuf.StringValue getCtime() { if (ctimeBuilder_ == null) { return ctime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : ctime_; } else { return ctimeBuilder_.getMessage(); } } /** * .google.protobuf.StringValue ctime = 5; */ public Builder setCtime(com.google.protobuf.StringValue value) { if (ctimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ctime_ = value; onChanged(); } else { ctimeBuilder_.setMessage(value); } return this; } /** * .google.protobuf.StringValue ctime = 5; */ public Builder setCtime( com.google.protobuf.StringValue.Builder builderForValue) { if (ctimeBuilder_ == null) { ctime_ = builderForValue.build(); onChanged(); } else { ctimeBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.StringValue ctime = 5; */ public Builder mergeCtime(com.google.protobuf.StringValue value) { if (ctimeBuilder_ == null) { if (ctime_ != null) { ctime_ = com.google.protobuf.StringValue.newBuilder(ctime_).mergeFrom(value).buildPartial(); } else { ctime_ = value; } onChanged(); } else { ctimeBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.StringValue ctime = 5; */ public Builder clearCtime() { if (ctimeBuilder_ == null) { ctime_ = null; onChanged(); } else { ctime_ = null; ctimeBuilder_ = null; } return this; } /** * .google.protobuf.StringValue ctime = 5; */ public com.google.protobuf.StringValue.Builder getCtimeBuilder() { onChanged(); return getCtimeFieldBuilder().getBuilder(); } /** * .google.protobuf.StringValue ctime = 5; */ public com.google.protobuf.StringValueOrBuilder getCtimeOrBuilder() { if (ctimeBuilder_ != null) { return ctimeBuilder_.getMessageOrBuilder(); } else { return ctime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : ctime_; } } /** * .google.protobuf.StringValue ctime = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getCtimeFieldBuilder() { if (ctimeBuilder_ == null) { ctimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getCtime(), getParentForChildren(), isClean()); ctime_ = null; } return ctimeBuilder_; } private com.google.protobuf.StringValue mtime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> mtimeBuilder_; /** * .google.protobuf.StringValue mtime = 6; * @return Whether the mtime field is set. */ public boolean hasMtime() { return mtimeBuilder_ != null || mtime_ != null; } /** * .google.protobuf.StringValue mtime = 6; * @return The mtime. */ public com.google.protobuf.StringValue getMtime() { if (mtimeBuilder_ == null) { return mtime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : mtime_; } else { return mtimeBuilder_.getMessage(); } } /** * .google.protobuf.StringValue mtime = 6; */ public Builder setMtime(com.google.protobuf.StringValue value) { if (mtimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } mtime_ = value; onChanged(); } else { mtimeBuilder_.setMessage(value); } return this; } /** * .google.protobuf.StringValue mtime = 6; */ public Builder setMtime( com.google.protobuf.StringValue.Builder builderForValue) { if (mtimeBuilder_ == null) { mtime_ = builderForValue.build(); onChanged(); } else { mtimeBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.StringValue mtime = 6; */ public Builder mergeMtime(com.google.protobuf.StringValue value) { if (mtimeBuilder_ == null) { if (mtime_ != null) { mtime_ = com.google.protobuf.StringValue.newBuilder(mtime_).mergeFrom(value).buildPartial(); } else { mtime_ = value; } onChanged(); } else { mtimeBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.StringValue mtime = 6; */ public Builder clearMtime() { if (mtimeBuilder_ == null) { mtime_ = null; onChanged(); } else { mtime_ = null; mtimeBuilder_ = null; } return this; } /** * .google.protobuf.StringValue mtime = 6; */ public com.google.protobuf.StringValue.Builder getMtimeBuilder() { onChanged(); return getMtimeFieldBuilder().getBuilder(); } /** * .google.protobuf.StringValue mtime = 6; */ public com.google.protobuf.StringValueOrBuilder getMtimeOrBuilder() { if (mtimeBuilder_ != null) { return mtimeBuilder_.getMessageOrBuilder(); } else { return mtime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : mtime_; } } /** * .google.protobuf.StringValue mtime = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getMtimeFieldBuilder() { if (mtimeBuilder_ == null) { mtimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getMtime(), getParentForChildren(), isClean()); mtime_ = null; } return mtimeBuilder_; } private com.google.protobuf.StringValue revision_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> revisionBuilder_; /** * .google.protobuf.StringValue revision = 7; * @return Whether the revision field is set. */ public boolean hasRevision() { return revisionBuilder_ != null || revision_ != null; } /** * .google.protobuf.StringValue revision = 7; * @return The revision. */ public com.google.protobuf.StringValue getRevision() { if (revisionBuilder_ == null) { return revision_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : revision_; } else { return revisionBuilder_.getMessage(); } } /** * .google.protobuf.StringValue revision = 7; */ public Builder setRevision(com.google.protobuf.StringValue value) { if (revisionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } revision_ = value; onChanged(); } else { revisionBuilder_.setMessage(value); } return this; } /** * .google.protobuf.StringValue revision = 7; */ public Builder setRevision( com.google.protobuf.StringValue.Builder builderForValue) { if (revisionBuilder_ == null) { revision_ = builderForValue.build(); onChanged(); } else { revisionBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.StringValue revision = 7; */ public Builder mergeRevision(com.google.protobuf.StringValue value) { if (revisionBuilder_ == null) { if (revision_ != null) { revision_ = com.google.protobuf.StringValue.newBuilder(revision_).mergeFrom(value).buildPartial(); } else { revision_ = value; } onChanged(); } else { revisionBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.StringValue revision = 7; */ public Builder clearRevision() { if (revisionBuilder_ == null) { revision_ = null; onChanged(); } else { revision_ = null; revisionBuilder_ = null; } return this; } /** * .google.protobuf.StringValue revision = 7; */ public com.google.protobuf.StringValue.Builder getRevisionBuilder() { onChanged(); return getRevisionFieldBuilder().getBuilder(); } /** * .google.protobuf.StringValue revision = 7; */ public com.google.protobuf.StringValueOrBuilder getRevisionOrBuilder() { if (revisionBuilder_ != null) { return revisionBuilder_.getMessageOrBuilder(); } else { return revision_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : revision_; } } /** * .google.protobuf.StringValue revision = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getRevisionFieldBuilder() { if (revisionBuilder_ == null) { revisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getRevision(), getParentForChildren(), isClean()); revision_ = null; } return revisionBuilder_; } private com.google.protobuf.StringValue serviceToken_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceTokenBuilder_; /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; * @return Whether the serviceToken field is set. */ public boolean hasServiceToken() { return serviceTokenBuilder_ != null || serviceToken_ != null; } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; * @return The serviceToken. */ public com.google.protobuf.StringValue getServiceToken() { if (serviceTokenBuilder_ == null) { return serviceToken_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : serviceToken_; } else { return serviceTokenBuilder_.getMessage(); } } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ public Builder setServiceToken(com.google.protobuf.StringValue value) { if (serviceTokenBuilder_ == null) { if (value == null) { throw new NullPointerException(); } serviceToken_ = value; onChanged(); } else { serviceTokenBuilder_.setMessage(value); } return this; } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ public Builder setServiceToken( com.google.protobuf.StringValue.Builder builderForValue) { if (serviceTokenBuilder_ == null) { serviceToken_ = builderForValue.build(); onChanged(); } else { serviceTokenBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ public Builder mergeServiceToken(com.google.protobuf.StringValue value) { if (serviceTokenBuilder_ == null) { if (serviceToken_ != null) { serviceToken_ = com.google.protobuf.StringValue.newBuilder(serviceToken_).mergeFrom(value).buildPartial(); } else { serviceToken_ = value; } onChanged(); } else { serviceTokenBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ public Builder clearServiceToken() { if (serviceTokenBuilder_ == null) { serviceToken_ = null; onChanged(); } else { serviceToken_ = null; serviceTokenBuilder_ = null; } return this; } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ public com.google.protobuf.StringValue.Builder getServiceTokenBuilder() { onChanged(); return getServiceTokenFieldBuilder().getBuilder(); } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ public com.google.protobuf.StringValueOrBuilder getServiceTokenOrBuilder() { if (serviceTokenBuilder_ != null) { return serviceTokenBuilder_.getMessageOrBuilder(); } else { return serviceToken_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : serviceToken_; } } /** * .google.protobuf.StringValue service_token = 8[json_name = "service_token"]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getServiceTokenFieldBuilder() { if (serviceTokenBuilder_ == null) { serviceTokenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getServiceToken(), getParentForChildren(), isClean()); serviceToken_ = null; } return serviceTokenBuilder_; } @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:v1.Routing) } // @@protoc_insertion_point(class_scope:v1.Routing) private static final com.tencent.polaris.client.pb.RoutingProto.Routing DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.tencent.polaris.client.pb.RoutingProto.Routing(); } public static com.tencent.polaris.client.pb.RoutingProto.Routing getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Routing parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Routing(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 com.tencent.polaris.client.pb.RoutingProto.Routing getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface RouteOrBuilder extends // @@protoc_insertion_point(interface_extends:v1.Route) com.google.protobuf.MessageOrBuilder { /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ java.util.List getSourcesList(); /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ com.tencent.polaris.client.pb.RoutingProto.Source getSources(int index); /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ int getSourcesCount(); /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ java.util.List getSourcesOrBuilderList(); /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ com.tencent.polaris.client.pb.RoutingProto.SourceOrBuilder getSourcesOrBuilder( int index); /** * repeated .v1.Destination destinations = 2; */ java.util.List getDestinationsList(); /** * repeated .v1.Destination destinations = 2; */ com.tencent.polaris.client.pb.RoutingProto.Destination getDestinations(int index); /** * repeated .v1.Destination destinations = 2; */ int getDestinationsCount(); /** * repeated .v1.Destination destinations = 2; */ java.util.List getDestinationsOrBuilderList(); /** * repeated .v1.Destination destinations = 2; */ com.tencent.polaris.client.pb.RoutingProto.DestinationOrBuilder getDestinationsOrBuilder( int index); } /** * Protobuf type {@code v1.Route} */ public static final class Route extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:v1.Route) RouteOrBuilder { private static final long serialVersionUID = 0L; // Use Route.newBuilder() to construct. private Route(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Route() { sources_ = java.util.Collections.emptyList(); destinations_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Route(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Route( 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)) { sources_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } sources_.add( input.readMessage(com.tencent.polaris.client.pb.RoutingProto.Source.parser(), extensionRegistry)); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { destinations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } destinations_.add( input.readMessage(com.tencent.polaris.client.pb.RoutingProto.Destination.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)) { sources_ = java.util.Collections.unmodifiableList(sources_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { destinations_ = java.util.Collections.unmodifiableList(destinations_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Route_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Route_fieldAccessorTable .ensureFieldAccessorsInitialized( com.tencent.polaris.client.pb.RoutingProto.Route.class, com.tencent.polaris.client.pb.RoutingProto.Route.Builder.class); } public static final int SOURCES_FIELD_NUMBER = 1; private java.util.List sources_; /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ @java.lang.Override public java.util.List getSourcesList() { return sources_; } /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ @java.lang.Override public java.util.List getSourcesOrBuilderList() { return sources_; } /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ @java.lang.Override public int getSourcesCount() { return sources_.size(); } /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Source getSources(int index) { return sources_.get(index); } /** *
     * 如果匹配Source规则,按照Destination路由
     * 多个Source之间的关系为或
     * 
* * repeated .v1.Source sources = 1; */ @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.SourceOrBuilder getSourcesOrBuilder( int index) { return sources_.get(index); } public static final int DESTINATIONS_FIELD_NUMBER = 2; private java.util.List destinations_; /** * repeated .v1.Destination destinations = 2; */ @java.lang.Override public java.util.List getDestinationsList() { return destinations_; } /** * repeated .v1.Destination destinations = 2; */ @java.lang.Override public java.util.List getDestinationsOrBuilderList() { return destinations_; } /** * repeated .v1.Destination destinations = 2; */ @java.lang.Override public int getDestinationsCount() { return destinations_.size(); } /** * repeated .v1.Destination destinations = 2; */ @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Destination getDestinations(int index) { return destinations_.get(index); } /** * repeated .v1.Destination destinations = 2; */ @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.DestinationOrBuilder getDestinationsOrBuilder( int index) { return destinations_.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 < sources_.size(); i++) { output.writeMessage(1, sources_.get(i)); } for (int i = 0; i < destinations_.size(); i++) { output.writeMessage(2, destinations_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < sources_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, sources_.get(i)); } for (int i = 0; i < destinations_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, destinations_.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 com.tencent.polaris.client.pb.RoutingProto.Route)) { return super.equals(obj); } com.tencent.polaris.client.pb.RoutingProto.Route other = (com.tencent.polaris.client.pb.RoutingProto.Route) obj; if (!getSourcesList() .equals(other.getSourcesList())) return false; if (!getDestinationsList() .equals(other.getDestinationsList())) 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 (getSourcesCount() > 0) { hash = (37 * hash) + SOURCES_FIELD_NUMBER; hash = (53 * hash) + getSourcesList().hashCode(); } if (getDestinationsCount() > 0) { hash = (37 * hash) + DESTINATIONS_FIELD_NUMBER; hash = (53 * hash) + getDestinationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.tencent.polaris.client.pb.RoutingProto.Route parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Route parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Route parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Route parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Route parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Route parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Route parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Route 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 com.tencent.polaris.client.pb.RoutingProto.Route parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Route 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 com.tencent.polaris.client.pb.RoutingProto.Route parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Route 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(com.tencent.polaris.client.pb.RoutingProto.Route 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 v1.Route} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:v1.Route) com.tencent.polaris.client.pb.RoutingProto.RouteOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Route_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Route_fieldAccessorTable .ensureFieldAccessorsInitialized( com.tencent.polaris.client.pb.RoutingProto.Route.class, com.tencent.polaris.client.pb.RoutingProto.Route.Builder.class); } // Construct using com.tencent.polaris.client.pb.RoutingProto.Route.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getSourcesFieldBuilder(); getDestinationsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (sourcesBuilder_ == null) { sources_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { sourcesBuilder_.clear(); } if (destinationsBuilder_ == null) { destinations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { destinationsBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Route_descriptor; } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Route getDefaultInstanceForType() { return com.tencent.polaris.client.pb.RoutingProto.Route.getDefaultInstance(); } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Route build() { com.tencent.polaris.client.pb.RoutingProto.Route result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Route buildPartial() { com.tencent.polaris.client.pb.RoutingProto.Route result = new com.tencent.polaris.client.pb.RoutingProto.Route(this); int from_bitField0_ = bitField0_; if (sourcesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { sources_ = java.util.Collections.unmodifiableList(sources_); bitField0_ = (bitField0_ & ~0x00000001); } result.sources_ = sources_; } else { result.sources_ = sourcesBuilder_.build(); } if (destinationsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { destinations_ = java.util.Collections.unmodifiableList(destinations_); bitField0_ = (bitField0_ & ~0x00000002); } result.destinations_ = destinations_; } else { result.destinations_ = destinationsBuilder_.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 com.tencent.polaris.client.pb.RoutingProto.Route) { return mergeFrom((com.tencent.polaris.client.pb.RoutingProto.Route)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.tencent.polaris.client.pb.RoutingProto.Route other) { if (other == com.tencent.polaris.client.pb.RoutingProto.Route.getDefaultInstance()) return this; if (sourcesBuilder_ == null) { if (!other.sources_.isEmpty()) { if (sources_.isEmpty()) { sources_ = other.sources_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureSourcesIsMutable(); sources_.addAll(other.sources_); } onChanged(); } } else { if (!other.sources_.isEmpty()) { if (sourcesBuilder_.isEmpty()) { sourcesBuilder_.dispose(); sourcesBuilder_ = null; sources_ = other.sources_; bitField0_ = (bitField0_ & ~0x00000001); sourcesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSourcesFieldBuilder() : null; } else { sourcesBuilder_.addAllMessages(other.sources_); } } } if (destinationsBuilder_ == null) { if (!other.destinations_.isEmpty()) { if (destinations_.isEmpty()) { destinations_ = other.destinations_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureDestinationsIsMutable(); destinations_.addAll(other.destinations_); } onChanged(); } } else { if (!other.destinations_.isEmpty()) { if (destinationsBuilder_.isEmpty()) { destinationsBuilder_.dispose(); destinationsBuilder_ = null; destinations_ = other.destinations_; bitField0_ = (bitField0_ & ~0x00000002); destinationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDestinationsFieldBuilder() : null; } else { destinationsBuilder_.addAllMessages(other.destinations_); } } } 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 { com.tencent.polaris.client.pb.RoutingProto.Route parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.tencent.polaris.client.pb.RoutingProto.Route) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List sources_ = java.util.Collections.emptyList(); private void ensureSourcesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { sources_ = new java.util.ArrayList(sources_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Source, com.tencent.polaris.client.pb.RoutingProto.Source.Builder, com.tencent.polaris.client.pb.RoutingProto.SourceOrBuilder> sourcesBuilder_; /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public java.util.List getSourcesList() { if (sourcesBuilder_ == null) { return java.util.Collections.unmodifiableList(sources_); } else { return sourcesBuilder_.getMessageList(); } } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public int getSourcesCount() { if (sourcesBuilder_ == null) { return sources_.size(); } else { return sourcesBuilder_.getCount(); } } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public com.tencent.polaris.client.pb.RoutingProto.Source getSources(int index) { if (sourcesBuilder_ == null) { return sources_.get(index); } else { return sourcesBuilder_.getMessage(index); } } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder setSources( int index, com.tencent.polaris.client.pb.RoutingProto.Source value) { if (sourcesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourcesIsMutable(); sources_.set(index, value); onChanged(); } else { sourcesBuilder_.setMessage(index, value); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder setSources( int index, com.tencent.polaris.client.pb.RoutingProto.Source.Builder builderForValue) { if (sourcesBuilder_ == null) { ensureSourcesIsMutable(); sources_.set(index, builderForValue.build()); onChanged(); } else { sourcesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder addSources(com.tencent.polaris.client.pb.RoutingProto.Source value) { if (sourcesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourcesIsMutable(); sources_.add(value); onChanged(); } else { sourcesBuilder_.addMessage(value); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder addSources( int index, com.tencent.polaris.client.pb.RoutingProto.Source value) { if (sourcesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourcesIsMutable(); sources_.add(index, value); onChanged(); } else { sourcesBuilder_.addMessage(index, value); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder addSources( com.tencent.polaris.client.pb.RoutingProto.Source.Builder builderForValue) { if (sourcesBuilder_ == null) { ensureSourcesIsMutable(); sources_.add(builderForValue.build()); onChanged(); } else { sourcesBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder addSources( int index, com.tencent.polaris.client.pb.RoutingProto.Source.Builder builderForValue) { if (sourcesBuilder_ == null) { ensureSourcesIsMutable(); sources_.add(index, builderForValue.build()); onChanged(); } else { sourcesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder addAllSources( java.lang.Iterable values) { if (sourcesBuilder_ == null) { ensureSourcesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, sources_); onChanged(); } else { sourcesBuilder_.addAllMessages(values); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder clearSources() { if (sourcesBuilder_ == null) { sources_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { sourcesBuilder_.clear(); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public Builder removeSources(int index) { if (sourcesBuilder_ == null) { ensureSourcesIsMutable(); sources_.remove(index); onChanged(); } else { sourcesBuilder_.remove(index); } return this; } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public com.tencent.polaris.client.pb.RoutingProto.Source.Builder getSourcesBuilder( int index) { return getSourcesFieldBuilder().getBuilder(index); } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public com.tencent.polaris.client.pb.RoutingProto.SourceOrBuilder getSourcesOrBuilder( int index) { if (sourcesBuilder_ == null) { return sources_.get(index); } else { return sourcesBuilder_.getMessageOrBuilder(index); } } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public java.util.List getSourcesOrBuilderList() { if (sourcesBuilder_ != null) { return sourcesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(sources_); } } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public com.tencent.polaris.client.pb.RoutingProto.Source.Builder addSourcesBuilder() { return getSourcesFieldBuilder().addBuilder( com.tencent.polaris.client.pb.RoutingProto.Source.getDefaultInstance()); } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public com.tencent.polaris.client.pb.RoutingProto.Source.Builder addSourcesBuilder( int index) { return getSourcesFieldBuilder().addBuilder( index, com.tencent.polaris.client.pb.RoutingProto.Source.getDefaultInstance()); } /** *
       * 如果匹配Source规则,按照Destination路由
       * 多个Source之间的关系为或
       * 
* * repeated .v1.Source sources = 1; */ public java.util.List getSourcesBuilderList() { return getSourcesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Source, com.tencent.polaris.client.pb.RoutingProto.Source.Builder, com.tencent.polaris.client.pb.RoutingProto.SourceOrBuilder> getSourcesFieldBuilder() { if (sourcesBuilder_ == null) { sourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Source, com.tencent.polaris.client.pb.RoutingProto.Source.Builder, com.tencent.polaris.client.pb.RoutingProto.SourceOrBuilder>( sources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); sources_ = null; } return sourcesBuilder_; } private java.util.List destinations_ = java.util.Collections.emptyList(); private void ensureDestinationsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { destinations_ = new java.util.ArrayList(destinations_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Destination, com.tencent.polaris.client.pb.RoutingProto.Destination.Builder, com.tencent.polaris.client.pb.RoutingProto.DestinationOrBuilder> destinationsBuilder_; /** * repeated .v1.Destination destinations = 2; */ public java.util.List getDestinationsList() { if (destinationsBuilder_ == null) { return java.util.Collections.unmodifiableList(destinations_); } else { return destinationsBuilder_.getMessageList(); } } /** * repeated .v1.Destination destinations = 2; */ public int getDestinationsCount() { if (destinationsBuilder_ == null) { return destinations_.size(); } else { return destinationsBuilder_.getCount(); } } /** * repeated .v1.Destination destinations = 2; */ public com.tencent.polaris.client.pb.RoutingProto.Destination getDestinations(int index) { if (destinationsBuilder_ == null) { return destinations_.get(index); } else { return destinationsBuilder_.getMessage(index); } } /** * repeated .v1.Destination destinations = 2; */ public Builder setDestinations( int index, com.tencent.polaris.client.pb.RoutingProto.Destination value) { if (destinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDestinationsIsMutable(); destinations_.set(index, value); onChanged(); } else { destinationsBuilder_.setMessage(index, value); } return this; } /** * repeated .v1.Destination destinations = 2; */ public Builder setDestinations( int index, com.tencent.polaris.client.pb.RoutingProto.Destination.Builder builderForValue) { if (destinationsBuilder_ == null) { ensureDestinationsIsMutable(); destinations_.set(index, builderForValue.build()); onChanged(); } else { destinationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .v1.Destination destinations = 2; */ public Builder addDestinations(com.tencent.polaris.client.pb.RoutingProto.Destination value) { if (destinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDestinationsIsMutable(); destinations_.add(value); onChanged(); } else { destinationsBuilder_.addMessage(value); } return this; } /** * repeated .v1.Destination destinations = 2; */ public Builder addDestinations( int index, com.tencent.polaris.client.pb.RoutingProto.Destination value) { if (destinationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDestinationsIsMutable(); destinations_.add(index, value); onChanged(); } else { destinationsBuilder_.addMessage(index, value); } return this; } /** * repeated .v1.Destination destinations = 2; */ public Builder addDestinations( com.tencent.polaris.client.pb.RoutingProto.Destination.Builder builderForValue) { if (destinationsBuilder_ == null) { ensureDestinationsIsMutable(); destinations_.add(builderForValue.build()); onChanged(); } else { destinationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .v1.Destination destinations = 2; */ public Builder addDestinations( int index, com.tencent.polaris.client.pb.RoutingProto.Destination.Builder builderForValue) { if (destinationsBuilder_ == null) { ensureDestinationsIsMutable(); destinations_.add(index, builderForValue.build()); onChanged(); } else { destinationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .v1.Destination destinations = 2; */ public Builder addAllDestinations( java.lang.Iterable values) { if (destinationsBuilder_ == null) { ensureDestinationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, destinations_); onChanged(); } else { destinationsBuilder_.addAllMessages(values); } return this; } /** * repeated .v1.Destination destinations = 2; */ public Builder clearDestinations() { if (destinationsBuilder_ == null) { destinations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { destinationsBuilder_.clear(); } return this; } /** * repeated .v1.Destination destinations = 2; */ public Builder removeDestinations(int index) { if (destinationsBuilder_ == null) { ensureDestinationsIsMutable(); destinations_.remove(index); onChanged(); } else { destinationsBuilder_.remove(index); } return this; } /** * repeated .v1.Destination destinations = 2; */ public com.tencent.polaris.client.pb.RoutingProto.Destination.Builder getDestinationsBuilder( int index) { return getDestinationsFieldBuilder().getBuilder(index); } /** * repeated .v1.Destination destinations = 2; */ public com.tencent.polaris.client.pb.RoutingProto.DestinationOrBuilder getDestinationsOrBuilder( int index) { if (destinationsBuilder_ == null) { return destinations_.get(index); } else { return destinationsBuilder_.getMessageOrBuilder(index); } } /** * repeated .v1.Destination destinations = 2; */ public java.util.List getDestinationsOrBuilderList() { if (destinationsBuilder_ != null) { return destinationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(destinations_); } } /** * repeated .v1.Destination destinations = 2; */ public com.tencent.polaris.client.pb.RoutingProto.Destination.Builder addDestinationsBuilder() { return getDestinationsFieldBuilder().addBuilder( com.tencent.polaris.client.pb.RoutingProto.Destination.getDefaultInstance()); } /** * repeated .v1.Destination destinations = 2; */ public com.tencent.polaris.client.pb.RoutingProto.Destination.Builder addDestinationsBuilder( int index) { return getDestinationsFieldBuilder().addBuilder( index, com.tencent.polaris.client.pb.RoutingProto.Destination.getDefaultInstance()); } /** * repeated .v1.Destination destinations = 2; */ public java.util.List getDestinationsBuilderList() { return getDestinationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Destination, com.tencent.polaris.client.pb.RoutingProto.Destination.Builder, com.tencent.polaris.client.pb.RoutingProto.DestinationOrBuilder> getDestinationsFieldBuilder() { if (destinationsBuilder_ == null) { destinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.tencent.polaris.client.pb.RoutingProto.Destination, com.tencent.polaris.client.pb.RoutingProto.Destination.Builder, com.tencent.polaris.client.pb.RoutingProto.DestinationOrBuilder>( destinations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); destinations_ = null; } return destinationsBuilder_; } @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:v1.Route) } // @@protoc_insertion_point(class_scope:v1.Route) private static final com.tencent.polaris.client.pb.RoutingProto.Route DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.tencent.polaris.client.pb.RoutingProto.Route(); } public static com.tencent.polaris.client.pb.RoutingProto.Route getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Route parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Route(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 com.tencent.polaris.client.pb.RoutingProto.Route getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface SourceOrBuilder extends // @@protoc_insertion_point(interface_extends:v1.Source) com.google.protobuf.MessageOrBuilder { /** *
     * 主调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ boolean hasService(); /** *
     * 主调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ com.google.protobuf.StringValue getService(); /** *
     * 主调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; */ com.google.protobuf.StringValueOrBuilder getServiceOrBuilder(); /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ boolean hasNamespace(); /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ com.google.protobuf.StringValue getNamespace(); /** * .google.protobuf.StringValue namespace = 2; */ com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder(); /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ int getMetadataCount(); /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ boolean containsMetadata( java.lang.String key); /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Deprecated java.util.Map getMetadata(); /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ java.util.Map getMetadataMap(); /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrDefault( java.lang.String key, com.tencent.polaris.client.pb.ModelProto.MatchString defaultValue); /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrThrow( java.lang.String key); } /** * Protobuf type {@code v1.Source} */ public static final class Source extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:v1.Source) SourceOrBuilder { private static final long serialVersionUID = 0L; // Use Source.newBuilder() to construct. private Source(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Source() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Source(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Source( 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: { com.google.protobuf.StringValue.Builder subBuilder = null; if (service_ != null) { subBuilder = service_.toBuilder(); } service_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(service_); service_ = subBuilder.buildPartial(); } break; } case 18: { com.google.protobuf.StringValue.Builder subBuilder = null; if (namespace_ != null) { subBuilder = namespace_.toBuilder(); } namespace_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(namespace_); namespace_ = subBuilder.buildPartial(); } break; } case 26: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { metadata_ = com.google.protobuf.MapField.newMapField( MetadataDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry metadata__ = input.readMessage( MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); metadata_.getMutableMap().put( metadata__.getKey(), metadata__.getValue()); 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 com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Source_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: return internalGetMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Source_fieldAccessorTable .ensureFieldAccessorsInitialized( com.tencent.polaris.client.pb.RoutingProto.Source.class, com.tencent.polaris.client.pb.RoutingProto.Source.Builder.class); } public static final int SERVICE_FIELD_NUMBER = 1; private com.google.protobuf.StringValue service_; /** *
     * 主调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ @java.lang.Override public boolean hasService() { return service_ != null; } /** *
     * 主调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ @java.lang.Override public com.google.protobuf.StringValue getService() { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } /** *
     * 主调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() { return getService(); } public static final int NAMESPACE_FIELD_NUMBER = 2; private com.google.protobuf.StringValue namespace_; /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ @java.lang.Override public boolean hasNamespace() { return namespace_ != null; } /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ @java.lang.Override public com.google.protobuf.StringValue getNamespace() { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } /** * .google.protobuf.StringValue namespace = 2; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() { return getNamespace(); } public static final int METADATA_FIELD_NUMBER = 3; private static final class MetadataDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.tencent.polaris.client.pb.ModelProto.MatchString> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Source_MetadataEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.tencent.polaris.client.pb.ModelProto.MatchString.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.String, com.tencent.polaris.client.pb.ModelProto.MatchString> metadata_; private com.google.protobuf.MapField internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField( MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public boolean containsMetadata( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetMetadata().getMap().containsKey(key); } /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); } /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrDefault( java.lang.String key, com.tencent.polaris.client.pb.ModelProto.MatchString defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * 主调方服务实例标签或者请求标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } 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 (service_ != null) { output.writeMessage(1, getService()); } if (namespace_ != null) { output.writeMessage(2, getNamespace()); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 3); unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (service_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getService()); } if (namespace_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getNamespace()); } for (java.util.Map.Entry entry : internalGetMetadata().getMap().entrySet()) { com.google.protobuf.MapEntry metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, metadata__); } 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 com.tencent.polaris.client.pb.RoutingProto.Source)) { return super.equals(obj); } com.tencent.polaris.client.pb.RoutingProto.Source other = (com.tencent.polaris.client.pb.RoutingProto.Source) obj; if (hasService() != other.hasService()) return false; if (hasService()) { if (!getService() .equals(other.getService())) return false; } if (hasNamespace() != other.hasNamespace()) return false; if (hasNamespace()) { if (!getNamespace() .equals(other.getNamespace())) return false; } if (!internalGetMetadata().equals( other.internalGetMetadata())) 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 (hasService()) { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } if (hasNamespace()) { hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; hash = (53 * hash) + getNamespace().hashCode(); } if (!internalGetMetadata().getMap().isEmpty()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.tencent.polaris.client.pb.RoutingProto.Source parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Source parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Source parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Source parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Source parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Source parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Source parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Source 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 com.tencent.polaris.client.pb.RoutingProto.Source parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Source 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 com.tencent.polaris.client.pb.RoutingProto.Source parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Source 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(com.tencent.polaris.client.pb.RoutingProto.Source 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 v1.Source} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:v1.Source) com.tencent.polaris.client.pb.RoutingProto.SourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Source_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: return internalGetMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 3: return internalGetMutableMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Source_fieldAccessorTable .ensureFieldAccessorsInitialized( com.tencent.polaris.client.pb.RoutingProto.Source.class, com.tencent.polaris.client.pb.RoutingProto.Source.Builder.class); } // Construct using com.tencent.polaris.client.pb.RoutingProto.Source.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 (serviceBuilder_ == null) { service_ = null; } else { service_ = null; serviceBuilder_ = null; } if (namespaceBuilder_ == null) { namespace_ = null; } else { namespace_ = null; namespaceBuilder_ = null; } internalGetMutableMetadata().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Source_descriptor; } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Source getDefaultInstanceForType() { return com.tencent.polaris.client.pb.RoutingProto.Source.getDefaultInstance(); } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Source build() { com.tencent.polaris.client.pb.RoutingProto.Source result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Source buildPartial() { com.tencent.polaris.client.pb.RoutingProto.Source result = new com.tencent.polaris.client.pb.RoutingProto.Source(this); int from_bitField0_ = bitField0_; if (serviceBuilder_ == null) { result.service_ = service_; } else { result.service_ = serviceBuilder_.build(); } if (namespaceBuilder_ == null) { result.namespace_ = namespace_; } else { result.namespace_ = namespaceBuilder_.build(); } result.metadata_ = internalGetMetadata(); result.metadata_.makeImmutable(); 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 com.tencent.polaris.client.pb.RoutingProto.Source) { return mergeFrom((com.tencent.polaris.client.pb.RoutingProto.Source)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.tencent.polaris.client.pb.RoutingProto.Source other) { if (other == com.tencent.polaris.client.pb.RoutingProto.Source.getDefaultInstance()) return this; if (other.hasService()) { mergeService(other.getService()); } if (other.hasNamespace()) { mergeNamespace(other.getNamespace()); } internalGetMutableMetadata().mergeFrom( other.internalGetMetadata()); 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 { com.tencent.polaris.client.pb.RoutingProto.Source parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.tencent.polaris.client.pb.RoutingProto.Source) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.StringValue service_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceBuilder_; /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ public boolean hasService() { return serviceBuilder_ != null || service_ != null; } /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ public com.google.protobuf.StringValue getService() { if (serviceBuilder_ == null) { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } else { return serviceBuilder_.getMessage(); } } /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder setService(com.google.protobuf.StringValue value) { if (serviceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } service_ = value; onChanged(); } else { serviceBuilder_.setMessage(value); } return this; } /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder setService( com.google.protobuf.StringValue.Builder builderForValue) { if (serviceBuilder_ == null) { service_ = builderForValue.build(); onChanged(); } else { serviceBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder mergeService(com.google.protobuf.StringValue value) { if (serviceBuilder_ == null) { if (service_ != null) { service_ = com.google.protobuf.StringValue.newBuilder(service_).mergeFrom(value).buildPartial(); } else { service_ = value; } onChanged(); } else { serviceBuilder_.mergeFrom(value); } return this; } /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder clearService() { if (serviceBuilder_ == null) { service_ = null; onChanged(); } else { service_ = null; serviceBuilder_ = null; } return this; } /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public com.google.protobuf.StringValue.Builder getServiceBuilder() { onChanged(); return getServiceFieldBuilder().getBuilder(); } /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() { if (serviceBuilder_ != null) { return serviceBuilder_.getMessageOrBuilder(); } else { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } } /** *
       * 主调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getServiceFieldBuilder() { if (serviceBuilder_ == null) { serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getService(), getParentForChildren(), isClean()); service_ = null; } return serviceBuilder_; } private com.google.protobuf.StringValue namespace_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> namespaceBuilder_; /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ public boolean hasNamespace() { return namespaceBuilder_ != null || namespace_ != null; } /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ public com.google.protobuf.StringValue getNamespace() { if (namespaceBuilder_ == null) { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } else { return namespaceBuilder_.getMessage(); } } /** * .google.protobuf.StringValue namespace = 2; */ public Builder setNamespace(com.google.protobuf.StringValue value) { if (namespaceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } namespace_ = value; onChanged(); } else { namespaceBuilder_.setMessage(value); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder setNamespace( com.google.protobuf.StringValue.Builder builderForValue) { if (namespaceBuilder_ == null) { namespace_ = builderForValue.build(); onChanged(); } else { namespaceBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder mergeNamespace(com.google.protobuf.StringValue value) { if (namespaceBuilder_ == null) { if (namespace_ != null) { namespace_ = com.google.protobuf.StringValue.newBuilder(namespace_).mergeFrom(value).buildPartial(); } else { namespace_ = value; } onChanged(); } else { namespaceBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder clearNamespace() { if (namespaceBuilder_ == null) { namespace_ = null; onChanged(); } else { namespace_ = null; namespaceBuilder_ = null; } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public com.google.protobuf.StringValue.Builder getNamespaceBuilder() { onChanged(); return getNamespaceFieldBuilder().getBuilder(); } /** * .google.protobuf.StringValue namespace = 2; */ public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() { if (namespaceBuilder_ != null) { return namespaceBuilder_.getMessageOrBuilder(); } else { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } } /** * .google.protobuf.StringValue namespace = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getNamespaceFieldBuilder() { if (namespaceBuilder_ == null) { namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getNamespace(), getParentForChildren(), isClean()); namespace_ = null; } return namespaceBuilder_; } private com.google.protobuf.MapField< java.lang.String, com.tencent.polaris.client.pb.ModelProto.MatchString> metadata_; private com.google.protobuf.MapField internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField( MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } private com.google.protobuf.MapField internalGetMutableMetadata() { onChanged();; if (metadata_ == null) { metadata_ = com.google.protobuf.MapField.newMapField( MetadataDefaultEntryHolder.defaultEntry); } if (!metadata_.isMutable()) { metadata_ = metadata_.copy(); } return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** *
       * 主调方服务实例标签或者请求标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public boolean containsMetadata( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetMetadata().getMap().containsKey(key); } /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); } /** *
       * 主调方服务实例标签或者请求标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } /** *
       * 主调方服务实例标签或者请求标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrDefault( java.lang.String key, com.tencent.polaris.client.pb.ModelProto.MatchString defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
       * 主调方服务实例标签或者请求标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearMetadata() { internalGetMutableMetadata().getMutableMap() .clear(); return this; } /** *
       * 主调方服务实例标签或者请求标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ public Builder removeMetadata( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableMetadata().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableMetadata() { return internalGetMutableMetadata().getMutableMap(); } /** *
       * 主调方服务实例标签或者请求标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ public Builder putMetadata( java.lang.String key, com.tencent.polaris.client.pb.ModelProto.MatchString value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableMetadata().getMutableMap() .put(key, value); return this; } /** *
       * 主调方服务实例标签或者请求标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ public Builder putAllMetadata( java.util.Map values) { internalGetMutableMetadata().getMutableMap() .putAll(values); 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:v1.Source) } // @@protoc_insertion_point(class_scope:v1.Source) private static final com.tencent.polaris.client.pb.RoutingProto.Source DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.tencent.polaris.client.pb.RoutingProto.Source(); } public static com.tencent.polaris.client.pb.RoutingProto.Source getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Source parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Source(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 com.tencent.polaris.client.pb.RoutingProto.Source getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DestinationOrBuilder extends // @@protoc_insertion_point(interface_extends:v1.Destination) com.google.protobuf.MessageOrBuilder { /** *
     * 被调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ boolean hasService(); /** *
     * 被调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ com.google.protobuf.StringValue getService(); /** *
     * 被调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; */ com.google.protobuf.StringValueOrBuilder getServiceOrBuilder(); /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ boolean hasNamespace(); /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ com.google.protobuf.StringValue getNamespace(); /** * .google.protobuf.StringValue namespace = 2; */ com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder(); /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ int getMetadataCount(); /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ boolean containsMetadata( java.lang.String key); /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Deprecated java.util.Map getMetadata(); /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ java.util.Map getMetadataMap(); /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrDefault( java.lang.String key, com.tencent.polaris.client.pb.ModelProto.MatchString defaultValue); /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrThrow( java.lang.String key); /** *
     * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
     * 服务实例子集可以设置优先级和权重
     * 优先级:整型,范围[0, 9],最高优先级为0
     * 权重:整型
     * 先按优先级路由,如果存在高优先级,不会使用低优先级
     * 如果存在优先级相同的子集,再按权重分配
     * 优先级和权重可以都不设置/设置一个/设置两个
     * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
     * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
     * 如果全部没有设置权重,认为权重相同
     * 
* * .google.protobuf.UInt32Value priority = 4; * @return Whether the priority field is set. */ boolean hasPriority(); /** *
     * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
     * 服务实例子集可以设置优先级和权重
     * 优先级:整型,范围[0, 9],最高优先级为0
     * 权重:整型
     * 先按优先级路由,如果存在高优先级,不会使用低优先级
     * 如果存在优先级相同的子集,再按权重分配
     * 优先级和权重可以都不设置/设置一个/设置两个
     * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
     * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
     * 如果全部没有设置权重,认为权重相同
     * 
* * .google.protobuf.UInt32Value priority = 4; * @return The priority. */ com.google.protobuf.UInt32Value getPriority(); /** *
     * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
     * 服务实例子集可以设置优先级和权重
     * 优先级:整型,范围[0, 9],最高优先级为0
     * 权重:整型
     * 先按优先级路由,如果存在高优先级,不会使用低优先级
     * 如果存在优先级相同的子集,再按权重分配
     * 优先级和权重可以都不设置/设置一个/设置两个
     * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
     * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
     * 如果全部没有设置权重,认为权重相同
     * 
* * .google.protobuf.UInt32Value priority = 4; */ com.google.protobuf.UInt32ValueOrBuilder getPriorityOrBuilder(); /** * .google.protobuf.UInt32Value weight = 5; * @return Whether the weight field is set. */ boolean hasWeight(); /** * .google.protobuf.UInt32Value weight = 5; * @return The weight. */ com.google.protobuf.UInt32Value getWeight(); /** * .google.protobuf.UInt32Value weight = 5; */ com.google.protobuf.UInt32ValueOrBuilder getWeightOrBuilder(); /** *
     * 将请求转发到代理服务
     * 
* * .google.protobuf.StringValue transfer = 6; * @return Whether the transfer field is set. */ boolean hasTransfer(); /** *
     * 将请求转发到代理服务
     * 
* * .google.protobuf.StringValue transfer = 6; * @return The transfer. */ com.google.protobuf.StringValue getTransfer(); /** *
     * 将请求转发到代理服务
     * 
* * .google.protobuf.StringValue transfer = 6; */ com.google.protobuf.StringValueOrBuilder getTransferOrBuilder(); /** *
     *是否对该set执行隔离,隔离后,不会再分配流量
     * 
* * .google.protobuf.BoolValue isolate = 7; * @return Whether the isolate field is set. */ boolean hasIsolate(); /** *
     *是否对该set执行隔离,隔离后,不会再分配流量
     * 
* * .google.protobuf.BoolValue isolate = 7; * @return The isolate. */ com.google.protobuf.BoolValue getIsolate(); /** *
     *是否对该set执行隔离,隔离后,不会再分配流量
     * 
* * .google.protobuf.BoolValue isolate = 7; */ com.google.protobuf.BoolValueOrBuilder getIsolateOrBuilder(); } /** * Protobuf type {@code v1.Destination} */ public static final class Destination extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:v1.Destination) DestinationOrBuilder { private static final long serialVersionUID = 0L; // Use Destination.newBuilder() to construct. private Destination(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Destination() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Destination(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Destination( 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: { com.google.protobuf.StringValue.Builder subBuilder = null; if (service_ != null) { subBuilder = service_.toBuilder(); } service_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(service_); service_ = subBuilder.buildPartial(); } break; } case 18: { com.google.protobuf.StringValue.Builder subBuilder = null; if (namespace_ != null) { subBuilder = namespace_.toBuilder(); } namespace_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(namespace_); namespace_ = subBuilder.buildPartial(); } break; } case 26: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { metadata_ = com.google.protobuf.MapField.newMapField( MetadataDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry metadata__ = input.readMessage( MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); metadata_.getMutableMap().put( metadata__.getKey(), metadata__.getValue()); break; } case 34: { com.google.protobuf.UInt32Value.Builder subBuilder = null; if (priority_ != null) { subBuilder = priority_.toBuilder(); } priority_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(priority_); priority_ = subBuilder.buildPartial(); } break; } case 42: { com.google.protobuf.UInt32Value.Builder subBuilder = null; if (weight_ != null) { subBuilder = weight_.toBuilder(); } weight_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(weight_); weight_ = subBuilder.buildPartial(); } break; } case 50: { com.google.protobuf.StringValue.Builder subBuilder = null; if (transfer_ != null) { subBuilder = transfer_.toBuilder(); } transfer_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(transfer_); transfer_ = subBuilder.buildPartial(); } break; } case 58: { com.google.protobuf.BoolValue.Builder subBuilder = null; if (isolate_ != null) { subBuilder = isolate_.toBuilder(); } isolate_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(isolate_); isolate_ = 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 com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Destination_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: return internalGetMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Destination_fieldAccessorTable .ensureFieldAccessorsInitialized( com.tencent.polaris.client.pb.RoutingProto.Destination.class, com.tencent.polaris.client.pb.RoutingProto.Destination.Builder.class); } public static final int SERVICE_FIELD_NUMBER = 1; private com.google.protobuf.StringValue service_; /** *
     * 被调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ @java.lang.Override public boolean hasService() { return service_ != null; } /** *
     * 被调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ @java.lang.Override public com.google.protobuf.StringValue getService() { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } /** *
     * 被调方服务以及命名空间
     * 
* * .google.protobuf.StringValue service = 1; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() { return getService(); } public static final int NAMESPACE_FIELD_NUMBER = 2; private com.google.protobuf.StringValue namespace_; /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ @java.lang.Override public boolean hasNamespace() { return namespace_ != null; } /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ @java.lang.Override public com.google.protobuf.StringValue getNamespace() { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } /** * .google.protobuf.StringValue namespace = 2; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() { return getNamespace(); } public static final int METADATA_FIELD_NUMBER = 3; private static final class MetadataDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.tencent.polaris.client.pb.ModelProto.MatchString> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Destination_MetadataEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.tencent.polaris.client.pb.ModelProto.MatchString.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.String, com.tencent.polaris.client.pb.ModelProto.MatchString> metadata_; private com.google.protobuf.MapField internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField( MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public boolean containsMetadata( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetMetadata().getMap().containsKey(key); } /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); } /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrDefault( java.lang.String key, com.tencent.polaris.client.pb.ModelProto.MatchString defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * 被调方服务实例标签
     * value支持正则匹配
     * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int PRIORITY_FIELD_NUMBER = 4; private com.google.protobuf.UInt32Value priority_; /** *
     * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
     * 服务实例子集可以设置优先级和权重
     * 优先级:整型,范围[0, 9],最高优先级为0
     * 权重:整型
     * 先按优先级路由,如果存在高优先级,不会使用低优先级
     * 如果存在优先级相同的子集,再按权重分配
     * 优先级和权重可以都不设置/设置一个/设置两个
     * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
     * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
     * 如果全部没有设置权重,认为权重相同
     * 
* * .google.protobuf.UInt32Value priority = 4; * @return Whether the priority field is set. */ @java.lang.Override public boolean hasPriority() { return priority_ != null; } /** *
     * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
     * 服务实例子集可以设置优先级和权重
     * 优先级:整型,范围[0, 9],最高优先级为0
     * 权重:整型
     * 先按优先级路由,如果存在高优先级,不会使用低优先级
     * 如果存在优先级相同的子集,再按权重分配
     * 优先级和权重可以都不设置/设置一个/设置两个
     * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
     * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
     * 如果全部没有设置权重,认为权重相同
     * 
* * .google.protobuf.UInt32Value priority = 4; * @return The priority. */ @java.lang.Override public com.google.protobuf.UInt32Value getPriority() { return priority_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : priority_; } /** *
     * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
     * 服务实例子集可以设置优先级和权重
     * 优先级:整型,范围[0, 9],最高优先级为0
     * 权重:整型
     * 先按优先级路由,如果存在高优先级,不会使用低优先级
     * 如果存在优先级相同的子集,再按权重分配
     * 优先级和权重可以都不设置/设置一个/设置两个
     * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
     * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
     * 如果全部没有设置权重,认为权重相同
     * 
* * .google.protobuf.UInt32Value priority = 4; */ @java.lang.Override public com.google.protobuf.UInt32ValueOrBuilder getPriorityOrBuilder() { return getPriority(); } public static final int WEIGHT_FIELD_NUMBER = 5; private com.google.protobuf.UInt32Value weight_; /** * .google.protobuf.UInt32Value weight = 5; * @return Whether the weight field is set. */ @java.lang.Override public boolean hasWeight() { return weight_ != null; } /** * .google.protobuf.UInt32Value weight = 5; * @return The weight. */ @java.lang.Override public com.google.protobuf.UInt32Value getWeight() { return weight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : weight_; } /** * .google.protobuf.UInt32Value weight = 5; */ @java.lang.Override public com.google.protobuf.UInt32ValueOrBuilder getWeightOrBuilder() { return getWeight(); } public static final int TRANSFER_FIELD_NUMBER = 6; private com.google.protobuf.StringValue transfer_; /** *
     * 将请求转发到代理服务
     * 
* * .google.protobuf.StringValue transfer = 6; * @return Whether the transfer field is set. */ @java.lang.Override public boolean hasTransfer() { return transfer_ != null; } /** *
     * 将请求转发到代理服务
     * 
* * .google.protobuf.StringValue transfer = 6; * @return The transfer. */ @java.lang.Override public com.google.protobuf.StringValue getTransfer() { return transfer_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : transfer_; } /** *
     * 将请求转发到代理服务
     * 
* * .google.protobuf.StringValue transfer = 6; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getTransferOrBuilder() { return getTransfer(); } public static final int ISOLATE_FIELD_NUMBER = 7; private com.google.protobuf.BoolValue isolate_; /** *
     *是否对该set执行隔离,隔离后,不会再分配流量
     * 
* * .google.protobuf.BoolValue isolate = 7; * @return Whether the isolate field is set. */ @java.lang.Override public boolean hasIsolate() { return isolate_ != null; } /** *
     *是否对该set执行隔离,隔离后,不会再分配流量
     * 
* * .google.protobuf.BoolValue isolate = 7; * @return The isolate. */ @java.lang.Override public com.google.protobuf.BoolValue getIsolate() { return isolate_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : isolate_; } /** *
     *是否对该set执行隔离,隔离后,不会再分配流量
     * 
* * .google.protobuf.BoolValue isolate = 7; */ @java.lang.Override public com.google.protobuf.BoolValueOrBuilder getIsolateOrBuilder() { return getIsolate(); } 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 (service_ != null) { output.writeMessage(1, getService()); } if (namespace_ != null) { output.writeMessage(2, getNamespace()); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 3); if (priority_ != null) { output.writeMessage(4, getPriority()); } if (weight_ != null) { output.writeMessage(5, getWeight()); } if (transfer_ != null) { output.writeMessage(6, getTransfer()); } if (isolate_ != null) { output.writeMessage(7, getIsolate()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (service_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getService()); } if (namespace_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getNamespace()); } for (java.util.Map.Entry entry : internalGetMetadata().getMap().entrySet()) { com.google.protobuf.MapEntry metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, metadata__); } if (priority_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getPriority()); } if (weight_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getWeight()); } if (transfer_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getTransfer()); } if (isolate_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getIsolate()); } 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 com.tencent.polaris.client.pb.RoutingProto.Destination)) { return super.equals(obj); } com.tencent.polaris.client.pb.RoutingProto.Destination other = (com.tencent.polaris.client.pb.RoutingProto.Destination) obj; if (hasService() != other.hasService()) return false; if (hasService()) { if (!getService() .equals(other.getService())) return false; } if (hasNamespace() != other.hasNamespace()) return false; if (hasNamespace()) { if (!getNamespace() .equals(other.getNamespace())) return false; } if (!internalGetMetadata().equals( other.internalGetMetadata())) return false; if (hasPriority() != other.hasPriority()) return false; if (hasPriority()) { if (!getPriority() .equals(other.getPriority())) return false; } if (hasWeight() != other.hasWeight()) return false; if (hasWeight()) { if (!getWeight() .equals(other.getWeight())) return false; } if (hasTransfer() != other.hasTransfer()) return false; if (hasTransfer()) { if (!getTransfer() .equals(other.getTransfer())) return false; } if (hasIsolate() != other.hasIsolate()) return false; if (hasIsolate()) { if (!getIsolate() .equals(other.getIsolate())) 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 (hasService()) { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } if (hasNamespace()) { hash = (37 * hash) + NAMESPACE_FIELD_NUMBER; hash = (53 * hash) + getNamespace().hashCode(); } if (!internalGetMetadata().getMap().isEmpty()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } if (hasPriority()) { hash = (37 * hash) + PRIORITY_FIELD_NUMBER; hash = (53 * hash) + getPriority().hashCode(); } if (hasWeight()) { hash = (37 * hash) + WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getWeight().hashCode(); } if (hasTransfer()) { hash = (37 * hash) + TRANSFER_FIELD_NUMBER; hash = (53 * hash) + getTransfer().hashCode(); } if (hasIsolate()) { hash = (37 * hash) + ISOLATE_FIELD_NUMBER; hash = (53 * hash) + getIsolate().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.tencent.polaris.client.pb.RoutingProto.Destination parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Destination parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Destination parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Destination parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Destination parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.tencent.polaris.client.pb.RoutingProto.Destination parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.tencent.polaris.client.pb.RoutingProto.Destination parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Destination 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 com.tencent.polaris.client.pb.RoutingProto.Destination parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Destination 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 com.tencent.polaris.client.pb.RoutingProto.Destination parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.tencent.polaris.client.pb.RoutingProto.Destination 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(com.tencent.polaris.client.pb.RoutingProto.Destination 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 v1.Destination} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:v1.Destination) com.tencent.polaris.client.pb.RoutingProto.DestinationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Destination_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 3: return internalGetMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 3: return internalGetMutableMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Destination_fieldAccessorTable .ensureFieldAccessorsInitialized( com.tencent.polaris.client.pb.RoutingProto.Destination.class, com.tencent.polaris.client.pb.RoutingProto.Destination.Builder.class); } // Construct using com.tencent.polaris.client.pb.RoutingProto.Destination.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 (serviceBuilder_ == null) { service_ = null; } else { service_ = null; serviceBuilder_ = null; } if (namespaceBuilder_ == null) { namespace_ = null; } else { namespace_ = null; namespaceBuilder_ = null; } internalGetMutableMetadata().clear(); if (priorityBuilder_ == null) { priority_ = null; } else { priority_ = null; priorityBuilder_ = null; } if (weightBuilder_ == null) { weight_ = null; } else { weight_ = null; weightBuilder_ = null; } if (transferBuilder_ == null) { transfer_ = null; } else { transfer_ = null; transferBuilder_ = null; } if (isolateBuilder_ == null) { isolate_ = null; } else { isolate_ = null; isolateBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.tencent.polaris.client.pb.RoutingProto.internal_static_v1_Destination_descriptor; } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Destination getDefaultInstanceForType() { return com.tencent.polaris.client.pb.RoutingProto.Destination.getDefaultInstance(); } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Destination build() { com.tencent.polaris.client.pb.RoutingProto.Destination result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.tencent.polaris.client.pb.RoutingProto.Destination buildPartial() { com.tencent.polaris.client.pb.RoutingProto.Destination result = new com.tencent.polaris.client.pb.RoutingProto.Destination(this); int from_bitField0_ = bitField0_; if (serviceBuilder_ == null) { result.service_ = service_; } else { result.service_ = serviceBuilder_.build(); } if (namespaceBuilder_ == null) { result.namespace_ = namespace_; } else { result.namespace_ = namespaceBuilder_.build(); } result.metadata_ = internalGetMetadata(); result.metadata_.makeImmutable(); if (priorityBuilder_ == null) { result.priority_ = priority_; } else { result.priority_ = priorityBuilder_.build(); } if (weightBuilder_ == null) { result.weight_ = weight_; } else { result.weight_ = weightBuilder_.build(); } if (transferBuilder_ == null) { result.transfer_ = transfer_; } else { result.transfer_ = transferBuilder_.build(); } if (isolateBuilder_ == null) { result.isolate_ = isolate_; } else { result.isolate_ = isolateBuilder_.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 com.tencent.polaris.client.pb.RoutingProto.Destination) { return mergeFrom((com.tencent.polaris.client.pb.RoutingProto.Destination)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.tencent.polaris.client.pb.RoutingProto.Destination other) { if (other == com.tencent.polaris.client.pb.RoutingProto.Destination.getDefaultInstance()) return this; if (other.hasService()) { mergeService(other.getService()); } if (other.hasNamespace()) { mergeNamespace(other.getNamespace()); } internalGetMutableMetadata().mergeFrom( other.internalGetMetadata()); if (other.hasPriority()) { mergePriority(other.getPriority()); } if (other.hasWeight()) { mergeWeight(other.getWeight()); } if (other.hasTransfer()) { mergeTransfer(other.getTransfer()); } if (other.hasIsolate()) { mergeIsolate(other.getIsolate()); } 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 { com.tencent.polaris.client.pb.RoutingProto.Destination parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.tencent.polaris.client.pb.RoutingProto.Destination) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.StringValue service_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceBuilder_; /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; * @return Whether the service field is set. */ public boolean hasService() { return serviceBuilder_ != null || service_ != null; } /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; * @return The service. */ public com.google.protobuf.StringValue getService() { if (serviceBuilder_ == null) { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } else { return serviceBuilder_.getMessage(); } } /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder setService(com.google.protobuf.StringValue value) { if (serviceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } service_ = value; onChanged(); } else { serviceBuilder_.setMessage(value); } return this; } /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder setService( com.google.protobuf.StringValue.Builder builderForValue) { if (serviceBuilder_ == null) { service_ = builderForValue.build(); onChanged(); } else { serviceBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder mergeService(com.google.protobuf.StringValue value) { if (serviceBuilder_ == null) { if (service_ != null) { service_ = com.google.protobuf.StringValue.newBuilder(service_).mergeFrom(value).buildPartial(); } else { service_ = value; } onChanged(); } else { serviceBuilder_.mergeFrom(value); } return this; } /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public Builder clearService() { if (serviceBuilder_ == null) { service_ = null; onChanged(); } else { service_ = null; serviceBuilder_ = null; } return this; } /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public com.google.protobuf.StringValue.Builder getServiceBuilder() { onChanged(); return getServiceFieldBuilder().getBuilder(); } /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() { if (serviceBuilder_ != null) { return serviceBuilder_.getMessageOrBuilder(); } else { return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_; } } /** *
       * 被调方服务以及命名空间
       * 
* * .google.protobuf.StringValue service = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getServiceFieldBuilder() { if (serviceBuilder_ == null) { serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getService(), getParentForChildren(), isClean()); service_ = null; } return serviceBuilder_; } private com.google.protobuf.StringValue namespace_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> namespaceBuilder_; /** * .google.protobuf.StringValue namespace = 2; * @return Whether the namespace field is set. */ public boolean hasNamespace() { return namespaceBuilder_ != null || namespace_ != null; } /** * .google.protobuf.StringValue namespace = 2; * @return The namespace. */ public com.google.protobuf.StringValue getNamespace() { if (namespaceBuilder_ == null) { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } else { return namespaceBuilder_.getMessage(); } } /** * .google.protobuf.StringValue namespace = 2; */ public Builder setNamespace(com.google.protobuf.StringValue value) { if (namespaceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } namespace_ = value; onChanged(); } else { namespaceBuilder_.setMessage(value); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder setNamespace( com.google.protobuf.StringValue.Builder builderForValue) { if (namespaceBuilder_ == null) { namespace_ = builderForValue.build(); onChanged(); } else { namespaceBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder mergeNamespace(com.google.protobuf.StringValue value) { if (namespaceBuilder_ == null) { if (namespace_ != null) { namespace_ = com.google.protobuf.StringValue.newBuilder(namespace_).mergeFrom(value).buildPartial(); } else { namespace_ = value; } onChanged(); } else { namespaceBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public Builder clearNamespace() { if (namespaceBuilder_ == null) { namespace_ = null; onChanged(); } else { namespace_ = null; namespaceBuilder_ = null; } return this; } /** * .google.protobuf.StringValue namespace = 2; */ public com.google.protobuf.StringValue.Builder getNamespaceBuilder() { onChanged(); return getNamespaceFieldBuilder().getBuilder(); } /** * .google.protobuf.StringValue namespace = 2; */ public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() { if (namespaceBuilder_ != null) { return namespaceBuilder_.getMessageOrBuilder(); } else { return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_; } } /** * .google.protobuf.StringValue namespace = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getNamespaceFieldBuilder() { if (namespaceBuilder_ == null) { namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getNamespace(), getParentForChildren(), isClean()); namespace_ = null; } return namespaceBuilder_; } private com.google.protobuf.MapField< java.lang.String, com.tencent.polaris.client.pb.ModelProto.MatchString> metadata_; private com.google.protobuf.MapField internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField( MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } private com.google.protobuf.MapField internalGetMutableMetadata() { onChanged();; if (metadata_ == null) { metadata_ = com.google.protobuf.MapField.newMapField( MetadataDefaultEntryHolder.defaultEntry); } if (!metadata_.isMutable()) { metadata_ = metadata_.copy(); } return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** *
       * 被调方服务实例标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public boolean containsMetadata( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetMetadata().getMap().containsKey(key); } /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); } /** *
       * 被调方服务实例标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } /** *
       * 被调方服务实例标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrDefault( java.lang.String key, com.tencent.polaris.client.pb.ModelProto.MatchString defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
       * 被调方服务实例标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ @java.lang.Override public com.tencent.polaris.client.pb.ModelProto.MatchString getMetadataOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearMetadata() { internalGetMutableMetadata().getMutableMap() .clear(); return this; } /** *
       * 被调方服务实例标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ public Builder removeMetadata( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableMetadata().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableMetadata() { return internalGetMutableMetadata().getMutableMap(); } /** *
       * 被调方服务实例标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ public Builder putMetadata( java.lang.String key, com.tencent.polaris.client.pb.ModelProto.MatchString value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableMetadata().getMutableMap() .put(key, value); return this; } /** *
       * 被调方服务实例标签
       * value支持正则匹配
       * 
* * map<string, .v1.MatchString> metadata = 3; */ public Builder putAllMetadata( java.util.Map values) { internalGetMutableMetadata().getMutableMap() .putAll(values); return this; } private com.google.protobuf.UInt32Value priority_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> priorityBuilder_; /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; * @return Whether the priority field is set. */ public boolean hasPriority() { return priorityBuilder_ != null || priority_ != null; } /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; * @return The priority. */ public com.google.protobuf.UInt32Value getPriority() { if (priorityBuilder_ == null) { return priority_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : priority_; } else { return priorityBuilder_.getMessage(); } } /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; */ public Builder setPriority(com.google.protobuf.UInt32Value value) { if (priorityBuilder_ == null) { if (value == null) { throw new NullPointerException(); } priority_ = value; onChanged(); } else { priorityBuilder_.setMessage(value); } return this; } /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; */ public Builder setPriority( com.google.protobuf.UInt32Value.Builder builderForValue) { if (priorityBuilder_ == null) { priority_ = builderForValue.build(); onChanged(); } else { priorityBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; */ public Builder mergePriority(com.google.protobuf.UInt32Value value) { if (priorityBuilder_ == null) { if (priority_ != null) { priority_ = com.google.protobuf.UInt32Value.newBuilder(priority_).mergeFrom(value).buildPartial(); } else { priority_ = value; } onChanged(); } else { priorityBuilder_.mergeFrom(value); } return this; } /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; */ public Builder clearPriority() { if (priorityBuilder_ == null) { priority_ = null; onChanged(); } else { priority_ = null; priorityBuilder_ = null; } return this; } /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; */ public com.google.protobuf.UInt32Value.Builder getPriorityBuilder() { onChanged(); return getPriorityFieldBuilder().getBuilder(); } /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; */ public com.google.protobuf.UInt32ValueOrBuilder getPriorityOrBuilder() { if (priorityBuilder_ != null) { return priorityBuilder_.getMessageOrBuilder(); } else { return priority_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : priority_; } } /** *
       * 根据服务名和服务实例metadata筛选符合条件的服务实例子集
       * 服务实例子集可以设置优先级和权重
       * 优先级:整型,范围[0, 9],最高优先级为0
       * 权重:整型
       * 先按优先级路由,如果存在高优先级,不会使用低优先级
       * 如果存在优先级相同的子集,再按权重分配
       * 优先级和权重可以都不设置/设置一个/设置两个
       * 如果部分设置优先级,部分没有设置,认为没有设置的优先级最低
       * 如果部分设置权重,部分没有设置,认为没有设置的权重为0
       * 如果全部没有设置权重,认为权重相同
       * 
* * .google.protobuf.UInt32Value priority = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getPriorityFieldBuilder() { if (priorityBuilder_ == null) { priorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getPriority(), getParentForChildren(), isClean()); priority_ = null; } return priorityBuilder_; } private com.google.protobuf.UInt32Value weight_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> weightBuilder_; /** * .google.protobuf.UInt32Value weight = 5; * @return Whether the weight field is set. */ public boolean hasWeight() { return weightBuilder_ != null || weight_ != null; } /** * .google.protobuf.UInt32Value weight = 5; * @return The weight. */ public com.google.protobuf.UInt32Value getWeight() { if (weightBuilder_ == null) { return weight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : weight_; } else { return weightBuilder_.getMessage(); } } /** * .google.protobuf.UInt32Value weight = 5; */ public Builder setWeight(com.google.protobuf.UInt32Value value) { if (weightBuilder_ == null) { if (value == null) { throw new NullPointerException(); } weight_ = value; onChanged(); } else { weightBuilder_.setMessage(value); } return this; } /** * .google.protobuf.UInt32Value weight = 5; */ public Builder setWeight( com.google.protobuf.UInt32Value.Builder builderForValue) { if (weightBuilder_ == null) { weight_ = builderForValue.build(); onChanged(); } else { weightBuilder_.setMessage(builderForValue.build()); } return this; } /** * .google.protobuf.UInt32Value weight = 5; */ public Builder mergeWeight(com.google.protobuf.UInt32Value value) { if (weightBuilder_ == null) { if (weight_ != null) { weight_ = com.google.protobuf.UInt32Value.newBuilder(weight_).mergeFrom(value).buildPartial(); } else { weight_ = value; } onChanged(); } else { weightBuilder_.mergeFrom(value); } return this; } /** * .google.protobuf.UInt32Value weight = 5; */ public Builder clearWeight() { if (weightBuilder_ == null) { weight_ = null; onChanged(); } else { weight_ = null; weightBuilder_ = null; } return this; } /** * .google.protobuf.UInt32Value weight = 5; */ public com.google.protobuf.UInt32Value.Builder getWeightBuilder() { onChanged(); return getWeightFieldBuilder().getBuilder(); } /** * .google.protobuf.UInt32Value weight = 5; */ public com.google.protobuf.UInt32ValueOrBuilder getWeightOrBuilder() { if (weightBuilder_ != null) { return weightBuilder_.getMessageOrBuilder(); } else { return weight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : weight_; } } /** * .google.protobuf.UInt32Value weight = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getWeightFieldBuilder() { if (weightBuilder_ == null) { weightBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getWeight(), getParentForChildren(), isClean()); weight_ = null; } return weightBuilder_; } private com.google.protobuf.StringValue transfer_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> transferBuilder_; /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; * @return Whether the transfer field is set. */ public boolean hasTransfer() { return transferBuilder_ != null || transfer_ != null; } /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; * @return The transfer. */ public com.google.protobuf.StringValue getTransfer() { if (transferBuilder_ == null) { return transfer_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : transfer_; } else { return transferBuilder_.getMessage(); } } /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; */ public Builder setTransfer(com.google.protobuf.StringValue value) { if (transferBuilder_ == null) { if (value == null) { throw new NullPointerException(); } transfer_ = value; onChanged(); } else { transferBuilder_.setMessage(value); } return this; } /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; */ public Builder setTransfer( com.google.protobuf.StringValue.Builder builderForValue) { if (transferBuilder_ == null) { transfer_ = builderForValue.build(); onChanged(); } else { transferBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; */ public Builder mergeTransfer(com.google.protobuf.StringValue value) { if (transferBuilder_ == null) { if (transfer_ != null) { transfer_ = com.google.protobuf.StringValue.newBuilder(transfer_).mergeFrom(value).buildPartial(); } else { transfer_ = value; } onChanged(); } else { transferBuilder_.mergeFrom(value); } return this; } /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; */ public Builder clearTransfer() { if (transferBuilder_ == null) { transfer_ = null; onChanged(); } else { transfer_ = null; transferBuilder_ = null; } return this; } /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; */ public com.google.protobuf.StringValue.Builder getTransferBuilder() { onChanged(); return getTransferFieldBuilder().getBuilder(); } /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; */ public com.google.protobuf.StringValueOrBuilder getTransferOrBuilder() { if (transferBuilder_ != null) { return transferBuilder_.getMessageOrBuilder(); } else { return transfer_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : transfer_; } } /** *
       * 将请求转发到代理服务
       * 
* * .google.protobuf.StringValue transfer = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getTransferFieldBuilder() { if (transferBuilder_ == null) { transferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getTransfer(), getParentForChildren(), isClean()); transfer_ = null; } return transferBuilder_; } private com.google.protobuf.BoolValue isolate_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> isolateBuilder_; /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; * @return Whether the isolate field is set. */ public boolean hasIsolate() { return isolateBuilder_ != null || isolate_ != null; } /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; * @return The isolate. */ public com.google.protobuf.BoolValue getIsolate() { if (isolateBuilder_ == null) { return isolate_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : isolate_; } else { return isolateBuilder_.getMessage(); } } /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; */ public Builder setIsolate(com.google.protobuf.BoolValue value) { if (isolateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } isolate_ = value; onChanged(); } else { isolateBuilder_.setMessage(value); } return this; } /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; */ public Builder setIsolate( com.google.protobuf.BoolValue.Builder builderForValue) { if (isolateBuilder_ == null) { isolate_ = builderForValue.build(); onChanged(); } else { isolateBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; */ public Builder mergeIsolate(com.google.protobuf.BoolValue value) { if (isolateBuilder_ == null) { if (isolate_ != null) { isolate_ = com.google.protobuf.BoolValue.newBuilder(isolate_).mergeFrom(value).buildPartial(); } else { isolate_ = value; } onChanged(); } else { isolateBuilder_.mergeFrom(value); } return this; } /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; */ public Builder clearIsolate() { if (isolateBuilder_ == null) { isolate_ = null; onChanged(); } else { isolate_ = null; isolateBuilder_ = null; } return this; } /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; */ public com.google.protobuf.BoolValue.Builder getIsolateBuilder() { onChanged(); return getIsolateFieldBuilder().getBuilder(); } /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; */ public com.google.protobuf.BoolValueOrBuilder getIsolateOrBuilder() { if (isolateBuilder_ != null) { return isolateBuilder_.getMessageOrBuilder(); } else { return isolate_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : isolate_; } } /** *
       *是否对该set执行隔离,隔离后,不会再分配流量
       * 
* * .google.protobuf.BoolValue isolate = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> getIsolateFieldBuilder() { if (isolateBuilder_ == null) { isolateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( getIsolate(), getParentForChildren(), isClean()); isolate_ = null; } return isolateBuilder_; } @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:v1.Destination) } // @@protoc_insertion_point(class_scope:v1.Destination) private static final com.tencent.polaris.client.pb.RoutingProto.Destination DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.tencent.polaris.client.pb.RoutingProto.Destination(); } public static com.tencent.polaris.client.pb.RoutingProto.Destination getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Destination parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Destination(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 com.tencent.polaris.client.pb.RoutingProto.Destination getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_v1_Routing_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_v1_Routing_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_v1_Route_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_v1_Route_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_v1_Source_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_v1_Source_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_v1_Source_MetadataEntry_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_v1_Source_MetadataEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_v1_Destination_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_v1_Destination_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_v1_Destination_MetadataEntry_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_v1_Destination_MetadataEntry_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\rrouting.proto\022\002v1\032\036google/protobuf/wra" + "ppers.proto\032\013model.proto\"\362\002\n\007Routing\022-\n\007" + "service\030\001 \001(\0132\034.google.protobuf.StringVa" + "lue\022/\n\tnamespace\030\002 \001(\0132\034.google.protobuf" + ".StringValue\022\033\n\010inbounds\030\003 \003(\0132\t.v1.Rout" + "e\022\034\n\toutbounds\030\004 \003(\0132\t.v1.Route\022+\n\005ctime" + "\030\005 \001(\0132\034.google.protobuf.StringValue\022+\n\005" + "mtime\030\006 \001(\0132\034.google.protobuf.StringValu" + "e\022.\n\010revision\030\007 \001(\0132\034.google.protobuf.St" + "ringValue\022B\n\rservice_token\030\010 \001(\0132\034.googl" + "e.protobuf.StringValueR\rservice_token\"K\n" + "\005Route\022\033\n\007sources\030\001 \003(\0132\n.v1.Source\022%\n\014d" + "estinations\030\002 \003(\0132\017.v1.Destination\"\326\001\n\006S" + "ource\022-\n\007service\030\001 \001(\0132\034.google.protobuf" + ".StringValue\022/\n\tnamespace\030\002 \001(\0132\034.google" + ".protobuf.StringValue\022*\n\010metadata\030\003 \003(\0132" + "\030.v1.Source.MetadataEntry\032@\n\rMetadataEnt" + "ry\022\013\n\003key\030\001 \001(\t\022\036\n\005value\030\002 \001(\0132\017.v1.Matc" + "hString:\0028\001\"\233\003\n\013Destination\022-\n\007service\030\001" + " \001(\0132\034.google.protobuf.StringValue\022/\n\tna" + "mespace\030\002 \001(\0132\034.google.protobuf.StringVa" + "lue\022/\n\010metadata\030\003 \003(\0132\035.v1.Destination.M" + "etadataEntry\022.\n\010priority\030\004 \001(\0132\034.google." + "protobuf.UInt32Value\022,\n\006weight\030\005 \001(\0132\034.g" + "oogle.protobuf.UInt32Value\022.\n\010transfer\030\006" + " \001(\0132\034.google.protobuf.StringValue\022+\n\007is" + "olate\030\007 \001(\0132\032.google.protobuf.BoolValue\032" + "@\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\036\n\005value\030\002" + " \001(\0132\017.v1.MatchString:\0028\001B-\n\035com.tencent" + ".polaris.client.pbB\014RoutingProtob\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.WrappersProto.getDescriptor(), com.tencent.polaris.client.pb.ModelProto.getDescriptor(), }); internal_static_v1_Routing_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_v1_Routing_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_v1_Routing_descriptor, new java.lang.String[] { "Service", "Namespace", "Inbounds", "Outbounds", "Ctime", "Mtime", "Revision", "ServiceToken", }); internal_static_v1_Route_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_v1_Route_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_v1_Route_descriptor, new java.lang.String[] { "Sources", "Destinations", }); internal_static_v1_Source_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_v1_Source_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_v1_Source_descriptor, new java.lang.String[] { "Service", "Namespace", "Metadata", }); internal_static_v1_Source_MetadataEntry_descriptor = internal_static_v1_Source_descriptor.getNestedTypes().get(0); internal_static_v1_Source_MetadataEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_v1_Source_MetadataEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_v1_Destination_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_v1_Destination_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_v1_Destination_descriptor, new java.lang.String[] { "Service", "Namespace", "Metadata", "Priority", "Weight", "Transfer", "Isolate", }); internal_static_v1_Destination_MetadataEntry_descriptor = internal_static_v1_Destination_descriptor.getNestedTypes().get(0); internal_static_v1_Destination_MetadataEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_v1_Destination_MetadataEntry_descriptor, new java.lang.String[] { "Key", "Value", }); com.google.protobuf.WrappersProto.getDescriptor(); com.tencent.polaris.client.pb.ModelProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy