{
  "type": "record",
  "Aspect": {
    "name": "constraintInfo"
  },
  "name": "ConstraintInfo",
  "namespace": "com.linkedin.pegasus2avro.constraint",
  "fields": [
    {
      "Searchable": {
        "fieldType": "KEYWORD"
      },
      "type": "string",
      "name": "displayName",
      "doc": "Display name of the constraint"
    },
    {
      "type": [
        "null",
        "string"
      ],
      "name": "description",
      "default": null,
      "doc": "Description of the Constraint"
    },
    {
      "type": "string",
      "name": "type",
      "doc": "The type of constraint"
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "DataHubResourceFilter",
          "namespace": "com.linkedin.pegasus2avro.policy",
          "fields": [
            {
              "deprecated": true,
              "type": [
                "null",
                "string"
              ],
              "name": "type",
              "default": null,
              "doc": "The type of resource that the policy applies to. This will most often be a data asset entity name, for\nexample 'dataset'. It is not strictly required because in the future we will want to support filtering a resource\nby domain, as well."
            },
            {
              "deprecated": true,
              "type": [
                "null",
                {
                  "type": "array",
                  "items": "string"
                }
              ],
              "name": "resources",
              "default": null,
              "doc": "A specific set of resources to apply the policy to, e.g. asset urns"
            },
            {
              "deprecated": true,
              "type": "boolean",
              "name": "allResources",
              "default": false,
              "doc": "Whether the policy should be applied to all assets matching the filter."
            },
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "PolicyMatchFilter",
                  "namespace": "com.linkedin.pegasus2avro.policy",
                  "fields": [
                    {
                      "type": {
                        "type": "array",
                        "items": {
                          "type": "record",
                          "name": "PolicyMatchCriterion",
                          "namespace": "com.linkedin.pegasus2avro.policy",
                          "fields": [
                            {
                              "type": "string",
                              "name": "field",
                              "doc": "The name of the field that the criterion refers to"
                            },
                            {
                              "type": {
                                "type": "array",
                                "items": "string"
                              },
                              "name": "values",
                              "doc": "Values. Matches criterion if any one of the values matches condition (OR-relationship)"
                            },
                            {
                              "type": {
                                "type": "enum",
                                "symbolDocs": {
                                  "EQUALS": "Whether the field matches the value",
                                  "NOT_EQUALS": "Whether the field does not match the value",
                                  "STARTS_WITH": "Whether the field value starts with the value"
                                },
                                "name": "PolicyMatchCondition",
                                "namespace": "com.linkedin.pegasus2avro.policy",
                                "symbols": [
                                  "EQUALS",
                                  "STARTS_WITH",
                                  "NOT_EQUALS"
                                ],
                                "doc": "The matching condition in a filter criterion"
                              },
                              "name": "condition",
                              "default": "EQUALS",
                              "doc": "The condition for the criterion"
                            }
                          ],
                          "doc": "A criterion for matching a field with given value"
                        }
                      },
                      "name": "criteria",
                      "doc": "A list of criteria to apply conjunctively (so all criteria must pass)"
                    }
                  ],
                  "doc": "The filter for specifying the resource or actor to apply privileges to"
                }
              ],
              "name": "filter",
              "default": null,
              "doc": "Filter to apply privileges to"
            },
            {
              "type": [
                "null",
                "com.linkedin.pegasus2avro.policy.PolicyMatchFilter"
              ],
              "name": "privilegeConstraints",
              "default": null,
              "doc": "Constraints around what sub-resources operations are allowed to modify, i.e. NOT_EQUALS - cannot modify a particular defined tag, EQUALS - can only modify a particular defined tag, STARTS_WITH - can only modify a tag starting with xyz"
            }
          ],
          "doc": "Information used to filter DataHub resource."
        }
      ],
      "name": "resources",
      "default": null,
      "doc": "The resource that the policy applies to. Not required for some 'Platform' privileges."
    },
    {
      "type": [
        "null",
        {
          "type": "record",
          "name": "ConstraintParams",
          "namespace": "com.linkedin.pegasus2avro.constraint",
          "fields": [
            {
              "type": [
                "null",
                {
                  "type": "record",
                  "name": "GlossaryTermInNodeConstraint",
                  "namespace": "com.linkedin.pegasus2avro.constraint",
                  "fields": [
                    {
                      "java": {
                        "class": "com.linkedin.pegasus2avro.common.urn.Urn"
                      },
                      "type": "string",
                      "name": "glossaryNode",
                      "doc": "The glossary node which the constrained entities must have attached to them",
                      "Urn": "Urn"
                    }
                  ]
                }
              ],
              "name": "hasGlossaryTermInNodeParams",
              "default": null,
              "doc": "An optional set of information specific to glossary node constraints."
            }
          ],
          "doc": "Params provided for a specific instance of a constraint."
        }
      ],
      "name": "params",
      "default": null,
      "doc": "Parameters specific for a particular Constraint type"
    }
  ],
  "doc": "Information about a constraint."
}