Class Comprehension

java.lang.Object
co.permify.sdk.model.Comprehension

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.14.0") public class Comprehension extends Object
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`.
  • Field Details

  • Constructor Details

    • Comprehension

      public Comprehension()
  • Method Details

    • iterVar

      public Comprehension iterVar(@Nullable String iterVar)
    • getIterVar

      @Nullable public String getIterVar()
      The name of the iteration variable.
      Returns:
      iterVar
    • setIterVar

      public void setIterVar(@Nullable String iterVar)
    • iterRange

      public Comprehension iterRange(@Nullable Object iterRange)
    • getIterRange

      @Nullable public Object getIterRange()
      An abstract representation of a common expression. Expressions are abstractly represented as a collection of identifiers, select statements, function calls, literals, and comprehensions. All operators with the exception of the '.' operator are modelled as function calls. This makes it easy to represent new operators into the existing AST. All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an expression to be valid. A reference may either be a bare identifier `name` or a qualified identifier `google.api.name`. References may either refer to a value or a function declaration. For example, the expression `google.api.name.startsWith('expr')` references the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the function declaration `startsWith`.
      Returns:
      iterRange
    • setIterRange

      public void setIterRange(@Nullable Object iterRange)
    • accuVar

      public Comprehension accuVar(@Nullable String accuVar)
    • getAccuVar

      @Nullable public String getAccuVar()
      The name of the variable used for accumulation of the result.
      Returns:
      accuVar
    • setAccuVar

      public void setAccuVar(@Nullable String accuVar)
    • accuInit

      public Comprehension accuInit(@Nullable Object accuInit)
    • getAccuInit

      @Nullable public Object getAccuInit()
      An abstract representation of a common expression. Expressions are abstractly represented as a collection of identifiers, select statements, function calls, literals, and comprehensions. All operators with the exception of the '.' operator are modelled as function calls. This makes it easy to represent new operators into the existing AST. All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an expression to be valid. A reference may either be a bare identifier `name` or a qualified identifier `google.api.name`. References may either refer to a value or a function declaration. For example, the expression `google.api.name.startsWith('expr')` references the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the function declaration `startsWith`.
      Returns:
      accuInit
    • setAccuInit

      public void setAccuInit(@Nullable Object accuInit)
    • loopCondition

      public Comprehension loopCondition(@Nullable Object loopCondition)
    • getLoopCondition

      @Nullable public Object getLoopCondition()
      An abstract representation of a common expression. Expressions are abstractly represented as a collection of identifiers, select statements, function calls, literals, and comprehensions. All operators with the exception of the '.' operator are modelled as function calls. This makes it easy to represent new operators into the existing AST. All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an expression to be valid. A reference may either be a bare identifier `name` or a qualified identifier `google.api.name`. References may either refer to a value or a function declaration. For example, the expression `google.api.name.startsWith('expr')` references the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the function declaration `startsWith`.
      Returns:
      loopCondition
    • setLoopCondition

      public void setLoopCondition(@Nullable Object loopCondition)
    • loopStep

      public Comprehension loopStep(@Nullable Object loopStep)
    • getLoopStep

      @Nullable public Object getLoopStep()
      An abstract representation of a common expression. Expressions are abstractly represented as a collection of identifiers, select statements, function calls, literals, and comprehensions. All operators with the exception of the '.' operator are modelled as function calls. This makes it easy to represent new operators into the existing AST. All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an expression to be valid. A reference may either be a bare identifier `name` or a qualified identifier `google.api.name`. References may either refer to a value or a function declaration. For example, the expression `google.api.name.startsWith('expr')` references the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the function declaration `startsWith`.
      Returns:
      loopStep
    • setLoopStep

      public void setLoopStep(@Nullable Object loopStep)
    • result

      public Comprehension result(@Nullable Object result)
    • getResult

      @Nullable public Object getResult()
      An abstract representation of a common expression. Expressions are abstractly represented as a collection of identifiers, select statements, function calls, literals, and comprehensions. All operators with the exception of the '.' operator are modelled as function calls. This makes it easy to represent new operators into the existing AST. All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an expression to be valid. A reference may either be a bare identifier `name` or a qualified identifier `google.api.name`. References may either refer to a value or a function declaration. For example, the expression `google.api.name.startsWith('expr')` references the declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the function declaration `startsWith`.
      Returns:
      result
    • setResult

      public void setResult(@Nullable Object result)
    • equals

      public boolean equals(Object o)
      Return true if this Comprehension object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toUrlQueryString

      public String toUrlQueryString()
      Convert the instance into URL query string.
      Returns:
      URL query string
    • toUrlQueryString

      public String toUrlQueryString(String prefix)
      Convert the instance into URL query string.
      Parameters:
      prefix - prefix of the query string
      Returns:
      URL query string