Class ProtoTypeMask


  • @Immutable
    public abstract class ProtoTypeMask
    extends java.lang.Object
    ProtoTypeMask describes the fraction of a protobuf type's object graph that should be visible within CEL expressions. The top-level fields of the type identified by the getTypeName() are treated as variable declarations.
    • Constructor Detail

      • ProtoTypeMask

        public ProtoTypeMask()
    • Method Detail

      • withFieldsAsVariableDeclarations

        public ProtoTypeMask withFieldsAsVariableDeclarations()
      • of

        public static ProtoTypeMask of​(java.lang.String typeName,
                                       FieldMask fieldMask)
        Construct a new ProtoTypeMask with a FieldMask indicating which fields should be visible to CEL expressions.

        All top-level fields from the combined set of paths in the field mask should be treated as variable identifiers bound to the protobuf field name and its associated field type.

        A FieldMask contains one or more paths which contain identifier characters that have been dot delimited, e.g.resource.name, request.auth.claims. Here are a few things to keep in mind:

        • All descendent fields after the last element in the field mask path are visible.
        • The asterisk '*' can be used as an explicit indicator that all descedent fields are visible to CEL.
        • Repeated fields are not supported.
      • ofAllFields

        public static ProtoTypeMask ofAllFields​(java.lang.String fullyQualifiedTypeName)
        Construct a new ProtoTypeMask which exposes all fields in the given typeName for use within CEL expressions.

        The typeName should be a fully-qualified path, e.g., "google.rpc.context.AttributeContext".

        All top-level fields in the given typeName should be treated as variable identifiers bound to the protobuf field name and the associated field type.