Class 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 type grpc.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
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

        com.google.protobuf.AbstractMessage.BuilderParent
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private GrpcKeyBuilder()  
      private GrpcKeyBuilder​(com.google.protobuf.GeneratedMessage.Builder<?> builder)  
    • Field Detail

      • bitField0_

        private int bitField0_
      • EXTRA_KEYS_FIELD_NUMBER

        public static final int EXTRA_KEYS_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
    • Constructor Detail

      • GrpcKeyBuilder

        private GrpcKeyBuilder​(com.google.protobuf.GeneratedMessage.Builder<?> builder)
      • GrpcKeyBuilder

        private GrpcKeyBuilder()
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapFieldReflection

        protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection​(int number)
        Overrides:
        internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
      • hasExtraKeys

        public boolean hasExtraKeys()
        .grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;
        Specified by:
        hasExtraKeys in interface GrpcKeyBuilderOrBuilder
        Returns:
        Whether the extraKeys field is set.
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • 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 interface GrpcKeyBuilderOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.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 interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public GrpcKeyBuilder.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected GrpcKeyBuilder.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)
        Overrides:
        newBuilderForType in class com.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 interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessage
      • getDefaultInstanceForType

        public GrpcKeyBuilder getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder