Package com.github.xds.type.matcher.v3
Class CelMatcher.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- 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,java.lang.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 typexds.type.matcher.v3.CelMatcher
-
-
Field Summary
Fields Modifier and Type Field Description private intbitField0_private java.lang.Objectdescription_private CelExpressionexprMatch_private com.google.protobuf.SingleFieldBuilder<CelExpression,CelExpression.Builder,CelExpressionOrBuilder>exprMatchBuilder_
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CelMatcherbuild()CelMatcherbuildPartial()private voidbuildPartial0(CelMatcher result)CelMatcher.Builderclear()CelMatcher.BuilderclearDescription()Free-form description of the CEL AST, e.g.CelMatcher.BuilderclearExprMatch()Either parsed or checked representation of the CEL program.CelMatchergetDefaultInstanceForType()java.lang.StringgetDescription()Free-form description of the CEL AST, e.g.com.google.protobuf.ByteStringgetDescriptionBytes()Free-form description of the CEL AST, e.g.static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()CelExpressiongetExprMatch()Either parsed or checked representation of the CEL program.CelExpression.BuildergetExprMatchBuilder()Either parsed or checked representation of the CEL program.private com.google.protobuf.SingleFieldBuilder<CelExpression,CelExpression.Builder,CelExpressionOrBuilder>getExprMatchFieldBuilder()Either parsed or checked representation of the CEL program.CelExpressionOrBuildergetExprMatchOrBuilder()Either parsed or checked representation of the CEL program.booleanhasExprMatch()Either parsed or checked representation of the CEL program.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()private voidmaybeForceBuilderInitialization()CelMatcher.BuildermergeExprMatch(CelExpression value)Either parsed or checked representation of the CEL program.CelMatcher.BuildermergeFrom(CelMatcher other)CelMatcher.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)CelMatcher.BuildermergeFrom(com.google.protobuf.Message other)CelMatcher.BuildersetDescription(java.lang.String value)Free-form description of the CEL AST, e.g.CelMatcher.BuildersetDescriptionBytes(com.google.protobuf.ByteString value)Free-form description of the CEL AST, e.g.CelMatcher.BuildersetExprMatch(CelExpression value)Either parsed or checked representation of the CEL program.CelMatcher.BuildersetExprMatch(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
-
-
-
-
Field Detail
-
bitField0_
private int bitField0_
-
exprMatch_
private CelExpression exprMatch_
-
exprMatchBuilder_
private com.google.protobuf.SingleFieldBuilder<CelExpression,CelExpression.Builder,CelExpressionOrBuilder> exprMatchBuilder_
-
description_
private java.lang.Object description_
-
-
Method Detail
-
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<CelMatcher.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization()
-
clear
public CelMatcher.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<CelMatcher.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<CelMatcher.Builder>
-
getDefaultInstanceForType
public CelMatcher getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public CelMatcher build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public CelMatcher buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial0
private void buildPartial0(CelMatcher result)
-
mergeFrom
public CelMatcher.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CelMatcher.Builder>
-
mergeFrom
public CelMatcher.Builder mergeFrom(CelMatcher other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<CelMatcher.Builder>
-
mergeFrom
public CelMatcher.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CelMatcher.Builder>- Throws:
java.io.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:
hasExprMatchin interfaceCelMatcherOrBuilder- Returns:
- Whether the exprMatch field is set.
-
getExprMatch
public CelExpression getExprMatch()
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }- Specified by:
getExprMatchin interfaceCelMatcherOrBuilder- Returns:
- The exprMatch.
-
setExprMatch
public CelMatcher.Builder setExprMatch(CelExpression value)
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
setExprMatch
public CelMatcher.Builder setExprMatch(CelExpression.Builder builderForValue)
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
mergeExprMatch
public CelMatcher.Builder mergeExprMatch(CelExpression value)
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
clearExprMatch
public CelMatcher.Builder clearExprMatch()
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
getExprMatchBuilder
public CelExpression.Builder getExprMatchBuilder()
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
getExprMatchOrBuilder
public CelExpressionOrBuilder getExprMatchOrBuilder()
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }- Specified by:
getExprMatchOrBuilderin interfaceCelMatcherOrBuilder
-
getExprMatchFieldBuilder
private com.google.protobuf.SingleFieldBuilder<CelExpression,CelExpression.Builder,CelExpressionOrBuilder> getExprMatchFieldBuilder()
Either parsed or checked representation of the CEL program.
.xds.type.v3.CelExpression expr_match = 1 [(.validate.rules) = { ... }
-
getDescription
public java.lang.String 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:
getDescriptionin 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:
getDescriptionBytesin interfaceCelMatcherOrBuilder- Returns:
- The bytes for description.
-
setDescription
public CelMatcher.Builder setDescription(java.lang.String value)
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
public CelMatcher.Builder 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
public CelMatcher.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
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.
-
-