{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-test-labs/json-schema/azure-test-labs-policy-list-schema.json",
  "title": "PolicyList",
  "description": "The response of a list operation.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-test-labs-policies-api-openapi.yml#/components/schemas/PolicyList",
  "properties": {
    "nextLink": {
      "description": "Link for next set of results.",
      "type": "string"
    },
    "value": {
      "description": "Results of the list operation.",
      "items": {
        "$ref": "#/$defs/Policy"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "Policy": {
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ],
      "description": "A Policy.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/PolicyProperties",
          "description": "The properties of the resource.",
          "x-ms-client-flatten": true
        }
      },
      "required": [
        "properties"
      ],
      "type": "object"
    },
    "PolicyProperties": {
      "description": "Properties of a Policy.",
      "properties": {
        "createdDate": {
          "description": "The creation date of the policy.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "description": {
          "description": "The description of the policy.",
          "type": "string"
        },
        "evaluatorType": {
          "description": "The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).",
          "enum": [
            "AllowedValuesPolicy",
            "MaxValuePolicy"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "PolicyEvaluatorType"
          }
        },
        "factData": {
          "description": "The fact data of the policy.",
          "type": "string"
        },
        "factName": {
          "description": "The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.",
          "enum": [
            "UserOwnedLabVmCount",
            "UserOwnedLabPremiumVmCount",
            "LabVmCount",
            "LabPremiumVmCount",
            "LabVmSize",
            "GalleryImage",
            "UserOwnedLabVmCountInSubnet",
            "LabTargetCost",
            "EnvironmentTemplate",
            "ScheduleEditPermission"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "PolicyFactName"
          }
        },
        "provisioningState": {
          "description": "The provisioning status of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "status": {
          "description": "The status of the policy.",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "PolicyStatus"
          }
        },
        "threshold": {
          "description": "The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).",
          "type": "string"
        },
        "uniqueIdentifier": {
          "description": "The unique immutable identifier of a resource (Guid).",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "Resource": {
      "description": "An Azure resource.",
      "properties": {
        "id": {
          "description": "The identifier of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "The location of the resource.",
          "type": "string"
        },
        "name": {
          "description": "The name of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags of the resource.",
          "type": "object"
        },
        "type": {
          "description": "The type of the resource.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object",
      "x-ms-azure-resource": true
    }
  }
}