Package io.grpc.lookup.v1
Class HttpKeyBuilder.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<HttpKeyBuilder.Builder>
com.google.protobuf.GeneratedMessage.Builder<HttpKeyBuilder.Builder>
io.grpc.lookup.v1.HttpKeyBuilder.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,HttpKeyBuilderOrBuilder,Cloneable
- Enclosing class:
HttpKeyBuilder
public static final class HttpKeyBuilder.Builder
extends com.google.protobuf.GeneratedMessage.Builder<HttpKeyBuilder.Builder>
implements HttpKeyBuilderOrBuilder
An HttpKeyBuilder applies to a given HTTP URL and headers.
Path and host patterns use the matching syntax from gRPC transcoding to
extract named key/value pairs from the path and host components of the URL:
https://github.com/googleapis/googleapis/blob/master/google/api/http.proto
It is invalid to specify the same key name in multiple places in a pattern.
For a service where the project id can be expressed either as a subdomain or
in the path, separate HttpKeyBuilders must be used:
host_pattern: 'example.com' path_pattern: '/{id}/{object}/**'
host_pattern: '{id}.example.com' path_pattern: '/{object}/**'
If the host is exactly 'example.com', the first path segment will be used as
the id and the second segment as the object. If the host has a subdomain, the
subdomain will be used as the id and the first segment as the object. If
neither pattern matches, no keys will be extracted.
Protobuf type grpc.lookup.v1.HttpKeyBuilder-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate List<NameMatcher> private com.google.protobuf.RepeatedFieldBuilder<NameMatcher, NameMatcher.Builder, NameMatcherOrBuilder> private com.google.protobuf.LazyStringArrayListprivate com.google.protobuf.LazyStringArrayListprivate List<NameMatcher> private com.google.protobuf.RepeatedFieldBuilder<NameMatcher, NameMatcher.Builder, NameMatcherOrBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllHeaders(Iterable<? extends NameMatcher> values) List of headers to try to match.addAllHostPatterns(Iterable<String> values) host_pattern is an ordered list of host template patterns for the desired value.addAllPathPatterns(Iterable<String> values) path_pattern is an ordered list of path template patterns for the desired value.addAllQueryParameters(Iterable<? extends NameMatcher> values) List of query parameter names to try to match.addHeaders(int index, NameMatcher value) List of headers to try to match.addHeaders(int index, NameMatcher.Builder builderForValue) List of headers to try to match.addHeaders(NameMatcher value) List of headers to try to match.addHeaders(NameMatcher.Builder builderForValue) List of headers to try to match.List of headers to try to match.addHeadersBuilder(int index) List of headers to try to match.addHostPatterns(String value) host_pattern is an ordered list of host template patterns for the desired value.addHostPatternsBytes(com.google.protobuf.ByteString value) host_pattern is an ordered list of host template patterns for the desired value.addPathPatterns(String value) path_pattern is an ordered list of path template patterns for the desired value.addPathPatternsBytes(com.google.protobuf.ByteString value) path_pattern is an ordered list of path template patterns for the desired value.addQueryParameters(int index, NameMatcher value) List of query parameter names to try to match.addQueryParameters(int index, NameMatcher.Builder builderForValue) List of query parameter names to try to match.addQueryParameters(NameMatcher value) List of query parameter names to try to match.addQueryParameters(NameMatcher.Builder builderForValue) List of query parameter names to try to match.List of query parameter names to try to match.addQueryParametersBuilder(int index) List of query parameter names to try to match.build()private voidbuildPartial0(HttpKeyBuilder result) private voidclear()List of headers to try to match.host_pattern is an ordered list of host template patterns for the desired value.path_pattern is an ordered list of path template patterns for the desired value.List of query parameter names to try to match.booleanYou can optionally set one or more specific key/value pairs to be added to the key_map.private voidprivate voidprivate voidprivate voidDeprecated.intYou can optionally set one or more specific key/value pairs to be added to the key_map.You can optionally set one or more specific key/value pairs to be added to the key_map.getConstantKeysOrDefault(String key, String defaultValue) You can optionally set one or more specific key/value pairs to be added to the key_map.You can optionally set one or more specific key/value pairs to be added to the key_map.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetHeaders(int index) List of headers to try to match.getHeadersBuilder(int index) List of headers to try to match.List of headers to try to match.intList of headers to try to match.private com.google.protobuf.RepeatedFieldBuilder<NameMatcher, NameMatcher.Builder, NameMatcherOrBuilder> List of headers to try to match.getHeadersOrBuilder(int index) List of headers to try to match.List<? extends NameMatcherOrBuilder> List of headers to try to match.getHostPatterns(int index) host_pattern is an ordered list of host template patterns for the desired value.com.google.protobuf.ByteStringgetHostPatternsBytes(int index) host_pattern is an ordered list of host template patterns for the desired value.inthost_pattern is an ordered list of host template patterns for the desired value.com.google.protobuf.ProtocolStringListhost_pattern is an ordered list of host template patterns for the desired value.Deprecated.getPathPatterns(int index) path_pattern is an ordered list of path template patterns for the desired value.com.google.protobuf.ByteStringgetPathPatternsBytes(int index) path_pattern is an ordered list of path template patterns for the desired value.intpath_pattern is an ordered list of path template patterns for the desired value.com.google.protobuf.ProtocolStringListpath_pattern is an ordered list of path template patterns for the desired value.getQueryParameters(int index) List of query parameter names to try to match.getQueryParametersBuilder(int index) List of query parameter names to try to match.List of query parameter names to try to match.intList of query parameter names to try to match.private com.google.protobuf.RepeatedFieldBuilder<NameMatcher, NameMatcher.Builder, NameMatcherOrBuilder> List of query parameter names to try to match.getQueryParametersOrBuilder(int index) List of query parameter names to try to match.List<? extends NameMatcherOrBuilder> List of query parameter names to try to match.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(HttpKeyBuilder other) putAllConstantKeys(Map<String, String> values) You can optionally set one or more specific key/value pairs to be added to the key_map.putConstantKeys(String key, String value) You can optionally set one or more specific key/value pairs to be added to the key_map.removeConstantKeys(String key) You can optionally set one or more specific key/value pairs to be added to the key_map.removeHeaders(int index) List of headers to try to match.removeQueryParameters(int index) List of query parameter names to try to match.setHeaders(int index, NameMatcher value) List of headers to try to match.setHeaders(int index, NameMatcher.Builder builderForValue) List of headers to try to match.setHostPatterns(int index, String value) host_pattern is an ordered list of host template patterns for the desired value.setPathPatterns(int index, String value) path_pattern is an ordered list of path template patterns for the desired value.setQueryParameters(int index, NameMatcher value) List of query parameter names to try to match.setQueryParameters(int index, NameMatcher.Builder builderForValue) List of query parameter names to try to match.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
bitField0_
private int bitField0_ -
hostPatterns_
private com.google.protobuf.LazyStringArrayList hostPatterns_ -
pathPatterns_
private com.google.protobuf.LazyStringArrayList pathPatterns_ -
queryParameters_
-
queryParametersBuilder_
private com.google.protobuf.RepeatedFieldBuilder<NameMatcher,NameMatcher.Builder, queryParametersBuilder_NameMatcherOrBuilder> -
headers_
-
headersBuilder_
private com.google.protobuf.RepeatedFieldBuilder<NameMatcher,NameMatcher.Builder, headersBuilder_NameMatcherOrBuilder> -
constantKeys_
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
Method Details
-
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.Builder<HttpKeyBuilder.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<HttpKeyBuilder.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<HttpKeyBuilder.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<HttpKeyBuilder.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<HttpKeyBuilder.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<HttpKeyBuilder.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<HttpKeyBuilder.Builder>
-
mergeFrom
public HttpKeyBuilder.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<HttpKeyBuilder.Builder>- Throws:
IOException
-
ensureHostPatternsIsMutable
private void ensureHostPatternsIsMutable() -
getHostPatternsList
public com.google.protobuf.ProtocolStringList getHostPatternsList()host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Specified by:
getHostPatternsListin interfaceHttpKeyBuilderOrBuilder- Returns:
- A list containing the hostPatterns.
-
getHostPatternsCount
public int getHostPatternsCount()host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Specified by:
getHostPatternsCountin interfaceHttpKeyBuilderOrBuilder- Returns:
- The count of hostPatterns.
-
getHostPatterns
host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Specified by:
getHostPatternsin interfaceHttpKeyBuilderOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The hostPatterns at the given index.
-
getHostPatternsBytes
public com.google.protobuf.ByteString getHostPatternsBytes(int index) host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Specified by:
getHostPatternsBytesin interfaceHttpKeyBuilderOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the hostPatterns at the given index.
-
setHostPatterns
host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Parameters:
index- The index to set the value at.value- The hostPatterns to set.- Returns:
- This builder for chaining.
-
addHostPatterns
host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Parameters:
value- The hostPatterns to add.- Returns:
- This builder for chaining.
-
addAllHostPatterns
host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Parameters:
values- The hostPatterns to add.- Returns:
- This builder for chaining.
-
clearHostPatterns
host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Returns:
- This builder for chaining.
-
addHostPatternsBytes
host_pattern is an ordered list of host template patterns for the desired value. If any host_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A host consists of labels separated by dots. Each label is matched against the label in the pattern as follows: - "*": Matches any single label. - "**": Matches zero or more labels (first or last part of host only). - "{<name>=...}": One or more label capture, where "..." can be any template that does not include a capture. - "{<name>}": A single label capture. Identical to {<name>=*}. Examples: - "example.com": Only applies to the exact host example.com. - "*.example.com": Matches subdomains of example.com. - "**.example.com": matches example.com, and all levels of subdomains. - "{project}.example.com": Extracts the third level subdomain. - "{project=**}.example.com": Extracts the third level+ subdomains. - "{project=**}": Extracts the entire host.repeated string host_patterns = 1;- Parameters:
value- The bytes of the hostPatterns to add.- Returns:
- This builder for chaining.
-
ensurePathPatternsIsMutable
private void ensurePathPatternsIsMutable() -
getPathPatternsList
public com.google.protobuf.ProtocolStringList getPathPatternsList()path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Specified by:
getPathPatternsListin interfaceHttpKeyBuilderOrBuilder- Returns:
- A list containing the pathPatterns.
-
getPathPatternsCount
public int getPathPatternsCount()path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Specified by:
getPathPatternsCountin interfaceHttpKeyBuilderOrBuilder- Returns:
- The count of pathPatterns.
-
getPathPatterns
path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Specified by:
getPathPatternsin interfaceHttpKeyBuilderOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The pathPatterns at the given index.
-
getPathPatternsBytes
public com.google.protobuf.ByteString getPathPatternsBytes(int index) path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Specified by:
getPathPatternsBytesin interfaceHttpKeyBuilderOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the pathPatterns at the given index.
-
setPathPatterns
path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Parameters:
index- The index to set the value at.value- The pathPatterns to set.- Returns:
- This builder for chaining.
-
addPathPatterns
path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Parameters:
value- The pathPatterns to add.- Returns:
- This builder for chaining.
-
addAllPathPatterns
path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Parameters:
values- The pathPatterns to add.- Returns:
- This builder for chaining.
-
clearPathPatterns
path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Returns:
- This builder for chaining.
-
addPathPatternsBytes
path_pattern is an ordered list of path template patterns for the desired value. If any path_pattern values are specified, then at least one must match, and the last one wins and sets any specified variables. A path consists of segments separated by slashes. Each segment is matched against the segment in the pattern as follows: - "*": Matches any single segment. - "**": Matches zero or more segments (first or last part of path only). - "{<name>=...}": One or more segment capture, where "..." can be any template that does not include a capture. - "{<name>}": A single segment capture. Identical to {<name>=*}. A custom method may also be specified by appending ":" and the custom method name or "*" to indicate any custom method (including no custom method). For example, "/*/projects/{project_id}/**:*" extracts `{project_id}` for any version, resource and custom method that includes it. By default, any custom method will be matched. Examples: - "/v1/{name=messages/*}": extracts a name like "messages/12345". - "/v1/messages/{message_id}": extracts a message_id like "12345". - "/v1/users/{user_id}/messages/{message_id}": extracts two key values.repeated string path_patterns = 2;- Parameters:
value- The bytes of the pathPatterns to add.- Returns:
- This builder for chaining.
-
ensureQueryParametersIsMutable
private void ensureQueryParametersIsMutable() -
getQueryParametersList
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3;- Specified by:
getQueryParametersListin interfaceHttpKeyBuilderOrBuilder
-
getQueryParametersCount
public int getQueryParametersCount()List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3;- Specified by:
getQueryParametersCountin interfaceHttpKeyBuilderOrBuilder
-
getQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3;- Specified by:
getQueryParametersin interfaceHttpKeyBuilderOrBuilder
-
setQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
setQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
addQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
addQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
addQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
addQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
addAllQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
clearQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
removeQueryParameters
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
getQueryParametersBuilder
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
getQueryParametersOrBuilder
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3;- Specified by:
getQueryParametersOrBuilderin interfaceHttpKeyBuilderOrBuilder
-
getQueryParametersOrBuilderList
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3;- Specified by:
getQueryParametersOrBuilderListin interfaceHttpKeyBuilderOrBuilder
-
addQueryParametersBuilder
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
addQueryParametersBuilder
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
getQueryParametersBuilderList
List of query parameter names to try to match. For example: ["parent", "name", "resource.name"] We extract all the specified query_parameters (case-sensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given parameter appears multiple times (?foo=a&foo=b) we will report it as a comma-separated string (foo=a,b).
repeated .grpc.lookup.v1.NameMatcher query_parameters = 3; -
getQueryParametersFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<NameMatcher,NameMatcher.Builder, getQueryParametersFieldBuilder()NameMatcherOrBuilder> -
ensureHeadersIsMutable
private void ensureHeadersIsMutable() -
getHeadersList
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4;- Specified by:
getHeadersListin interfaceHttpKeyBuilderOrBuilder
-
getHeadersCount
public int getHeadersCount()List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4;- Specified by:
getHeadersCountin interfaceHttpKeyBuilderOrBuilder
-
getHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4;- Specified by:
getHeadersin interfaceHttpKeyBuilderOrBuilder
-
setHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
setHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
addHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
addHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
addHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
addHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
addAllHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
clearHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
removeHeaders
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
getHeadersBuilder
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
getHeadersOrBuilder
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4;- Specified by:
getHeadersOrBuilderin interfaceHttpKeyBuilderOrBuilder
-
getHeadersOrBuilderList
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4;- Specified by:
getHeadersOrBuilderListin interfaceHttpKeyBuilderOrBuilder
-
addHeadersBuilder
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
addHeadersBuilder
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
getHeadersBuilderList
List of headers to try to match. We extract all the specified header values (case-insensitively). If any are marked as "required_match" and are not present, this keybuilder fails to match. If a given header appears multiple times in the request we will report it as a comma-separated string, in standard HTTP fashion.
repeated .grpc.lookup.v1.NameMatcher headers = 4; -
getHeadersFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<NameMatcher,NameMatcher.Builder, getHeadersFieldBuilder()NameMatcherOrBuilder> -
internalGetConstantKeys
-
internalGetMutableConstantKeys
-
getConstantKeysCount
public int getConstantKeysCount()Description copied from interface:HttpKeyBuilderOrBuilderYou 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 a lot of information from the URL, but need to separately cache and request URLs with that content.
map<string, string> constant_keys = 5;- Specified by:
getConstantKeysCountin interfaceHttpKeyBuilderOrBuilder
-
containsConstantKeys
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 a lot of information from the URL, but need to separately cache and request URLs with that content.
map<string, string> constant_keys = 5;- Specified by:
containsConstantKeysin interfaceHttpKeyBuilderOrBuilder
-
getConstantKeys
Deprecated.UsegetConstantKeysMap()instead.- Specified by:
getConstantKeysin interfaceHttpKeyBuilderOrBuilder
-
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 a lot of information from the URL, but need to separately cache and request URLs with that content.
map<string, string> constant_keys = 5;- Specified by:
getConstantKeysMapin interfaceHttpKeyBuilderOrBuilder
-
getConstantKeysOrDefault
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 a lot of information from the URL, but need to separately cache and request URLs with that content.
map<string, string> constant_keys = 5;- Specified by:
getConstantKeysOrDefaultin interfaceHttpKeyBuilderOrBuilder
-
getConstantKeysOrThrow
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 a lot of information from the URL, but need to separately cache and request URLs with that content.
map<string, string> constant_keys = 5;- Specified by:
getConstantKeysOrThrowin interfaceHttpKeyBuilderOrBuilder
-
clearConstantKeys
-
removeConstantKeys
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 a lot of information from the URL, but need to separately cache and request URLs with that content.
map<string, string> constant_keys = 5; -
getMutableConstantKeys
Deprecated.Use alternate mutation accessors instead. -
putConstantKeys
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 a lot of information from the URL, but need to separately cache and request URLs with that content.
map<string, string> constant_keys = 5; -
putAllConstantKeys
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 a lot of information from the URL, but need to separately cache and request URLs with that content.
map<string, string> constant_keys = 5;
-