public static final class Expr.Comprehension extends com.google.protobuf.GeneratedMessageV3 implements Expr.ComprehensionOrBuilder
A comprehension expression applied to a list or map.
Comprehensions are not part of the core syntax, but enabled with macros.
A macro matches a specific call signature within a parsed AST and replaces
the call with an alternate AST block. Macro expansion happens at parse
time.
The following macros are supported within CEL:
Aggregate type macros may be applied to all elements in a list or all keys
in a map:
* `all`, `exists`, `exists_one` - test a predicate expression against
the inputs and return `true` if the predicate is satisfied for all,
any, or only one value `list.all(x, x < 10)`.
* `filter` - test a predicate expression against the inputs and return
the subset of elements which satisfy the predicate:
`payments.filter(p, p > 1000)`.
* `map` - apply an expression to all elements in the input and return the
output aggregate type: `[1, 2, 3].map(i, i * i)`.
The `has(m.x)` macro tests whether the property `x` is present in struct
`m`. The semantics of this macro depend on the type of `m`. For proto2
messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the
macro tests whether the property is set to its default. For map and struct
types, the macro tests whether the property `x` is defined on `m`.
Protobuf type google.api.expr.v1alpha1.Expr.Comprehension| Modifier and Type | Class and Description |
|---|---|
static class |
Expr.Comprehension.Builder
A comprehension expression applied to a list or map.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
ACCU_INIT_FIELD_NUMBER |
static int |
ACCU_VAR_FIELD_NUMBER |
static int |
ITER_RANGE_FIELD_NUMBER |
static int |
ITER_VAR_FIELD_NUMBER |
static int |
LOOP_CONDITION_FIELD_NUMBER |
static int |
LOOP_STEP_FIELD_NUMBER |
static int |
RESULT_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Expr |
getAccuInit()
The initial value of the accumulator.
|
ExprOrBuilder |
getAccuInitOrBuilder()
The initial value of the accumulator.
|
String |
getAccuVar()
The name of the variable used for accumulation of the result.
|
com.google.protobuf.ByteString |
getAccuVarBytes()
The name of the variable used for accumulation of the result.
|
static Expr.Comprehension |
getDefaultInstance() |
Expr.Comprehension |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Expr |
getIterRange()
The range over which var iterates.
|
ExprOrBuilder |
getIterRangeOrBuilder()
The range over which var iterates.
|
String |
getIterVar()
The name of the iteration variable.
|
com.google.protobuf.ByteString |
getIterVarBytes()
The name of the iteration variable.
|
Expr |
getLoopCondition()
An expression which can contain iter_var and accu_var.
|
ExprOrBuilder |
getLoopConditionOrBuilder()
An expression which can contain iter_var and accu_var.
|
Expr |
getLoopStep()
An expression which can contain iter_var and accu_var.
|
ExprOrBuilder |
getLoopStepOrBuilder()
An expression which can contain iter_var and accu_var.
|
com.google.protobuf.Parser<Expr.Comprehension> |
getParserForType() |
Expr |
getResult()
An expression which can contain accu_var.
|
ExprOrBuilder |
getResultOrBuilder()
An expression which can contain accu_var.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasAccuInit()
The initial value of the accumulator.
|
int |
hashCode() |
boolean |
hasIterRange()
The range over which var iterates.
|
boolean |
hasLoopCondition()
An expression which can contain iter_var and accu_var.
|
boolean |
hasLoopStep()
An expression which can contain iter_var and accu_var.
|
boolean |
hasResult()
An expression which can contain accu_var.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Expr.Comprehension.Builder |
newBuilder() |
static Expr.Comprehension.Builder |
newBuilder(Expr.Comprehension prototype) |
Expr.Comprehension.Builder |
newBuilderForType() |
protected Expr.Comprehension.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Expr.Comprehension |
parseDelimitedFrom(InputStream input) |
static Expr.Comprehension |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Expr.Comprehension |
parseFrom(byte[] data) |
static Expr.Comprehension |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Expr.Comprehension |
parseFrom(ByteBuffer data) |
static Expr.Comprehension |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Expr.Comprehension |
parseFrom(com.google.protobuf.ByteString data) |
static Expr.Comprehension |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Expr.Comprehension |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Expr.Comprehension |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Expr.Comprehension |
parseFrom(InputStream input) |
static Expr.Comprehension |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Expr.Comprehension> |
parser() |
Expr.Comprehension.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int ITER_VAR_FIELD_NUMBER
public static final int ITER_RANGE_FIELD_NUMBER
public static final int ACCU_VAR_FIELD_NUMBER
public static final int ACCU_INIT_FIELD_NUMBER
public static final int LOOP_CONDITION_FIELD_NUMBER
public static final int LOOP_STEP_FIELD_NUMBER
public static final int RESULT_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getIterVar()
The name of the iteration variable.
string iter_var = 1;getIterVar in interface Expr.ComprehensionOrBuilderpublic com.google.protobuf.ByteString getIterVarBytes()
The name of the iteration variable.
string iter_var = 1;getIterVarBytes in interface Expr.ComprehensionOrBuilderpublic boolean hasIterRange()
The range over which var iterates.
.google.api.expr.v1alpha1.Expr iter_range = 2;hasIterRange in interface Expr.ComprehensionOrBuilderpublic Expr getIterRange()
The range over which var iterates.
.google.api.expr.v1alpha1.Expr iter_range = 2;getIterRange in interface Expr.ComprehensionOrBuilderpublic ExprOrBuilder getIterRangeOrBuilder()
The range over which var iterates.
.google.api.expr.v1alpha1.Expr iter_range = 2;getIterRangeOrBuilder in interface Expr.ComprehensionOrBuilderpublic String getAccuVar()
The name of the variable used for accumulation of the result.
string accu_var = 3;getAccuVar in interface Expr.ComprehensionOrBuilderpublic com.google.protobuf.ByteString getAccuVarBytes()
The name of the variable used for accumulation of the result.
string accu_var = 3;getAccuVarBytes in interface Expr.ComprehensionOrBuilderpublic boolean hasAccuInit()
The initial value of the accumulator.
.google.api.expr.v1alpha1.Expr accu_init = 4;hasAccuInit in interface Expr.ComprehensionOrBuilderpublic Expr getAccuInit()
The initial value of the accumulator.
.google.api.expr.v1alpha1.Expr accu_init = 4;getAccuInit in interface Expr.ComprehensionOrBuilderpublic ExprOrBuilder getAccuInitOrBuilder()
The initial value of the accumulator.
.google.api.expr.v1alpha1.Expr accu_init = 4;getAccuInitOrBuilder in interface Expr.ComprehensionOrBuilderpublic boolean hasLoopCondition()
An expression which can contain iter_var and accu_var. Returns false when the result has been computed and may be used as a hint to short-circuit the remainder of the comprehension.
.google.api.expr.v1alpha1.Expr loop_condition = 5;hasLoopCondition in interface Expr.ComprehensionOrBuilderpublic Expr getLoopCondition()
An expression which can contain iter_var and accu_var. Returns false when the result has been computed and may be used as a hint to short-circuit the remainder of the comprehension.
.google.api.expr.v1alpha1.Expr loop_condition = 5;getLoopCondition in interface Expr.ComprehensionOrBuilderpublic ExprOrBuilder getLoopConditionOrBuilder()
An expression which can contain iter_var and accu_var. Returns false when the result has been computed and may be used as a hint to short-circuit the remainder of the comprehension.
.google.api.expr.v1alpha1.Expr loop_condition = 5;getLoopConditionOrBuilder in interface Expr.ComprehensionOrBuilderpublic boolean hasLoopStep()
An expression which can contain iter_var and accu_var. Computes the next value of accu_var.
.google.api.expr.v1alpha1.Expr loop_step = 6;hasLoopStep in interface Expr.ComprehensionOrBuilderpublic Expr getLoopStep()
An expression which can contain iter_var and accu_var. Computes the next value of accu_var.
.google.api.expr.v1alpha1.Expr loop_step = 6;getLoopStep in interface Expr.ComprehensionOrBuilderpublic ExprOrBuilder getLoopStepOrBuilder()
An expression which can contain iter_var and accu_var. Computes the next value of accu_var.
.google.api.expr.v1alpha1.Expr loop_step = 6;getLoopStepOrBuilder in interface Expr.ComprehensionOrBuilderpublic boolean hasResult()
An expression which can contain accu_var. Computes the result.
.google.api.expr.v1alpha1.Expr result = 7;hasResult in interface Expr.ComprehensionOrBuilderpublic Expr getResult()
An expression which can contain accu_var. Computes the result.
.google.api.expr.v1alpha1.Expr result = 7;getResult in interface Expr.ComprehensionOrBuilderpublic ExprOrBuilder getResultOrBuilder()
An expression which can contain accu_var. Computes the result.
.google.api.expr.v1alpha1.Expr result = 7;getResultOrBuilder in interface Expr.ComprehensionOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Expr.Comprehension parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Expr.Comprehension parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Expr.Comprehension parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Expr.Comprehension parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Expr.Comprehension parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Expr.Comprehension parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Expr.Comprehension parseFrom(InputStream input) throws IOException
IOExceptionpublic static Expr.Comprehension parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Expr.Comprehension parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Expr.Comprehension parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Expr.Comprehension parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Expr.Comprehension parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Expr.Comprehension.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Expr.Comprehension.Builder newBuilder()
public static Expr.Comprehension.Builder newBuilder(Expr.Comprehension prototype)
public Expr.Comprehension.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Expr.Comprehension.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Expr.Comprehension getDefaultInstance()
public static com.google.protobuf.Parser<Expr.Comprehension> parser()
public com.google.protobuf.Parser<Expr.Comprehension> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Expr.Comprehension getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.