| 1 |
# Copyright 2025 Google LLC |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
name: "extended-env" |
| 16 |
container: "google.expr" |
| 17 |
extensions: |
| 18 |
- name: "optional" |
| 19 |
version: "2" |
| 20 |
- name: "math" |
| 21 |
version: "latest" |
| 22 |
variables: |
| 23 |
- name: "msg" |
| 24 |
type_name: "google.expr.proto3.test.TestAllTypes" |
| 25 |
description: >- |
| 26 |
msg represents all possible type permutation which |
| 27 |
CEL understands from a proto perspective |
| 28 |
functions: |
| 29 |
- name: "isEmpty" |
| 30 |
description: |- |
| 31 |
determines whether a list is empty, |
| 32 |
or a string has no characters |
| 33 |
overloads: |
| 34 |
- id: "wrapper_string_isEmpty" |
| 35 |
examples: |
| 36 |
- "''.isEmpty() // true" |
| 37 |
target: |
| 38 |
type_name: "google.protobuf.StringValue" |
| 39 |
return: |
| 40 |
type_name: "bool" |
| 41 |
- id: "list_isEmpty" |
| 42 |
examples: |
| 43 |
- "[].isEmpty() // true" |
| 44 |
- "[1].isEmpty() // false" |
| 45 |
target: |
| 46 |
type_name: "list" |
| 47 |
params: |
| 48 |
- type_name: "T" |
| 49 |
is_type_param: true |
| 50 |
return: |
| 51 |
type_name: "bool" |
| 52 |
validators: |
| 53 |
- name: cel.validator.duration |
| 54 |
- name: cel.validator.matches |
| 55 |
- name: cel.validator.timestamp |
| 56 |
- name: cel.validator.comprehension_nesting_limit |
| 57 |
config: |
| 58 |
limit: 2 |
| 59 |
features: |
| 60 |
- name: cel.feature.macro_call_tracking |
| 61 |
enabled: true |