You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**items**|[**List<PermissionBulkCheckRequestItem>**](PermissionBulkCheckRequestItem.md)| List of permission check requests, maximum 100 items. |[optional]|
Copy file name to clipboardExpand all lines: docs/Comprehension.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,14 @@
2
2
3
3
# Comprehension
4
4
5
-
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`.
5
+
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`. Comprehensions for the standard environment macros evaluation can be best visualized as the following pseudocode: ``` let `accu_var` = `accu_init` for (let `iter_var` in `iter_range`) { if (!`loop_condition`) { break } `accu_var` = `loop_step` } return `result` ``` Comprehensions for the optional V2 macros which support map-to-map translation differ slightly from the standard environment macros in that they expose both the key or index in addition to the value for each list or map entry: ``` let `accu_var` = `accu_init` for (let `iter_var`, `iter_var2` in `iter_range`) { if (!`loop_condition`) { break } `accu_var` = `loop_step` } return `result` ```
|**iterVar**|**String**| The name of the iteration variable. |[optional]|
11
+
|**iterVar**|**String**| The name of the first iteration variable. When the iter_range is a list, this variable is the list element. When the iter_range is a map, this variable is the map entry key. |[optional]|
12
+
|**iterVar2**|**String**| The name of the second iteration variable, empty if not set. When the iter_range is a list, this variable is the integer index. When the iter_range is a map, this variable is the map entry value. This field is only set for comprehension v2 macros. |[optional]|
12
13
|**iterRange**|[**Expr**](Expr.md)||[optional]|
13
14
|**accuVar**|**String**| The name of the variable used for accumulation of the result. |[optional]|
|**affectedComponents**|**List<Component>**| If set, the listed components must understand the extension for the expression to evaluate correctly. This field has set semantics, repeated values should be deduplicated. |[optional]|
String tenantId ="tenantId_example"; // String | Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
49
+
BulkCheckBody body =newBulkCheckBody(); // BulkCheckBody |
50
+
try {
51
+
PermissionBulkCheckResponse result = apiInstance.permissionsBulkCheck(tenantId, body);
52
+
System.out.println(result);
53
+
} catch (ApiException e) {
54
+
System.err.println("Exception when calling PermissionApi#permissionsBulkCheck");
|**tenantId**|**String**| Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. ||
String tenantId ="tenantId_example"; // String | Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
118
+
BulkCheckBody body =newBulkCheckBody(); // BulkCheckBody |
|**tenantId**|**String**| Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. ||
|**results**|[**List<PermissionCheckResponse>**](PermissionCheckResponse.md)| List of permission check responses corresponding to each request. |[optional]|
Copy file name to clipboardExpand all lines: docs/SourceInfo.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ Source information collected at parse time.
13
13
|**lineOffsets**|**List<Integer>**| Monotonically increasing list of code point offsets where newlines `\\n` appear. The line number of a given position is the index `i` where for a given `id` the `line_offsets[i]< id_positions[id]< line_offsets[i+1]`. The column may be derivd from `id_positions[id] - line_offsets[i]`. |[optional]|
14
14
|**positions**|**Map<String, Integer>**| A map from the parse node id (e.g. `Expr.id`) to the code point offset within the source. |[optional]|
15
15
|**macroCalls**|[**Map<String, Expr>**](Expr.md)| A map from the parse node id where a macro replacement was made to the call `Expr` that resulted in a macro expansion. For example, `has(value.field)` is a function call that is replaced by a `test_only` field selection in the AST. Likewise, the call `list.exists(e, e > 10)` translates to a comprehension expression. The key in the map corresponds to the expression id of the expanded macro, and the value is the call `Expr` that was replaced. |[optional]|
16
+
|**extensions**|[**List<Extension>**](Extension.md)| A list of tags for extensions that were used while parsing or type checking the source expression. For example, optimizations that require special runtime support may be specified. These are used to check feature support between components in separate implementations. This can be used to either skip redundant work or report an error if the extension is unsupported. |[optional]|
|**major**|**String**| Major version changes indicate different required support level from the required components. |[optional]|
11
+
|**minor**|**String**| Minor version changes must not change the observed behavior from existing implementations, but may be provided informationally. |[optional]|
0 commit comments