{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-test-labs/json-schema/azure-test-labs-lab-fragment-schema.json",
  "title": "LabFragment",
  "description": "A lab.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-test-labs-labs-api-openapi.yml#/components/schemas/LabFragment",
  "allOf": [
    {
      "$ref": "#/$defs/UpdateResource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/LabPropertiesFragment",
      "description": "The properties of the resource.",
      "x-ms-client-flatten": true
    }
  },
  "type": "object",
  "$defs": {
    "LabAnnouncementPropertiesFragment": {
      "description": "Properties of a lab's announcement banner",
      "properties": {
        "enabled": {
          "description": "Is the lab announcement active/enabled at this time?",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "EnableStatus"
          }
        },
        "expirationDate": {
          "description": "The time at which the announcement expires (null for never)",
          "format": "date-time",
          "type": "string"
        },
        "expired": {
          "description": "Has this announcement expired?",
          "type": "boolean"
        },
        "markdown": {
          "description": "The markdown text (if any) that this lab displays in the UI. If left empty/null, nothing will be shown.",
          "type": "string"
        },
        "title": {
          "description": "The plain text title for the lab announcement",
          "type": "string"
        }
      },
      "type": "object"
    },
    "LabPropertiesFragment": {
      "description": "Properties of a lab.",
      "properties": {
        "announcement": {
          "$ref": "#/$defs/LabAnnouncementPropertiesFragment",
          "description": "The properties of any lab announcement associated with this lab"
        },
        "environmentPermission": {
          "description": "The access rights to be granted to the user when provisioning an environment",
          "enum": [
            "Reader",
            "Contributor"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "EnvironmentPermission"
          }
        },
        "extendedProperties": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Extended properties of the lab used for experimental features",
          "type": "object"
        },
        "labStorageType": {
          "description": "Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.",
          "enum": [
            "Standard",
            "Premium",
            "StandardSSD"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "StorageType"
          }
        },
        "mandatoryArtifactsResourceIdsLinux": {
          "description": "The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "mandatoryArtifactsResourceIdsWindows": {
          "description": "The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "premiumDataDisks": {
          "description": "The setting to enable usage of premium data disks.\nWhen its value is 'Enabled', creation of standard or premium data disks is allowed.\nWhen its value is 'Disabled', only creation of standard data disks is allowed.",
          "enum": [
            "Disabled",
            "Enabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "PremiumDataDisk"
          }
        },
        "support": {
          "$ref": "#/$defs/LabSupportPropertiesFragment",
          "description": "The properties of any lab support message associated with this lab"
        }
      },
      "type": "object"
    },
    "LabSupportPropertiesFragment": {
      "description": "Properties of a lab's support banner",
      "properties": {
        "enabled": {
          "description": "Is the lab support banner active/enabled at this time?",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "EnableStatus"
          }
        },
        "markdown": {
          "description": "The markdown text (if any) that this lab displays in the UI. If left empty/null, nothing will be shown.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "UpdateResource": {
      "description": "Represents an update resource",
      "properties": {
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags of the resource.",
          "type": "object"
        }
      },
      "type": "object"
    }
  }
}