Package com.github.xds.type.matcher.v3
Class CelMatcher.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<CelMatcher.Builder>
com.google.protobuf.GeneratedMessage.Builder<CelMatcher.Builder>
com.github.xds.type.matcher.v3.CelMatcher.Builder
- All Implemented Interfaces:
CelMatcherOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
CelMatcher
public static final class CelMatcher.Builder
extends com.google.protobuf.GeneratedMessage.Builder<CelMatcher.Builder>
implements CelMatcherOrBuilder
Performs a match by evaluating a `Common Expression Language <https://github.com/google/cel-spec>`_ (CEL) expression against the standardized set of :ref:`HTTP attributes <arch_overview_attributes>` specified via ``HttpAttributesCelMatchInput``. .. attention:: The match is ``true``, iff the result of the evaluation is a bool AND true. In all other cases, the match is ``false``, including but not limited to: non-bool types, ``false``, ``null``,`` int(1)``, etc. In case CEL expression raises an error, the result of the evaluation is interpreted "no match". Refer to :ref:`Unified Matcher API <envoy_v3_api_msg_.xds.type.matcher.v3.Matcher>` documentation for usage details. [#comment:TODO(sergiitk): Link HttpAttributesMatchInput + usage example.] [#comment:TODO(sergiitk): When implemented, add the extension tag.]Protobuf type
xds.type.matcher.v3.CelMatcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private Object
private CelExpression
private com.google.protobuf.SingleFieldBuilder
<CelExpression, CelExpression.Builder, CelExpressionOrBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
private void
buildPartial0
(CelMatcher result) clear()
Free-form description of the CEL AST, e.g.Either parsed or checked representation of the CEL program.Free-form description of the CEL AST, e.g.com.google.protobuf.ByteString
Free-form description of the CEL AST, e.g.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
Either parsed or checked representation of the CEL program.Either parsed or checked representation of the CEL program.private com.google.protobuf.SingleFieldBuilder
<CelExpression, CelExpression.Builder, CelExpressionOrBuilder> Either parsed or checked representation of the CEL program.Either parsed or checked representation of the CEL program.boolean
Either parsed or checked representation of the CEL program.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
private void
mergeExprMatch
(CelExpression value) Either parsed or checked representation of the CEL program.mergeFrom
(CelMatcher other) mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) setDescription
(String value) Free-form description of the CEL AST, e.g.setDescriptionBytes
(com.google.protobuf.ByteString value) Free-form description of the CEL AST, e.g.setExprMatch
(CelExpression value) Either parsed or checked representation of the CEL program.setExprMatch
(CelExpression.Builder builderForValue) Either parsed or checked representation of the CEL program.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
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
bitField0_
private int bitField0_ -
exprMatch_
-
exprMatchBuilder_
private com.google.protobuf.SingleFieldBuilder<CelExpression,CelExpression.Builder, exprMatchBuilder_CelExpressionOrBuilder> -
description_
-
-
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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<CelMatcher.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization() -
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<CelMatcher.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<CelMatcher.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<CelMatcher.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<CelMatcher.Builder>
-
mergeFrom
public CelMatcher.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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<CelMatcher.Builder>
- Throws:
IOException
-
hasExprMatch
public boolean hasExprMatch()Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
- Specified by:
hasExprMatch
in interfaceCelMatcherOrBuilder
- Returns:
- Whether the exprMatch field is set.
-
getExprMatch
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
- Specified by:
getExprMatch
in interfaceCelMatcherOrBuilder
- Returns:
- The exprMatch.
-
setExprMatch
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
setExprMatch
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
mergeExprMatch
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
clearExprMatch
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
getExprMatchBuilder
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
getExprMatchOrBuilder
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
- Specified by:
getExprMatchOrBuilder
in interfaceCelMatcherOrBuilder
-
getExprMatchFieldBuilder
private com.google.protobuf.SingleFieldBuilder<CelExpression,CelExpression.Builder, getExprMatchFieldBuilder()CelExpressionOrBuilder> Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
getDescription
Free-form description of the CEL AST, e.g. the original expression text, to be used for debugging assistance.
string description = 2;
- Specified by:
getDescription
in interfaceCelMatcherOrBuilder
- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()Free-form description of the CEL AST, e.g. the original expression text, to be used for debugging assistance.
string description = 2;
- Specified by:
getDescriptionBytes
in interfaceCelMatcherOrBuilder
- Returns:
- The bytes for description.
-
setDescription
Free-form description of the CEL AST, e.g. the original expression text, to be used for debugging assistance.
string description = 2;
- Parameters:
value
- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
Free-form description of the CEL AST, e.g. the original expression text, to be used for debugging assistance.
string description = 2;
- Returns:
- This builder for chaining.
-
setDescriptionBytes
Free-form description of the CEL AST, e.g. the original expression text, to be used for debugging assistance.
string description = 2;
- Parameters:
value
- The bytes for description to set.- Returns:
- This builder for chaining.
-