Class GrpcKeyBuilder.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, GrpcKeyBuilderOrBuilder, java.lang.Cloneable
    Enclosing class:
    GrpcKeyBuilder

    public static final class GrpcKeyBuilder.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<GrpcKeyBuilder.Builder>
    implements GrpcKeyBuilderOrBuilder
     A GrpcKeyBuilder applies to a given gRPC service, name, and headers.
     
    Protobuf type grpc.lookup.v1.GrpcKeyBuilder
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.AbstractMessage.BuilderParent parent)
    • 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.Builder<GrpcKeyBuilder.Builder>
      • internalGetMutableMapFieldReflection

        protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection​(int number)
        Overrides:
        internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<GrpcKeyBuilder.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<GrpcKeyBuilder.Builder>
      • maybeForceBuilderInitialization

        private void maybeForceBuilderInitialization()
      • clear

        public GrpcKeyBuilder.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessage.Builder<GrpcKeyBuilder.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<GrpcKeyBuilder.Builder>
      • getDefaultInstanceForType

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

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

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

        private void buildPartialRepeatedFields​(GrpcKeyBuilder result)
      • buildPartial0

        private void buildPartial0​(GrpcKeyBuilder result)
      • mergeFrom

        public GrpcKeyBuilder.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GrpcKeyBuilder.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.Builder<GrpcKeyBuilder.Builder>
      • mergeFrom

        public GrpcKeyBuilder.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GrpcKeyBuilder.Builder>
        Throws:
        java.io.IOException
      • ensureNamesIsMutable

        private void ensureNamesIsMutable()
      • clearNames

        public GrpcKeyBuilder.Builder clearNames()
        repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
      • removeNames

        public GrpcKeyBuilder.Builder removeNames​(int index)
        repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
      • getNamesBuilder

        public GrpcKeyBuilder.Name.Builder getNamesBuilder​(int index)
        repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
      • addNamesBuilder

        public GrpcKeyBuilder.Name.Builder addNamesBuilder​(int index)
        repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
      • getNamesBuilderList

        public java.util.List<GrpcKeyBuilder.Name.Builder> getNamesBuilderList()
        repeated .grpc.lookup.v1.GrpcKeyBuilder.Name names = 1;
      • 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.
      • clearExtraKeys

        public GrpcKeyBuilder.Builder clearExtraKeys()
        .grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys extra_keys = 3;
      • ensureHeadersIsMutable

        private void ensureHeadersIsMutable()
      • 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
      • 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
      • setHeaders

        public GrpcKeyBuilder.Builder setHeaders​(int index,
                                                 NameMatcher value)
         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;
      • setHeaders

        public GrpcKeyBuilder.Builder setHeaders​(int index,
                                                 NameMatcher.Builder builderForValue)
         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;
      • addHeaders

        public GrpcKeyBuilder.Builder addHeaders​(NameMatcher value)
         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;
      • addHeaders

        public GrpcKeyBuilder.Builder addHeaders​(int index,
                                                 NameMatcher value)
         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;
      • addHeaders

        public GrpcKeyBuilder.Builder addHeaders​(NameMatcher.Builder builderForValue)
         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;
      • addHeaders

        public GrpcKeyBuilder.Builder addHeaders​(int index,
                                                 NameMatcher.Builder builderForValue)
         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;
      • addAllHeaders

        public GrpcKeyBuilder.Builder addAllHeaders​(java.lang.Iterable<? extends NameMatcher> values)
         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;
      • clearHeaders

        public GrpcKeyBuilder.Builder clearHeaders()
         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;
      • removeHeaders

        public GrpcKeyBuilder.Builder removeHeaders​(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;
      • getHeadersBuilder

        public NameMatcher.Builder getHeadersBuilder​(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;
      • 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
      • 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
      • addHeadersBuilder

        public NameMatcher.Builder addHeadersBuilder()
         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;
      • addHeadersBuilder

        public NameMatcher.Builder addHeadersBuilder​(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;
      • getHeadersBuilderList

        public java.util.List<NameMatcher.Builder> getHeadersBuilderList()
         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;
      • internalGetConstantKeys

        private com.google.protobuf.MapField<java.lang.String,​java.lang.String> internalGetConstantKeys()
      • internalGetMutableConstantKeys

        private com.google.protobuf.MapField<java.lang.String,​java.lang.String> internalGetMutableConstantKeys()
      • 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
      • removeConstantKeys

        public GrpcKeyBuilder.Builder removeConstantKeys​(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;
      • getMutableConstantKeys

        @Deprecated
        public java.util.Map<java.lang.String,​java.lang.String> getMutableConstantKeys()
        Deprecated.
        Use alternate mutation accessors instead.
      • putConstantKeys

        public GrpcKeyBuilder.Builder putConstantKeys​(java.lang.String key,
                                                      java.lang.String value)
         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;
      • putAllConstantKeys

        public GrpcKeyBuilder.Builder putAllConstantKeys​(java.util.Map<java.lang.String,​java.lang.String> values)
         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;