Package io.grpc.lookup.v1
Class NameMatcher.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<NameMatcher.Builder>
com.google.protobuf.GeneratedMessage.Builder<NameMatcher.Builder>
io.grpc.lookup.v1.NameMatcher.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,NameMatcherOrBuilder,Cloneable
- Enclosing class:
NameMatcher
public static final class NameMatcher.Builder
extends com.google.protobuf.GeneratedMessage.Builder<NameMatcher.Builder>
implements NameMatcherOrBuilder
Extract a key based on a given name (e.g. header name or query parameter name). The name must match one of the names listed in the "name" field. If the "required_match" field is true, one of the specified names must be present for the keybuilder to match.Protobuf type
grpc.lookup.v1.NameMatcher-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Objectprivate com.google.protobuf.LazyStringArrayListprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllNames(Iterable<String> values) Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.addNamesBytes(com.google.protobuf.ByteString value) Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.build()private voidbuildPartial0(NameMatcher result) clear()clearKey()The name that will be used in the RLS key_map to refer to this value.Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.If true, make this extraction required; the key builder will not match if no value is found.private voidstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetKey()The name that will be used in the RLS key_map to refer to this value.com.google.protobuf.ByteStringThe name that will be used in the RLS key_map to refer to this value.getNames(int index) Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.com.google.protobuf.ByteStringgetNamesBytes(int index) Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.intOrdered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.com.google.protobuf.ProtocolStringListOrdered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.booleanIf true, make this extraction required; the key builder will not match if no value is found.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(NameMatcher other) The name that will be used in the RLS key_map to refer to this value.setKeyBytes(com.google.protobuf.ByteString value) The name that will be used in the RLS key_map to refer to this value.Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.setRequiredMatch(boolean value) If true, make this extraction required; the key builder will not match if no value is found.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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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_ -
key_
-
names_
private com.google.protobuf.LazyStringArrayList names_ -
requiredMatch_
private boolean requiredMatch_
-
-
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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<NameMatcher.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<NameMatcher.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<NameMatcher.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
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<NameMatcher.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<NameMatcher.Builder>
-
mergeFrom
public NameMatcher.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<NameMatcher.Builder>- Throws:
IOException
-
getKey
The name that will be used in the RLS key_map to refer to this value. If required_match is true, you may omit this field or set it to an empty string, in which case the matcher will require a match, but won't update the key_map.
string key = 1;- Specified by:
getKeyin interfaceNameMatcherOrBuilder- Returns:
- The key.
-
getKeyBytes
public com.google.protobuf.ByteString getKeyBytes()The name that will be used in the RLS key_map to refer to this value. If required_match is true, you may omit this field or set it to an empty string, in which case the matcher will require a match, but won't update the key_map.
string key = 1;- Specified by:
getKeyBytesin interfaceNameMatcherOrBuilder- Returns:
- The bytes for key.
-
setKey
The name that will be used in the RLS key_map to refer to this value. If required_match is true, you may omit this field or set it to an empty string, in which case the matcher will require a match, but won't update the key_map.
string key = 1;- Parameters:
value- The key to set.- Returns:
- This builder for chaining.
-
clearKey
The name that will be used in the RLS key_map to refer to this value. If required_match is true, you may omit this field or set it to an empty string, in which case the matcher will require a match, but won't update the key_map.
string key = 1;- Returns:
- This builder for chaining.
-
setKeyBytes
The name that will be used in the RLS key_map to refer to this value. If required_match is true, you may omit this field or set it to an empty string, in which case the matcher will require a match, but won't update the key_map.
string key = 1;- Parameters:
value- The bytes for key to set.- Returns:
- This builder for chaining.
-
ensureNamesIsMutable
private void ensureNamesIsMutable() -
getNamesList
public com.google.protobuf.ProtocolStringList getNamesList()Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Specified by:
getNamesListin interfaceNameMatcherOrBuilder- Returns:
- A list containing the names.
-
getNamesCount
public int getNamesCount()Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Specified by:
getNamesCountin interfaceNameMatcherOrBuilder- Returns:
- The count of names.
-
getNames
Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Specified by:
getNamesin interfaceNameMatcherOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The names at the given index.
-
getNamesBytes
public com.google.protobuf.ByteString getNamesBytes(int index) Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Specified by:
getNamesBytesin interfaceNameMatcherOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the names at the given index.
-
setNames
Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Parameters:
index- The index to set the value at.value- The names to set.- Returns:
- This builder for chaining.
-
addNames
Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Parameters:
value- The names to add.- Returns:
- This builder for chaining.
-
addAllNames
Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Parameters:
values- The names to add.- Returns:
- This builder for chaining.
-
clearNames
Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Returns:
- This builder for chaining.
-
addNamesBytes
Ordered list of names (headers or query parameter names) that can supply this value; the first one with a non-empty value is used.
repeated string names = 2;- Parameters:
value- The bytes of the names to add.- Returns:
- This builder for chaining.
-
getRequiredMatch
public boolean getRequiredMatch()If true, make this extraction required; the key builder will not match if no value is found.
bool required_match = 3;- Specified by:
getRequiredMatchin interfaceNameMatcherOrBuilder- Returns:
- The requiredMatch.
-
setRequiredMatch
If true, make this extraction required; the key builder will not match if no value is found.
bool required_match = 3;- Parameters:
value- The requiredMatch to set.- Returns:
- This builder for chaining.
-
clearRequiredMatch
If true, make this extraction required; the key builder will not match if no value is found.
bool required_match = 3;- Returns:
- This builder for chaining.
-