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

shade.polaris.io.grpc.lookup.v1.RouteLookupRequest Maven / Gradle / Ivy

There is a newer version: 2.0.0.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: grpc/lookup/v1/rls.proto

package io.grpc.lookup.v1;

/**
 * Protobuf type {@code grpc.lookup.v1.RouteLookupRequest}
 */
public final class RouteLookupRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:grpc.lookup.v1.RouteLookupRequest)
    RouteLookupRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use RouteLookupRequest.newBuilder() to construct.
  private RouteLookupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private RouteLookupRequest() {
    targetType_ = "";
    reason_ = 0;
    staleHeaderData_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new RouteLookupRequest();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.grpc.lookup.v1.RlsProto.internal_static_grpc_lookup_v1_RouteLookupRequest_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 4:
        return internalGetKeyMap();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.grpc.lookup.v1.RlsProto.internal_static_grpc_lookup_v1_RouteLookupRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.grpc.lookup.v1.RouteLookupRequest.class, io.grpc.lookup.v1.RouteLookupRequest.Builder.class);
  }

  /**
   * 
   * Possible reasons for making a request.
   * 
* * Protobuf enum {@code grpc.lookup.v1.RouteLookupRequest.Reason} */ public enum Reason implements com.google.protobuf.ProtocolMessageEnum { /** *
     * Unused
     * 
* * REASON_UNKNOWN = 0; */ REASON_UNKNOWN(0), /** *
     * No data available in local cache
     * 
* * REASON_MISS = 1; */ REASON_MISS(1), /** *
     * Data in local cache is stale
     * 
* * REASON_STALE = 2; */ REASON_STALE(2), UNRECOGNIZED(-1), ; /** *
     * Unused
     * 
* * REASON_UNKNOWN = 0; */ public static final int REASON_UNKNOWN_VALUE = 0; /** *
     * No data available in local cache
     * 
* * REASON_MISS = 1; */ public static final int REASON_MISS_VALUE = 1; /** *
     * Data in local cache is stale
     * 
* * REASON_STALE = 2; */ public static final int REASON_STALE_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Reason valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Reason forNumber(int value) { switch (value) { case 0: return REASON_UNKNOWN; case 1: return REASON_MISS; case 2: return REASON_STALE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Reason> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Reason findValueByNumber(int number) { return Reason.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return io.grpc.lookup.v1.RouteLookupRequest.getDescriptor().getEnumTypes().get(0); } private static final Reason[] VALUES = values(); public static Reason valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Reason(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:grpc.lookup.v1.RouteLookupRequest.Reason) } public static final int TARGET_TYPE_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object targetType_ = ""; /** *
   * Target type allows the client to specify what kind of target format it
   * would like from RLS to allow it to find the regional server, e.g. "grpc".
   * 
* * string target_type = 3; * @return The targetType. */ @java.lang.Override public java.lang.String getTargetType() { java.lang.Object ref = targetType_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); targetType_ = s; return s; } } /** *
   * Target type allows the client to specify what kind of target format it
   * would like from RLS to allow it to find the regional server, e.g. "grpc".
   * 
* * string target_type = 3; * @return The bytes for targetType. */ @java.lang.Override public com.google.protobuf.ByteString getTargetTypeBytes() { java.lang.Object ref = targetType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); targetType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REASON_FIELD_NUMBER = 5; private int reason_ = 0; /** *
   * Reason for making this request.
   * 
* * .grpc.lookup.v1.RouteLookupRequest.Reason reason = 5; * @return The enum numeric value on the wire for reason. */ @java.lang.Override public int getReasonValue() { return reason_; } /** *
   * Reason for making this request.
   * 
* * .grpc.lookup.v1.RouteLookupRequest.Reason reason = 5; * @return The reason. */ @java.lang.Override public io.grpc.lookup.v1.RouteLookupRequest.Reason getReason() { io.grpc.lookup.v1.RouteLookupRequest.Reason result = io.grpc.lookup.v1.RouteLookupRequest.Reason.forNumber(reason_); return result == null ? io.grpc.lookup.v1.RouteLookupRequest.Reason.UNRECOGNIZED : result; } public static final int STALE_HEADER_DATA_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object staleHeaderData_ = ""; /** *
   * For REASON_STALE, the header_data from the stale response, if any.
   * 
* * string stale_header_data = 6; * @return The staleHeaderData. */ @java.lang.Override public java.lang.String getStaleHeaderData() { java.lang.Object ref = staleHeaderData_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); staleHeaderData_ = s; return s; } } /** *
   * For REASON_STALE, the header_data from the stale response, if any.
   * 
* * string stale_header_data = 6; * @return The bytes for staleHeaderData. */ @java.lang.Override public com.google.protobuf.ByteString getStaleHeaderDataBytes() { java.lang.Object ref = staleHeaderData_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); staleHeaderData_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int KEY_MAP_FIELD_NUMBER = 4; private static final class KeyMapDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( io.grpc.lookup.v1.RlsProto.internal_static_grpc_lookup_v1_RouteLookupRequest_KeyMapEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> keyMap_; private com.google.protobuf.MapField internalGetKeyMap() { if (keyMap_ == null) { return com.google.protobuf.MapField.emptyMapField( KeyMapDefaultEntryHolder.defaultEntry); } return keyMap_; } public int getKeyMapCount() { return internalGetKeyMap().getMap().size(); } /** *
   * Map of key values extracted via key builders for the gRPC or HTTP request.
   * 
* * map<string, string> key_map = 4; */ @java.lang.Override public boolean containsKeyMap( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetKeyMap().getMap().containsKey(key); } /** * Use {@link #getKeyMapMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getKeyMap() { return getKeyMapMap(); } /** *
   * Map of key values extracted via key builders for the gRPC or HTTP request.
   * 
* * map<string, string> key_map = 4; */ @java.lang.Override public java.util.Map getKeyMapMap() { return internalGetKeyMap().getMap(); } /** *
   * Map of key values extracted via key builders for the gRPC or HTTP request.
   * 
* * map<string, string> key_map = 4; */ @java.lang.Override public /* nullable */ java.lang.String getKeyMapOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetKeyMap().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Map of key values extracted via key builders for the gRPC or HTTP request.
   * 
* * map<string, string> key_map = 4; */ @java.lang.Override public java.lang.String getKeyMapOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetKeyMap().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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetType_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetKeyMap(), KeyMapDefaultEntryHolder.defaultEntry, 4); if (reason_ != io.grpc.lookup.v1.RouteLookupRequest.Reason.REASON_UNKNOWN.getNumber()) { output.writeEnum(5, reason_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(staleHeaderData_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, staleHeaderData_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetType_); } for (java.util.Map.Entry entry : internalGetKeyMap().getMap().entrySet()) { com.google.protobuf.MapEntry keyMap__ = KeyMapDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, keyMap__); } if (reason_ != io.grpc.lookup.v1.RouteLookupRequest.Reason.REASON_UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(5, reason_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(staleHeaderData_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, staleHeaderData_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.grpc.lookup.v1.RouteLookupRequest)) { return super.equals(obj); } io.grpc.lookup.v1.RouteLookupRequest other = (io.grpc.lookup.v1.RouteLookupRequest) obj; if (!getTargetType() .equals(other.getTargetType())) return false; if (reason_ != other.reason_) return false; if (!getStaleHeaderData() .equals(other.getStaleHeaderData())) return false; if (!internalGetKeyMap().equals( other.internalGetKeyMap())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TARGET_TYPE_FIELD_NUMBER; hash = (53 * hash) + getTargetType().hashCode(); hash = (37 * hash) + REASON_FIELD_NUMBER; hash = (53 * hash) + reason_; hash = (37 * hash) + STALE_HEADER_DATA_FIELD_NUMBER; hash = (53 * hash) + getStaleHeaderData().hashCode(); if (!internalGetKeyMap().getMap().isEmpty()) { hash = (37 * hash) + KEY_MAP_FIELD_NUMBER; hash = (53 * hash) + internalGetKeyMap().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.grpc.lookup.v1.RouteLookupRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.lookup.v1.RouteLookupRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.lookup.v1.RouteLookupRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.lookup.v1.RouteLookupRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.lookup.v1.RouteLookupRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.lookup.v1.RouteLookupRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.lookup.v1.RouteLookupRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.lookup.v1.RouteLookupRequest 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 io.grpc.lookup.v1.RouteLookupRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.grpc.lookup.v1.RouteLookupRequest 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 io.grpc.lookup.v1.RouteLookupRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.lookup.v1.RouteLookupRequest 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(io.grpc.lookup.v1.RouteLookupRequest 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 grpc.lookup.v1.RouteLookupRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:grpc.lookup.v1.RouteLookupRequest) io.grpc.lookup.v1.RouteLookupRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.lookup.v1.RlsProto.internal_static_grpc_lookup_v1_RouteLookupRequest_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 4: return internalGetKeyMap(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 4: return internalGetMutableKeyMap(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.lookup.v1.RlsProto.internal_static_grpc_lookup_v1_RouteLookupRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.lookup.v1.RouteLookupRequest.class, io.grpc.lookup.v1.RouteLookupRequest.Builder.class); } // Construct using io.grpc.lookup.v1.RouteLookupRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; targetType_ = ""; reason_ = 0; staleHeaderData_ = ""; internalGetMutableKeyMap().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grpc.lookup.v1.RlsProto.internal_static_grpc_lookup_v1_RouteLookupRequest_descriptor; } @java.lang.Override public io.grpc.lookup.v1.RouteLookupRequest getDefaultInstanceForType() { return io.grpc.lookup.v1.RouteLookupRequest.getDefaultInstance(); } @java.lang.Override public io.grpc.lookup.v1.RouteLookupRequest build() { io.grpc.lookup.v1.RouteLookupRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grpc.lookup.v1.RouteLookupRequest buildPartial() { io.grpc.lookup.v1.RouteLookupRequest result = new io.grpc.lookup.v1.RouteLookupRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.grpc.lookup.v1.RouteLookupRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.targetType_ = targetType_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.reason_ = reason_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.staleHeaderData_ = staleHeaderData_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.keyMap_ = internalGetKeyMap(); result.keyMap_.makeImmutable(); } } @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 io.grpc.lookup.v1.RouteLookupRequest) { return mergeFrom((io.grpc.lookup.v1.RouteLookupRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.grpc.lookup.v1.RouteLookupRequest other) { if (other == io.grpc.lookup.v1.RouteLookupRequest.getDefaultInstance()) return this; if (!other.getTargetType().isEmpty()) { targetType_ = other.targetType_; bitField0_ |= 0x00000001; onChanged(); } if (other.reason_ != 0) { setReasonValue(other.getReasonValue()); } if (!other.getStaleHeaderData().isEmpty()) { staleHeaderData_ = other.staleHeaderData_; bitField0_ |= 0x00000004; onChanged(); } internalGetMutableKeyMap().mergeFrom( other.internalGetKeyMap()); bitField0_ |= 0x00000008; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 26: { targetType_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 26 case 34: { com.google.protobuf.MapEntry keyMap__ = input.readMessage( KeyMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableKeyMap().getMutableMap().put( keyMap__.getKey(), keyMap__.getValue()); bitField0_ |= 0x00000008; break; } // case 34 case 40: { reason_ = input.readEnum(); bitField0_ |= 0x00000002; break; } // case 40 case 50: { staleHeaderData_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object targetType_ = ""; /** *
     * Target type allows the client to specify what kind of target format it
     * would like from RLS to allow it to find the regional server, e.g. "grpc".
     * 
* * string target_type = 3; * @return The targetType. */ public java.lang.String getTargetType() { java.lang.Object ref = targetType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); targetType_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Target type allows the client to specify what kind of target format it
     * would like from RLS to allow it to find the regional server, e.g. "grpc".
     * 
* * string target_type = 3; * @return The bytes for targetType. */ public com.google.protobuf.ByteString getTargetTypeBytes() { java.lang.Object ref = targetType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); targetType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Target type allows the client to specify what kind of target format it
     * would like from RLS to allow it to find the regional server, e.g. "grpc".
     * 
* * string target_type = 3; * @param value The targetType to set. * @return This builder for chaining. */ public Builder setTargetType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } targetType_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Target type allows the client to specify what kind of target format it
     * would like from RLS to allow it to find the regional server, e.g. "grpc".
     * 
* * string target_type = 3; * @return This builder for chaining. */ public Builder clearTargetType() { targetType_ = getDefaultInstance().getTargetType(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Target type allows the client to specify what kind of target format it
     * would like from RLS to allow it to find the regional server, e.g. "grpc".
     * 
* * string target_type = 3; * @param value The bytes for targetType to set. * @return This builder for chaining. */ public Builder setTargetTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); targetType_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int reason_ = 0; /** *
     * Reason for making this request.
     * 
* * .grpc.lookup.v1.RouteLookupRequest.Reason reason = 5; * @return The enum numeric value on the wire for reason. */ @java.lang.Override public int getReasonValue() { return reason_; } /** *
     * Reason for making this request.
     * 
* * .grpc.lookup.v1.RouteLookupRequest.Reason reason = 5; * @param value The enum numeric value on the wire for reason to set. * @return This builder for chaining. */ public Builder setReasonValue(int value) { reason_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * Reason for making this request.
     * 
* * .grpc.lookup.v1.RouteLookupRequest.Reason reason = 5; * @return The reason. */ @java.lang.Override public io.grpc.lookup.v1.RouteLookupRequest.Reason getReason() { io.grpc.lookup.v1.RouteLookupRequest.Reason result = io.grpc.lookup.v1.RouteLookupRequest.Reason.forNumber(reason_); return result == null ? io.grpc.lookup.v1.RouteLookupRequest.Reason.UNRECOGNIZED : result; } /** *
     * Reason for making this request.
     * 
* * .grpc.lookup.v1.RouteLookupRequest.Reason reason = 5; * @param value The reason to set. * @return This builder for chaining. */ public Builder setReason(io.grpc.lookup.v1.RouteLookupRequest.Reason value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; reason_ = value.getNumber(); onChanged(); return this; } /** *
     * Reason for making this request.
     * 
* * .grpc.lookup.v1.RouteLookupRequest.Reason reason = 5; * @return This builder for chaining. */ public Builder clearReason() { bitField0_ = (bitField0_ & ~0x00000002); reason_ = 0; onChanged(); return this; } private java.lang.Object staleHeaderData_ = ""; /** *
     * For REASON_STALE, the header_data from the stale response, if any.
     * 
* * string stale_header_data = 6; * @return The staleHeaderData. */ public java.lang.String getStaleHeaderData() { java.lang.Object ref = staleHeaderData_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); staleHeaderData_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * For REASON_STALE, the header_data from the stale response, if any.
     * 
* * string stale_header_data = 6; * @return The bytes for staleHeaderData. */ public com.google.protobuf.ByteString getStaleHeaderDataBytes() { java.lang.Object ref = staleHeaderData_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); staleHeaderData_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * For REASON_STALE, the header_data from the stale response, if any.
     * 
* * string stale_header_data = 6; * @param value The staleHeaderData to set. * @return This builder for chaining. */ public Builder setStaleHeaderData( java.lang.String value) { if (value == null) { throw new NullPointerException(); } staleHeaderData_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * For REASON_STALE, the header_data from the stale response, if any.
     * 
* * string stale_header_data = 6; * @return This builder for chaining. */ public Builder clearStaleHeaderData() { staleHeaderData_ = getDefaultInstance().getStaleHeaderData(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
     * For REASON_STALE, the header_data from the stale response, if any.
     * 
* * string stale_header_data = 6; * @param value The bytes for staleHeaderData to set. * @return This builder for chaining. */ public Builder setStaleHeaderDataBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); staleHeaderData_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> keyMap_; private com.google.protobuf.MapField internalGetKeyMap() { if (keyMap_ == null) { return com.google.protobuf.MapField.emptyMapField( KeyMapDefaultEntryHolder.defaultEntry); } return keyMap_; } private com.google.protobuf.MapField internalGetMutableKeyMap() { if (keyMap_ == null) { keyMap_ = com.google.protobuf.MapField.newMapField( KeyMapDefaultEntryHolder.defaultEntry); } if (!keyMap_.isMutable()) { keyMap_ = keyMap_.copy(); } bitField0_ |= 0x00000008; onChanged(); return keyMap_; } public int getKeyMapCount() { return internalGetKeyMap().getMap().size(); } /** *
     * Map of key values extracted via key builders for the gRPC or HTTP request.
     * 
* * map<string, string> key_map = 4; */ @java.lang.Override public boolean containsKeyMap( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetKeyMap().getMap().containsKey(key); } /** * Use {@link #getKeyMapMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getKeyMap() { return getKeyMapMap(); } /** *
     * Map of key values extracted via key builders for the gRPC or HTTP request.
     * 
* * map<string, string> key_map = 4; */ @java.lang.Override public java.util.Map getKeyMapMap() { return internalGetKeyMap().getMap(); } /** *
     * Map of key values extracted via key builders for the gRPC or HTTP request.
     * 
* * map<string, string> key_map = 4; */ @java.lang.Override public /* nullable */ java.lang.String getKeyMapOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetKeyMap().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Map of key values extracted via key builders for the gRPC or HTTP request.
     * 
* * map<string, string> key_map = 4; */ @java.lang.Override public java.lang.String getKeyMapOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetKeyMap().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearKeyMap() { bitField0_ = (bitField0_ & ~0x00000008); internalGetMutableKeyMap().getMutableMap() .clear(); return this; } /** *
     * Map of key values extracted via key builders for the gRPC or HTTP request.
     * 
* * map<string, string> key_map = 4; */ public Builder removeKeyMap( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableKeyMap().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableKeyMap() { bitField0_ |= 0x00000008; return internalGetMutableKeyMap().getMutableMap(); } /** *
     * Map of key values extracted via key builders for the gRPC or HTTP request.
     * 
* * map<string, string> key_map = 4; */ public Builder putKeyMap( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableKeyMap().getMutableMap() .put(key, value); bitField0_ |= 0x00000008; return this; } /** *
     * Map of key values extracted via key builders for the gRPC or HTTP request.
     * 
* * map<string, string> key_map = 4; */ public Builder putAllKeyMap( java.util.Map values) { internalGetMutableKeyMap().getMutableMap() .putAll(values); bitField0_ |= 0x00000008; 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:grpc.lookup.v1.RouteLookupRequest) } // @@protoc_insertion_point(class_scope:grpc.lookup.v1.RouteLookupRequest) private static final io.grpc.lookup.v1.RouteLookupRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.grpc.lookup.v1.RouteLookupRequest(); } public static io.grpc.lookup.v1.RouteLookupRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RouteLookupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.grpc.lookup.v1.RouteLookupRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy