{
  "type": "record",
  "name": "DataHubPolicyInfo",
  "namespace": "com.linkedin.pegasus2avro.policy",
  "doc": "Information about a DataHub (UI) access policy.",
  "fields": [
    {
      "name": "displayName",
      "type": "string",
      "doc": "Display name of the Policy"
    },
    {
      "name": "description",
      "type": "string",
      "doc": "Description of the Policy"
    },
    {
      "name": "type",
      "type": "string",
      "doc": "The type of policy"
    },
    {
      "name": "state",
      "type": "string",
      "doc": "The state of policy, ACTIVE or INACTIVE"
    },
    {
      "name": "resources",
      "type": [
        "null",
        {
          "type": "record",
          "name": "DataHubResourceFilter",
          "doc": "Information used to filter DataHub resource.",
          "fields": [
            {
              "name": "type",
              "type": [
                "null",
                "string"
              ],
              "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.",
              "default": null
            },
            {
              "name": "resources",
              "type": [
                "null",
                {
                  "type": "array",
                  "items": "string"
                }
              ],
              "doc": "A specific set of resources to apply the policy to, e.g. asset urns",
              "default": null
            },
            {
              "name": "allResources",
              "type": "boolean",
              "doc": "Whether the policy should be applied to all assets matching the filter.",
              "default": false
            }
          ]
        }
      ],
      "doc": "The resource that the policy applies to. Not required for some 'Platform' privileges.",
      "default": null
    },
    {
      "name": "privileges",
      "type": {
        "type": "array",
        "items": "string"
      },
      "doc": "The privileges that the policy grants."
    },
    {
      "name": "actors",
      "type": {
        "type": "record",
        "name": "DataHubActorFilter",
        "doc": "Information used to filter DataHub actors.",
        "fields": [
          {
            "name": "users",
            "type": [
              "null",
              {
                "type": "array",
                "items": "string"
              }
            ],
            "doc": "A specific set of users to apply the policy to (disjunctive)",
            "default": null
          },
          {
            "name": "groups",
            "type": [
              "null",
              {
                "type": "array",
                "items": "string"
              }
            ],
            "doc": "A specific set of groups to apply the policy to (disjunctive)",
            "default": null
          },
          {
            "name": "resourceOwners",
            "type": "boolean",
            "doc": "Whether the filter should return true for owners of a particular resource.\nOnly applies to policies of type 'Metadata', which have a resource associated with them.",
            "default": false
          },
          {
            "name": "allUsers",
            "type": "boolean",
            "doc": "Whether the filter should apply to all users.",
            "default": false
          },
          {
            "name": "allGroups",
            "type": "boolean",
            "doc": "Whether the filter should apply to all groups.",
            "default": false
          }
        ]
      },
      "doc": "The actors that the policy applies to."
    },
    {
      "name": "editable",
      "type": "boolean",
      "doc": "Whether the policy should be editable via the UI",
      "default": true
    }
  ],
  "Aspect": {
    "name": "dataHubPolicyInfo"
  }
}