MetadataMatcher

    MetadataMatcher provides a general interface to check if a given value is matched in Metadata. It uses filter and path to retrieve the value from the Metadata and then check if it’s matched to the specified value.

    For example, for the following Metadata:

    The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value “pro” from the Metadata which is matched to the specified prefix match.

    The following MetadataMatcher is matched as the code will match one of the string values in the list at the path [a, t].

    filter

    (, REQUIRED) The filter name to retrieve the Struct from the Metadata.

    path

    (type.matcher.MetadataMatcher.PathSegment, REQUIRED) The path to retrieve the Value from the Struct.

    (, REQUIRED) The MetadataMatcher is matched if the value retrieved by path is matched to this value.

    type.matcher.MetadataMatcher.PathSegment

    Specifies the segment in a path to retrieve value from Metadata. Note: Currently it’s not supported to retrieve a value from a list in Metadata. This means that if the segment key refers to a list, it has to be the last segment in a path.

    key

    Precisely one of key must be set.