Package io.grpc.lookup.v1
Class NameMatcher.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- 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
,java.lang.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 typegrpc.lookup.v1.NameMatcher
-
-
Field Summary
Fields Modifier and Type Field Description private int
bitField0_
private java.lang.Object
key_
private com.google.protobuf.LazyStringArrayList
names_
private boolean
requiredMatch_
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NameMatcher.Builder
addAllNames(java.lang.Iterable<java.lang.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.NameMatcher.Builder
addNames(java.lang.String 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.NameMatcher.Builder
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.NameMatcher
build()
NameMatcher
buildPartial()
private void
buildPartial0(NameMatcher result)
NameMatcher.Builder
clear()
NameMatcher.Builder
clearKey()
The name that will be used in the RLS key_map to refer to this value.NameMatcher.Builder
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.NameMatcher.Builder
clearRequiredMatch()
If true, make this extraction required; the key builder will not match if no value is found.private void
ensureNamesIsMutable()
NameMatcher
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
java.lang.String
getKey()
The name that will be used in the RLS key_map to refer to this value.com.google.protobuf.ByteString
getKeyBytes()
The name that will be used in the RLS key_map to refer to this value.java.lang.String
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.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.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.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.boolean
getRequiredMatch()
If true, make this extraction required; the key builder will not match if no value is found.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
NameMatcher.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
NameMatcher.Builder
mergeFrom(com.google.protobuf.Message other)
NameMatcher.Builder
mergeFrom(NameMatcher other)
NameMatcher.Builder
setKey(java.lang.String value)
The name that will be used in the RLS key_map to refer to this value.NameMatcher.Builder
setKeyBytes(com.google.protobuf.ByteString value)
The name that will be used in the RLS key_map to refer to this value.NameMatcher.Builder
setNames(int index, java.lang.String 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.NameMatcher.Builder
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, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<NameMatcher.Builder>
-
clear
public NameMatcher.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<NameMatcher.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<NameMatcher.Builder>
-
getDefaultInstanceForType
public NameMatcher getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public NameMatcher build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public NameMatcher buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial0
private void buildPartial0(NameMatcher result)
-
mergeFrom
public NameMatcher.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<NameMatcher.Builder>
-
mergeFrom
public NameMatcher.Builder mergeFrom(NameMatcher other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<NameMatcher.Builder>
-
mergeFrom
public NameMatcher.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<NameMatcher.Builder>
- Throws:
java.io.IOException
-
getKey
public java.lang.String 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:
getKey
in 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:
getKeyBytes
in interfaceNameMatcherOrBuilder
- Returns:
- The bytes for key.
-
setKey
public NameMatcher.Builder setKey(java.lang.String value)
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
public NameMatcher.Builder 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
public NameMatcher.Builder setKeyBytes(com.google.protobuf.ByteString value)
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:
getNamesList
in 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:
getNamesCount
in interfaceNameMatcherOrBuilder
- Returns:
- The count of names.
-
getNames
public java.lang.String 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.
repeated string names = 2;
- Specified by:
getNames
in 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:
getNamesBytes
in interfaceNameMatcherOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the names at the given index.
-
setNames
public NameMatcher.Builder setNames(int index, java.lang.String 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.
repeated string names = 2;
- Parameters:
index
- The index to set the value at.value
- The names to set.- Returns:
- This builder for chaining.
-
addNames
public NameMatcher.Builder addNames(java.lang.String 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.
repeated string names = 2;
- Parameters:
value
- The names to add.- Returns:
- This builder for chaining.
-
addAllNames
public NameMatcher.Builder addAllNames(java.lang.Iterable<java.lang.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.
repeated string names = 2;
- Parameters:
values
- The names to add.- Returns:
- This builder for chaining.
-
clearNames
public NameMatcher.Builder 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
public NameMatcher.Builder 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.
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:
getRequiredMatch
in interfaceNameMatcherOrBuilder
- Returns:
- The requiredMatch.
-
setRequiredMatch
public NameMatcher.Builder setRequiredMatch(boolean value)
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
public NameMatcher.Builder 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.
-
-