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 class
GrpcKeyBuilder.Builder
A GrpcKeyBuilder applies to a given gRPC service, name, and headers.private static class
GrpcKeyBuilder.ConstantKeysDefaultEntryHolder
static class
GrpcKeyBuilder.ExtraKeys
If 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 interface
GrpcKeyBuilder.ExtraKeysOrBuilder
static class
GrpcKeyBuilder.Name
To match, one of the given Name fields must match; the service and method fields are specified as fixed strings.static interface
GrpcKeyBuilder.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 int
bitField0_
static int
CONSTANT_KEYS_FIELD_NUMBER
private com.google.protobuf.MapField<java.lang.String,java.lang.String>
constantKeys_
private static GrpcKeyBuilder
DEFAULT_INSTANCE
static int
EXTRA_KEYS_FIELD_NUMBER
private GrpcKeyBuilder.ExtraKeys
extraKeys_
private java.util.List<NameMatcher>
headers_
static int
HEADERS_FIELD_NUMBER
private byte
memoizedIsInitialized
private java.util.List<GrpcKeyBuilder.Name>
names_
static int
NAMES_FIELD_NUMBER
private static com.google.protobuf.Parser<GrpcKeyBuilder>
PARSER
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
GrpcKeyBuilder()
private
GrpcKeyBuilder(com.google.protobuf.GeneratedMessage.Builder<?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsConstantKeys(java.lang.String key)
You can optionally set one or more specific key/value pairs to be added to the key_map.boolean
equals(java.lang.Object obj)
java.util.Map<java.lang.String,java.lang.String>
getConstantKeys()
Deprecated.int
getConstantKeysCount()
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.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.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.static GrpcKeyBuilder
getDefaultInstance()
GrpcKeyBuilder
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
GrpcKeyBuilder.ExtraKeys
getExtraKeys()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;
GrpcKeyBuilder.ExtraKeysOrBuilder
getExtraKeysOrBuilder()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;
NameMatcher
getHeaders(int index)
Extract keys from all listed headers.int
getHeadersCount()
Extract keys from all listed headers.java.util.List<NameMatcher>
getHeadersList()
Extract keys from all listed headers.NameMatcherOrBuilder
getHeadersOrBuilder(int index)
Extract keys from all listed headers.java.util.List<? extends NameMatcherOrBuilder>
getHeadersOrBuilderList()
Extract keys from all listed headers.GrpcKeyBuilder.Name
getNames(int index)
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
int
getNamesCount()
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
java.util.List<GrpcKeyBuilder.Name>
getNamesList()
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
GrpcKeyBuilder.NameOrBuilder
getNamesOrBuilder(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()
int
getSerializedSize()
boolean
hasExtraKeys()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;
int
hashCode()
private com.google.protobuf.MapField<java.lang.String,java.lang.String>
internalGetConstantKeys()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapFieldReflectionAccessor
internalGetMapFieldReflection(int number)
boolean
isInitialized()
static GrpcKeyBuilder.Builder
newBuilder()
static GrpcKeyBuilder.Builder
newBuilder(GrpcKeyBuilder prototype)
GrpcKeyBuilder.Builder
newBuilderForType()
protected GrpcKeyBuilder.Builder
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
static GrpcKeyBuilder
parseDelimitedFrom(java.io.InputStream input)
static GrpcKeyBuilder
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static GrpcKeyBuilder
parseFrom(byte[] data)
static GrpcKeyBuilder
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static GrpcKeyBuilder
parseFrom(com.google.protobuf.ByteString data)
static GrpcKeyBuilder
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static GrpcKeyBuilder
parseFrom(com.google.protobuf.CodedInputStream input)
static GrpcKeyBuilder
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static GrpcKeyBuilder
parseFrom(java.io.InputStream input)
static GrpcKeyBuilder
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static GrpcKeyBuilder
parseFrom(java.nio.ByteBuffer data)
static GrpcKeyBuilder
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<GrpcKeyBuilder>
parser()
GrpcKeyBuilder.Builder
toBuilder()
void
writeTo(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:
internalGetMapFieldReflection
in classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage
-
getNamesList
public java.util.List<GrpcKeyBuilder.Name> getNamesList()
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
- Specified by:
getNamesList
in interfaceGrpcKeyBuilderOrBuilder
-
getNamesOrBuilderList
public java.util.List<? extends GrpcKeyBuilder.NameOrBuilder> getNamesOrBuilderList()
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
- Specified by:
getNamesOrBuilderList
in interfaceGrpcKeyBuilderOrBuilder
-
getNamesCount
public int getNamesCount()
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
- Specified by:
getNamesCount
in interfaceGrpcKeyBuilderOrBuilder
-
getNames
public GrpcKeyBuilder.Name getNames(int index)
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
- Specified by:
getNames
in interfaceGrpcKeyBuilderOrBuilder
-
getNamesOrBuilder
public GrpcKeyBuilder.NameOrBuilder getNamesOrBuilder(int index)
repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
- Specified by:
getNamesOrBuilder
in interfaceGrpcKeyBuilderOrBuilder
-
hasExtraKeys
public boolean hasExtraKeys()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;
- Specified by:
hasExtraKeys
in interfaceGrpcKeyBuilderOrBuilder
- Returns:
- Whether the extraKeys field is set.
-
getExtraKeys
public GrpcKeyBuilder.ExtraKeys getExtraKeys()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;
- Specified by:
getExtraKeys
in interfaceGrpcKeyBuilderOrBuilder
- Returns:
- The extraKeys.
-
getExtraKeysOrBuilder
public GrpcKeyBuilder.ExtraKeysOrBuilder getExtraKeysOrBuilder()
.grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;
- Specified by:
getExtraKeysOrBuilder
in 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:
getHeadersList
in 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:
getHeadersOrBuilderList
in 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:
getHeadersCount
in 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:
getHeaders
in 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:
getHeadersOrBuilder
in interfaceGrpcKeyBuilderOrBuilder
-
internalGetConstantKeys
private com.google.protobuf.MapField<java.lang.String,java.lang.String> internalGetConstantKeys()
-
getConstantKeysCount
public int getConstantKeysCount()
Description copied from interface:GrpcKeyBuilderOrBuilder
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:
getConstantKeysCount
in 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:
containsConstantKeys
in interfaceGrpcKeyBuilderOrBuilder
-
getConstantKeys
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getConstantKeys()
Deprecated.UsegetConstantKeysMap()
instead.- Specified by:
getConstantKeys
in 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:
getConstantKeysMap
in 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:
getConstantKeysOrDefault
in 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:
getConstantKeysOrThrow
in interfaceGrpcKeyBuilderOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected GrpcKeyBuilder.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
- Overrides:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
public GrpcKeyBuilder getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-