Package io.grpc.lookup.v1
Class GrpcKeyBuilder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessage
-
- io.grpc.lookup.v1.GrpcKeyBuilder
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,GrpcKeyBuilderOrBuilder,java.io.Serializable
public final class GrpcKeyBuilder extends com.google.protobuf.GeneratedMessage implements GrpcKeyBuilderOrBuilder
A GrpcKeyBuilder applies to a given gRPC service, name, and headers.
Protobuf typegrpc.lookup.v1.GrpcKeyBuilder- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGrpcKeyBuilder.BuilderA GrpcKeyBuilder applies to a given gRPC service, name, and headers.private static classGrpcKeyBuilder.ConstantKeysDefaultEntryHolderstatic classGrpcKeyBuilder.ExtraKeysIf you wish to include the host, service, or method names as keys in the generated RouteLookupRequest, specify key names to use in the extra_keys submessage.static interfaceGrpcKeyBuilder.ExtraKeysOrBuilderstatic classGrpcKeyBuilder.NameTo match, one of the given Name fields must match; the service and method fields are specified as fixed strings.static interfaceGrpcKeyBuilder.NameOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends java.lang.Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description private intbitField0_static intCONSTANT_KEYS_FIELD_NUMBERprivate com.google.protobuf.MapField<java.lang.String,java.lang.String>constantKeys_private static GrpcKeyBuilderDEFAULT_INSTANCEstatic intEXTRA_KEYS_FIELD_NUMBERprivate GrpcKeyBuilder.ExtraKeysextraKeys_private java.util.List<NameMatcher>headers_static intHEADERS_FIELD_NUMBERprivate bytememoizedIsInitializedprivate java.util.List<GrpcKeyBuilder.Name>names_static intNAMES_FIELD_NUMBERprivate static com.google.protobuf.Parser<GrpcKeyBuilder>PARSERprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateGrpcKeyBuilder()privateGrpcKeyBuilder(com.google.protobuf.GeneratedMessage.Builder<?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsConstantKeys(java.lang.String key)You can optionally set one or more specific key/value pairs to be added to the key_map.booleanequals(java.lang.Object obj)java.util.Map<java.lang.String,java.lang.String>getConstantKeys()Deprecated.intgetConstantKeysCount()You can optionally set one or more specific key/value pairs to be added to the key_map.java.util.Map<java.lang.String,java.lang.String>getConstantKeysMap()You can optionally set one or more specific key/value pairs to be added to the key_map.java.lang.StringgetConstantKeysOrDefault(java.lang.String key, java.lang.String defaultValue)You can optionally set one or more specific key/value pairs to be added to the key_map.java.lang.StringgetConstantKeysOrThrow(java.lang.String key)You can optionally set one or more specific key/value pairs to be added to the key_map.static GrpcKeyBuildergetDefaultInstance()GrpcKeyBuildergetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()GrpcKeyBuilder.ExtraKeysgetExtraKeys().grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;GrpcKeyBuilder.ExtraKeysOrBuildergetExtraKeysOrBuilder().grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;NameMatchergetHeaders(int index)Extract keys from all listed headers.intgetHeadersCount()Extract keys from all listed headers.java.util.List<NameMatcher>getHeadersList()Extract keys from all listed headers.NameMatcherOrBuildergetHeadersOrBuilder(int index)Extract keys from all listed headers.java.util.List<? extends NameMatcherOrBuilder>getHeadersOrBuilderList()Extract keys from all listed headers.GrpcKeyBuilder.NamegetNames(int index)repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;intgetNamesCount()repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;java.util.List<GrpcKeyBuilder.Name>getNamesList()repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;GrpcKeyBuilder.NameOrBuildergetNamesOrBuilder(int index)repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;java.util.List<? extends GrpcKeyBuilder.NameOrBuilder>getNamesOrBuilderList()repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;com.google.protobuf.Parser<GrpcKeyBuilder>getParserForType()intgetSerializedSize()booleanhasExtraKeys().grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;inthashCode()private com.google.protobuf.MapField<java.lang.String,java.lang.String>internalGetConstantKeys()protected com.google.protobuf.GeneratedMessage.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number)booleanisInitialized()static GrpcKeyBuilder.BuildernewBuilder()static GrpcKeyBuilder.BuildernewBuilder(GrpcKeyBuilder prototype)GrpcKeyBuilder.BuildernewBuilderForType()protected GrpcKeyBuilder.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)static GrpcKeyBuilderparseDelimitedFrom(java.io.InputStream input)static GrpcKeyBuilderparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GrpcKeyBuilderparseFrom(byte[] data)static GrpcKeyBuilderparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GrpcKeyBuilderparseFrom(com.google.protobuf.ByteString data)static GrpcKeyBuilderparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GrpcKeyBuilderparseFrom(com.google.protobuf.CodedInputStream input)static GrpcKeyBuilderparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GrpcKeyBuilderparseFrom(java.io.InputStream input)static GrpcKeyBuilderparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GrpcKeyBuilderparseFrom(java.nio.ByteBuffer data)static GrpcKeyBuilderparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<GrpcKeyBuilder>parser()GrpcKeyBuilder.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
bitField0_
private int bitField0_
-
NAMES_FIELD_NUMBER
public static final int NAMES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
names_
private java.util.List<GrpcKeyBuilder.Name> names_
-
EXTRA_KEYS_FIELD_NUMBER
public static final int EXTRA_KEYS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
extraKeys_
private GrpcKeyBuilder.ExtraKeys extraKeys_
-
HEADERS_FIELD_NUMBER
public static final int HEADERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
headers_
private java.util.List<NameMatcher> headers_
-
CONSTANT_KEYS_FIELD_NUMBER
public static final int CONSTANT_KEYS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
constantKeys_
private com.google.protobuf.MapField<java.lang.String,java.lang.String> constantKeys_
-
memoizedIsInitialized
private byte memoizedIsInitialized
-
DEFAULT_INSTANCE
private static final GrpcKeyBuilder DEFAULT_INSTANCE
-
PARSER
private static final com.google.protobuf.Parser<GrpcKeyBuilder> PARSER
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
- Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getNamesList
public java.util.List<GrpcKeyBuilder.Name> getNamesList()
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;- Specified by:
getNamesListin interfaceGrpcKeyBuilderOrBuilder
-
getNamesOrBuilderList
public java.util.List<? extends GrpcKeyBuilder.NameOrBuilder> getNamesOrBuilderList()
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;- Specified by:
getNamesOrBuilderListin interfaceGrpcKeyBuilderOrBuilder
-
getNamesCount
public int getNamesCount()
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;- Specified by:
getNamesCountin interfaceGrpcKeyBuilderOrBuilder
-
getNames
public GrpcKeyBuilder.Name getNames(int index)
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;- Specified by:
getNamesin interfaceGrpcKeyBuilderOrBuilder
-
getNamesOrBuilder
public GrpcKeyBuilder.NameOrBuilder getNamesOrBuilder(int index)
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;- Specified by:
getNamesOrBuilderin interfaceGrpcKeyBuilderOrBuilder
-
hasExtraKeys
public boolean hasExtraKeys()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;- Specified by:
hasExtraKeysin interfaceGrpcKeyBuilderOrBuilder- Returns:
- Whether the extraKeys field is set.
-
getExtraKeys
public GrpcKeyBuilder.ExtraKeys getExtraKeys()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;- Specified by:
getExtraKeysin interfaceGrpcKeyBuilderOrBuilder- Returns:
- The extraKeys.
-
getExtraKeysOrBuilder
public GrpcKeyBuilder.ExtraKeysOrBuilder getExtraKeysOrBuilder()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;- Specified by:
getExtraKeysOrBuilderin interfaceGrpcKeyBuilderOrBuilder
-
getHeadersList
public java.util.List<NameMatcher> getHeadersList()
Extract keys from all listed headers. For gRPC, it is an error to specify "required_match" on the NameMatcher protos.
repeated .grpc.lookup.v1.NameMatcher headers = 2;- Specified by:
getHeadersListin interfaceGrpcKeyBuilderOrBuilder
-
getHeadersOrBuilderList
public java.util.List<? extends NameMatcherOrBuilder> getHeadersOrBuilderList()
Extract keys from all listed headers. For gRPC, it is an error to specify "required_match" on the NameMatcher protos.
repeated .grpc.lookup.v1.NameMatcher headers = 2;- Specified by:
getHeadersOrBuilderListin interfaceGrpcKeyBuilderOrBuilder
-
getHeadersCount
public int getHeadersCount()
Extract keys from all listed headers. For gRPC, it is an error to specify "required_match" on the NameMatcher protos.
repeated .grpc.lookup.v1.NameMatcher headers = 2;- Specified by:
getHeadersCountin interfaceGrpcKeyBuilderOrBuilder
-
getHeaders
public NameMatcher getHeaders(int index)
Extract keys from all listed headers. For gRPC, it is an error to specify "required_match" on the NameMatcher protos.
repeated .grpc.lookup.v1.NameMatcher headers = 2;- Specified by:
getHeadersin interfaceGrpcKeyBuilderOrBuilder
-
getHeadersOrBuilder
public NameMatcherOrBuilder getHeadersOrBuilder(int index)
Extract keys from all listed headers. For gRPC, it is an error to specify "required_match" on the NameMatcher protos.
repeated .grpc.lookup.v1.NameMatcher headers = 2;- Specified by:
getHeadersOrBuilderin interfaceGrpcKeyBuilderOrBuilder
-
internalGetConstantKeys
private com.google.protobuf.MapField<java.lang.String,java.lang.String> internalGetConstantKeys()
-
getConstantKeysCount
public int getConstantKeysCount()
Description copied from interface:GrpcKeyBuilderOrBuilderYou can optionally set one or more specific key/value pairs to be added to the key_map. This can be useful to identify which builder built the key, for example if you are suppressing the actual method, but need to separately cache and request all the matched methods.
map<string, string> constant_keys = 4;- Specified by:
getConstantKeysCountin interfaceGrpcKeyBuilderOrBuilder
-
containsConstantKeys
public boolean containsConstantKeys(java.lang.String key)
You can optionally set one or more specific key/value pairs to be added to the key_map. This can be useful to identify which builder built the key, for example if you are suppressing the actual method, but need to separately cache and request all the matched methods.
map<string, string> constant_keys = 4;- Specified by:
containsConstantKeysin interfaceGrpcKeyBuilderOrBuilder
-
getConstantKeys
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getConstantKeys()
Deprecated.UsegetConstantKeysMap()instead.- Specified by:
getConstantKeysin interfaceGrpcKeyBuilderOrBuilder
-
getConstantKeysMap
public java.util.Map<java.lang.String,java.lang.String> getConstantKeysMap()
You can optionally set one or more specific key/value pairs to be added to the key_map. This can be useful to identify which builder built the key, for example if you are suppressing the actual method, but need to separately cache and request all the matched methods.
map<string, string> constant_keys = 4;- Specified by:
getConstantKeysMapin interfaceGrpcKeyBuilderOrBuilder
-
getConstantKeysOrDefault
public java.lang.String getConstantKeysOrDefault(java.lang.String key, java.lang.String defaultValue)You can optionally set one or more specific key/value pairs to be added to the key_map. This can be useful to identify which builder built the key, for example if you are suppressing the actual method, but need to separately cache and request all the matched methods.
map<string, string> constant_keys = 4;- Specified by:
getConstantKeysOrDefaultin interfaceGrpcKeyBuilderOrBuilder
-
getConstantKeysOrThrow
public java.lang.String getConstantKeysOrThrow(java.lang.String key)
You can optionally set one or more specific key/value pairs to be added to the key_map. This can be useful to identify which builder built the key, for example if you are suppressing the actual method, but need to separately cache and request all the matched methods.
map<string, string> constant_keys = 4;- Specified by:
getConstantKeysOrThrowin interfaceGrpcKeyBuilderOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static GrpcKeyBuilder parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrpcKeyBuilder parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrpcKeyBuilder parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrpcKeyBuilder parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrpcKeyBuilder parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrpcKeyBuilder parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static GrpcKeyBuilder parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static GrpcKeyBuilder parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static GrpcKeyBuilder parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static GrpcKeyBuilder parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static GrpcKeyBuilder parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static GrpcKeyBuilder parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public GrpcKeyBuilder.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static GrpcKeyBuilder.Builder newBuilder()
-
newBuilder
public static GrpcKeyBuilder.Builder newBuilder(GrpcKeyBuilder prototype)
-
toBuilder
public GrpcKeyBuilder.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected GrpcKeyBuilder.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
- Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
public static GrpcKeyBuilder getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<GrpcKeyBuilder> parser()
-
getParserForType
public com.google.protobuf.Parser<GrpcKeyBuilder> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
public GrpcKeyBuilder getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-