{
  "type": "record",
  "name": "Filter",
  "namespace": "com.linkedin.pegasus2avro.metadata.query.filter",
  "fields": [
    {
      "type": [
        "null",
        {
          "type": "array",
          "items": {
            "type": "record",
            "name": "ConjunctiveCriterion",
            "namespace": "com.linkedin.pegasus2avro.metadata.query.filter",
            "fields": [
              {
                "type": {
                  "type": "array",
                  "items": {
                    "type": "record",
                    "name": "Criterion",
                    "namespace": "com.linkedin.pegasus2avro.metadata.query.filter",
                    "fields": [
                      {
                        "type": "string",
                        "name": "field",
                        "doc": "The name of the field that the criterion refers to"
                      },
                      {
                        "type": {
                          "type": "array",
                          "items": "string"
                        },
                        "name": "values",
                        "default": [],
                        "doc": "Values to match against the field (one match suffices unless otherwise documented)."
                      },
                      {
                        "type": {
                          "type": "enum",
                          "symbolDocs": {
                            "ANCESTORS_INCL": "Represent the relation: URN field matches any nested parent in addition to the given URN",
                            "BETWEEN": "Represent the relation within an inclusive range, e.g. 3 <= ownerCount <= 5. Note that the values in Criterion must have two entries for a lower and upper bound.",
                            "CONTAIN": "Represent the relation: String field contains value, e.g. name contains Profile",
                            "DESCENDANTS_INCL": "Represent the relation: URN field any nested children in addition to the given URN",
                            "END_WITH": "Represent the relation: String field ends with value, e.g. name ends with Event",
                            "EQUAL": "Represent the relation: field = value, e.g. platform = hdfs",
                            "EXISTS": "Represents the relation: field exists and is non-empty, e.g. owners is not null and != [] (empty)",
                            "GREATER_THAN": "Represent the relation greater than, e.g. ownerCount > 5",
                            "GREATER_THAN_OR_EQUAL_TO": "Represent the relation greater than or equal to, e.g. ownerCount >= 5",
                            "IEQUAL": "Represent the relation: field = value and support case insensitive values, e.g. platform = hdfs",
                            "IN": "Represent the relation: String field is one of the array values to, e.g. name in [\"Profile\", \"Event\"]",
                            "IS_NULL": "Represent the relation: field is null, e.g. platform is null",
                            "LESS_THAN": "Represent the relation less than, e.g. ownerCount < 3",
                            "LESS_THAN_OR_EQUAL_TO": "Represent the relation less than or equal to, e.g. ownerCount <= 3",
                            "RELATED_INCL": "Represent the relation: URN field matches any nested child or parent in addition to the given URN",
                            "START_WITH": "Represent the relation: String field starts with value, e.g. name starts with PageView"
                          },
                          "name": "Condition",
                          "namespace": "com.linkedin.pegasus2avro.metadata.query.filter",
                          "symbols": [
                            "CONTAIN",
                            "END_WITH",
                            "EQUAL",
                            "IEQUAL",
                            "IS_NULL",
                            "EXISTS",
                            "GREATER_THAN",
                            "GREATER_THAN_OR_EQUAL_TO",
                            "IN",
                            "LESS_THAN",
                            "LESS_THAN_OR_EQUAL_TO",
                            "BETWEEN",
                            "START_WITH",
                            "DESCENDANTS_INCL",
                            "ANCESTORS_INCL",
                            "RELATED_INCL"
                          ],
                          "doc": "The matching condition in a filter criterion"
                        },
                        "name": "condition",
                        "default": "EQUAL",
                        "doc": "The condition for the criterion, e.g. EQUAL, START_WITH"
                      },
                      {
                        "type": "boolean",
                        "name": "negated",
                        "default": false,
                        "doc": "Whether the condition should be negated"
                      }
                    ],
                    "doc": "A criterion for matching a field with given values"
                  }
                },
                "name": "and",
                "doc": "A list of and criteria the filter applies to the query"
              }
            ],
            "doc": "A list of criterion and'd together."
          }
        }
      ],
      "name": "or",
      "default": null,
      "doc": "A list of disjunctive criterion for the filter. (or operation to combine filters)"
    },
    {
      "type": [
        "null",
        {
          "type": "array",
          "items": "com.linkedin.pegasus2avro.metadata.query.filter.Criterion"
        }
      ],
      "name": "criteria",
      "default": null,
      "doc": "Deprecated! A list of conjunctive criterion for the filter. If \"or\" field is provided, then this field is ignored."
    }
  ],
  "doc": "The filter for finding a record or a collection of records"
}