Package com.google.api.expr.v1alpha1
Class Expr.Comprehension
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.api.expr.v1alpha1.Expr.Comprehension
- All Implemented Interfaces:
Expr.ComprehensionOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
- Enclosing class:
Expr
public static final class Expr.Comprehension
extends com.google.protobuf.GeneratedMessage
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
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A comprehension expression applied to a list or map.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,
BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParent
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
private Expr
private Object
private int
private static final Expr.Comprehension
static final int
static final int
private Expr
private Object
static final int
static final int
private Expr
private Expr
private byte
private static final com.google.protobuf.Parser
<Expr.Comprehension> private Expr
static final int
private static final long
Fields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
private
Comprehension
(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionboolean
The initial value of the accumulator.The initial value of the accumulator.The name of the variable used for accumulation of the result.com.google.protobuf.ByteString
The name of the variable used for accumulation of the result.static Expr.Comprehension
static final com.google.protobuf.Descriptors.Descriptor
The range over which var iterates.The range over which var iterates.The name of the iteration variable.com.google.protobuf.ByteString
The name of the iteration variable.An expression which can contain iter_var and accu_var.An expression which can contain iter_var and accu_var.An expression which can contain iter_var and accu_var.An expression which can contain iter_var and accu_var.com.google.protobuf.Parser
<Expr.Comprehension> An expression which can contain accu_var.An expression which can contain accu_var.int
boolean
The initial value of the accumulator.int
hashCode()
boolean
The range over which var iterates.boolean
An expression which can contain iter_var and accu_var.boolean
An expression which can contain iter_var and accu_var.boolean
An expression which can contain accu_var.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
static Expr.Comprehension.Builder
static Expr.Comprehension.Builder
newBuilder
(Expr.Comprehension prototype) protected Expr.Comprehension.Builder
newBuilderForType
(com.google.protobuf.AbstractMessage.BuilderParent parent) 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
(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 Expr.Comprehension
parseFrom
(ByteBuffer data) static Expr.Comprehension
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser
<Expr.Comprehension> parser()
void
writeTo
(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
bitField0_
private int bitField0_ -
ITER_VAR_FIELD_NUMBER
public static final int ITER_VAR_FIELD_NUMBER- See Also:
-
iterVar_
-
ITER_RANGE_FIELD_NUMBER
public static final int ITER_RANGE_FIELD_NUMBER- See Also:
-
iterRange_
-
ACCU_VAR_FIELD_NUMBER
public static final int ACCU_VAR_FIELD_NUMBER- See Also:
-
accuVar_
-
ACCU_INIT_FIELD_NUMBER
public static final int ACCU_INIT_FIELD_NUMBER- See Also:
-
accuInit_
-
LOOP_CONDITION_FIELD_NUMBER
public static final int LOOP_CONDITION_FIELD_NUMBER- See Also:
-
loopCondition_
-
LOOP_STEP_FIELD_NUMBER
public static final int LOOP_STEP_FIELD_NUMBER- See Also:
-
loopStep_
-
RESULT_FIELD_NUMBER
public static final int RESULT_FIELD_NUMBER- See Also:
-
result_
-
memoizedIsInitialized
private byte memoizedIsInitialized -
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
Comprehension
private Comprehension(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
Comprehension
private Comprehension()
-
-
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
-
getIterVar
The name of the iteration variable.
string iter_var = 1;
- Specified by:
getIterVar
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The iterVar.
-
getIterVarBytes
public com.google.protobuf.ByteString getIterVarBytes()The name of the iteration variable.
string iter_var = 1;
- Specified by:
getIterVarBytes
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The bytes for iterVar.
-
hasIterRange
public boolean hasIterRange()The range over which var iterates.
.google.api.expr.v1alpha1.Expr iter_range = 2;
- Specified by:
hasIterRange
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- Whether the iterRange field is set.
-
getIterRange
The range over which var iterates.
.google.api.expr.v1alpha1.Expr iter_range = 2;
- Specified by:
getIterRange
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The iterRange.
-
getIterRangeOrBuilder
The range over which var iterates.
.google.api.expr.v1alpha1.Expr iter_range = 2;
- Specified by:
getIterRangeOrBuilder
in interfaceExpr.ComprehensionOrBuilder
-
getAccuVar
The name of the variable used for accumulation of the result.
string accu_var = 3;
- Specified by:
getAccuVar
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The accuVar.
-
getAccuVarBytes
public com.google.protobuf.ByteString getAccuVarBytes()The name of the variable used for accumulation of the result.
string accu_var = 3;
- Specified by:
getAccuVarBytes
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The bytes for accuVar.
-
hasAccuInit
public boolean hasAccuInit()The initial value of the accumulator.
.google.api.expr.v1alpha1.Expr accu_init = 4;
- Specified by:
hasAccuInit
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- Whether the accuInit field is set.
-
getAccuInit
The initial value of the accumulator.
.google.api.expr.v1alpha1.Expr accu_init = 4;
- Specified by:
getAccuInit
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The accuInit.
-
getAccuInitOrBuilder
The initial value of the accumulator.
.google.api.expr.v1alpha1.Expr accu_init = 4;
- Specified by:
getAccuInitOrBuilder
in interfaceExpr.ComprehensionOrBuilder
-
hasLoopCondition
public 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;
- Specified by:
hasLoopCondition
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- Whether the loopCondition field is set.
-
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;
- Specified by:
getLoopCondition
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The loopCondition.
-
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;
- Specified by:
getLoopConditionOrBuilder
in interfaceExpr.ComprehensionOrBuilder
-
hasLoopStep
public 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;
- Specified by:
hasLoopStep
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- Whether the loopStep field is set.
-
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;
- Specified by:
getLoopStep
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The loopStep.
-
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;
- Specified by:
getLoopStepOrBuilder
in interfaceExpr.ComprehensionOrBuilder
-
hasResult
public boolean hasResult()An expression which can contain accu_var. Computes the result.
.google.api.expr.v1alpha1.Expr result = 7;
- Specified by:
hasResult
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- Whether the result field is set.
-
getResult
An expression which can contain accu_var. Computes the result.
.google.api.expr.v1alpha1.Expr result = 7;
- Specified by:
getResult
in interfaceExpr.ComprehensionOrBuilder
- Returns:
- The result.
-
getResultOrBuilder
An expression which can contain accu_var. Computes the result.
.google.api.expr.v1alpha1.Expr result = 7;
- Specified by:
getResultOrBuilder
in interfaceExpr.ComprehensionOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Expr.Comprehension parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr.Comprehension parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr.Comprehension parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr.Comprehension parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr.Comprehension parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Expr.Comprehension parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Expr.Comprehension parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Expr.Comprehension parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Expr.Comprehension parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Expr.Comprehension parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Expr.Comprehension.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForType
in classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-